boundlab.diff.expr.DiffExpr3#

class boundlab.diff.expr.DiffExpr3[source]#

Bases: object

A triple (x, y, diff) for differential zonotope verification.

x and y track each network’s activations independently. diff over-approximates f₁(x) f₂(y).

For affine operations f(z) = W z + b:
  • x and y receive both weight and bias.

  • diff receives only the weight (bias cancels: (Wx+b)−(Wy+b) = W(x−y)).

For pure-linear operations (no bias), all three components are updated identically.

Methods

x: Expr#
y: Expr#
diff: Expr#
property shape: torch.Size#
__add__(other)[source]#
__mul__(other)[source]#
scatter(indices, output_shape)[source]#
gather(indices)[source]#
reshape(*shape)[source]#
permute(*dims)[source]#
transpose(dim0, dim1)[source]#
flatten(start_dim=0, end_dim=-1)[source]#
unflatten(dim, sizes)[source]#
squeeze(dim=None)[source]#
unsqueeze(dim)[source]#
narrow(dim, start, length)[source]#
expand(*sizes)[source]#
repeat(*sizes)[source]#
tile(*sizes)[source]#
flip(dims)[source]#
roll(shifts, dims)[source]#
diag(diagonal=0)[source]#
__init__(x, y, diff)#