✗ Mechanism failed 2026

Jointly Contractive Input-Conditioned RNN

Implementation & benchmark of arXiv:2607.03849 — Stability of input-output maps and their minimal realizations in state-linear, state-affine, LPV, and linear switched systems

Usefulness6/10
Difficulty5/10
Novelty6/10

Source paper: Stability of input-output maps and their minimal realizations in state-linear, state-affine, LPV, and linear switched systems arXiv:2607.03849 ⓘ · analyzed Aug 29, 2026

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

Idea description

Replace pointwise spectral normalization of an RNN transition with a stability constraint on the entire family of input-conditioned matrices. Use a learned positive-definite metric P so every transition contracts in the same state geometry, approximating the paper's uniform exponential stability and input-forgetting guarantee.

Formulas

$$x(t+1)=A_{u(t)}x(t),\qquad y(t)=Cx(t)$$
$$\rho_{\mathrm{jsr}}(\{A_u\})=\limsup_{T\to\infty}\ \sup_{u_0,\ldots,u_{T-1}}\left\|A_{u_{T-1}}\cdots A_{u_0}\right\|^{1/T}<1$$
$$A_u^{\top}PA_u\preceq\rho^2P\quad\forall u\in\mathbb U,\qquad P\succ0,\quad 0<\rho<1$$
$$V_{t+1}=x(t+1)^\top Px(t+1)\le\rho^2V_t\quad\Longrightarrow\quad\|x(t)\|_P\le\rho^t\|x(0)\|_P$$

Mathematical statement

The paper studies state-linear systems x(t+1)=A_{u(t)}x(t), y(t)=Cx(t), where x(t) is the hidden state, u(t) is the input, A_u is the transition matrix selected by the input, and C is the readout. Its central stability principle is that uniform global exponential stability is equivalent to the joint spectral radius of the matrix family {A_u}_{u\in\mathbb{U}} being less than one. The joint spectral radius is defined by rho_jsr({A_u})=limsup_{T o\infty} sup_{u_0,...,u_{T-1}} ||A_{u_{T-1}}...A_{u_0}||^{1/T}. For an implementable sufficient condition, introduce P positive definite and 0<rho<1 such that A_u^T P A_u is less than or equal to rho^2 P for every admissible u. Then the Lyapunov energy V_t=x_t^T P x_t satisfies V_{t+1}<=rho^2 V_t and therefore ||x_t||_P<=rho^t||x_0||_P, where ||x||_P=sqrt(x^T P x). This common quadratic condition is stronger than joint-spectral-radius stability but is differentiable enough to enforce during neural-network training.

Implementation notes

Integrate this into an input-conditioned GRU-like or state-space recurrent layer whose transition is h_{t+1}=A(z_t)h_t+G(z_t), with z_t being the current token embedding or a low-dimensional projection of it. Start with a finite set of K transition matrices A_k produced by K learned basis matrices and softmax gates: A(z)=sum_k pi_k(z)A_k; enforce the constraint on each basis matrix, which also controls every convex mixture. Parameterize P=L L^T+epsilon I using a lower-triangular L with positive diagonal. At every training step, compute the normalized Lyapunov violation for each basis matrix, r_k=max(0, lambda_max(P^{-1/2}A_k^T P A_k P^{-1/2})-rho^2), and add lambda_L sum_k r_k^2 to the task loss. A cheaper guaranteed variant computes B_k=P^{1/2}A_kP^{-1/2} and parameterizes B_k=rho*tanh(s_k)*Q_k, where Q_k is approximately orthogonal, then maps back to A_k; use the penalty version first because it is less restrictive. Estimate the finite-horizon joint spectral radius empirically by sampling many token sequences and tracking g_T=max_sequences ||A_{T-1}...A_0||_2^{1/T}; this estimate is diagnostic, not a formal guarantee. Pseudocode: initialize h=0; for t in 1..T, compute pi=softmax(router(z_t)), set A=sum_k pi_k*A_k, and update h=A@h+G(z_t). Add loss=task_loss+lambda_L*sum_k*r_k^2, then backpropagate and update A_k and L. Estimate lambda_max with 5 to 10 power iterations rather than full eigendecomposition for large hidden states. The first cheap experiment should compare a 2-layer 256-unit input-conditioned RNN with unconstrained transitions, standard spectral normalization, and the Lyapunov penalty on sequential MNIST and copy/add tasks. Measure gradient norms, hidden-state norms, long-sequence loss, accuracy, and wall-clock overhead at equal parameters and FLOPs. Success means bounded hidden norms, fewer exploding-gradient runs, and better long-context accuracy without materially slowing short-sequence convergence.

Verification

Mechanism failed

Stage 1 · Toy mechanism gate: Failed ✗

Stage 2 · Mechanism transferred to benchmark: Not tested

Stage 2 · Practical benchmark result: Not run

Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works

Stage 1 — Mechanism check agent confidence 8/10

Built an input-conditioned recurrent layer with a learned positive-definite metric, generalized-eigenvalue Lyapunov penalty, pointwise spectral-normalization control, and an explicit product-contraction sanity check. The core math check passed: all basis matrices satisfied the bound and sampled convex-mixture products contracted substantially in the P-norm. However, on the toy 30-step memory task, the Lyapunov model did not improve over controls: long-sequence accuracy was 0.445 for all variants and final MSE was essentially 1.0, so the promised task-level win was not observed.

Agent confidence
8/10
Baseline
Free: final MSE 0.99966, long accuracy 0.4453, max basis P-gain 1.2454, runtime 18.32 s; spectral: final MSE 0.99984, long accuracy 0.4453, max basis P-gain 0.9338, runtime 21.05 s
Idea
Lyapunov penalty: final MSE 0.99953, long accuracy 0.4453, max basis P-gain 0.8815, runtime 21.11 s; math check max basis violation -0.3238 and max normalized sampled product ratio 0.3901 at rho=0.82

Limitations: Only a small synthetic one-bit memory task was tested, with an 8-unit single-layer recurrent model rather than the proposed larger GRU-like architecture or sequential MNIST/copy-add benchmarks. The task setup and rho=0.90 constraint may make 30-step memory intrinsically difficult; no hyperparameter sweep, formal JSR computation, or repeated-seed statistical comparison was performed.

How to run: python3 experiment.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Artifacts

Implementation overview ⬇ Download all as ZIP 2 files · code, reports and structured results