boundlab.zono.reciprocal_linearizer#

boundlab.zono.reciprocal_linearizer(ub, lb)[source]#

Minimal-area reciprocal relaxation with positive-output constraint.

Matches DeepT (Bonaert et al., 2021, Section 4.6) with the y_positive_constraint that prevents bound explosion when the input lower bound is near zero (as happens inside softmax when sum(exp(x_j - x_i)) has a loose lower bound).

The key change from the naive relaxation: the tangent point is clamped to t_opt >= ub/2 + 0.01, ensuring the reciprocal output remains strictly positive and the relaxation stays tight.