Contractive Kuramoto Attractor Memory
Implementation & benchmark of arXiv:2607.18439 — Learnable Sequential Memory in Coupled Oscillator Networks
Source paper: Learnable Sequential Memory in Coupled Oscillator Networks arXiv:2607.18439 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a conventional recurrent hidden state with a phase oscillator state whose stored memories are exponentially stable phase-locked configurations. Each memory has a coupling matrix or low-rank coupling parameter, while an external context selects which coupling landscape is active; this separates representation storage from sequence routing.
Formulas
Mathematical statement
For oscillator phases \(\theta_i\in\mathbb{R}/2\pi\mathbb{Z}\), use \(\dot{\theta}_i=\omega_i+\sum_{j=1}^{n}W_{ij}^{(k)}\sin(\theta_j-\theta_i)\), where \(W^{(k)}\) is the coupling matrix for memory \(k\), \(\omega_i\) is the natural frequency, and \(n\) is the number of oscillators. With identical frequencies in a rotating frame, symmetric coupling gives gradient flow for \(E_k(\theta)=-\frac{1}{2}\sum_{i,j}W_{ij}^{(k)}\cos(\theta_i-\theta_j)\), so \(\dot E_k=-\sum_i\dot\theta_i^2\leq 0\). Around a phase-locked state \(\theta^{(k)}\), the Jacobian is \(J_{ii}=-\sum_jW_{ij}^{(k)}\cos(\theta_j^{(k)}-\theta_i^{(k)})\) and \(J_{ij}=W_{ij}^{(k)}\cos(\theta_j^{(k)}-\theta_i^{(k)})\) for \(i\neq j\). Exponential convergence modulo the global phase requires the nonzero eigenvalues of \(-J\) to satisfy \(\lambda_2(-J)\geq\mu_k>0\), predicting error decay at rate at least \(\mu_k\).
Implementation notes
Integration point: add a phase-memory state to an RNN, state-space model, or world model. Maintain phases theta of dimension n and decode them with a learned readout y=MLP([cos(theta),sin(theta)]). Store K memories using K symmetric coupling matrices W[k], preferably parameterized as W[k]=B[k]B[k]^T plus a diagonal correction. A context encoder produces logits over memories and selects one W[k] or a soft mixture W=sum_k p[k]W[k]. Pseudocode: initialize theta from the encoded input; at each internal Euler substep compute dtheta[i]=sum_j W_active[i,j]*sin(theta[j]-theta[i]); update theta += dt*dtheta; decode the state; train prediction loss plus a weak penalty max(0,E(t+dt)-E(t)). The energy and Jacobian are computed exactly for the current W. Estimate mu with the second-smallest eigenvalue of -J, excluding the global phase-zero mode. First experiment: train a 32- or 64-unit module on sequential or permuted-MNIST and compare with a parameter-matched GRU. Sweep coupling scale and Euler step dt. The prediction is a divergence boundary near dt_c=2/lambda_max(-J), while below it phase error decays with semilog slope near -mu. Require the measured decay rate and boundary to agree with these predictions within 20%.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built and ran a reproducible Kuramoto attractor-memory toy experiment with symmetric coupling, exact energy evaluation, Jacobian/Laplacian spectrum, Euler stability sweep, contraction-rate scaling, and a small retrieval comparison. The mechanism manifested: energy had zero monotonicity violations, the measured linear Euler boundary bracketed the predicted dt_c=2/Lambda, and contraction-rate scaling matched the predicted linear dependence within 17.2% mean relative error. Retrieval was perfect for both the phase system and the matched tanh baseline, so no accuracy win over the baseline was observed.
- Agent confidence
- 8/10
- Baseline
- Tanh recurrent retrieval accuracy: 1.00 over 160 trials.
- Idea
- Kuramoto retrieval accuracy: 1.00 over 160 trials; energy violations: 0; predicted dt_c=0.1887, with linearized stability below and instability above the boundary; measured-vs-predicted contraction-rate mean relative error: 17.2%.
Limitations: This is a toy consensus/retrieval experiment, not a trained sequential-MNIST or parameter-matched GRU study. It uses one shared coupling matrix rather than learned context-selected per-memory coupling landscapes, and the nonlinear bounded phase dynamics do not literally diverge beyond the Euler boundary; the verified divergence claim is for the local linearized Euler system.
How to run: python3 run_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.18439)
Significantly WORSE than the tuned baseline (+427.4%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0006
- Effect (Δ)
- 0.0005 (+427.4%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the registered dynamics pendulum task, one 64-unit coupling landscape, 15 epochs, and a three-value learning-rate sweep were tested. Multiple context-selected landscapes and longer-horizon memory were not tested.
How to run: python3 bench_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
The Kuramoto phase recurrent system was significantly worse than the matched GRU on the structurally appropriate registered dynamics track. Baseline MSE was 0.0001216785 versus 0.0006417852 for the idea, with permutation p=0.0081; therefore no benchmark win was observed.
- Baseline
- GRU rnn_small, best lr=0.01, MSE 0.00012167845488875173
- Delta mean
- 0.0005201067870075349
- Idea
- KuramotoRNN, lr=0.01, MSE 0.0006417852418962866
- Idea wins
- 0/8
- P value
- 0.0081
Benchmark result
Significantly WORSE than the tuned baseline (+427.4%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0006
- Effect (Δ)
- 0.0005 (+427.4%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Not confirmed ✗
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Only the registered dynamics pendulum task, one 64-unit coupling landscape, 15 epochs, and a three-value learning-rate sweep were tested. Multiple context-selected landscapes and longer-horizon memory were not tested.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 5.3 KB View Raw
- bench_report.json 2.6 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-30T205551.md 3.4 KB View
- results.json 2.2 KB View Raw
- run_experiment.py 5.3 KB View Raw