# Horizon-Dependent Error Tubes for Recurrent Rollouts

- ID: 2021
- Canonical URL: https://synthcore.org/idea/2021/horizon-dependent-error-tubes-for-recurrent-rollouts
- API JSON: https://synthcore.org/api/idea/2021.json
- API Markdown: https://synthcore.org/api/idea/2021.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.08921](https://arxiv.org/abs/2608.08921)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: rnn, ssm, world-model, training-dynamics
- Math tags: control-theory, dynamical-systems, spectral-theory, linear-algebra
- Ratings: usefulness 8/10; difficulty 5/10; novelty 7/10

## Idea description

Wrap an RNN, neural state-space model, or recurrent world model with an element-wise uncertainty tube that is propagated separately at every future step. Use the resulting tube to tighten output constraints or penalize predictions whose uncertainty reaches unsafe regions, avoiding the excessive conservatism of a single worst-case bound shared by all horizons.

## Mathematical statement

Let the nominal recurrent dynamics be $h_{j+1}=f_\theta(h_j,u_j)$ and let $\hat h_j$ be the nominal rollout. Linearize the perturbed rollout with respect to hidden-state error $e_j=h_j-\hat h_j$: $e_{j+1}\approx A_j e_j+w_j$, where $A_j=\partial f_\theta/\partial h$ evaluated at $(\hat h_j,u_j)$ and $w_j$ is an additive bound containing observation noise, model error, quantization error, and linearization residuals. For element-wise absolute bounds $\bar e_j\ge |e_j|$, propagate $\bar e_{j+1}=|A_j|\bar e_j+\bar w_j$ with $\bar e_0$ equal to the initial-state error bound. If $|A_j|\le M$ element-wise and the nonnegative matrix $M$ satisfies $\rho(M)<1$, then the tube is bounded by $\bar e_\infty\le(I-M)^{-1}\bar w$, where $\rho$ is spectral radius. For an output $y_j=g_\theta(h_j)$ with element-wise Jacobian bound $G_j$, tighten a constraint $y_j\in[y_{\min},y_{\max}]$ to $g_\theta(\hat h_j)\in[y_{\min}+G_j\bar e_j,y_{\max}-G_j\bar e_j]$.

## Key formulas

- $$\bar{e}_{j+1}=|A_j|\bar{e}_j+\bar{w}_j,\qquad \bar{e}_0\ge |h_0-\hat h_0|.$$
- $$\rho(M)<1\ \Longrightarrow\ \bar e_j\le M^j\bar e_0+\sum_{i=0}^{j-1}M^{j-1-i}\bar w_i,\qquad \bar e_\infty\le(I-M)^{-1}\bar w.$$
- $$y_{\min}+G_j\bar e_j\le g_\theta(\hat h_j)\le y_{\max}-G_j\bar e_j.$$

## Implementation notes

1. Integration point: apply this wrapper to a GRU, vanilla RNN, or diagonal/low-rank SSM used for multi-step forecasting or world-model rollouts. Keep the network's nominal hidden state and add a parallel nonnegative vector `ebar`; do not sample trajectories during the first implementation. At each rollout step, compute or upper-bound the hidden Jacobian $A_j$. For a GRU, use automatic differentiation followed by interval or absolute-value bounds; for a diagonal SSM, use the exact diagonal transition magnitudes. Estimate $\bar w_j$ from a held-out residual quantile, sensor-noise specification, or injected quantization noise. 2. Pseudocode: initialize `h=encoder(x0)`, `ebar=initial_error`; for `j in range(H)`, compute `h_next=f_theta(h,u[j])`, compute `A_abs=abs(jacobian(f_theta,h))` or a conservative bound, set `ebar=A_abs@ebar+wbar[j]`, compute output margin `margin=G_abs@ebar`, and either reject or tighten unsafe predictions or add `lambda*relu(margin-|constraint slack|)^2` to the loss. Estimate a uniform certificate matrix $M$ by taking element-wise maxima of $|A_j|$ over training rollouts, or use a blockwise local $M$. 3. From the paper, the required mechanism is the element-wise recursion and Perron–Frobenius condition; Jacobian bounds and disturbance quantiles are empirical estimates. 4. First cheap experiment: train a small GRU on noisy sine-wave or Lorenz forecasting and compare ordinary rollout training with tube-regularized training at horizons 1--100. Scale recurrent gain by a factor $\alpha$ and measure $\rho(M)$. The quantitative prediction is a sharp transition near $\rho(M)=1$: for $\rho(M)<1$, median propagated error should plateau at approximately $(I-M)^{-1}\bar w$; for $\rho(M)>1$, it should grow exponentially with slope close to $\log\rho(M)$, and the measured long-horizon violation rate should increase sharply across this boundary.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a readable element-wise error-tube propagator and verified its core math numerically. The predicted boundary alpha=1/rho(B)=1.28205 was observed: rho=0.99 remained bounded over the finite horizon, rho=1.01 grew, and measured log-growth at rho=1.05/1.20 was 0.04930/0.18232 versus predictions 0.04879/0.18232. Below the boundary, the propagated tube converged to (I-A)^(-1)w with 0.2% relative error at rho=0.95; near-boundary (1-rho)*plateau stayed 0.0247--0.0282. In the time-varying comparison, a single worst-case matrix produced a final tube 1.78x larger than local horizon-dependent propagation. Random bounded disturbances had zero bound violations. This is a clear toy mechanism win, not evidence of improved trained-RNN forecasting.

### Mechanism check

- Verdict: Built a readable element-wise error-tube propagator and verified its core math numerically. The predicted boundary alpha=1/rho(B)=1.28205 was observed: rho=0.99 remained bounded over the finite horizon, rho=1.01 grew, and measured log-growth at rho=1.05/1.20 was 0.04930/0.18232 versus predictions 0.04879/0.18232. Below the boundary, the propagated tube converged to (I-A)^(-1)w with 0.2% relative error at rho=0.95; near-boundary (1-rho)*plateau stayed 0.0247--0.0282. In the time-varying comparison, a single worst-case matrix produced a final tube 1.78x larger than local horizon-dependent propagation. Random bounded disturbances had zero bound violations. This is a clear toy mechanism win, not evidence of improved trained-RNN forecasting.
- Confidence: 9/10
- Limitations: Only a deterministic 2D linear positive-system toy was tested; no GRU/SSM training, learned Jacobian estimation, noisy sine/Lorenz forecasting, constraint-violation rate, FLOPs, or GPU experiment was evaluated. The exact rho=1 case was assessed over a finite horizon, so divergence is inferred from continued growth rather than an infinite-time computation.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.19985
- Paired wins: 6/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/765/bench_report.json)
- [report.md](https://synthcore.org/code/765/report.md)
- [report_bench_2026-09-01T101555.md](https://synthcore.org/code/765/report_bench_2026-09-01T101555.md)
- [results.json](https://synthcore.org/code/765/results.json)
- [stage2_tube_bench.py](https://synthcore.org/code/765/stage2_tube_bench.py)
- [tube_experiment.py](https://synthcore.org/code/765/tube_experiment.py)
- [Download all files as ZIP](https://synthcore.org/download/765)

## Disclaimer

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