# Ratio-Stable Positive Recurrent Core

- ID: 1940
- Canonical URL: https://synthcore.org/idea/1940/ratio-stable-positive-recurrent-core
- API JSON: https://synthcore.org/api/idea/1940.json
- API Markdown: https://synthcore.org/api/idea/1940.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.07403](https://arxiv.org/abs/2608.07403)
- Category: dynamics
- Solves: stability, generalization, accuracy
- ML areas: rnn, ssm, optimizer, training-dynamics
- Math tags: dynamical-systems, control-theory, optimization, linear-algebra, spectral-theory
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Replace an unconstrained recurrent transition with a positive linear state-space core whose equilibrium has a prescribed composition vector. Fit or project its interaction matrix using a quadratic program with sign, sparsity, diagonal-dominance, and equilibrium constraints, then use the resulting stable dynamics as the hidden-state update.

## Mathematical statement

Let x in R^n be the hidden state, A in R^(n x n) the interaction matrix, b in R^n the bias, and mu in R^n be a positive composition vector with sum_i mu_i = 1. The desired equilibrium is x_star = c mu for c > 0. Positivity is guaranteed for the continuous-time system dx/dt = A x + b when A is Metzler, meaning A_ij >= 0 for i not equal to j, and b >= 0. Impose b = -A x_star so that x_star is an equilibrium. A simple computable stability certificate is row diagonal dominance: A_ii + sum_{j not equal to i} A_ij <= -alpha for every i, with alpha > 0. This makes A Hurwitz under suitable norm conditions and gives exponential contraction. For the discrete update x_(k+1) = (I + h A)x_k + h b, choose h small enough that I + h A is nonnegative and its spectral radius is below one. Signed topology labels can be enforced by setting A_ij = 0 for absent edges, A_ij >= 0 for positive edges, and A_ij <= 0 for negative edges; negative edges should be represented through a separate signed residual channel if strict state positivity is required.

## Key formulas

- x_i(k) >= 0, and lim_(t -> infinity) x(t) = x_star, with x_star_j / x_star_i = mu_j / mu_i, mu_i > 0, and sum_i mu_i = 1.
- min_(A,b) sum_(k=0)^(T-1) ||(x_(k+1) - x_k)/h - A x_k - b||_2^2 + lambda ||A||_F^2, subject to A_ij >= 0 for i not equal to j and A_ii + sum_(j not equal to i) A_ij <= -alpha.
- b = -A x_star, and x_(k+1) = (I + h A)x_k + h b + h B phi(U u_k).
- rho(I + h A) < 1, and ||x(t) - x_star||_infinity <= C exp(-alpha t) ||x(0) - x_star||_infinity.

## Implementation notes

1. Integration point: implement this module as the recurrent core of a small RNN, a linear state-space model, or a memory block inside a sequence model. Let x be the nonnegative hidden state and use an unconstrained linear readout y = W x + c. Choose a target composition vector mu either from empirical average hidden activations or as a learnable positive simplex vector.

2. Pseudocode: collect hidden-state pairs (x_k, x_(k+1)) from a warm-start model; solve the quadratic program in the formulas for A and b; enforce off-diagonal sign constraints and the row stability margin alpha; select h so that I + h A is elementwise nonnegative; update x_(k+1) = (I + h A)x_k + h b + h B phi(Uu_k); then fine-tune B, U, W, and optionally mu with backpropagation. Add an L1 penalty on A to encourage a sparse inferred topology.

3. Computed from the paper: the positivity condition, equilibrium-ratio constraint, sign restrictions, and constrained least-squares topology fit. Estimated empirically: A, B, U, W, alpha, h, and the contraction constant C. Log the minimum hidden coordinate, equilibrium-ratio error, spectral radius, and hidden-state norm over long rollouts.

4. First cheap experiment: compare a vanilla tanh RNN, a GRU, and this constrained core on sequential MNIST, permuted sequential MNIST, and a synthetic stable linear system with known equilibrium mu. Sweep h and alpha. The falsifiable prediction is that instability appears close to the measured boundary rho(I + h A) = 1, while the constrained model remains bounded below that boundary. On the synthetic system, the log error relative to equilibrium should decrease approximately linearly with slope -alpha, within 20 percent of the predicted rate. Long-horizon hidden-state variance and the frequency of negative activations should also be lower than for the unconstrained RNN at matched one-step loss.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: Built a readable NumPy MVP of the ratio-stable positive recurrent core with Metzler interactions, prescribed equilibrium, Euler updates, and parameter sweeps. The mechanism manifested: equilibrium residual was 0, the measured spectral-radius boundary matched prediction within 0.07%, decay slopes matched discrete theory within 0.33%, and the positivity boundary matched the predicted value at sweep resolution. The constrained core also reached 0.61 toy test accuracy versus 0.53 for the vanilla tanh RNN, though this is not evidence of broad accuracy improvement.

### Mechanism check

- Verdict: Built a readable NumPy MVP of the ratio-stable positive recurrent core with Metzler interactions, prescribed equilibrium, Euler updates, and parameter sweeps. The mechanism manifested: equilibrium residual was 0, the measured spectral-radius boundary matched prediction within 0.07%, decay slopes matched discrete theory within 0.33%, and the positivity boundary matched the predicted value at sweep resolution. The constrained core also reached 0.61 toy test accuracy versus 0.53 for the vanilla tanh RNN, though this is not evidence of broad accuracy improvement.
- Confidence: 8/10
- Limitations: The QP fitting/projection stage, signed topology residual channel, learnable composition vector, GPU implementation, GRU comparison, sequential MNIST, and large-scale training were not tested. The toy task uses fixed recurrent dynamics and trains only input/readout parameters; positivity above the Euler matrix boundary was identified through a negative matrix entry rather than a dedicated adversarial state rollout.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/741/bench_report.json)
- [experiment.py](https://synthcore.org/code/741/experiment.py)
- [positive_core_bench.py](https://synthcore.org/code/741/positive_core_bench.py)
- [report.md](https://synthcore.org/code/741/report.md)
- [report_bench_2026-09-01T020659.md](https://synthcore.org/code/741/report_bench_2026-09-01T020659.md)
- [results.json](https://synthcore.org/code/741/results.json)
- [Download all files as ZIP](https://synthcore.org/download/741)

## Disclaimer

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