Abstract
Turns raw signals into symbolic numerals. Defines two lawful mappings for alignment (a ∈ [-1, +1]) and a reproducible reference pipeline that emits (m_t, a_t) per sample. ASCII-only; clamps and manifest fields included.
1) Step 1 — Magnitude m
- Take
m_tdirectly from the observed scalar (e.g., knots, mV, rupees). - Optional normalization/scaling is allowed; units attach to
m. - Alignment
ais unitless.
2) Step 2 — Alignment a (choose exactly one, declare it)
Option E — Earned-alignment mapping
1) Compute SyZ_t ∈ [0,1] # earned calm score from the pipeline
2) a_t = 2*SyZ_t - 1 # maps to [-1, +1]
3) a_t = clamp(a_t, -1+eps, +1-eps) # default eps = 1e-6
Option C — Contrast mapping
1) Compute A_t (drift memory) and Z_t (instant drift)
2) a_t = tanh( c * (A_t - Z_t) ), c > 0
3) a_t = clamp(a_t, -1+eps, +1-eps) # default eps = 1e-6
Notes
- Use one mapping per project and record it in the Manifest.
- Option E emphasizes earned calm; Option C emphasizes instant contrast.
- Both yield continuous
a_t ∈ [-1, +1](with clamps).
3) Reference pipeline (to obtain SyZ_t, A_t, Z_t)
This recipe is domain-agnostic and reproducible; you may swap components if declared.
Inputs
x_t : scalar series (on a uniform grid)
window : rolling-centre window (e.g., 60 samples)
mu ∈ (0,1) : EMA gain (e.g., 0.2)
rho ∈ (0,1): slow calm gain (e.g., 0.9)
kappa ≥ 0 : stability hyperparameter
muR ≥ 0 : calm → reward gain
Steps
1) Rolling centre c_t = rolling_mean(x_t, window)
2) Sq. deviation e_t = (x_t - c_t)^2
3) EMA of dev E_t = (1 - mu)*E_{t-1} + mu*e_t
4) Drift intensity Z_t = log(1 + E_t)
5) Drift memory (EMA) A_t = (1 - mu)*A_{t-1} + mu*Z_t
6) Misalignment magnitude D_t = |Z_t - A_t|
7) Calm accumulator Q_t = rho*Q_{t-1} + (1 - rho)*clip(A_t - Z_t, 0, 1)
8) Earned calm SyZ_t = ( 1 / (1 + Z_t + kappa*D_t) ) * ( 1 - exp(-muR*Q_t) )
Map to alignment
Option E: a_t = 2*SyZ_t - 1
Option C: a_t = tanh( c * (A_t - Z_t) )
a_t = clamp(a_t, -1+eps, +1-eps) # eps = 1e-6
4) Streaming pseudocode (single pass)
init E=0, A=0, Q=0
for each sample x_t:
c = rolling_mean(x_t, window)
e = (x_t - c)^2
E = (1 - mu)*E + mu*e
Z = log(1 + E)
A = (1 - mu)*A + mu*Z
D = abs(Z - A)
Q = rho*Q + (1 - rho)*clip(A - Z, 0, 1)
SyZ = ( 1 / (1 + Z + kappa*D) ) * ( 1 - exp(-muR*Q) )
a = 2*SyZ - 1 # or: a = tanh(c*(A - Z))
a = clamp(a, -1+eps, +1-eps)
emit (m = x_t, a)
Implementation notes
- Light detrend/denoise (median / low-pass) as needed—declare filters.
- Resample to a uniform grid if timestamps are missing.
- Multi-channel: compute per channel, then combine in u-space (
u = atanh(a)) or via a weighted mean—declare the scheme. - Keep hyperparameters in the Manifest for reproducibility.
5) Worked example (toy ECG-like segment)
Segment: [1.0, 1.2, 0.8, 1.1]
rolling centre ≈ 1.0
squared deviations = [0, 0.04, 0.04, 0.01]
after smoothing: E_t ≈ 0.03
Z_t = log(1 + 0.03) ≈ 0.0296
A_{t-1} = 0.020, mu = 0.2 → A_t = 0.8*0.020 + 0.2*0.0296 ≈ 0.0219
D_t = |0.0296 - 0.0219| = 0.0077
rho = 0.9, Q_{t-1} = 0.5, muR = 1, kappa = 1:
Q_t = 0.9*0.5 + 0.1*clip(0.0219 - 0.0296, 0, 1) = 0.45
SyZ_t = (1 / (1 + 0.0296 + 1*0.0077)) * (1 - exp(-1*0.45))
≈ (1 / 1.0373) * (1 - 0.6376) ≈ 0.35
Option E → a_t = 2*0.35 - 1 = -0.30
Clamp (eps=1e-6) → a_t = -0.30
Interpretation: a_t ≈ -0.30 indicates mild Nearo (drift-leaning). Multi-scale windows or channel aggregation can stabilize this estimate if needed.
6) Manifest fields (required)
a_mapping: "earned" | "contrast"
params: { mu, rho, kappa, muR, c (if contrast), window, eps, filters }
bounds: [-1, +1]; clamp_eps: eps
sampling: <rate and resampling policy>
multi_channel_policy: <if any>
✅ Takeaway
The symbolic interface separates what SSM requires (a ∈ [-1, +1] with clamps) from how you derive it (pipeline choice). The reference pipeline yields an earned calm score SyZ_t ∈ [0,1] that maps cleanly to alignment. A declared mapping and manifest make (m, a) audit-ready and reproducible across datasets and domains.
Navigation
Previous → Centre estimators: making the hidden centre visible
Next → Inverses & symmetry
Disclaimer
Observation only. Reproducible math; domain claims require independent peer review. Defaults: gamma=1, mult_mode=M2, clamp_eps=1e-6, |a|<1.