boundlab.polysp.interpret#

boundlab.polysp.interpret = {<class 'boundlab.ibp.softmax.Softmax2ExpReciprocal'>: Softmax2ExpReciprocal(op='softmax', interp_exp=None, interp_reciprocal=None), <class 'boundlab.interp.Add'>: Add(op='add'), <class 'boundlab.interp.BroadcastTo'>: BroadcastTo(op='broadcast_to'), <class 'boundlab.interp.Cast'>: Cast(op='cast'), <class 'boundlab.interp.Identity'>: Identity(op='identity'), <class 'boundlab.interp.Neg'>: Neg(op='neg'), <class 'boundlab.interp.ReduceMean'>: ReduceMean(op='reduce_mean'), <class 'boundlab.interp.ReduceSum'>: ReduceSum(op='reduce_sum'), <class 'boundlab.interp.Reshape'>: Reshape(op='reshape'), <class 'boundlab.interp.Squeeze'>: Squeeze(op='squeeze'), <class 'boundlab.interp.Sub'>: Sub(op='sub'), <class 'boundlab.interp.Transpose'>: Transpose(op='transpose'), <class 'boundlab.interp.Unsqueeze'>: Unsqueeze(op='unsqueeze'), <class 'boundlab.interp.base.DivSimple'>: <boundlab.interp.base.DivSimple object>, <class 'boundlab.interp.base.Gemm'>: <boundlab.interp.base.Gemm object>, <class 'boundlab.interp.base.MarkedIdentity'>: <boundlab.interp.base.MarkedIdentity object>, <class 'boundlab.interp.base.MatmulSimple'>: <boundlab.interp.base.MatmulSimple object>, <class 'boundlab.interp.base.MulSimple'>: <boundlab.interp.base.MulSimple object>, <class 'boundlab.polysp.Matmul'>: Matmul(op='matmul', eps=0.0001, order=4), <class 'boundlab.polysp.PolySpCompression'>: PolySpCompression(op='marked_identity', overrides=[<class 'boundlab.interp.base.MarkedIdentity'>], nterm_limit=65536, error_len=1024, tol=0.001), <class 'boundlab.zono.linearizers.Exp'>: Exp(op='exp', apply_bound=<function linearizer_fn.<locals>.decorator.<locals>.LinearizerHandler.<lambda>>), <class 'boundlab.zono.linearizers.MaxWithConst2Relu'>: <boundlab.zono.linearizers.MaxWithConst2Relu object>, <class 'boundlab.zono.linearizers.Reciprocal'>: Reciprocal(op='reciprocal', apply_bound=<function linearizer_fn.<locals>.decorator.<locals>.LinearizerHandler.<lambda>>), <class 'boundlab.zono.linearizers.Relu'>: Relu(op='relu', apply_bound=<function linearizer_fn.<locals>.decorator.<locals>.LinearizerHandler.<lambda>>), <class 'boundlab.zono.linearizers.Tanh'>: Tanh(op='tanh', apply_bound=<function linearizer_fn.<locals>.decorator.<locals>.LinearizerHandler.<lambda>>)}#

The sparse polynomial interpreter.

Extends boundlab.interp.base.interpret with the exact-to-truncation Matmul pair product (eps=1e-4, order=4), the zonotope linearizers (their residuals are lifted straight back into polynomial symbols by keep_ploysp), and the softmax decomposition. Swap in SoftmaxConstrained for the simplex-tightened softmax.