Expand description
Assignment gates and sparsity-prior helpers for the SAE manifold term.
Mechanically split from sae_manifold.rs.
Structs§
- SaeAssignment
- Per-row latent assignment state.
Enums§
- Assignment
Mode - Assignment prior/relaxation used by
SaeAssignment. - Routing
Predictor - #1033 — the fixed-form predictor that produces the ρ-invariant FROZEN routing
(amortized routing). Both forms are NO-learned-net deterministic functions of
the current dictionary; they differ in how faithfully they track the
dictionary as it evolves across outer iterates. Kept as alternatives so the
accuracy gate can pick whichever passes the fit-quality bar (the cheap
Snapshotif it suffices, theChartGeometrydistill otherwise).
Functions§
- ibp_
map_ row - IBP-MAP row activations: per-atom sigmoid likelihood times the truncated
stick-breaking prior mean
π_k = (α/(α+1))^{k+1}. With tied logits the prior dominates and yields strictly decreasing activations in atom index, with the first atom already shrunk by one Beta(α,1) stick mean (no unshrunk base atom). - ibp_
map_ row_ value_ grad - IBP-MAP activations together with the diagonal Jacobian
∂z_k/∂l_k, shared with the torch autogradFunctionso the Python IBP-Gumbel path applies the same stick-breaking prior meanπ_k = (α/(α+1))^{k+1}and temperature scaling as the Rust closed form. Withz_k = σ(l_k/τ)·π_kthe per-atom derivative isσ(l_k/τ)(1 − σ(l_k/τ))·π_k / τ; the map is diagonal ink, so the Jacobian is returned as the per-atom diagonal vector. - jumprelu_
row - select_
hybrid_ atom_ parameterization - #1026 hybrid curved + linear-tail adjudication for one SAE atom slot.
- set_
ibp_ alpha_ override - Set (or, with a non-finite/non-positive value, clear) the process-global IBP-α override. Called from the gamfit Python FFI sweep driver.