boundlab.prop.input_attribution#

boundlab.prop.input_attribution(e, target)[source]#

Exact linear sensitivity of e to target’s symbols.

Returns J with shape (*e.shape, *target.shape): the accumulated linear weight of target in the affine DAG rooted at e. This is exact because post-interpretation DAGs are affine over LpEpsilon leaves (every nonlinearity has been replaced by a linear relaxation), so the contribution of target to e is a single linear map J with e = J · target + (terms in other symbols).

target is typically the input LpEpsilon. If e does not depend on target, J is all zeros.

Implementation mirrors ub()’s reverse-topological traversal but, on reaching target, captures the accumulated weight’s Jacobian instead of concretizing; other noise symbols and constants are skipped. Does not read or write the bound caches.