{
 "artifacts": [
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1026/bench_report.json"
  },
  {
   "name": "bench_stage2.py",
   "url": "https://synthcore.org/code/1026/bench_stage2.py"
  },
  {
   "name": "experiment.py",
   "url": "https://synthcore.org/code/1026/experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1026/report.md"
  },
  {
   "name": "report_bench_2026-09-01T185628.md",
   "url": "https://synthcore.org/code/1026/report_bench_2026-09-01T185628.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1026/results.json"
  }
 ],
 "category": "architecture",
 "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.",
 "download_zip": "https://synthcore.org/download/1026",
 "formulas_latex": [
  "$$R_a=\\exp\\!\\left(\\theta_a[\\mathbf{n}_a]_\\times\\right),\\qquad [\\mathbf{n}]_\\times=\\begin{pmatrix}0\u0026-n_3\u0026n_2\\\\ n_3\u00260\u0026-n_1\\\\ -n_2\u0026n_1\u00260\\end{pmatrix},\\qquad \\mathbf{s}_{t+1}=R_{e_t}\\mathbf{s}_t.$$",
  "$$U_\\gamma=R_{e_L}R_{e_{L-1}}\\cdots R_{e_1},\\qquad \\mathbf{s}_L=U_\\gamma\\mathbf{s}_0.$$",
  "$$\\mathbf{n}(\\chi_1,\\chi_2)=\\frac{\\mathbf{m}(\\chi_1,\\chi_2)}{\\|\\mathbf{m}(\\chi_1,\\chi_2)\\|},\\qquad C=\\frac{1}{4\\pi}\\int_{\\mathbb{T}^2}\\mathbf{n}\\cdot(\\partial_{\\chi_1}\\mathbf{n}\\times\\partial_{\\chi_2}\\mathbf{n})\\,d\\chi_1d\\chi_2.$$"
 ],
 "id": 2704,
 "implementation": "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.",
 "math_summary": "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\\).",
 "math_tags": [
  "dynamical-systems",
  "geometry",
  "differential-geometry"
 ],
 "ml_areas": [
  "rnn",
  "ssm",
  "world-model"
 ],
 "paper": {
  "arxiv_id": "2608.23533",
  "arxiv_url": "https://arxiv.org/abs/2608.23533",
  "summary_what_math_gives_to_ml": "The paper introduces a transferable mechanism: replace commuting scalar trajectory counters by ordered products of noncommuting rotations, allowing a representation to retain temporal ordering that aggregate counts discard. Its finite-time mean spin defines a map from a two-dimensional counting torus to the sphere, with polarization-gap closings and an integer Chern number giving sharp transition diagnostics. In neural networks, this can become an order-sensitive recurrent or state-space module, while the gap and Chern sector can serve as a training monitor for representation collapse and finite-horizon instability.",
  "title": "Non-Abelian Spin Counting of Ordered Stochastic Trajectories: Reentrant Finite-Time Chern Numbers",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 8,
  "usefulness": 8
 },
 "solves": [
  "accuracy",
  "stability",
  "sample-efficiency"
 ],
 "title": "Non-Abelian Event-Order Memory",
 "url": "https://synthcore.org/idea/2704/non-abelian-event-order-memory",
 "verification": {
  "benchmark": {
   "track": "sequence",
   "model": "transformer_tiny",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.22894670069217682,
    "idea_mean": 0.23161649331450462,
    "delta_mean": 0.0026697926223278046,
    "per_seed_diffs": [
     0.0037065446376800537,
     0.02299468219280243,
     -0.008169487118721008,
     0.027169615030288696,
     0.013744071125984192,
     -0.016873285174369812,
     -0.025876685976982117,
     0.0046628862619400024
    ],
    "idea_wins": 3,
    "n_pairs": 8,
    "p_value": 0.6818,
    "mde": 0.015660083437405745,
    "mde_rel_pct": 6.8400563930646125,
    "verdict": "no significant win",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "lr": 0.001
    },
    "sweep": [
     {
      "cfg": {
       "lr": 0.001
      },
      "mean": 0.22030843049287796
     },
     {
      "cfg": {
       "lr": 0.003
      },
      "mean": 0.2290698178112507
     },
     {
      "cfg": {
       "lr": 0.01
      },
      "mean": 1.0897138714790344
     }
    ],
    "full": {
     "mean": 0.22894670069217682,
     "std": 0.02468231743126849,
     "per_seed": [
      0.2348448932170868,
      0.18358114361763,
      0.2119988203048706,
      0.25080886483192444,
      0.21615827083587646,
      0.258085697889328,
      0.258510559797287,
      0.21758535504341125
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.23161649331450462,
    "std": 0.0217385249680007,
    "per_seed": [
     0.23855143785476685,
     0.20657582581043243,
     0.2038293331861496,
     0.27797847986221313,
     0.22990234196186066,
     0.2412124127149582,
     0.23263387382030487,
     0.22224824130535126
    ],
    "n": 8
   },
   "mechanism_signature": {
    "behavior": {
     "confirmed": true,
     "note": "All values are measured from the trained benchmark spin model.",
     "observed_axis_cross_norm": 0.9981767535209656,
     "observed_max_norm_error": 0.0000013113021850585938,
     "observed_mean_reversal_spin_delta": 1.0346672534942627,
     "predicted_norm_error": 0,
     "predicted_order_delta_nonzero": true,
     "prediction": "ordered noncommuting updates preserve sphere norm and create order sensitivity"
    },
    "idea_sweep": [
     {
      "cfg": {
       "lr": 0.001
      },
      "mean": 0.2317337691783905
     },
     {
      "cfg": {
       "lr": 0.003
      },
      "mean": 0.26143352687358856
     },
     {
      "cfg": {
       "lr": 0.01
      },
      "mean": 1.1830730140209198
     }
    ],
    "selected_idea_cfg": {
     "lr": 0.001
    }
   },
   "custom_track": null
  },
  "mechanism_confirmed": false,
  "peer_reviewed": false,
  "practical_verdict": "no_effect",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 9,
   "verdict": "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.",
   "metrics": {
    "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."
   },
   "how_to_run": "python3 experiment.py",
   "files": [
    "experiment.py",
    "results.json"
   ],
   "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."
  },
  "status": "failed_benchmark",
  "status_label": "Failed on benchmark",
  "updated_at": "2026-09-01T18:56:28",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
