Rotational-Twist Recurrent Layer
Implementation & benchmark of arXiv:2607.11833 — Graph-Induced Rotational Twisted States in Systems of Identical Oscillators
Source paper: Graph-Induced Rotational Twisted States in Systems of Identical Oscillators arXiv:2607.11833 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace an unconstrained recurrent matrix by a structured asymmetric circulant coupling whose Fourier modes have analytically known complex eigenvalues. A selected nonzero mode becomes a rotating attractor, providing a phase-coded recurrent state that can preserve information through oscillatory dynamics without requiring the optimizer to discover a stable spectral structure from scratch. A weak input projection and optional mode-selection loss can use the attractor as a nonlinear memory substrate.
Formulas
Mathematical statement
Use complex latent states $z_j\in\mathbb{C}$, indexed by graph nodes $j=0,\ldots,N-1$, with Stuart–Landau dynamics $\dot z_j=(\alpha+i\omega)z_j-\beta|z_j|^2z_j+\kappa\sum_l A_{jl}(z_l-z_j)+u_j(t)$, where $\alpha$ is intrinsic linear growth, $\omega$ is intrinsic frequency, $\beta>0$ is radial saturation, $\kappa$ is coupling strength, $A$ is a directed circulant adjacency matrix, and $u_j$ is the input. Let $\lambda_q$ be the eigenvalue of $A$ for discrete Fourier mode $q$, and let $d=\sum_lA_{jl}$ be the common row sum. The linear coefficient of mode $q$ is $\mu_q=\alpha+\kappa\operatorname{Re}(\lambda_q-d)$ and its angular frequency is $\Omega_q=\omega+\kappa\operatorname{Im}(\lambda_q-d)$. When $\mu_q>0$, the corresponding rotational twisted solution has radius $R_q=\sqrt{\mu_q/\beta}$ and phase pattern $z_j(t)=R_q\exp(i(\Omega_qt+2\pi qj/N+\phi_0))$. The bifurcation occurs at $\mu_q=0$, and the radial amplitude obeys $R_q\propto(\kappa-\kappa_c)^{1/2}$ with $\kappa_c=-\alpha/\operatorname{Re}(\lambda_q-d)$ when the denominator is positive. Stability requires all perturbation Floquet exponents transverse to the selected mode to have negative real part; in practice estimate the largest transverse exponent or use a spectral margin $\gamma=-\max_{p\neq q}\operatorname{Re}\nu_p>0$.
Implementation notes
1. Integration point: implement this as a continuous-time recurrent or state-space block between embedding/input projections and the task readout. Store $N$ complex channels, represented in code by $2N$ real channels. Choose a directed circulant kernel with first row $a_0,\ldots,a_{N-1}$; compute its eigenvalues once with an FFT. Select a nonzero Fourier mode $q$ and initialize $\alpha$, $\beta$, and $\kappa$ so that $\mu_q$ is slightly positive while competing modes have negative linear growth. Use RK4 or a semimplicit solver over each token interval. 2. Pseudocode: compute $z\leftarrow z+\Delta t[(\alpha+i\omega)z-\beta|z|^2z+\kappa(Az-dz)+P x_t]$; optionally apply a mode penalty $L_{mode}=|\widehat z_q|^2/(\sum_p|\widehat z_p|^2+\epsilon)$ and a radius penalty $(|z|^2-R_q^2)^2$. The readout receives $[\operatorname{Re}z,\operatorname{Im}z]$. 3. Compute $\lambda_q$, $d$, $\mu_q$, $R_q$, and $\Omega_q$ analytically from the circulant kernel; estimate the actual transverse exponent $\nu_p$ empirically by propagating Jacobian-vector products or by fitting perturbation decay. 4. First cheap experiment: train this layer and an equal-parameter vanilla GRU on Copy Memory and sequential MNIST. Sweep $\kappa$ across the predicted threshold $\kappa_c$. With zero input after initialization, measure Fourier-mode amplitude, phase velocity, and perturbation decay. The predicted signature is no oscillation below $\mu_q=0$, $R_q$ growing with slope $1/2$ on a log-log plot above threshold, frequency $\Omega_q$ matching the eigenvalue formula within 10%, and exponential perturbation decay with rate approximately $\gamma$ when the selected attractor is stable. Also test that replacing the directed kernel by a symmetric one removes the graph-induced frequency shift because its eigenvalues are real.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Inconclusive
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 a Stuart–Landau recurrent layer with a directed circulant coupling, RK4 integration, analytic Fourier eigenvalues, and a delayed-bit baseline comparison. The predicted bifurcation was kappa_c=0.8: amplitudes stayed near zero below threshold and reached 0.168/0.374 versus predicted radii 0.179/0.374 above it. The observed amplitude exponent was 0.547 versus the predicted 0.5, directed frequency was 0.7975 versus 0.7975 predicted, and the symmetric control had frequency 1.2000 versus 1.2 with effectively zero shift. On the small delayed-sign task, the twist reached 65.7% versus 51.0% for vanilla RNN with 50 versus 106 parameters; this is promising but not a robust benchmark win.
- Agent confidence
- 8/10
- Amplitude scaling
- predicted exponent 0.500; observed exponent 0.547
- Baseline
- vanilla RNN delayed-bit accuracy 0.510, 106 parameters
- Directed frequency
- predicted 0.7975; observed 0.7975; relative error 3.4e-11
- Idea
- Rotational-Twist layer delayed-bit accuracy 0.657, 50 parameters
- Mechanism threshold
- predicted kappa_c=0.800; observed transition between 0.736 (amplitude 0.00265) and 0.864 (amplitude 0.168)
- Symmetric frequency
- predicted 1.2000; observed 1.2000; shift approximately -2.1e-10
Limitations: Only one random seed and one tiny delayed-bit task were tested. The task baseline was a vanilla RNN, not a GRU, and no Copy Memory, sequential MNIST, long-horizon robustness, mode-selection loss, Floquet transverse stability estimate, or FLOP-normalized multi-seed comparison was performed.
How to run: python3 rotational_twist_experiment.py && /home/maxwelhelp/main/bin/python3 mini_task.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.11833)
No significant difference vs. the tuned baseline (+54.0%, p=0.0953, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0019
- Idea mean
- 0.003
- Effect (Δ)
- 0.001 (+54.0%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.0953 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±64.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The completed protocol used 800 training samples, 300 test samples, and 6 epochs after the original 4000-sample, 18-epoch attempt exceeded the time budget. No sequence, vision, Copy Memory, long-horizon rollout, mode-selection loss, or transverse Floquet stability benchmark was tested.
How to run: python3 bench_rotational_twist.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 Rotational-Twist recurrent layer was implemented and evaluated against the standard rnn_small GRU on the registered dynamics track, which matches the idea's stability/control structure. Across eight paired seeds, the idea had higher MSE than the tuned baseline (0.002954 versus 0.001919), delta_mean=+0.001035 and permutation p=0.09525, so there was no significant benchmark win. The trained-model frequency signature was confirmed quantitatively, but this does not override the failed task-metric comparison.
- Baseline
- Tuned GRU rnn_small; best lr=0.01; mean MSE 0.001918749389005825; std 0.0005918721912043233; 8 seeds
- Idea
- Rotational-Twist recurrent layer; selected lr=0.01; mean MSE 0.0029542355332523584; std 0.0011468508843362152; 8 seeds
- Paired delta
- delta_mean=0.0010354861442465335; idea wins 3/8; p_value=0.09525; verdict=no significant win
Benchmark result
No significant difference vs. the tuned baseline (+54.0%, p=0.0953, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0019
- Idea mean
- 0.003
- Effect (Δ)
- 0.001 (+54.0%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.0953 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±64.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The completed protocol used 800 training samples, 300 test samples, and 6 epochs after the original 4000-sample, 18-epoch attempt exceeded the time budget. No sequence, vision, Copy Memory, long-horizon rollout, mode-selection loss, or transverse Floquet stability benchmark was tested.
How to run: python3 bench_rotational_twist.py
Artifacts
- bench_report.json 3.0 KB View Raw
- bench_rotational_twist.py 7.2 KB View Raw
- mini_task.py 2.7 KB View Raw
- report.md 1.9 KB View
- report_bench_2026-08-31T012505.md 4.9 KB View
- results.json 3.0 KB View Raw
- rotational_twist_experiment.py 4.9 KB View Raw
- task_results.json 0.2 KB View Raw