Non-Abelian Event-Order Memory
Implementation & benchmark of arXiv:2608.23533 — Non-Abelian Spin Counting of Ordered Stochastic Trajectories: Reentrant Finite-Time Chern Numbers
Source paper: Non-Abelian Spin Counting of Ordered Stochastic Trajectories: Reentrant Finite-Time Chern Numbers arXiv:2608.23533 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Augment an RNN or state-space model with a three-dimensional auxiliary spin updated by noncommuting rotations associated with event types or token classes. The ordered product preserves information that additive counters discard: two sequences with the same number of each event can produce different final spins when their event order differs. Train the spin axes, angles, and readout jointly with the task model while constraining every update to remain on the sphere.
Formulas
Mathematical statement
For an input trajectory \(\gamma=(e_1,\ldots,e_L)\), let event \(e_t\in\{1,2\}\) select a unit rotation axis \(\mathbf{n}_{e_t}\in\mathbb{R}^3\) and angle \(\theta_{e_t}\). The non-Abelian trajectory operator is the time-ordered product \(U_\gamma=R_{e_L}\cdots R_{e_1}\), where \(R_a=\exp(\theta_a[\mathbf{n}_a]_\times)\) and \([\mathbf{n}]_\times\) is the skew-symmetric cross-product matrix. The auxiliary state is \(\mathbf{s}_{t+1}=R_{e_t}\mathbf{s}_t\), which preserves \(\|\mathbf{s}_t\|=1\). Introduce phase variables \(\boldsymbol{\chi}=(\chi_1,\chi_2)\in\mathbb{T}^2\) and phase-dependent operators \(R_a(\chi_a)=\exp(\chi_a\theta_a[\mathbf{n}_a]_\times)\). For an ensemble, compute the mean spin \(\mathbf{m}(\boldsymbol{\chi})=\mathbb{E}[U_\gamma(\boldsymbol{\chi})\mathbf{s}_0]\). Whenever \(\mathbf{m}\neq0\), its normalized field \(\mathbf{n}=\mathbf{m}/\|\mathbf{m}\|\) maps the torus to the sphere and has Chern number \(C=(4\pi)^{-1}\int\mathbf{n}\cdot(\partial_{\chi_1}\mathbf{n}\times\partial_{\chi_2}\mathbf{n})d\chi_1d\chi_2\).
Implementation notes
Integrate the module beside the hidden state of a GRU, an S4-like state-space model, or a lightweight recurrent block. Reserve a three-dimensional vector \(\mathbf{s}_t\) per sequence or feature group. Store two learnable axis vectors and normalize them to unit length after every optimizer step; store two learnable rotation angles, optionally bounded by \(|\theta_a|\leq\pi\). For each input event, select its axis and angle and update the spin using Rodrigues' formula, \(R\mathbf{s}=\mathbf{s}\cos\theta+(\mathbf{n}\times\mathbf{s})\sin\theta+\mathbf{n}(\mathbf{n}\cdot\mathbf{s})(1-\cos\theta)\). Concatenate \(\mathbf{s}_t\) or the final spin with the ordinary hidden state before the output head. For diagnostics, evaluate a fixed probe batch on a small \(K\times K\) grid of phase pairs, replace each event angle by \(\chi_a\theta_a\), average final spins to obtain \(\mathbf{m}(\chi)\), and estimate the Chern number using finite differences or spherical triangle areas. The noncommuting ordered product is taken directly from the paper; learned axes and neural readout are the adaptation. First test on length-64 synthetic sequences containing A and B events with identical counts but labels determined only by AB versus BA ordering. Compare an MLP count baseline, a GRU, and GRU-plus-spin. The prediction is that the count baseline stays near chance while the spin model improves whenever the commutator \([\mathbf{n}_1]_\times[\mathbf{n}_2]_\times-[\mathbf{n}_2]_\times[\mathbf{n}_1]_\times\) is nonzero; parallel axes should eliminate the advantage. Chern estimates should remain integer-stable while the minimum polarization gap remains nonzero.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a Rodrigues-update non-Abelian spin module and verified the core mechanism numerically. The matrix-exponential error and sphere-norm error were approximately 2.6e-15 and 2.0e-15; the AB-versus-BA effect scaled with exponent 2.005 (predicted 2), vanished exactly for parallel axes, and tracked axis misalignment with correlation 0.9999. In the fixed-count length-64 task, count and plain GRU stayed at 50% accuracy, while GRU-plus-spin reached 100%, providing a clear secondary task signal.
- Agent confidence
- 9/10
- Baseline
- Count MLP: accuracy 0.500, test cross-entropy 0.6932; plain GRU: accuracy 0.500, test cross-entropy 0.6931.
- Idea
- GRU-plus-spin: accuracy 1.000, test cross-entropy 0.0321. Mechanism checks: exponential-formula max error 2.55e-15, norm error 2.00e-15, small-angle exponent 2.005 vs predicted 2, parallel-axis order difference 0, axis-angle correlation 0.9999 vs predicted 1.
Limitations: Only a synthetic fixed-count AB-versus-BA classification task was tested, with one seed and one train/test split. No S4-like model, Chern-number computation, phase-grid diagnostic, FLOP/speed comparison, or larger/noisy sequence benchmark was evaluated.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.23533)
No significant difference vs. the tuned baseline (+1.2%, p=0.6818, wins 3 / 8 paired seeds).
- Benchmark
- Sequence modeling
- Model
- transformer_tiny
- Paired seeds
- 8
- Baseline mean
- 0.2289
- Idea mean
- 0.2316
- Effect (Δ)
- 0.0027 (+1.2%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.6818 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±6.8%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in sequence forecast track was tested; no custom event-order track, dynamics track, Chern-number diagnostic, runtime/FLOP comparison, or larger-scale training was run.
How to run: python3 bench_stage2.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The matched transformer_tiny plus learned Rodrigues-spin system was evaluated on the registered sequence track using the bench training path and eight paired seeds. The mechanism signature was confirmed from trained-model behavior, but the idea had higher test MSE than the tuned baseline and no significant win.
- Baseline
- Full 8-seed test MSE 0.2289467007 ± 0.0246823174; best learning rate 0.001.
- Idea
- Full 8-seed test MSE 0.2316164933 ± 0.02173852497; best learning rate 0.001; paired delta +0.0026697926; 3/8 wins; permutation p=0.6818.
Benchmark result
No significant difference vs. the tuned baseline (+1.2%, p=0.6818, wins 3 / 8 paired seeds).
- Benchmark
- Sequence modeling
- Model
- transformer_tiny
- Paired seeds
- 8
- Baseline mean
- 0.2289
- Idea mean
- 0.2316
- Effect (Δ)
- 0.0027 (+1.2%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.6818 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±6.8%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in sequence forecast track was tested; no custom event-order track, dynamics track, Chern-number diagnostic, runtime/FLOP comparison, or larger-scale training was run.
How to run: python3 bench_stage2.py
Artifacts
- bench_report.json 2.6 KB View Raw
- bench_stage2.py 4.5 KB View Raw
- experiment.py 5.3 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T185628.md 4.0 KB View
- results.json 0.7 KB View Raw