SSM-AI – Surfaces → Kernel → Acceleration (0C)

One substrate for decoding, RAG, tools, evaluators, and ensembles

Where it drops in (surfaces)
Decoding (LLM candidates). Keep m intact. Derive contrasts (e_in, e_out) from a declared lens. Produce RSI per token or branch. Pick with bounded clarity.
RAG (retrieval + citation). Passages carry (m_retrieval, a_doc). Pool in u-space with (U,W). Band schedulers when evidence thins. Better first-answer correctness without retraining.
Tools and functions. Each call emits (m_tool, a_tool). Retries drop as schedulers use RSI_env := g_t * RSI.
Evaluators / judges. Turn policy or intent gaps into a; route based on bands.
Ensembles (models or providers). Pool alignments with one bounded chooser that never alters their m.

Across all these, the kernel is always the same.


Kernel: always the same tiny pipe
Clamp → Map → Compose → Bound

a_c := clamp(a, -1+eps_a, +1-eps_a)   # eps_a = 1e-6
u   := atanh(a_c)

# compose in u-space: add/sub/weights or M2 for mul/div
U += w*u       # streaming
W += w

a_out := tanh( U / max(W, eps_w) )   # eps_w = 1e-12
phi((m,a)) = m

Default weight rule:

w := |m|^gamma   # gamma = 1

No matter the component or vendor, collapse parity holds everywhere:
phi((m,a)) = m.


Optional acceleration, same semantics
When throughput matters, the identical lane math becomes a small accumulator and fixed-point arithmetic block.

atanh LUT → MAC → tanh LUT
• Streaming updates in (U,W)
Manifests unchanged, bands unchanged, exact same outputs

Software ↔ accelerator parity is mandatory.


12-line walk-through (pseudocode, candidate selection)
A minimal illustration of selection by bounded clarity:

def clamp_a(a, eps_a=1e-6):
    lo, hi = -1+eps_a, 1-eps_a
    return max(lo, min(hi, a))

def rsi_for_candidate(items, c=1.0, eps_w=1e-12):
    U_in, V_out, W_in = 0.0, 0.0, 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(clamp_a(a_in))
        V_out += w * atanh(clamp_a(a_out))
        W_in  += w
    return tanh( (V_out - U_in) / max(W_in, eps_w) )

def select(cands, g_t=1.0):
    scored = [(cid, g_t * rsi_for_candidate(items)) for (cid, items) in cands]
    return max(scored, key=lambda x: x[1])  # choose by RSI_env

30-second mental model
Keep m exactly the same. Compute a bounded a from declared contrasts.
Pool order-invariantly in u-space.
If the environment is shaky, scale via g_t.
Pick by bounded visibility, not just magnitude.


Pocket thought
SSM-AI is not about adding new math. It’s about publishing the truth you already know.
When answers differ only a little on m but dramatically on stability, SSM-AI ensures you see the difference.


Navigation
Previous: SSM-AI – Core Mechanics at a Glance (0B)
Next: SSM-AI – Why This Matters (0D)


Directory of Pages
SSM-AI — Table of Contents