# Contractive projected residual dynamics

- ID: 575
- Canonical URL: https://synthcore.org/idea/575/contractive-projected-residual-dynamics
- API JSON: https://synthcore.org/api/idea/575.json
- API Markdown: https://synthcore.org/api/idea/575.md
- Verification status: beats_baseline
- Source: [arXiv:2607.08301](https://arxiv.org/abs/2607.08301)
- Category: dynamics
- Solves: stability, generalization, accuracy
- ML areas: rnn, ssm, training-dynamics, regularization
- Math tags: dynamical-systems, convex-analysis, geometry, functional-analysis
- Ratings: usefulness 6/10; difficulty 5/10; novelty 5/10

## Idea description

Build a recurrent or continuous-depth block from a dissipative vector field and project every state derivative onto the tangent cone of a closed convex hidden-state set. Unlike ordinary clipping, tangent-cone projection removes only the outward component at the boundary and preserves admissible motion. Under the paper's maximal-dissipativity result, the continuous flow is nonexpansive in its initial state.

## Mathematical statement

Let X be a Hilbert space, K a closed convex subset, and A_theta the learned drift. The tangent cone at x is T_K(x)=closure of {alpha(z-x): alpha>=0,z in K}, and the normal cone is N_K(x)={n: inner_product(n,z-x)<=0 for every z in K}. The constrained dynamics are dx/dt in A_theta(x,v)-N_K(x), equivalently dx/dt=Pi_{T_K(x)} A_theta(x,v) when the projection is single-valued. If A_theta is maximal dissipative, meaning inner_product(A_theta(x,v)-A_theta(z,v),x-z)<=0 for all x,z in K, the paper proves that the constrained operator remains maximal dissipative and generates a contraction semigroup. Thus two states satisfy ||x_1(t)-x_2(t)||<=||x_1(0)-x_2(0)||. The paper's equation (31) gives ||[y_tau1,x_1(tau),u_tau1]^T-[y_tau2,x_2(tau),u_tau2]^T|| <= ||[y_01,x_01,u_01]^T-[y_02,x_02,u_02]^T||, while the expanded energy inequality bounds output discrepancy, terminal state discrepancy, and future input discrepancy by initial state and total input discrepancy. In the neural adaptation, x is the hidden state, v is the input, K is a box or Euclidean ball, and A_theta is a parameterized dissipative drift.

## Key formulas

- $$N_K(x)=\{n\in X:\langle n,z-x\rangle\le 0\ \forall z\in K\},\qquad T_K(x)=\overline{\{\alpha(z-x):\alpha\ge 0,\ z\in K\}}$$
- $$\frac{d^+x(t)}{dt}\in A_\theta(x(t),v(t))-N_K(x(t)),\qquad \frac{dx(t)}{dt}=\Pi_{T_K(x(t))}A_\theta(x(t),v(t))$$
- $$\langle A_\theta(x,v)-A_\theta(z,v),x-z\rangle\le 0\quad\Longrightarrow\quad \|x_1(\tau)-x_2(\tau)\|^2\le \|x_1(0)-x_2(0)\|^2$$
- $$\int_0^\tau\|y_1(t)-y_2(t)\|_Y^2dt+\|x_1(\tau)-x_2(\tau)\|_X^2+\int_\tau^\infty\|u_1(t)-u_2(t)\|_U^2dt\le \|x_1(0)-x_2(0)\|_X^2+\int_0^\infty\|u_1(t)-u_2(t)\|_U^2dt$$

## Implementation notes

Integrate this into the hidden-state update of a recurrent model or an explicit Euler continuous-depth block. Let x_t in R^d be the hidden state and v_t the input embedding. Use K=[-1,1]^d initially. Parameterize the drift as A_theta(x_t,v_t)=-(L_theta^T L_theta+lambda I)x_t+B_theta v_t+b_theta, where L_theta and B_theta are learned matrices and lambda>=0; the negative semidefinite term enforces dissipativity in x. Compute q=A_theta(x_t,v_t). For each coordinate i, set p_i=q_i when -1<x_{t,i}<1; set p_i=max(q_i,0) when x_{t,i}=-1; and set p_i=min(q_i,0) when x_{t,i}=1. Update x_{t+1}=clip(x_t+h p,-1,1). The projection p is the discrete version of Pi_{T_K(x)}A_theta. For a more stable variant, perform 3 to 5 iterations of projected fixed-point updates for the implicit equation x_{t+1}=argmin_{z in K}||z-x_t-h A_theta(z,v_t)||^2. The paper guarantees contraction for the continuous maximal-dissipative system, not automatically for finite-step Euler updates, so estimate the implemented block's Jacobian norm by power iteration and log pairwise distance ratios. The first cheap experiment should use sequential MNIST or the adding problem with sequence lengths 500 and 1000. Compare a vanilla GRU, a spectrally normalized residual RNN, and this projected dissipative RNN at matched parameter count and FLOPs. Measure validation accuracy, gradient norm, hidden-state norm, perturbation amplification, and loss over sequence length. Success means bounded hidden states, no exploding gradients, final-state perturbation ratio near or below one, and equal-or-better accuracy than the stable baseline at long sequence lengths.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built a projected dissipative residual RNN with box tangent-cone projection and a fixed-seed long-sequence toy experiment. The numerical check showed no distance-expansion violations across 1,000 trials (maximum final/initial distance ratio 0.0368) and states remained within [-1,1]. In training, the idea strongly improved stability versus the vanilla residual baseline (perturbation ratio 0.067 vs 9.67; bounded state magnitude 1.0 vs 14.56), but accuracy was lower (0.805 vs 0.906), so the stability effect is real but an overall accuracy win was not demonstrated.

### Mechanism check

- Verdict: Built a projected dissipative residual RNN with box tangent-cone projection and a fixed-seed long-sequence toy experiment. The numerical check showed no distance-expansion violations across 1,000 trials (maximum final/initial distance ratio 0.0368) and states remained within [-1,1]. In training, the idea strongly improved stability versus the vanilla residual baseline (perturbation ratio 0.067 vs 9.67; bounded state magnitude 1.0 vs 14.56), but accuracy was lower (0.805 vs 0.906), so the stability effect is real but an overall accuracy win was not demonstrated.
- Confidence: 9/10
- Limitations: Only one toy sign-of-sum task, one random seed, hidden size 16, and sequence length 200 were tested. The experiment used explicit Euler rather than the optional implicit solver, did not compare against GRU or spectrally normalized RNN, and did not measure FLOPs, Jacobian power-iteration norms, or gradient-vs-sequence-length curves.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 8/8
- Benchmark verdict: idea better (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/1394/bench_report.json)
- [experiment.py](https://synthcore.org/code/1394/experiment.py)
- [report.md](https://synthcore.org/code/1394/report.md)
- [report_bench_2026-09-04T195448.md](https://synthcore.org/code/1394/report_bench_2026-09-04T195448.md)
- [results.json](https://synthcore.org/code/1394/results.json)
- [stage2_bench.py](https://synthcore.org/code/1394/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/1394)

## Disclaimer

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