Skip to main content

Module assignment

Module assignment 

Source
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§

AssignmentMode
Assignment prior/relaxation used by SaeAssignment.
RoutingPredictor
#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 Snapshot if it suffices, the ChartGeometry distill 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 autograd Function so the Python IBP-Gumbel path applies the same stick-breaking prior mean π_k = (α/(α+1))^{k+1} and temperature scaling as the Rust closed form. With z_k = σ(l_k/τ)·π_k the per-atom derivative is σ(l_k/τ)(1 − σ(l_k/τ))·π_k / τ; the map is diagonal in k, 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.