SSM-AI – Chooser — RSI (3.3)

Pool alignments once. Pick fairly and reproducibly.

3.3 Chooser — RSI (bounded selection index)
Purpose. Turn many alignments into one bounded RSI ∈ (-1,+1) that is transparent, order-invariant, and comparable across prompts, models, and vendors. Classical magnitudes remain unchanged everywhere via phi((m,a)) = m.

Definition (two-channel form).

# penalties channel (IN) and support channel (OUT)
U_in  := SUM_i w_i * atanh(a_in_i)
V_out := SUM_j w_j * atanh(a_out_j)
W_in  := SUM_i w_i
RSI   := tanh( (V_out - U_in) / max(W_in, eps_w) )   # default eps_w = 1e-12

Single-channel variant.

U := SUM_k w_k * atanh(a_k)
W := SUM_k w_k
RSI := tanh( U / max(W, eps_w) )

Why it works.
Bounded & monotone: more support raises RSI; more penalty lowers it; output stays in (-1,+1).
Order-invariant: uses the U/W mean in u-space; batch == stream == shuffled.
Comparable: same manifest ⇒ apples-to-apples across systems.
Zero-evidence safe: if W_in = 0, define RSI := 0 (neutral).

Optional calm gate (alignment only).

RSI_env := g_t * RSI     # g_t in [0,1] from bounded telemetry
# m never changes; gate scales alignment only

Worked minis (calculator-fast).
A) One item (matches earlier numbers).

e_in = 0.2, e_out = 0.5, c = 1, w = 1
a_in  = tanh(-0.2)
a_out = tanh(+0.5)
U_in = -0.2,  V_out = +0.5,  W_in = 1
RSI = tanh(0.7) ≈ 0.604368  -> band A+

B) Multiple signals (uniform weights).

a_out = [tanh(0.6), tanh(0.3)],  a_in = [tanh(0.2)],  all w=1
V_out = 0.6 + 0.3 = 0.9
U_in  = 0.2
RSI   = tanh( (0.9 - 0.2) / 1 ) = tanh(0.7) ≈ 0.604368

C) Calm gate in turbulence.

RSI ≈ 0.604368, g_t = 0.5  ->  RSI_env ≈ 0.302184 (drops to A0)

Design notes & guardrails.
Weights w. Start with w := |m|^gamma (gamma=1) or declare uniform w := 1 for pure comparability.
Clamp safety. Ensure |a| < 1 before any atanh (use eps_a).
Bands. Defaults: A++(≥0.90), A+([0.60,0.90)), A0((-0.60,0.60)), A-((-0.90,-0.60]), A–(≤-0.90).
Determinism. Same inputs + same manifest ⇒ identical RSI.

Pseudocode (drop-in).

def rsi_from_alignments(a_in_items, a_out_items, eps_w=1e-12):
    U_in = V_out = W_in = 0.0
    for (a_in,  w) in a_in_items:
        U_in += w * atanh(a_in)
        W_in += w
    for (a_out, w) in a_out_items:
        V_out += w * atanh(a_out)
    if W_in <= 0.0:
        return 0.0  # neutral: no "in" evidence
    return tanh( (V_out - U_in) / max(W_in, eps_w) )

def choose(candidates, g_t=1.0):
    # each candidate supplies: a_in_items, a_out_items (clamped)
    scored = []
    for cid, ain, aout in candidates:
        rsi = rsi_from_alignments(ain, aout)
        scored.append((cid, g_t * rsi))  # RSI_env
    return max(scored, key=lambda kv: kv[1])[0]

One-line takeaway. RSI := tanh((V_out - U_in)/max(W_in, eps_w)) is the single, bounded chooser that makes selection fair, stable, and comparable—while phi((m,a)) = m keeps numbers pristine.


Navigation
Previous: SSM-AI – Symmetric Maps → Alignment (3.2)
Next: SSM-AI – Bands (A++/A+/A0/A-/A–) and Thresholds (3.4)


Directory of Pages
SSM-AI — Table of Contents