Risk-Calibrated World-Model Gates
Implementation & benchmark of arXiv:2608.17956 — An Omitted Mode Is a Rare Rule: The Sampling-Verification Danger Law in Continuous Code World Models
Source paper: An Omitted Mode Is a Rare Rule: The Sampling-Verification Danger Law in Continuous Code World Models arXiv:2608.17956 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a fixed-size random transition gate with a risk-calibrated gate whose test count is chosen from the estimated probability of a critical event and the cost of shipping a model that misses it. The gate should combine ordinary i.i.d. rollouts with planner-generated probes aimed at high-cost boundaries, because uniform sampling can make a dangerous model appear perfectly accurate.
Formulas
Mathematical statement
For a critical event with probability r in one independent gate rollout, the probability that all N rollouts miss it is exactly P_miss=(1-r)^N. To make this probability at most delta, choose N >= log(delta)/log(1-r), equivalently N >= log(1/delta)/(-log(1-r)); for small r this is approximately log(1/delta)/r. If C is the play cost incurred by the shipped model when the gate misses the mode, and C is independent of acceptance, the expected danger risk factorizes as R=C(1-r)^N. If the training sample independently misses the same event with probability (1-r)^M and the acceptance sample has N rollouts, the joint blind-and-accepted probability is (1-r)^(M+N). Here r is the event probability under the gate distribution, N is the number of verification rollouts, M is the number of training samples, delta is the target miss probability, and C can be estimated as planner regret or episode cost under the blind model.
Implementation notes
Integrate this at the acceptance stage of a learned simulator or Code World Model, immediately after training and before allowing a planner to use the model. First define an event detector E(s,a,s') for mode-relevant behavior: contact with a boundary, abrupt velocity reset, termination, saturation, collision, or a large disagreement between independently trained predictors. Estimate r under the current gate distribution by counting E, but do not trust the estimate when zero events are observed. Use a conservative lower confidence estimate r_low from a Beta(1,1) prior or a stress-test distribution. If the target miss probability is delta, set N=ceil(log(delta)/log(1-r_low)). Run N ordinary rollouts and K planner-directed rollouts initialized near the highest predicted value-gradient, uncertainty, or boundary score. Reject the model if any transition violates the reference environment or if the estimated high-cost risk C_hat*(1-r_low)^N exceeds a deployment threshold. Pseudocode: sample or generate states z_i; execute reference and learned transitions; compute E_i and costs C_i; update r_low; compute N_required; accept only when N>=N_required and C_hat*(1-r_low)^N<=R_max. The exact mathematics supplies the miss probability and required sample count; r_low, C_hat, and the stress distribution are empirical. First test on a cart-with-wall or small MuJoCo contact task using an MLP simulator and random-gate baseline. Measure accepted blind models, contact detection rate, false rejection rate, and planner regret. Success is fewer catastrophic accepted models at the same verification budget, or a large regret reduction for a modest rollout increase.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a reproducible risk-calibrated gate MVP with required-rollout sizing, conservative lower event bounds, ordinary sampling, and planner-directed probes. The exact miss law matched Monte Carlo within 0.00272 absolute error; all required-count sweeps achieved target delta=0.05, with the small-r approximation within 3.2%. Matched-budget probes reduced observed miss probability from 0.77877 to 0.03343 at r=0.005 and from 0.60664 to 0.00065 at r=0.01, closely matching the multiplicative prediction. This confirms the mechanism, but not a real deployment win because probe effectiveness was prescribed rather than learned.
- Agent confidence
- 8/10
- Baseline
- Uniform 50-rollout miss probabilities: 0.77877, 0.60664, 0.36528, 0.07742 for r={0.005,0.01,0.02,0.05}.
- Idea
- 30 random plus 20 directed-probe miss probabilities: 0.03343, 0.00065, 0.0, 0.0 for the same r values; analytical predictions were 0.03335, 0.00059, 6.0e-9, and 2.36e-9.
Limitations: No learned simulator, reference environment, planner regret, collision detector, deployment threshold, or false-rejection analysis was tested. The stress probe rate q=min(0.60,30r) is synthetic and assumes independent stationary events.
How to run: python3 risk_gate_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.17956)
No significant difference vs. the tuned baseline (+20.5%, p=0.164, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- 0 (+20.5%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.164 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±30.4%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The idea was implemented as boundary-weighted transition loss rather than a full post-training risk gate with planner-generated rollouts. The official dynamics track evaluates one-step regression targets from an 8-step input window, so deployment acceptance, actual rollout miss probability, planner regret, risk cost C, false rejection, and wall-clock/FLOP tradeoffs were not tested. The CUDA GRU path failed with a cuDNN allocation error and the official trainer/local loop completed using CPU fallback.
How to run: python3 official_stage2.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
The official dynamics/rnn_small benchmark was successfully run with the required paired-seed protocol and shared learning-rate grid. The idea's best MSE was 7.27276e-06 versus the tuned baseline's 6.03494e-06, giving paired delta +1.23782e-06 and permutation p=0.164; verdict is no significant win. The mechanism signature was also not confirmed: both trained systems had zero critical bad-rate on the measured test behavior.
- Baseline
- Official bench baseline sweep best lr=0.006; full 8-seed mean MSE 6.034935353227411e-06, std 2.324192087412265e-06.
- Idea
- Official bench idea sweep best lr=0.006; full 8-seed mean MSE 7.2727560791463475e-06, std 3.341130715564463e-06; paired delta +1.2378207259189367e-06; permutation p-value 0.164; 3/8 paired wins.
Benchmark result
No significant difference vs. the tuned baseline (+20.5%, p=0.164, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- 0 (+20.5%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.164 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±30.4%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The idea was implemented as boundary-weighted transition loss rather than a full post-training risk gate with planner-generated rollouts. The official dynamics track evaluates one-step regression targets from an 8-step input window, so deployment acceptance, actual rollout miss probability, planner regret, risk cost C, false rejection, and wall-clock/FLOP tradeoffs were not tested. The CUDA GRU path failed with a cuDNN allocation error and the official trainer/local loop completed using CPU fallback.
How to run: python3 official_stage2.py
Artifacts
- bench_report.json 3.6 KB View Raw
- official_stage2.py 4.8 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T171258.md 5.6 KB View
- results.json 4.5 KB View Raw
- risk_gate_experiment.py 4.4 KB View Raw
- stage2_bench.py 5.9 KB View Raw