Border-Collision Multi-Attractor Memory
Implementation & benchmark of arXiv:2607.13519 — Noninvertibility and Bifurcation Phenomena in a Four-Partitions Piecewise Linear Map
Source paper: Noninvertibility and Bifurcation Phenomena in a Four-Partitions Piecewise Linear Map arXiv:2607.13519 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use the paper's stable periodic orbits and border-collision transitions as an intentional memory mechanism in a recurrent module. Different input-dependent parameter settings can place the same cell in fixed-point, period-2, or higher-period regimes, allowing a compact state to encode discrete modes without allocating one separate neural attractor per mode.
Formulas
Mathematical statement
The cell uses the piecewise-linear map \(T(x,y)=(|x|+ay-1,x+c|y|-1)\). A period-\(p\) attractor is a point \(z\) satisfying \(T^p(z)=z\) with minimal period \(p\), whose product Jacobian \(M_p=J_{q_{p-1}}\cdots J_{q_0}\) has spectral radius \(\rho(M_p)<1\). Each \(q_i\) is the quadrant visited at step \(i\). A Border Collision occurs when one orbit point satisfies \(x_i=0\) or \(y_i=0\), changing one factor of \(M_p\). A Fold Border Collision is detected when stable and saddle period-\(p\) orbits coalesce at a border. A Flip transition from a fixed point to period 2 occurs when a fixed-point multiplier crosses \(-1\), namely \(1+\operatorname{tr}(J)+\det(J)=0\), provided the other multiplier is not on the unit circle.
Implementation notes
1. Integration point: create a bank of two-dimensional recurrent cells in an RNN, world model, or compact sequence classifier. Let an input-dependent hypernetwork select \((a_t,c_t)\) through bounded functions such as \(a_t=a_{\max}\tanh(w_a^\top u_t)\) and \(c_t=c_{\max}\tanh(w_c^\top u_t)\). The hidden state can then move among fixed-point and periodic attractor regimes. Decode the attractor mode with a linear head. 2. Pseudocode: during a warm-up phase, iterate z=cell(z,u) for \(K\) steps; for candidate periods \(p\in\{1,2,3,4\}\), compute residual=norm(T^p(z)-z)^2, record the quadrant sequence, form \(M_p\) by multiplying the exact quadrant Jacobians, and add the orbit loss above when a target mode is requested. For classification, combine cross-entropy with a weak separation loss between attractor representatives. 3. Computed from the paper: the four-partition map, quadrant Jacobians, periodic-orbit stability criterion, and interpretation of border collisions as transitions between distinct cycles. Estimated empirically: period, basin membership, border distance, and \(\rho(M_p)\) by multistart orbit iteration and finite differences. Do not assume closed-form period-3 or period-4 coordinates; locate them by multistart solves of \(T^p(z)-z=0\). 4. First cheap experiment: train on a synthetic sequence task in which a mode token selects period 1, 2, 3, or 4 and the model must recall that mode after 100--1000 blank steps. Compare against same-parameter-count tanh-RNN and GRU. Sweep hypernetwork gain so trajectories cross \(x=0\) or \(y=0\). The predicted signature is an abrupt change in observed period and basin assignment at border crossings, stable modes satisfying \(\rho(M_p)<1\), and a sharp recall-error increase when the measured multiplier crosses \(\rho(M_p)=1\).
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
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 and ran a numerical MVP of the border-collision map with exact quadrant Jacobians, analytic fixed/2-cycle candidates, stability checks, border sweeps, and a small recall demo. The predicted flip boundary a=0 was observed exactly, fixed-point stability classification matched the analytic region on 98.9% of 832 grid points, and the predicted period-2 border c=(2-3a)/4 was observed exactly with the symbolic cycle changing from 34 to 24. The memory demo showed a promising but incomplete signal: 60% mode recall versus 25% for a shared contracting tanh baseline, but the selected parameters produced only periods 1 and 2 rather than four clean modes.
- Agent confidence
- 8/10
- Baseline
- Shared 2D stable tanh recurrence: 25% mode recall after 150 blank steps; all four states contracted to the same decoded prototype.
- Idea
- Border-collision map: 60% nearest-prototype mode recall; fixed-point stability sweep accuracy 98.9% (832 valid grid points); flip observed at a=0 with multiplier -1; period-2 border predicted and observed at c=-0.175 for a=0.9, with 34 below and 24 above the border; stable-point perturbation log slope -0.156 versus predicted log rho(J)=-0.131, though norm ratios oscillated.
Limitations: No trained hypernetwork RNN or GRU comparison was implemented; the memory demo used hand-selected parameter regimes and nearest-prototype decoding. It did not produce stable period-3/period-4 attractors, did not test long sequence datasets or FLOPs, and the contraction sweep crossed piecewise dynamics enough to make individual norm ratios non-monotonic.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.13519)
No significant difference vs. the tuned baseline (+58.2%, p=0.2034, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- matched_tanh_vs_border_cells
- Paired seeds
- 8
- Baseline mean
- 0.0063
- Idea mean
- 0.0099
- Effect (Δ)
- 0.0037 (+58.2%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.2034 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±101.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics pendulum rollout was tested; no custom long-delay recall track, period-3/period-4 attractor training, or larger hyperparameter sweep was run. The mechanism diagnostic used four-step products from trained final hidden states and was exploratory rather than a full basin/attractor census.
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: 9/10
Implemented a matched end-to-end dynamics benchmark: an exact input-conditioned border-collision recurrent system versus a same-width tanh RNN, using the canonical bench training path, shared learning-rate sweep, and 8 paired seeds. The idea was worse (MSE 0.00994385 vs 0.00628474; paired delta +0.00365911, permutation p=0.20345), so it did not produce a significant win. The trained-model mechanism signature was not confirmed: mean product spectral radius was 1.5247 and only 4.69% of measured states had rho<1.
- Baseline
- Test MSE mean 0.0062847389781381935, std 0.003016475610481406, best lr=0.01
- Idea
- Test MSE mean 0.009943852724973112, std 0.009340805162427421, best lr=0.01
Benchmark result
No significant difference vs. the tuned baseline (+58.2%, p=0.2034, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- matched_tanh_vs_border_cells
- Paired seeds
- 8
- Baseline mean
- 0.0063
- Idea mean
- 0.0099
- Effect (Δ)
- 0.0037 (+58.2%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.2034 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±101.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics pendulum rollout was tested; no custom long-delay recall track, period-3/period-4 attractor training, or larger hyperparameter sweep was run. The mechanism diagnostic used four-step products from trained final hidden states and was exploratory rather than a full basin/attractor census.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 6.3 KB View Raw
- bench_report.json 4.4 KB View Raw
- experiment.py 7.4 KB View Raw
- report.md 1.8 KB View
- report_bench_2026-08-31T015813.md 3.6 KB View
- results.json 2.0 KB View Raw