boundlab.prop#
Bound Propagation for Concretizing Expressions
This module provides functions for computing concrete upper and lower bounds from symbolic expressions through backward-mode propagation.
Examples
>>> import torch
>>> import boundlab.expr as expr
>>> import boundlab.prop as prop
>>> x = expr.ConstVal(torch.tensor([1.0, -1.0])) + expr.LpEpsilon([2])
>>> ub = prop.ub(x)
>>> lb = prop.lb(x)
>>> ub.shape, lb.shape
(torch.Size([2]), torch.Size([2]))
Functions
Compute an upper bound via backward bound propagation. |
|
Compute a lower bound via backward bound propagation. |
|
Compute both upper and lower bounds for the given expression. |
|
Compute the midpoint of the concretized interval. |
|
Compute interval width from concretized bounds. |
|
Compute the maximum interval width over all output dimensions. |
|
Compute interval width breakdown by reason. |
|
Work like ublb but stops when == propagation is no longer possible, returning an expression. |