Uniform Stochastic Barrier Critic
Implementation & benchmark of arXiv:2608.30318 — Converse Barrier Certificates for Set-Based Stochastic Reach-Avoid Verification
Source paper: Converse Barrier Certificates for Set-Based Stochastic Reach-Avoid Verification arXiv:2608.30318 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a neural barrier function that certifies a lower bound on the probability of reaching a target before entering an unsafe set, uniformly over an entire compact set of initial states. Add boundary and expected-drift penalties to a learned world model or policy, and enforce a positive slack margin rather than fitting only pointwise trajectories. The mechanism should improve safety under distribution shift because the certificate constrains one-step stochastic transitions throughout the reachable state region.
Formulas
Mathematical statement
Let the stochastic closed-loop system be $x_{k+1}=F(x_k,u_k,w_k)$, with policy $u_k=\pi_\phi(x_k)$ and disturbance $w_k\sim P(\cdot\mid x_k)$. Let $T$ be the target set, $U$ the unsafe set, and $C$ the continuation region, typically $C=S\setminus(T\cup U)$ where $S$ is the safe region. Let $B_\theta:S\to\mathbb{R}_{\ge 0}$ be a neural barrier. A sufficient supermartingale certificate for failure probability at most $q$ is $B_\theta(x)\le q-\delta$ for every $x$ in the compact initial set $X_0$, $B_\theta(x)\ge 1$ for every $x\in U$, $B_\theta(x)=0$ on $T$, and $\mathbb{E}[B_\theta(x_{k+1})\mid x_k=x]\le B_\theta(x)-\delta$ or, for the weaker infinite-horizon condition, $\mathbb{E}[B_\theta(x_{k+1})\mid x_k=x]\le B_\theta(x)$ for all $x\in C$. Here $\delta>0$ is a uniform certificate margin and $q=1-p$ for desired reach-avoid probability $p$. Optional stopping gives $\Pr_x(\text{hit }U\text{ before }T)\le B_\theta(x)$ and hence $\Pr_x(\text{hit }T\text{ before }U)\ge 1-B_\theta(x)\ge p+\delta$ on $X_0$. The paper's converse result says that, under continuous transitions, compact $X_0$, and a strict uniform probability margin, a barrier-like object of this type exists whenever the uniform reach-avoid specification is true; the neural approximation is the implementation hypothesis to test.
Implementation notes
1. Exact integration point: attach a scalar MLP $B_\theta(x)$ to a stochastic policy, learned dynamics model, or model-based RL system. Use it as a safety regularizer during policy training and as a runtime monitor; the task loss remains the ordinary RL or imitation objective. Restrict evaluation to a compact safe envelope $S$ and explicitly define target $T$, unsafe $U$, continuation $C$, and initial set $X_0$.
2. Pseudocode: sample minibatches from $X_0,U,T,C$; for each $x\in C$, draw $M$ disturbances $w_j$ and compute $x'_j=F(x,\pi_\phi(x),w_j)$, then estimate $\widehat P_\theta(x)=M^{-1}\sum_jB_\theta(x'_j)$. Minimize the displayed loss, while adding an adversarial inner loop that maximizes each constraint violation over small perturbations of $x$. After each update, record the worst observed values of $B(x)-(1-p-\delta)$, $1-B(x)$ on $U$, $|B(x)|$ on $T$, and $\widehat P(x)-B(x)+\delta$ on $C$.
3. Computed versus estimated: the boundary inequalities are directly evaluated; the expectation is estimated by disturbance Monte Carlo, quadrature, or a learned noise sampler. If $F$ is differentiable, use gradient-based adversarial state search; otherwise use dense low-discrepancy sampling. The mathematical certificate assumes continuity and a uniform strict margin, while finite neural sampling only provides a falsification-oriented approximation, so retain a held-out disturbance set and optionally interval-bound $B_\theta$ for a final certificate.
4. First cheap experiment: use a 2D stochastic Dubins car or linear system $x_{k+1}=Ax_k+Bu_k+\sigma w_k$, a small MLP policy, a circular target, and rectangular unsafe states. Compare ordinary policy optimization against the barrier-regularized version for $p\in\{0.7,0.8,0.9,0.95\}$. Estimate the true reach-avoid probability with 10,000 rollouts and sweep $p$. The quantitative prediction is a feasibility cliff: when $p$ exceeds the empirical worst-case reach-avoid probability on $X_0$, the minimum constraint violation and barrier loss should rise sharply; below it, violations should decrease with sample count and the measured lower bound $1-\sup_{x\in X_0}B_\theta(x)$ should track rollout probability conservatively. Test whether adding margin $\delta$ predictably shifts the cliff downward by approximately $\delta$.
Verification
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 8/10
Built a stochastic 1D reach-avoid barrier MVP with an exact Bellman LP oracle, Monte Carlo expectation estimation, rollout validation, and a CUDA neural-critic comparison. The mechanism manifested: the required initial barrier increased approximately linearly with slack (slope 15.96) until a feasibility cliff between delta=0.03 and 0.04, while Monte Carlo error scaled as M^-0.511 versus the predicted M^-0.5. The neural idea improved boundary fitting and reduced initial-set values versus the baseline, but its maximum drift residual remained positive (0.217), so it was not a valid finite-sample certificate and did not demonstrate a reliable safety win.
- Agent confidence
- 8/10
- Baseline
- Neural task/boundary fit: loss 0.3060, max initial B 0.2222, boundary RMSE 0.1438, max drift residual 0.2871
- Idea
- Margin/drift critic: loss 8.0592, max initial B 0.00948, boundary RMSE 0.000114, max drift residual 0.2173; exact LP margin slope 15.96 and MC error exponent -0.511
Limitations: Only a 1D additive-noise system and grid/quadrature transition model were tested; no learned dynamics, policy optimization, adversarial state search, high-dimensional neural barriers, held-out disturbance certificate, or statistically powered distribution-shift evaluation was performed.
How to run: python3 barrier_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.30318)
No significant difference vs. the tuned baseline (−-0.0%, p=1, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0005
- Effect (Δ)
- 0 (−-0.0%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 1 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
The registered dynamics track is supervised pendulum rollout prediction rather than closed-loop policy training, so actual reach-avoid safety and distribution-shift performance were not tested. The barrier transition uses a hand-specified local pendulum proxy with finite disturbance sampling; adversarial state search, formal neural bounds, and large-scale training were not performed.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The Uniform Stochastic Barrier Critic was implemented as an auxiliary stochastic barrier-loss intervention on the registered dynamics/rnn_small benchmark. The finite-chain sanity check passed, but the full paired benchmark showed no measurable task-metric effect: the best idea exactly matched the tuned baseline, with permutation p=1.0. The held-out barrier drift remained positive, so the proposed certificate mechanism was not confirmed.
- Baseline
- best_cfg={lr:0.01, weight_decay:0.0}; full mean MSE=0.000540327702765353; per-seed=[0.0005864710547029972,0.0004609658499248326,0.000695098948199302,0.0006717051728628576,0.0005945063894614577,0.00035726596252061427,0.0004858067259192467,0.0004708015185315162]
- Idea
- best_cfg={lr:0.01, lam:2.0}; full mean MSE=0.000540327702765353; per-seed=[0.0005864710547029972,0.0004609658499248326,0.000695098948199302,0.0006717051728628576,0.0005945063894614577,0.00035726596252061427,0.0004858067259192467,0.0004708015185315162]
- Math sanity
- failure_probability=0.6666666666666666, barrier=0.7, one_step_drift=-0.01, bound_holds=true
- Mechanism signature
- predicted_mean_drift=0.00018591515208754572; heldout_mean_drift=0.00018507556751501397; margin=0.02; confirmed=false
- Paired delta
- 0.0
- Permutation p value
- 1.0
Benchmark result
No significant difference vs. the tuned baseline (−-0.0%, p=1, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0005
- Effect (Δ)
- 0 (−-0.0%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 1 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
The registered dynamics track is supervised pendulum rollout prediction rather than closed-loop policy training, so actual reach-avoid safety and distribution-shift performance were not tested. The barrier transition uses a hand-specified local pendulum proxy with finite disturbance sampling; adversarial state search, formal neural bounds, and large-scale training were not performed.
How to run: python3 stage2_bench.py
Artifacts
- barrier_experiment.py 5.2 KB View Raw
- bench_report.json 4.3 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-09-02T002000.md 6.6 KB View
- results.json 3.0 KB View Raw
- stage2_bench.py 7.2 KB View Raw