# Digital-Recurrence Lyapunov Monitor

- ID: 2386
- Canonical URL: https://synthcore.org/idea/2386/digital-recurrence-lyapunov-monitor
- API JSON: https://synthcore.org/api/idea/2386.json
- API Markdown: https://synthcore.org/api/idea/2386.md
- Verification status: mechanism_failed
- Source: [arXiv:2608.16120](https://arxiv.org/abs/2608.16120)
- Category: regularization
- Solves: stability, accuracy
- ML areas: rnn, ssm, world-model, training-dynamics, scheduler
- Math tags: dynamical-systems, numerical-analysis, statistics, random-matrix
- Ratings: usefulness 7/10; difficulty 5/10; novelty 8/10

## Idea description

Add a numerical-health monitor that distinguishes genuine contraction or chaos from finite-precision periodicization. It tracks hidden-state recurrence, effective cycle length, and the divergence between single-rollout and independent-restart Lyapunov estimates, then triggers precision escalation, rollout truncation, perturbation, or training early stopping when the diagnostic enters the recurrence-collapse regime.

## Mathematical statement

For a deployed transition $z_{t+1}=Q(F_\theta(z_t))$, define the first recurrence time $\tau=\min\{t>s\geq0:z_t=z_s\}$ and the observed period $P=t-s$. For continuous floating-point states, equality can be replaced by a hash collision or $\|z_t-z_s\|_\infty\leq\varepsilon$. Let $\widehat\lambda_1(N)$ be the forecast-error Lyapunov estimate from one length-$N$ trajectory and $\widehat\lambda_R(N)$ the mean estimate from $R$ independently restarted trajectories of short horizon $K$. Define the collapse ratio $C(N)=|\widehat\lambda_1(N)-\widehat\lambda_R(N)|/(|\widehat\lambda_R(N)|+\epsilon)$, where $\epsilon>0$ prevents division by zero. The paper predicts that $C(N)$ rises when $N$ exceeds the transient-plus-period recurrence scale, while independent restarts delay the effect. This creates an actionable alarm rather than treating a near-zero exponent as a reliable property of the learned system.

## Key formulas

- $$\tau=\min\{t>s\geq0:\ z_t=z_s\},\qquad P=t-s,$$
- $$\widehat\lambda_1(N)=\operatorname{slope}\left(\log\|\delta_k\|\right)_{k=1}^{N},\qquad \widehat\lambda_R(K)=\frac{1}{R}\sum_{r=1}^{R}\operatorname{slope}\left(\log\|\delta^{(r)}_k\|\right)_{k=1}^{K},$$
- $$C(N)=\frac{|\widehat\lambda_1(N)-\widehat\lambda_R(K)|}{|\widehat\lambda_R(K)|+\epsilon},\qquad \text{alarm if }N\gtrsim\tau\text{ and }C(N)>c_0,$$

## Implementation notes

1. Integration point: place the monitor around validation rollouts and, optionally, inside an adaptive training controller for RNNs, SSMs, neural simulators, or diffusion samplers with deterministic low-precision state updates. Keep a shadow fp32/fp64 run only for calibration when affordable. 2. Pseudocode: maintain a bounded hash table of recent quantized hidden states; record the first repeated hash, estimated period, and transient. Every validation interval, calculate one long-rollout exponent $\widehat\lambda_1(N)$ and a restart estimate from $R$ independent segments of length $K$. Compute $C(N)$. If recurrence is detected and $C(N)>c_0$, shorten rollout windows, increase precision, inject a tiny controlled state perturbation, or use restart averaging; log the intervention rather than silently reporting the collapsed exponent. 3. Exact quantities are state hashes and finite-difference forecast errors; the threshold $c_0$, tolerance $\varepsilon$, and minimum repeat count should be selected on a held-out precision calibration run. 4. First cheap experiment: use a 2-layer tanh RNN on Mackey-Glass or Lorenz-63, compare fp16, bf16, fp32, and fp64, and sweep rollout length logarithmically. Predict a kink: $C(N)$ should remain low before the measured recurrence scale and rise sharply afterward, while the single-rollout exponent decreases toward zero. Reproducing the paper's logistic-map control requires the collapse near $N=20,000$--$30,000$ in float32 and no comparable collapse in float64.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a bounded state-recurrence monitor with exact/grid-hash detection, finite-difference Lyapunov slopes, restart averaging, collapse ratio, and alarm logic. The logistic-map sanity check found float32 recurrence at tau=4686 with period 4344, while float64 had no recurrence through 20,000 steps. However, C(N) rose to about 0.91 by N=512 in both float32 and float64, well before float32 recurrence, indicating separation saturation rather than recurrence collapse; therefore the claimed effect was not validated.

### Mechanism check

- Verdict: Built a bounded state-recurrence monitor with exact/grid-hash detection, finite-difference Lyapunov slopes, restart averaging, collapse ratio, and alarm logic. The logistic-map sanity check found float32 recurrence at tau=4686 with period 4344, while float64 had no recurrence through 20,000 steps. However, C(N) rose to about 0.91 by N=512 in both float32 and float64, well before float32 recurrence, indicating separation saturation rather than recurrence collapse; therefore the claimed effect was not validated.
- Confidence: 9/10
- Limitations: Only a deterministic logistic-map toy system was tested, not an RNN, neural simulator, or training controller. The Lyapunov estimator uses raw finite-difference separation slopes without renormalization, so chaotic-distance saturation confounds the collapse ratio. No intervention effectiveness, wall-clock overhead, approximate hashing, or held-out threshold calibration was evaluated.

## Artifacts

- [digital_recurrence.py](https://synthcore.org/code/935/digital_recurrence.py)
- [report.md](https://synthcore.org/code/935/report.md)
- [results.json](https://synthcore.org/code/935/results.json)
- [Download all files as ZIP](https://synthcore.org/download/935)

## Disclaimer

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