# Parameter-Dependent Lyapunov Neural Dynamics

- ID: 2938
- Canonical URL: https://synthcore.org/idea/2938/parameter-dependent-lyapunov-neural-dynamics
- API JSON: https://synthcore.org/api/idea/2938.json
- API Markdown: https://synthcore.org/api/idea/2938.md
- Verification status: unverified
- Source: [arXiv:2608.28349](https://arxiv.org/abs/2608.28349)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: rnn, ssm, optimizer, training-dynamics
- Math tags: control-theory, dynamical-systems, linear-algebra, optimization
- Ratings: usefulness 8/10; difficulty 6/10; novelty 6/10

## Idea description

Replace an unconstrained recurrent or neural-ODE hidden-state evolution with a parameter-conditioned vector field whose Jacobian is contractive in a learned positive-definite metric. A Lyapunov residual is added during training using the current context, time, or operating-condition vector, allowing one model to remain stable across changing regimes rather than only near one nominal point.

## Mathematical statement

Let $z(t)\in\mathbb{R}^{n}$ be the hidden state, $\theta(t)$ a measurable conditioning parameter, and $\dot z=f_\phi(z,\theta,t)$. The local generator is $A_\phi(z,\theta,t)=\partial f_\phi/\partial z$. Let $P_\psi(\theta,t)=P_\psi(\theta,t)^\top\succ p_{\min}I$ be a parameter-dependent Lyapunov metric, where $p_{\min}>0$. The transferred differential LMI is $\dot P_\psi+A_\phi^\top P_\psi+P_\psi A_\phi+2\alpha P_\psi\preceq0$, with desired decay rate $\alpha>0$. It implies that $V(\delta z,t)=\delta z^\top P_\psi\delta z$ satisfies $\dot V\le-2\alpha V$ for infinitesimal perturbations. For a residual layer $z_{k+1}=z_k+h f_\phi(z_k,\theta_k)$, the finite-step condition is $J_k^\top P_{k+1}J_k\preceq e^{-2\alpha h}P_k$, where $J_k=I+hA_k$.

## Key formulas

- $$\dot z=f_\phi(z,\theta,t),\qquad A_\phi(z,\theta,t)=\frac{\partial f_\phi}{\partial z},\qquad V(\delta z,t)=\delta z^\top P_\psi(\theta,t)\delta z.$$
- $$\dot P_\psi+A_\phi^\top P_\psi+P_\psi A_\phi+2\alpha P_\psi\preceq0,\qquad P_\psi\succeq p_{\min}I>0.$$
- $$J_k^\top P_{k+1}J_k\preceq e^{-2\alpha h}P_k,\qquad J_k=I+hA_k.$$
- $$\mathcal{L}_{\mathrm{lyap}}=\frac{1}{N}\sum_{k=0}^{N-1}\left[\max\left(0,\lambda_{\max}\left(P_k^{-1/2}(J_k^\top P_{k+1}J_k-e^{-2\alpha h}P_k)P_k^{-1/2}\right)\right)\right]^2.$$

## Implementation notes

1. Integration point: use a residual RNN, neural ODE solver, or latent state-space block. Parameterize $P_\psi(\theta,t)=L_\psi(\theta,t)L_\psi(\theta,t)^\top+p_{\min}I$, where $L_\psi$ is lower triangular with positive diagonal. 2. Pseudocode: compute $z_{k+1}=z_k+h f_\phi(z_k,\theta_k,t_k)$; obtain $A_k$ explicitly for small states or through Jacobian-vector products and power iteration for large states; evaluate $P_k$ and $P_{k+1}$; compute the largest generalized eigenvalue of $(J_k^\top P_{k+1}J_k,e^{-2\alpha h}P_k)$; add its positive part to the task loss; update $\phi$ and $\psi$. 3. Computed from the mechanism: the Lyapunov inequality, decay rate $\alpha$, and metric positivity. Estimated empirically: local Jacobians, parameter derivatives of $P$, and minibatch averages over trajectories. 4. First experiment: train equal-width GRUs and residual MLP dynamics on sequence-copy and Lorenz-63 prediction tasks. Compare vanilla training, spectral normalization, and this penalty at equal optimizer steps; ablate both the Lyapunov term and parameter dependence of $P$. 5. Pre-registered signature: perturbation energy must satisfy $V_k\le e^{-2\alpha kh}V_0$ up to discretization error, and the measured contraction factor must cross one near $\lambda_{\max}(P_k^{-1/2}J_k^\top P_{k+1}J_kP_k^{-1/2})=e^{-2\alpha h}$. Reject the transfer if the empirical boundary differs by more than 20%, or if the Lyapunov residual is positive without reducing perturbation growth versus the ablation.

## Verification

- Status: unverified
- Mechanism evidence: yes
- Mechanism confirmed: no
- Verdict: Built a compact parameter-conditioned residual dynamics model with a learned positive-definite metric and finite-step generalized-eigenvalue Lyapunov penalty. The exact 2D check satisfied the finite-step LMI (maximum normalized residual eigenvalue -0.083) and the measured energy ratio 0.797 was below the theoretical bound 0.946. In the learned comparison, the penalty reduced violating transitions from 44.5% to 3.9% and reduced the mean residual eigenvalue from 0.634 to -0.247, but prediction MSE worsened from 0.0199 to 0.0233, so the stability effect is real while there was no accuracy win.

### Mechanism check

- Verdict: Built a compact parameter-conditioned residual dynamics model with a learned positive-definite metric and finite-step generalized-eigenvalue Lyapunov penalty. The exact 2D check satisfied the finite-step LMI (maximum normalized residual eigenvalue -0.083) and the measured energy ratio 0.797 was below the theoretical bound 0.946. In the learned comparison, the penalty reduced violating transitions from 44.5% to 3.9% and reduced the mean residual eigenvalue from 0.634 to -0.247, but prediction MSE worsened from 0.0199 to 0.0233, so the stability effect is real while there was no accuracy win.
- Confidence: 8/10
- Limitations: Only a tiny 2D one-step residual-dynamics task was tested for 120 optimization steps. The parameter transition used for P_{k+1} was a rolled minibatch condition rather than a generated multi-step trajectory, and no GRU, Lorenz-63, spectral-normalization baseline, long-horizon robustness test, or equal-FLOP study was run.

## Artifacts

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

## Disclaimer

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