Decode, retrieve, and search with a bounded chooser — numbers stay pristine
How SSM-AI rides beside your stack
SSM-AI never edits m. Each surface computes a bounded alignment from plain evidence and picks by a single chooser RSI in (-1,+1) (optionally tempered as RSI_env := g_t * RSI). Pools are order-invariant via U += w*atanh(a) ; W += w ; a_out := tanh( U / max(W, eps_w) ). Defaults: eps_a = 1e-6, eps_w = 1e-12, w := |m|^gamma with gamma = 1. Collapse parity holds throughout: phi((m,a)) = m.
Decoding / Beam Pick
Goal: pick the best candidate robustly, without rescoring m.
Lens: contrasts (e_in, e_out) from declared cues (e.g., constraint hits vs. contradictions).
# Map to bounded alignments
a_in := tanh(-c*e_in)
a_out := tanh(+c*e_out)
# Order-invariant chooser
RSI := tanh( (SUM w*atanh(a_out) - SUM w*atanh(a_in)) / max(SUM w, eps_w) )
# Optional calm gate (alignment only)
RSI_env := g_t * RSI
Pick: choose by RSI_env; m remains unchanged (phi((m,a)) = m).
Mini-number: e_in=0.2, e_out=0.5, w=1, c=1 ⇒ RSI = tanh(0.7) ≈ 0.604 → band A+.
RAG (Documents + Citations)
Goal: rank documents that are helpful and safe, then forward alignment (not m) into generation.
Lens idea: e_in := toxicity_gap, e_out := citation_hit + semantic_gain.
# Per doc item
a_doc_in := tanh(-c*toxicity_gap)
a_doc_out := tanh(+c*(citation_hit + semantic_gain))
# Pool (u-space mean) → doc alignment / chooser
U_in := SUM w*atanh(a_doc_in)
V_out := SUM w*atanh(a_doc_out)
W := SUM w
RSI_doc := tanh( (V_out - U_in) / max(W, eps_w) )
Rank: by RSI_doc (or RSI_env); pass top-K alignments to the generator; m stays pristine.
Search (Internet / Intranet / Local)
Goal: rank with freshness and risk considered, reproducibly and comparably.
Lens: declare units and scales once; form a signed contrast.
# Example contrast
e := (alpha*hit_quality + beta*freshness - gamma*risk_penalty) / Unit
# Map & choose (same pattern as above)
a_in := tanh(-c*gamma*risk_penalty)
a_out := tanh(+c*(alpha*hit_quality + beta*freshness))
RSI := tanh( (SUM w*atanh(a_out) - SUM w*atanh(a_in)) / max(SUM w, eps_w) )
UI hooks: bands drive badges/safe-open; RSI_env adds telemetry-aware calm; m is never altered.
Pocket pseudocode (common scorer for any surface)
def rsi_common(items, c=1.0, eps_w=1e-12):
U_in = V_out = W = 0.0
for e_in, e_out, w in items:
a_in = tanh(-c*e_in)
a_out = tanh(+c*e_out)
U_in += w * atanh(max(-1+1e-6, min(1-1e-6, a_in)))
V_out += w * atanh(max(-1+1e-6, min(1-1e-6, a_out)))
W += w
return tanh( (V_out - U_in) / max(W, eps_w) )
One-line takeaway. Declare a lens → compute bounded alignments → fuse in u-space → choose by RSI/RSI_env. Throughout, phi((m,a)) = m keeps your numbers unchanged.
Navigation
Previous: SSM-AI – Observation-Only Ethos & Collapse Parity (1.2)
Next: SSM-AI – Where the Lane Lives (1.3) — Part 2
Directory of Pages
SSM-AI — Table of Contents