# P-Metric Contractive State Transition

- ID: 307
- Canonical URL: https://synthcore.org/idea/307/p-metric-contractive-state-transition
- API JSON: https://synthcore.org/api/idea/307.json
- API Markdown: https://synthcore.org/api/idea/307.md
- Verification status: unverified
- Source: [arXiv:2607.00383](https://arxiv.org/abs/2607.00383)
- Category: dynamics
- Solves: stability, generalization, accuracy
- ML areas: rnn, ssm, world-model, regularization
- Math tags: dynamical-systems, control-theory, linear-algebra, optimization
- Ratings: usefulness 6/10; difficulty 5/10; novelty 5/10

## Idea description

Replace an unconstrained recurrent or latent-dynamics transition with a transition whose local Jacobian is contractive in a learned or fixed positive-definite metric P. Add a hinge penalty whenever the induced P-norm of the Jacobian exceeds a target factor eta<1, so perturbations and differences between trajectories decay after each step.

## Mathematical statement

Definition 1 of the paper calls a discrete-time system x(t+1)=f_t(x(t)) strongly contracting in the norm ||v||_P=sqrt(v^T P v), with P=P^T positive definite, when every pair of trajectories satisfies ||x^(1)(t+1)-x^(2)(t+1)||_P <= eta ||x^(1)(t)-x^(2)(t)||_P for eta in (0,1). For a differentiable neural transition f_theta, let J_theta(x)=partial f_theta(x)/partial x. A sufficient local differential condition is J_theta(x)^T P J_theta(x) <= eta^2 P, equivalently ||P^(1/2)J_theta(x)P^(-1/2)||_2 <= eta. Enforcing this inequality on states sampled from training trajectories transfers the paper's contraction guarantee approximately to a neural transition; if the inequality holds everywhere on an invariant state domain, the resulting closed-loop latent dynamics are globally contractive on that domain.

## Key formulas

- $$\|x^{(1)}(t+1)-x^{(2)}(t+1)\|_{P}\leq\eta\|x^{(1)}(t)-x^{(2)}(t)\|_{P},\qquad \|v\|_{P}=\sqrt{v^{\top}Pv},\quad 0<\eta<1.$$
- $$J_{\theta}(x)^{\top}P J_{\theta}(x)\preceq \eta^{2}P\quad\Longleftrightarrow\quad \left\|P^{1/2}J_{\theta}(x)P^{-1/2}\right\|_{2}\leq\eta.$$
- $$\mathcal{L}_{\mathrm{contr}}(x)=\left[\left\|P^{1/2}J_{\theta}(x)P^{-1/2}\right\|_{2}^{2}-\eta^{2}\right]_{+}^{2},\qquad \mathcal{L}=\mathcal{L}_{\mathrm{task}}+\lambda\,\mathbb{E}_{x\sim\mathcal{D}}[\mathcal{L}_{\mathrm{contr}}(x)].$$

## Implementation notes

Integrate this at the recurrent or state-space transition, not at the readout: for an RNN use h_{t+1}=f_theta(h_t,u_t), and for a latent world model use z_{t+1}=f_theta(z_t,a_t). Start with P=I for a cheap baseline, then optionally parameterize P=LL^T+epsilon I and normalize trace(P)=d to prevent the penalty from being defeated by metric scaling. For each minibatch, collect hidden states x from teacher-forced or replay trajectories. Estimate the largest singular value of the transformed Jacobian T=P^(1/2)J_theta(x)P^(-1/2) by 2-5 power iterations using Jacobian-vector products and vector-Jacobian products; do not materialize J. Use this update: inputs are x, target eta, metric P, and coefficient lambda; initialize a random unit vector v; repeatedly compute w=T v, set v=w/(||w||_2+epsilon); after the iterations set s=||T v||_2; accumulate hinge=(max(0,s^2-eta^2))^2; optimize task_loss+lambda*mean(hinge). Detach the power-iteration vector between iterations initially for stability, then test full differentiation. The paper supplies the contraction inequality and target factor; the Jacobian norm, sampled states, and any P update are estimated numerically. Begin with a 1-2 layer GRU on sequential MNIST or a small linear-control-inspired latent prediction task, comparing an ordinary GRU, spectral-normalized GRU, and this penalty at equal parameter count and FLOPs. Measure validation accuracy, gradient norms, multi-step rollout error, sensitivity to perturbed initial states, and the fraction of sampled states violating the bound. Success means fewer exploding or unstable rollouts and lower long-horizon prediction error at comparable one-step loss, without materially reducing short-horizon accuracy.

## Disclaimer

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