# Border-Collision Multi-Attractor Memory

- ID: 866
- Canonical URL: https://synthcore.org/idea/866/border-collision-multi-attractor-memory
- API JSON: https://synthcore.org/api/idea/866.json
- API Markdown: https://synthcore.org/api/idea/866.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.13519](https://arxiv.org/abs/2607.13519)
- Category: architecture
- Solves: memory, accuracy, sample-efficiency
- ML areas: rnn, ssm, memory, world-model
- Math tags: dynamical-systems, bifurcations, linear-algebra, control-theory
- Ratings: usefulness 7/10; difficulty 7/10; novelty 7/10

## 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.

## 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.

## Key formulas

- $$T(x,y)=\bigl(|x|+ay-1,\ x+c|y|-1\bigr),\qquad T^p(z)=z,$$
- $$M_p=\prod_{i=p-1}^{0}J_{q_i},\qquad J_{q_i}=\begin{bmatrix}s_{x,i}&a\\1&cs_{y,i}\end{bmatrix},\qquad \rho(M_p)<1\ \text{for a stable period-}p\text{ orbit},$$
- $$\text{Border collision: }x_i=0\ \text{or}\ y_i=0\ \text{for some }i;\qquad \text{Flip: }1+\operatorname{tr}(J)+\det(J)=0,$$
- $$\mathcal{L}_{\mathrm{orbit}}=\|T^p(z_0)-z_0\|^2+\beta\max\bigl(0,\rho(M_p)-1+\epsilon\bigr)^2.$$

## 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

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 8/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.20345
- Paired wins: 2/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_experiment.py](https://synthcore.org/code/350/bench_experiment.py)
- [bench_report.json](https://synthcore.org/code/350/bench_report.json)
- [experiment.py](https://synthcore.org/code/350/experiment.py)
- [report.md](https://synthcore.org/code/350/report.md)
- [report_bench_2026-08-31T015813.md](https://synthcore.org/code/350/report_bench_2026-08-31T015813.md)
- [results.json](https://synthcore.org/code/350/results.json)
- [Download all files as ZIP](https://synthcore.org/download/350)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
