✗ Failed on benchmark 2026

Residual-Scenario Safety Training

Implementation & benchmark of arXiv:2607.04165 — Scenario-based Data-Enabled Predictive Control: Robustification via the Scenario Approach

Usefulness6/10
Difficulty5/10
Novelty6/10

Source paper: Scenario-based Data-Enabled Predictive Control: Robustification via the Scenario Approach arXiv:2607.04165 ⓘ · analyzed Aug 30, 2026

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

Idea description

Train a neural dynamics predictor or policy output head against an empirical buffer of observed prediction-error scenarios rather than only nominal targets. For each input, require the predicted output plus every sampled residual trajectory to remain inside the admissible set, using an exact nonnegative slack penalty when robust feasibility is impossible. This should reduce rare but operationally important constraint violations while preserving nominal tracking accuracy.

Formulas

$$y_k^{(i)}=y_{\mathrm{pred},k}+s_k^{(i)}$$
$$u_k\in\mathcal{U},\quad y_k^{(i)}\in\mathcal{Y},\qquad \forall k\in\{0,\ldots,N-1\},\ \forall i\in\{1,\ldots,N_{\mathrm{scen}}\}$$
$$h\geq 0,\qquad \min\; J_{\mathrm{nominal}}(W)+\mu\|h\|_1,\qquad y_k^{(i)}\in\mathcal{Y}(h)$$
$$\sum_{j=0}^{d-1}\binom{N_{\mathrm{scen}}}{j}\varepsilon^j(1-\varepsilon)^{N_{\mathrm{scen}}-j}\leq\beta$$

Mathematical statement

The paper models a scenario-perturbed prediction as $y_k^{(i)}=y_{\mathrm{pred},k}+s_k^{(i)}$, where $y_{\mathrm{pred},k}\in\mathbb{R}^{n_y}$ is the nominal prediction at horizon step $k$ and $s_k^{(i)}\in\mathbb{R}^{n_y}$ is the sampled single-step error; the stacked scenario is $s^{(i)}=[s_0^{(i)};\ldots;s_{N-1}^{(i)}]$. It imposes $y_k^{(i)}\in\mathcal{Y}$ for every time step $k$ and scenario index $i$, while retaining $u_k\in\mathcal{U}$. The relaxed formulation introduces $h\geq0$ and uses an $\ell_1$ penalty $\mu\|h\|_1$; Proposition 6.8 states that this gives feasibility by construction and that sufficiently large $\mu$ makes the slack vanish whenever the unrelaxed problem is feasible. Adapt this to a neural predictor $f_\theta$ with nominal output $\hat y=f_\theta(z)$, residual scenarios $s^{(i)}$, admissible output set $\mathcal{Y}$, and scalar or elementwise violation slack $h_i\geq0$. The distribution-free scenario interpretation requires exchangeable or iid residual scenarios and a convex decision problem; preserve that interpretation initially by freezing the nonlinear feature extractor and optimizing only a linear output head.

Implementation notes

Integrate this at the output head of either a learned multi-step dynamics model or a neural policy. Let a frozen encoder produce $\phi_t=\phi_\psi(z_t)\in\mathbb{R}^p$, and let the trainable head produce nominal outputs $\hat y_{t:t+N-1}=W\Phi_t+b$, where $W,b$ are the only optimized variables during the first experiment. Maintain a FIFO residual buffer $\mathcal B$ containing observed errors $e_t=y_t-\hat y_t$; normalize residuals componentwise and remove only logging artifacts. At each minibatch, draw $N_{\mathrm{scen}}$ residual trajectories $s^{(i)}=[s_0^{(i)};\ldots;s_{N-1}^{(i)}]$ by bootstrap sampling blocks from $\mathcal B$. Compute $y^{(i)}=\hat y+s^{(i)}$. For box constraints $\ell\leq y\leq u$, compute $h_i=\max(0,\ell-y^{(i)},y^{(i)}-u)$ elementwise and use $L=L_{\mathrm{nominal}}+\lambda_W\|W\|_F^2+\mu\sum_i\|h_i\|_1$. Alternatively solve the convex frozen-head problem directly with projected gradient or a QP solver when the nominal loss is quadratic. Update the buffer online after every prediction window, optionally conditioning sampling on regime labels or nearest-neighbor state regions so scenarios reflect operating-point-dependent errors. The paper supplies the scenario perturbation, all-scenario constraint logic, and exact-penalty mechanism; estimate residuals empirically and estimate the effective head dimension $d$ as the number of free parameters in $W,b$. If using the confidence calculation, choose violation tolerance $\varepsilon$ and confidence failure probability $\beta$, then increase $N_{\mathrm{scen}}$ until the displayed binomial tail is at most $\beta$. First test on a small GRU or MLP predictor for cart-pole or pendulum, comparing ordinary MSE training, Gaussian-noise augmentation, and residual-scenario training with equal forward-pass budgets. Track nominal MSE, worst-quantile rollout error, fraction of trajectories violating output bounds, average slack, and calibration on a held-out disturbance distribution. Success means substantially fewer 95th/99th-percentile constraint violations with only a small nominal-MSE increase; the frozen-encoder experiment should establish whether the scenario mechanism is useful before end-to-end fine-tuning.

Verification

Failed on benchmark

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗

Stage 2 · Practical benchmark result: No measurable effect

Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works

Stage 1 — Mechanism check agent confidence 7/10

Built a frozen affine output-head MVP using bootstrap residual scenarios, box constraints, and an exact nonnegative slack penalty. The slack elimination identity matched brute-force minimization to 2.2e-16. Across five seeds, residual-scenario training reduced held-out disturbance violation rate by 24.0% and mean slack by 27.0%, while nominal clean-target MSE increased 10.6%; this is a promising but modest safety signal, with essentially unchanged p95 error.

Agent confidence
7/10
Baseline
5-seed mean: nominal MSE 0.0001694, p95 absolute error 0.19770, violation rate 0.003919, mean slack 0.0001557
Idea
5-seed mean: nominal MSE 0.0001873 (+10.6%), p95 absolute error 0.19784 (+0.07%), violation rate 0.0029775 (-24.0%), mean slack 0.0001137 (-27.0%)

Limitations: This is a scalar one-step toy with a frozen affine head, iid Gaussian held-out disturbances, and no multi-step dynamics, regime-conditioned sampling, Gaussian-augmentation control, calibration analysis, or formal scenario-confidence validation. The evaluated violation rate is low and p99 slack is zero, so the magnitude and generality of the safety improvement remain uncertain.

How to run: python3 multi_seed.py

Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.04165)

Ahead of the baseline (-0.0001 metric points) but not statistically significant (p=0.6789, wins 5 / 8 paired seeds).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0
Idea mean
0.0013
Effect (Δ)
-0.0001 (n/a; negative = idea better)
Wins
5 / 8 paired seeds
p-value
0.6789 (permutation test, 20 000 shuffles)
Smallest detectable effect
n/a
Mechanism
Not confirmed ✗
Practical effect
No effect
Baseline tuning
swept over 12 configs
Limitations:

Only the built-in 400-train/200-test dynamics subset and 12 training epochs were tested. The benchmark measured one-step target MSE and empirical residual slack, not long-horizon rollout constraint violations, regime-conditioned buffers, Gaussian augmentation, or formal scenario-confidence guarantees.

How to run: python3 bench_experiment.py

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

Stage 2 — Benchmark latest Failed ✗

Agent confidence: 8/10

Built residual-scenario training with a bootstrap residual buffer, box-constraint slack penalty, and the shared rnn_small model on the controlled-pendulum dynamics track. Across 8 paired seeds, test MSE changed from 0.0014198302 to 0.0013042011, but the paired permutation p-value was 0.6789; both systems had zero measured mean slack, so the claimed safety benefit was not demonstrated.

Baseline
mean test MSE 0.0014198302; std 0.0003983911; best config lr=0.01, mu=0.0
Idea
mean test MSE 0.0013042011; std 0.0005283693; best config lr=0.01, mu=0.05
Mechanism signature
baseline residual std=0.03405833, idea residual std=0.03194591, baseline mean slack=0.0, idea mean slack=0.0, confirmed=false
Paired comparison
delta_mean=-0.0001156291; idea wins 5/8; permutation p=0.6789; verdict=no significant win

Benchmark result

Ahead of the baseline (-0.0001 metric points) but not statistically significant (p=0.6789, wins 5 / 8 paired seeds).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0
Idea mean
0.0013
Effect (Δ)
-0.0001 (n/a; negative = idea better)
Wins
5 / 8 paired seeds
p-value
0.6789 (permutation test, 20 000 shuffles)
Smallest detectable effect
n/a
Mechanism
Not confirmed ✗
Practical effect
No effect
Baseline tuning
swept over 12 configs
Limitations:

Only the built-in 400-train/200-test dynamics subset and 12 training epochs were tested. The benchmark measured one-step target MSE and empirical residual slack, not long-horizon rollout constraint violations, regime-conditioned buffers, Gaussian augmentation, or formal scenario-confidence guarantees.

How to run: python3 bench_experiment.py

Artifacts

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