# Finite-Horizon Lyapunov Risk Monitor

- ID: 1469
- Canonical URL: https://synthcore.org/idea/1469/finite-horizon-lyapunov-risk-monitor
- API JSON: https://synthcore.org/api/idea/1469.json
- API Markdown: https://synthcore.org/api/idea/1469.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.26963](https://arxiv.org/abs/2607.26963)
- Category: regularization
- Solves: stability, generalization
- ML areas: rnn, ssm, training-dynamics, regularization
- Math tags: dynamical-systems, statistics, random-matrix, linear-algebra
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Treat the hidden-state evolution of an RNN or state-space model as a randomly perturbed map and estimate the distribution of finite-time expansion rates rather than only the spectral radius of an average Jacobian. Penalize high-probability positive FTLEs, allowing the model to remain expressive while controlling rare finite-horizon explosions.

## Mathematical statement

For a stochastic map x_{t+1}=f_{theta_t}(x_t) with independently sampled parameters theta_t, define lambda_T=(1/T) log ||J_{T-1}...J_0||, where J_t=Df_{theta_t}(x_t) is the hidden-state Jacobian and ||.|| is the spectral norm. Let mu_{T,sigma}=E[lambda_T] and v_{T,sigma}=Var(lambda_T) under perturbation amplitude sigma. The paper's finite-time Gaussian mechanism predicts (lambda_T-mu_{T,sigma})/sqrt(v_{T,sigma}) is approximately standard normal. Therefore the probability of finite-horizon expansion is p_+=P(lambda_T>0) approximately equal to 1-Phi(-mu_{T,sigma}/sqrt(v_{T,sigma})). A one-sided upper-confidence penalty controls this probability directly.

## Key formulas

- $$\lambda_T(x_0)=\frac{1}{T}\ln\left\|Df_{\theta_{T-1}}(x_{T-1})\cdots Df_{\theta_0}(x_0)\right\|.$$
- $$\frac{\lambda_T-\mu_{T,\sigma}}{\sqrt{v_{T,\sigma}}}\approx\mathcal{N}(0,1),\qquad p_+\approx1-\Phi\left(\frac{-\mu_{T,\sigma}}{\sqrt{v_{T,\sigma}}}\right).$$
- $$\mathcal{L}_{\mathrm{total}}=\mathcal{L}_{\mathrm{task}}+\rho\left[\widehat{\mu}_{T,\sigma}+z_{1-\alpha}\widehat{s}_{T,\sigma}\right]_+^2.$$

## Implementation notes

Integration point: apply this to an RNN, gated state-space model, or discretized neural ODE with hidden update h_{t+1}=F_theta(h_t,u_t). During training, inject independently resampled parameter noise or input noise at every unrolled step and measure the hidden-state Jacobian. Pseudocode: for each of K perturbation realizations, initialize a random unit vector q and set s=0; for t=0,...,T-1 compute q=J_t q using a Jacobian-vector product, add log(||q||+epsilon) to s, and renormalize q; store lambda=s/T. Estimate mu_hat and s_hat from the K samples and add the displayed upper-confidence penalty to the task loss. The paper supplies the product-Jacobian FTLE definition and Gaussian standardization. The mean, variance, Jacobian-vector products, and Gaussianity are estimated empirically; no full Jacobian is needed. First experiment: train tanh RNNs on sequential MNIST or the adding problem, comparing no penalty, a mean-FTLE penalty, and the upper-confidence penalty. Sweep T and noise amplitude sigma. The prediction is that standardized FTLE histograms become approximately normal and that the observed positive-FTLE fraction agrees with p_+ within about 10 percentage points. A divergence boundary should occur near mu_hat+z_{0.95}s_hat=0; models below this boundary should exhibit fewer long-horizon hidden-state explosions.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a differentiable finite-horizon FTLE monitor for a noisy tanh RNN, including mean and one-sided UCB risk variants, plus an exact scalar stochastic-map verification. In the toy sweep, observed standard deviations matched sigma/sqrt(T) within about 0.1%, tail probabilities matched the Gaussian prediction closely, and the UCB crossed zero at sigma=0.195 versus the predicted 0.1945. The mechanism is therefore numerically manifested, although the RNN comparison is not evidence of a practical task-performance win because the unregularized baseline was already highly contractive.

### Mechanism check

- Verdict: Built a differentiable finite-horizon FTLE monitor for a noisy tanh RNN, including mean and one-sided UCB risk variants, plus an exact scalar stochastic-map verification. In the toy sweep, observed standard deviations matched sigma/sqrt(T) within about 0.1%, tail probabilities matched the Gaussian prediction closely, and the UCB crossed zero at sigma=0.195 versus the predicted 0.1945. The mechanism is therefore numerically manifested, although the RNN comparison is not evidence of a practical task-performance win because the unregularized baseline was already highly contractive.
- Confidence: 9/10
- Limitations: The scalar verification is an analytically Gaussian construction, so it validates the formulas but not Gaussianity for nonlinear RNN dynamics. The RNN study used a tiny adding-style task, one noise level, short training, K=4 monitor samples, and did not test sequential MNIST, FLOPs, long-horizon generalization, or multiple random seeds.

### Practical benchmark

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

## Artifacts

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

## Disclaimer

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