Spectral Memory-Lift Ensemble
Implementation & benchmark of arXiv:2607.24310 — Memory operator ensembles indicate proximity to criticality in simulated AMOC transitions
Source paper: Memory operator ensembles indicate proximity to criticality in simulated AMOC transitions arXiv:2607.24310 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace or augment a recurrent or state-space block with a small ensemble of stable linear memory lifts. Each lift stores a low-dimensional state whose repeated matrix powers generate a structured long-range convolution, and a learned gate mixes the experts using both their current predictions and their slowest block-operator mode. The module can represent multiple memory timescales without explicitly storing a long token history.
Formulas
Mathematical statement
The paper defines a resolved state q_n in R^d, an unresolved memory state z_n in R^h, input u_n, and the linear lift q_{n+1}=A q_n+B z_n+F u_n+b_0+epsilon_{n+1}, z_{n+1}=C q_n+D z_n. Here A is the direct state transition, B maps memory to the resolved state, C writes the resolved state into memory, D is the h-by-h memory transition, F maps exogenous input, b_0 is a bias, and epsilon is residual noise. Eliminating z gives the exact lag kernel K_k=B D^{k-1} C for k>=1, so a finite memory state implements infinitely many exponentially structured lags. The full local transition matrix is M=[[A,B],[C,D]], and stability is governed by its spectral radius rho(M); the slowest mode is lambda_star=max_i |lambda_i(M)|, with memory time constant tau=-1/log(max(lambda_star,epsilon)). For an ensemble indexed by e, use independent parameters A_e,B_e,C_e,D_e and compute lambda_star,e from M_e. The paper explicitly guarantees D is Schur stable, meaning rho(D)<1; in the neural adaptation, additionally penalize or project rho(M_e) to remain below one so hidden states do not explode.
Implementation notes
Integrate the module at the token-processing position occupied by an S4/Mamba-style SSM, GRU, or the residual stream of a small Transformer. Let q_t be the current token embedding or hidden vector of width d, u_t be the same token projection plus optional positional features, and initialize z_{0,e}=0 for each of E=4 memory experts with state width h=8 or 16. For every time step and expert, execute: (1) qnext_e=A_e q_t+B_e z_e+F_e u_t+b_e; (2) znext_e=C_e q_t+D_e z_e; (3) v_e=output_projection(qnext_e,znext_e); (4) compute pi_t with a two-layer gate and mix y_t=sum_e pi_t,e v_e; (5) add y_t to the residual stream. Parameterize D_e=tanh(r_e)Dhat_e/sigma_max(Dhat_e), with a learned scalar or diagonal r_e constrained below one, and initialize experts with distinct target timescales such as 2, 8, 32, and 128 tokens. Compute M_e=[[A_e,B_e],[C_e,D_e]] and estimate lambda_star,e every 100 optimizer steps using 10 power iterations on M_e^T M_e; use the resulting upper-bound singular value as a conservative stability proxy. Add L_spec=beta sum_e ReLU(sigma_bound,e-0.98)^2, or rescale M_e by 0.98/max(1,sigma_bound,e) before the recurrence. The gate's tau term is the paper-inspired slow-mode signal; stop gradients through tau initially to avoid unstable eigenvalue optimization. The exact recurrence and kernel-equivalent state update come from the paper, while spectral values and gating parameters are estimated numerically or learned. First test on character-level enwik8 or TinyStories with a 4-layer 256-width causal model, comparing a standard GRU, a single learned SSM, and this four-expert lift at equal parameter count and sequence length 2048. Measure validation perplexity, gradient norm spikes, hidden-state norm, and throughput. Success means lower perplexity at long context than the single SSM, no exploding states, and improved loss at sequence lengths where the baseline must increase explicit context or attention cost.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significant win ✓
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 four-expert spectral memory lift with gated mixing and stable memory-rate parameterization in spectral_memory_lift.py. The kernel identity matched BD^(k-1)C to 5.6e-17, the measured stability transition matched the predicted gamma=1/rho(M0)=1.8814, and fitted exponential time constants matched theory across rho=0.5 to 0.99. In the fixed-seed delayed-memory regression, the ensemble achieved validation MSE 0.0724 versus 0.2954 for a single-exponential baseline, with bounded observed state/output norm 5.70; this is a promising toy win, not evidence for language-model superiority.
- Agent confidence
- 9/10
- Baseline
- SingleExponential: validation MSE 0.2953793, train MSE 0.2901353, max output norm 1.0720
- Idea
- SpectralMemoryLift with 4 experts: validation MSE 0.0723709, train MSE 0.0697623, max state norm 5.7043; kernel max error 5.55e-17; predicted/observed stability boundary gamma 1.88144/1.88144; fitted timescales matched theory to numerical precision
Limitations: Only a small synthetic delayed-memory regression was tested, not enwik8, TinyStories, GRU or SSM equal-parameter language modeling, throughput, long-context perplexity, or optimizer spectral regularization/projection. The stability sweep uses exact eigendecomposition rather than the proposed approximate power-iteration penalty.
How to run: python3 spectral_memory_lift.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.24310)
Beats the tuned baseline by 95.7% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0004
- Idea mean
- 0
- Effect (Δ)
- -0.0004 (−95.7%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The test used the built-in 8-step dynamics window, 1000 training examples, 300 test examples, and 12 epochs rather than long-horizon rollout or language/SSM benchmarks. The idea model had 16077 parameters versus 3585 for the GRU, so parameter-count equality and throughput were not tested; only optimizer and learning-rate search budgets were matched. Explicit spectral penalties/projection were not measured.
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 Worked ✓
Agent confidence: 7/10
Built and trained a four-expert stable spectral memory-lift recurrent model on the structurally matched actuated-pendulum dynamics track using the canonical bench training loop and eight paired seeds. It achieved mean test MSE 1.8605e-05 versus 4.3304e-04 for the GRU baseline; all 8 paired differences favored the idea and the permutation p-value was 0.0081, so the harness verdict is a significant win. The trained-model signature confirmed a predicted slowest memory mode of 0.3353 and bounded observed state norm 2.5836.
- Baseline
- GRU, lr=0.01 selected by sweep: mean MSE 0.0004330402, std 0.0001868057
- Idea
- SpectralMemoryLift, lr=0.01 selected by matched sweep: mean MSE 0.0000186052, std 0.0000283193
- Idea wins
- 8/8
- Mechanism signature
- map[confirmed:true observed_max_state_norm:2.583609104156494 predicted_slowest_memory_mode:0.3352634608745575]
- Paired delta mean
- -0.00041443498906801324
- Permutation p value
- 0.0081
Benchmark result
Beats the tuned baseline by 95.7% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0004
- Idea mean
- 0
- Effect (Δ)
- -0.0004 (−95.7%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The test used the built-in 8-step dynamics window, 1000 training examples, 300 test examples, and 12 epochs rather than long-horizon rollout or language/SSM benchmarks. The idea model had 16077 parameters versus 3585 for the GRU, so parameter-count equality and throughput were not tested; only optimizer and learning-rate search budgets were matched. Explicit spectral penalties/projection were not measured.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 5.2 KB View Raw
- bench_report.json 2.8 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T171412.md 4.9 KB View
- results.json 4.1 KB View Raw
- spectral_memory_lift.py 6.9 KB View Raw