SSM-AI – Appendix M — Interop & Wire Protocol (M1–M3)

Versioned lane envelope for clean parity, easy roll-ups, and deterministic replay.

Purpose. Standardize how services emit/consume the alignment lane beside classical values without breaking existing APIs. Classical magnitudes remain pristine (phi((m,a)) = m). Alignments stay bounded (|a| < 1), choosers are bounded (|RSI| < 1), and fusion is 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, gate modes "mul" and "u_scale".


M1) Minimal JSON object (per decision or per item)

All fields are optional except the v and m/phi_m pair; consumers tolerate unknown fields (forward-compatible). Values are scalars unless noted.

{
  "v": "SSM-LANE/1",
  "svc": "decode-beam",
  "iso_utc": "2025-10-23T11:42:03Z",
  "knobs_hash": "sha256:...",
  "tool_versions": "py=3.11;ssm_ai=0.1.0",

  "m": 0.7319,
  "phi_m": 0.7319,

  "a": 0.4172,
  "U": 0.5869,
  "W": 1.0,
  "RSI": 0.5281,
  "g_t": 0.81,
  "RSI_env": 0.4278,
  "band": "A0",

  "lens_id": "decode_v1",
  "c": 0.8887,
  "Unit": 0.78,
  "w_rule": "uniform",
  "gate_mode": "mul",

  "stamp": "SSMCLOCK1|...|chain",

  "a_in_items":  [ [ -0.2000, 1.0 ] ],
  "a_out_items": [ [  0.5000, 1.0 ] ]
}

Required invariants (producer side).

  • Parity: phi_m == m and equals your pre-lane baseline (phi((m,a)) = m).
  • Pool parity: If U and W are provided, then a == tanh( U / max(W, eps_w) ) within dtype tolerance.
  • Gate purity: If RSI_env is provided, it must be g_t * RSI (mode "mul") or tanh( g_t * atanh(RSI) ) (mode "u_scale").

M2) Batch envelope (list with header)

For high-throughput endpoints, wrap items under a header; knobs_hash and v live in the header to avoid repetition.

{
  "v": "SSM-LANE/1",
  "header": {
    "svc": "rag-ranker",
    "iso_utc": "2025-10-23T11:42:03Z",
    "knobs_hash": "sha256:...",
    "tool_versions": "py=3.11;ssm_ai=0.1.0",
    "eps_a": 1e-6,
    "eps_w": 1e-12,
    "bands": {"A++":0.90,"A+":0.60,"A0":-0.60,"A-":-0.90,"A--":-1.00},
    "gate": {"mode":"mul","rho":0.2,"g_min":0.0}
  },
  "items": [
    { "...": "JSON per M1" }
  ]
}

Replay rule (deterministic). Reducers reconstruct a_pool := tanh( sum(U) / max(sum(W), eps_w) ) and must recover the original a/RSI within tolerance, independent of order or sharding.


M3) CSV schema (flat logs, copy-paste)

Tab- or comma-separated; one row per decision. Use empty strings for N/A.

iso_utc,svc,v,knobs_hash,m,phi_m,a,U,W,RSI,g_t,RSI_env,band,lens_id,c,Unit,w_rule,gate_mode,stamp,tool_versions
2025-10-23T11:42:03Z,decode-beam,SSM-LANE/1,sha256:...,0.7319,0.7319,0.4172,0.5869,1.0,0.5281,0.81,0.4278,A0,decode_v1,0.8887,0.78,uniform,mul,SSMCLOCK1|...|chain,py=3.11;ssm_ai=0.1.0

Shard roll-up. To combine logs by hour/day/vendor, group by (svc, knobs_hash, window) and sum U and W; compute a_pool := tanh( sumU / max(sumW, eps_w) ). Do not average a or RSI directly.


Navigation
Previous: SSM-AI – Appendix L — Governance Quick Reference (L10–L12)
Next: SSM-AI – Appendix M — Interop & Wire Protocol (M4–M6)


Directory of Pages
SSM-AI — Table of Contents