SSM-AI – Plan-Level Priors & Gates (5.4)

Tiny u-space nudge and a single gate for whole-plan tempering

Purpose. After step scoring and path pooling, apply a small, published prior in u-space and (optionally) a single calm gate to obtain a conservative, comparable plan score — without ever touching classical magnitudes (phi((m,a)) = m).

Plan prior (bounded, public). Publish a prior B_plan in [-1,+1] and a tiny gain beta_plan ≥ 0. Nudge the pooled u-space sum proportionally to mass.

# from Section 5.2 outputs
U_path := Σ_s w_s * u'_s
W_path := Σ_s w_s
RSI_path := tanh( U_path / max(W_path, eps_w) )

# plan prior (bounded)
U_plan' := U_path + beta_plan * B_plan * W_path
RSI_path' := tanh( U_plan' / max(W_path, eps_w) )

Rules: keep |beta_plan| small (e.g., ≤ 0.2), publish B_plan and beta_plan, and never alter m.

Plan gate (alignment-only). Apply one gate value to the whole plan; choose mode once in the manifest.

# mode "mul" (default, proportional)
RSI_plan_env := g_plan * RSI_path'

# mode "u_scale" (curvature-preserving)
RSI_plan_env := tanh( g_plan * atanh(RSI_path') )

# band after gate
band_path := to_band(RSI_plan_env)

g_plan in [0,1] typically comes from plan-level telemetry (e.g., end-to-end error/latency/contradiction summaries). Invariant: phi((m,a)) = m always.

Worked mini (6-dec rounding).

Given: RSI_path = 0.376388, W_path = 3
Prior: B_plan = +0.300000, beta_plan = 0.100000
U_path = atanh(0.376388) * 1  ->  0.395845 * 1  (since RSI_path = tanh(U_path/W_path) with W_path normalized here)
U_plan' = 0.395845 + 0.1*0.3*3 = 0.395845 + 0.090000 = 0.485845
RSI_path' = tanh(0.485845/1) = 0.450310
Gate: g_plan = 0.800000 (mode "mul") -> RSI_plan_env = 0.360248 -> band A0

Pseudocode (drop-in).

def plan_prior_and_gate(U_path, W_path, beta_plan=0.0, B_plan=0.0,
                        g_plan=1.0, mode="mul", eps_w=1e-12):
    # prior in u-space
    Up = U_path + beta_plan * B_plan * W_path
    RSIp = tanh( Up / max(W_path, eps_w) )
    # gate (alignment-only)
    if mode == "u_scale":
        return tanh( g_plan * atanh(RSIp) )
    return g_plan * RSIp

Manifest (suggested keys).

"plan": {
  "beta_plan": 0.10,
  "B_plan_name": "vendor_reliability_index",   # must be in [-1,+1]
  "gate": { "g_plan_mode": "mul", "g_plan": 1.0 }
}

Stamp (add minimal fields).
...|U_path=...|W_path=...|RSI_path=...|beta_plan=0.10|B_plan=+0.30|RSI_path'=...|g_plan=0.80|RSI_env=...|band=...|...

Acceptance checklist (pass/fail).
• Prior bounded: B_plan in [-1,+1], small beta_plan
• Gate purity: plan gate scales alignment only; m unchanged
• Determinism: same inputs + manifest ⇒ same RSI_plan_env
• Replay: stamps reconstruct RSI_path', RSI_plan_env, and band_path
• Boundedness: all RSIs remain strictly in (-1,+1)

One-line takeaway. Add a tiny, published u-space prior and (optionally) a single plan gate to temper whole-plan confidence — transparent, reproducible, and alignment-only with phi((m,a)) = m intact.


Navigation
Previous: SSM-AI – Failure Containment & Rollback (5.3)
Next: SSM-AI – Developer Hooks (5.5)


Directory of Pages
SSM-AI — Table of Contents