pub fn joint_encode_fallback_fraction(
atoms: &[SaeManifoldAtom],
coords: &[Array2<f64>],
amplitudes: ArrayView2<'_, f64>,
amplitude_floor: f64,
) -> Result<f64, String>Expand description
The JOINT (multi-atom) encode-fallback fraction: the share of rows whose per-row joint reconstruction problem across CO-ACTIVE atoms is NOT covered by the composition of the per-atom certificates, so the row genuinely needs the exact multi-start solve (reviewer condition #3 — the honest encode-tax cost multiplier at scale).
The per-atom Kantorovich certificate certifies each atom’s coordinate encode
IN ISOLATION — a block-diagonal view of the joint Hessian. The joint problem
couples co-active atoms through the off-diagonal blocks
H_kj = z_k z_j J_k(t_k)ᵀ J_j(t_j) (tangent-image inner products). When an
atom’s own curvature block fails to dominate its coupling to the rest —
Gershgorin: λ_min(H_kk) ≤ Σ_{j≠k} ‖H_kj‖ — the block-diagonal certificate
no longer implies a joint root, a second basin can open, and the row must go
to multi-start. This fraction GROWS with atom-image similarity and
co-activation: no per-atom certificate covers the joint problem.
The curvature block uses the Gauss–Newton form z_k² J_kᵀ J_k (exact for
flat/linear atoms, where the residual-curvature term vanishes identically);
the off-diagonal is measured in Frobenius norm, which upper-bounds the
operator norm, so a row DECLARED dominant is genuinely dominant and the
fraction never under-reports the multi-start need. Rows with fewer than two
co-active atoms have no cross blocks and are never counted as fallbacks.
amplitude_floor is the mass above which an atom counts as co-active; pass a
small positive value (a domain threshold on the assignment mass, not a solver
knob).