Differentiable Maximal-Attractor Trap
Implementation & benchmark of arXiv:2608.18761 — Maximal attractors for perturbations of unimodal maps near a homoclinic tangency
Source paper: Maximal attractors for perturbations of unimodal maps near a homoclinic tangency arXiv:2608.18761 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Constrain a recurrent neural transition to map a compact learned-state region strictly into its interior, creating a neural analogue of the paper's maximal attractor. Unlike simple spectral normalization, this permits a nontrivial invariant set and can preserve task-relevant recurrent dynamics while preventing long-horizon state escape.
Formulas
Mathematical statement
Let f_theta: R^d -> R^d be the hidden-state transition and let U be a compact trapping region. The defining condition is f_theta(cl U) subset int U, and the maximal attractor is F_theta = intersection over n >= 0 of f_theta^n(U). Use U = [-alpha, alpha]^d with alpha > 0 and enforce a margin epsilon > 0 by penalizing violations of |f_theta(x)_j| <= alpha - epsilon for sampled x in U. The finite approximation F_theta,N = intersection over n = 0,...,N of f_theta^n(U) is estimated using reachable particles or interval samples. Strict forward invariance and compactness imply bounded trajectories starting in U and convergence toward an invariant maximal set, although finite sampling only provides an empirical certificate.
Implementation notes
1. Exact integration point: apply the method to the hidden-state update of an RNN, state-space model, or learned world model, h_(t+1) = f_theta(h_t, u_t). For the first test, set inputs to zero or restrict them to a bounded set V, choose U = [-alpha, alpha]^d, and use a tanh MLP transition. 2. Pseudocode: sample B states x_k uniformly from U; compute y_k = f_theta(x_k, 0); calculate L_trap as the mean softplus of |y_kj| - alpha + epsilon; optimize L_task + lambda_trap L_trap. Every M training steps, initialize particles X_0 in U, propagate X_(n+1) = f_theta(X_n, 0), and record maximum norm, violation rate, cloud diameter, and Hausdorff distance between successive clouds. 3. Taken from the paper: the trapping-region definition and the nested forward-image construction. Estimated empirically: whether the sampled region is invariant, the finite-time attractor, and convergence of reachable clouds. A stronger implementation can use interval-bound propagation instead of point samples to obtain a conservative box certificate. 4. First cheap experiment: train a 32-unit RNN on Mackey-Glass next-step prediction, comparing a vanilla model with the trap-regularized model over 1,000-step rollouts from 10,000 random hidden states. The quantitative prediction is a sharp escape transition as lambda_trap becomes large enough to drive empirical violations below 0.1 percent. Above that boundary, maximum hidden-state norm stays bounded, and the Hausdorff distance between X_N and X_(N+1) decreases with N; excessive lambda_trap should shrink attractor diameter and degrade prediction accuracy.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
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 8/10
Built a differentiable trapping-loss RNN experiment plus an analytic tanh-map verification. The mechanism manifested: the exact strict-invariance boundary was predicted as a=1.2474 and the first violating sweep point was a=1.25; the toy map also showed the predicted transition at a=1 and closely matched nonzero fixed-point attractor diameters. In the RNN, trap regularization reduced long-horizon violations from 99.9% mean at lambda=0 to 0% at lambda>=3, with max hidden norm falling from 2.46 to 0.76 at lambda=3, at the cost of higher MSE.
- Agent confidence
- 8/10
- Baseline
- lambda=0: MSE 0.00551, one-step violation 78.7%, mean 300-step violation 99.92%, max hidden norm 2.464
- Idea
- lambda=3: MSE 0.01078, one-step violation 0%, mean 300-step violation 0%, max hidden norm 0.763; lambda=10 further shrank norm to 0.007 but MSE rose to 0.01630
Limitations: The invariance certificate is empirical point sampling rather than interval-bound or exact verification for the learned RNN. The task used zero-input dynamics, a small 16-unit RNN, one fixed seed, short training, and a synthetic Mackey-Glass setup; no FLOP-normalized study, multiple-seed statistics, nonzero bounded inputs, or larger benchmarks were tested.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.18761)
Ahead of the baseline (-0.0008 metric points) but not statistically significant (p=0.2266, wins 6 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0034
- Effect (Δ)
- -0.0008 (n/a; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.2266 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±33.6%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
The registered benchmark used 400 training and 200 test examples, a 32-unit RNN, 12 epochs, zero inputs, and sampled rather than interval-certified trapping constraints. No exact invariance certificate, larger models, longer training, nonzero bounded inputs, or additional tracks were tested.
How to run: python3 stage2_bench.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
Implemented the Differentiable Maximal-Attractor Trap as a sampled trapping loss on the registered dynamics/rnn_small benchmark. The best idea configuration improved mean test MSE from 0.0041100 to 0.0033520, but the paired permutation test gave p=0.22655, so this is not a significant win under the bench rule. The trained-model signature confirmed reduced one-step sampled violations, while the long-horizon mean violation reduction was modest.
- Baseline
- Best tuned baseline: lr=0.01, epochs=12, trap_lambda=0.0; mean test MSE 0.0041099994 over 8 seeds.
- Idea
- Best idea: lr=0.01, epochs=12, trap_lambda=0.3; mean test MSE 0.0033519628 over 8 seeds; paired delta -0.0007580366; 6/8 wins; p=0.22655.
- Math check
- For a*tanh(x) with alpha=1 and epsilon=0.05, predicted boundary 1.2473835 and observed grid boundary 1.25, absolute error 0.0026165.
- Mechanism signature
- Seed-0 trained-model measurement: one-step violation 0.821289 baseline versus 0.303223 idea; mean 100-step violation 0.998208 baseline versus 0.988950 idea; idea max one-step absolute coordinate 0.961669.
Benchmark result
Ahead of the baseline (-0.0008 metric points) but not statistically significant (p=0.2266, wins 6 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0034
- Effect (Δ)
- -0.0008 (n/a; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.2266 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±33.6%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
The registered benchmark used 400 training and 200 test examples, a 32-unit RNN, 12 epochs, zero inputs, and sampled rather than interval-certified trapping constraints. No exact invariance certificate, larger models, longer training, nonzero bounded inputs, or additional tracks were tested.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 22.1 KB View Raw
- experiment.py 5.4 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T172049.md 4.6 KB View
- results.json 6.2 KB View Raw
- stage2_bench.py 8.7 KB View Raw