# Log-Hölder Lyapunov Trust Region

- ID: 50
- Canonical URL: https://synthcore.org/idea/50/log-h-lder-lyapunov-trust-region
- API JSON: https://synthcore.org/api/idea/50.json
- API Markdown: https://synthcore.org/api/idea/50.md
- Verification status: mechanism_failed
- Source: [arXiv:2608.22157](https://arxiv.org/abs/2608.22157)
- Category: dynamics
- Solves: stability, generalization
- ML areas: rnn, ssm, optimizer, training-dynamics
- Math tags: dynamical-systems, probability, random-matrix, stochastic-processes
- Ratings: usefulness 6/10; difficulty 5/10; novelty 7/10

## Idea description

Treat a recurrent or state-space layer as a finite-state Markov cocycle and constrain optimizer steps using the paper's inverse-logarithmic sensitivity of Lyapunov exponents near a zero exponent gap. Instead of enforcing a crude spectral-norm bound, allow updates that are harmless for long-run growth while shrinking steps that could substantially change the recurrent stability profile.

## Mathematical statement

Let $A_i\in GL(2,\mathbb R)$ be the matrix associated with mode $i$, and let $P$ be a primitive transition matrix satisfying $P_{ij}\geq0$, $\sum_jP_{ij}=1$. Its stationary row vector satisfies $p(P)P=p(P)$ and $\sum_i p_i(P)=1$. For a stationary Markov path $(X_t)$, define the top Lyapunov exponent by $\lambda_+(A,P)=\lim_{n\to\infty}n^{-1}\mathbb E[\log\|A_{X_{n-1}}\cdots A_{X_0}\|]$ and the lower exponent using the smallest singular value, $\lambda_-(A,P)=\lim_{n\to\infty}n^{-1}\mathbb E[\log\|A_{X_{n-1}}\cdots A_{X_0}\|_{\min}]$. At parameters with zero gap $\lambda_+=\lambda_-$, the paper proves pointwise log-Hölder continuity under perturbations within a fixed transition graph: if $d=\max_i\|A_i-\widetilde A_i\|_2+\|P-\widetilde P\|_\infty$ is small, exponent changes are bounded by a constant times $|\log d|^{-1/2}$ in the general nonsplit triangular case, and by $|\log d|^{-1}$ in the conformal case. The adaptation uses this modulus as a conservative trust-region estimate for recurrent parameter updates.

## Key formulas

- $$P_{ij}\geq 0,\qquad \sum_{j\in X}P_{ij}=1,\qquad p(P)P=p(P),\qquad \sum_{i\in X}p_i(P)=1.$$
- $$\lambda_+(A,P)=\lim_{n\to\infty}\frac{1}{n}\,\mathbb E\left[\log\left\|A_{X_{n-1}}\cdots A_{X_0}\right\|\right],\qquad \lambda_-(A,P)=\lim_{n\to\infty}\frac{1}{n}\,\mathbb E\left[\log\left\|A_{X_{n-1}}\cdots A_{X_0}\right\|_{\min}\right].$$
- $$\left|\lambda_+(A,P)-\lambda_+(\widetilde A,\widetilde P)\right|\lesssim\frac{C}{|\log d|^{1/2}},\qquad d=\max_i\|A_i-\widetilde A_i\|_2+\|P-\widetilde P\|_\infty.$$
- $$\left|\lambda_+(A,P)-\lambda_+(\widetilde A,\widetilde P)\right|\lesssim\frac{C_{\mathrm{conf}}}{|\log d|}\quad\text{for conformal cocycles}. $$

## Implementation notes

(1) Integration point: use a gated RNN or state-space layer with $K$ discrete modes. The recurrent update is $h_{t+1}=A_{z_t}h_t+B_{z_t}u_t$, where $z_t$ follows a learned transition matrix $P$. Apply the controller to the recurrent matrices $A_i$ and transition logits, not to the input matrix.

(2) Pseudocode:
```text
for each optimizer step:
    save A_old and P_old
    compute the ordinary gradient proposal A_new, P_new
    estimate l_plus_old, l_minus_old with QR products along mode paths
    estimate l_plus_new, l_minus_new for the proposal
    d = max_i spectral_norm(A_new[i]-A_old[i]) + max_abs(P_new-P_old)
    alpha = 0.5                 # general cocycle
    if conformal_mode: alpha = 1.0
    bound = C_hat / abs(log(max(d, d_min)))**alpha
    if abs(l_plus_new-l_plus_old) > bound or l_plus_new > stability_budget:
        backtrack the step, or multiply its learning rate by 0.5
    otherwise accept the proposal
```
Parameterize $P_{ij}=\exp(q_{ij})/\sum_{k\in N(i)}\exp(q_{ik})$ over allowed neighbors $N(i)$ so the transition graph remains fixed. Use QR reorthogonalization every few time steps; accumulate the logarithms of the diagonal of $R$ for the top exponent and use inverse-transpose products for the lower exponent.

(3) The logarithmic modulus, the exponent $\alpha=1/2$, and the conformal improvement $\alpha=1$ come from the paper. The constant $C$ is estimated empirically: collect checkpoint pairs, compute $d$ and observed $|\Delta\lambda_+|$, and choose a high quantile of $|\Delta\lambda_+||\log d|^\alpha$ as $\widehat C$. Define the zero-gap regime using $g=\max(\lambda_+-\lambda_-,0)<0.05$.

(4) First cheap experiment: train a two-mode width-64 RNN on permuted MNIST using AdamW, comparing the controller with ordinary AdamW at matched FLOPs across five seeds. Record exploding-gradient frequency, training loss versus steps, validation accuracy, estimated Lyapunov exponents, and accepted/backtracked update counts. The main falsifiable target is fewer divergent runs and the ability to use at least a 2x larger base learning rate without instability, with no loss in final validation accuracy.

## Verification

- Status: mechanism_failed
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a two-mode conformal Markov-cocycle verifier and a small CUDA RNN trust-region comparison. The exact math checks confirmed zero Lyapunov gap and the expected local perturbation slope (observed 0.999999 versus predicted 1.0), while an inverse-log envelope held only when calibrated over the full tested range; calibration on tiny perturbations had 0/7 held-out coverage, showing it is a loose local bound rather than a reliable practical controller. In the RNN test the controller backtracked all 90 updates in every seed and reached 0.539 accuracy versus 0.983 for baseline, so the proposed adaptation did not produce a training win.

### Mechanism check

- Verdict: Built a two-mode conformal Markov-cocycle verifier and a small CUDA RNN trust-region comparison. The exact math checks confirmed zero Lyapunov gap and the expected local perturbation slope (observed 0.999999 versus predicted 1.0), while an inverse-log envelope held only when calibrated over the full tested range; calibration on tiny perturbations had 0/7 held-out coverage, showing it is a loose local bound rather than a reliable practical controller. In the RNN test the controller backtracked all 90 updates in every seed and reached 0.539 accuracy versus 0.983 for baseline, so the proposed adaptation did not produce a training win.
- Confidence: 9/10
- Limitations: Only a tiny synthetic sequence task and three seeds were tested, not permuted MNIST or a realistic learned multi-mode recurrent model. The controller used a scalar spectral-growth proxy for the RNN matrix rather than full QR exponent estimates at every optimizer proposal, and no careful constant-estimation or FLOP-matched hyperparameter retuning was performed.

## Artifacts

- [report.md](https://synthcore.org/code/694/report.md)
- [results.json](https://synthcore.org/code/694/results.json)
- [run_experiment.py](https://synthcore.org/code/694/run_experiment.py)
- [verification.json](https://synthcore.org/code/694/verification.json)
- [verify_math.py](https://synthcore.org/code/694/verify_math.py)
- [Download all files as ZIP](https://synthcore.org/download/694)

## Disclaimer

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