Beyond Ensemble Disagreement: Predictive STL Monitoring of RL Locomotion under Distribution Shift
Authors: Qurban Ali, Badaruddin Chachar, Maqsood Ali, Sajjad Ali Rajper
Organizations: Sindh Madressatul Islam University, Karachi, Pakistan · Shah Abdul Latif University, Ghotki, Pakistan · University of Camerino, Camerino, Italy · Institute of Biophysics, CNR, Palermo, Italy · University of Mirpurkhas, Mirpurkhas, Pakistan
RL locomotion policies trained under nominal simulation conditions may encounter distribution shifts that compromise safety. Predictive monitors could anticipate violations, but their world-model forecasts may become unreliable under shift, and ensemble disagreement is not calibrated. We evaluate predictive Signal Temporal Logic (STL) monitoring for frozen Ant-v5 and HalfCheetah-v5 policies using closed-loop world-model rollouts and a three-model ensemble. Across external-force, observation-noise, and mass shifts, predicted robustness ranks HalfCheetah's future STL violations strongly, whereas disagreement does not reliably track observation prediction error or violations. Under severe noise, violations remain common (64.2±24.4% at K=20 across three PPO seeds), yet current-state robustness without prediction comes within 0.03 AUROC of predictive robustness. Penalizing predicted robustness by disagreement does not consistently improve ranking. Ant provides complementary per-specification evidence, but its composite target has no positive violations and its any-violation target is single-class in most evaluated seed-condition slices. Overall, predictive robustness provides useful STL-specific ranking but little demonstrated additional ranking value over the current state; these findings caution against treating ensemble disagreement as a reliable indicator of safety uncertainty.
Figures & tables
Figure 1: Predictive STL monitoring pipeline. The current observation ot feeds the frozen PPO policy and the world-model ensemble, whose members each generate a K -step closed-loop rollout by repeatedly querying the policy on predicted observations. Predicted trajectories are evaluated with STL and aggregated into predictive robustness P and STL disagreement Uρ ; independently, O is evaluated on the observed trajectory τt:t+K , and SUP penalizes P by Uρ .
AUROC
AUPRC
Condition
Viol%
Uρ
−P
Uρ
−P
baseline
56±25
0.50±0.08
0.92±0.08
0.59±0.26
0.97±0.02
noise 0.05
57±29
0.50±0.07
0.81±0.25
0.64±0.24
0.95±0.05
noise 0.15
56±29
0.56±0.18
0.98±0.00
0.61±0.28
0.97±0.03
mass 0.8x
55±24
0.47±0.09
0.96±0.05
0.63±0.19
0.98±0.02
mass 1.6x
63±28
0.47±0.03
0.94±0.01
0.47±0.04
0.92±0.03
Table 1: Failure prediction at K=10 for the HalfCheetah any-violation target (mean ± std of per-seed metrics over 3 PPO seeds, 10 episodes per seed). Viol% is multi-seed any-violation prevalence, not comparable to seed-0 per-spec rates in Appendix C . Ant-v5 is not reported in this multi-seed table because its any-violation target is single-class ( 79 – 100% positive) in 21 of 24 evaluated seed-condition slices (8 conditions × 3 seeds); the three slices admitting both classes give AUROC( −P ) 0.98 – 1.00 (Tab. 9 ). Its composite target has no positive violations at all. Predicted robustness ( −P ) substantially outperforms the evaluated disagreement measures.
Figure 2: HalfCheetah any-violation failure prediction (descriptive mean ± std over 3 seeds). Left ( K=10 , Tab. 1 ): Uρ stays near chance (0.47–0.56) while −P ranks failures strongly (0.92–0.98); Uo / Uz are likewise near chance (0.44–0.54). Right ( K=20 , severe noise, 64.2 ± 24.4% prevalence): Uρ / Uo / Uz give 0.65 / 0.47 / 0.46 versus 0.99 for −P . Dashed line marks chance.
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Composite STL
Condition
O
P
δρ
Uρ
rUE ( n )
rUV
Viol%
Ant-v5
baseline
+0.75
+0.71
0.04
0.049
−0.75 (3)
—
0.0
force 5N
+0.75
+0.73
0.02
0.056
+0.49 (3)
—
0.0
force 15N
+0.74
+0.72
0.07
0.043
−0.36 (19)
—
0.0
noise 0.05
+0.66
+0.70
0.05
0.035
−0.95 (5)
—
0.0
Appendix
Table 2: Legacy single-seed predictive monitoring summary at K=10 (closed-loop, environment-dependent property composite). O : retrospective reference score evaluated on the actually observed future trajectory. P : predictive score evaluated on the world-model trajectory. δρ : mean ∣Δρ∣ . Uρ : mean STL robustness disagreement. rUE : Pearson correlation between STL robustness disagreement and prediction error ( n denotes monitoring windows; small n values result from early episode termination in shifted conditions). Viol%: future violation rate.
Environment
K=1
K=5
K=10
K=20
Ant-v5
0.30
0.31
0.32
0.34 ∗
HalfCheetah-v5
2.52
2.49
2.48
2.50
Appendix
Table 3: Mean observation prediction error ( L2 ) by prediction horizon, closed-loop rollouts, averaged over all conditions. ∗ Ant-v5 K=20 is reported only for the subset of conditions with sufficient valid monitoring windows.
Horizon K
Environment
Metric
K=1
K=5
K=10
K=20
Ant-v5
O
+0.82
+0.77
+0.75
—
P
+0.82
+0.78
+0.71
—
HalfCheetah-v5
O
+0.17
+0.13
+0.11
+0.10
P
+0.18
+0.16
+0.14
+0.16
Appendix
Table 4: Retrospective ( O ) versus predictive ( P ) composite STL score at each horizon, nominal condition, closed-loop. Ant-v5 uses five predictive properties; HalfCheetah-v5 uses three (pitch, height, contact; recovery excluded at K<50 ).
Figure 3: Predictive bias (P−O) versus prediction horizon for representative conditions. Ant-v5 exhibits mixed bias directions: predictive robustness is mildly pessimistic under the 15N force shift but increasingly optimistic under severe observation noise. HalfCheetah-v5 is consistently optimistic, with the predictive–retrospective gap increasing with horizon and becoming largest under observation noise.
Horizon K
Condition
K=1
K=5
K=10
K=20
Ant-v5
baseline
+0.10
−0.58
−0.75
—
force 5N
+0.13
−0.85
+0.49
—
force 15N
−0.12
−0.29
−0.36
−0.39
noise 0.05
+0.12
−0.05
−0.95
—
Appendix
Table 5: Pearson correlation ( r ) between STL robustness disagreement and observation prediction error, closed-loop. All values are descriptive; correlations with small sample sizes ( n<10 ) should be interpreted with particular caution.
Horizon K
Condition
K=1
K=5
K=10
K=20
Ant-v5: violation rate (%)
All conditions
0.0
0.0
0.0
0.0
HalfCheetah-v5: correlation ( r )
baseline
−0.07
−0.04
−0.20
−0.37
force 5N
−0.01
−0.14
−0.26
−0.57
Appendix
Table 6: Correlation ( r ) between STL robustness disagreement and future STL violation, and legacy single-seed window-level composite violation rate (%) by horizon, closed-loop. The Ant-v5 violation rates refer to the predictive composite and are zero at all reported horizons. The legacy single-seed runs used 3 episodes per condition ( n=27 windows at K=10 ), whereas the seed-0 horizon analysis in Appendix C (Tab. 10 ) uses 10 episodes ( n=90 ); the composite-label rates for noise σ=0.15 at K=10 ( 37.0% vs. 35.6% ) therefore differ by sampling, not by definition.
Figure 4: Left: Future violation rate for HalfCheetah-v5 at K=20 across representative distribution shifts. Severe observation noise produces the highest violation rate (66.7%). Right: Point-biserial correlation rUV between ensemble STL robustness disagreement and future violation across the same conditions. The correlations vary in both magnitude and direction; notably, the condition with the highest violation rate has only a moderate positive correlation ( rUV=0.27 ), while several lower-violation conditions exhibit negative correlations. These condition-level results provide no consistent evidence that ensemble STL robustness disagreement reliably identifies future STL violations.
ρˉ
λUρ
SUP
Ant-v5 (force 15N)
λ=0
+0.72
0.000
+0.72
λ=1
+0.72
0.045
+0.67
λ=2
+0.72
0.090
+0.63
λ=5
+0.72
0.226
+0.49
HalfCheetah-v5 (noise σ=0.15 )
Appendix
Table 7: SUP components, K=20 , closed-loop. Ant-v5 under force 15N; HalfCheetah-v5 under noise σ=0.15 .
Ant-v5
HalfCheetah-v5
Condition
no_falls
recovery
no_falls
recovery
baseline
88.9
88.9
90.0
64.4
noise 0.15
100
100
95.6
50.0
mass 1.6x
79.2
75.0
98.9
76.7
friction 0.5x
100
100
95.6
66.7
compound
100
100
98.9
75.6
Appendix
Table 8: Per-specification (binary, each spec alone) violation rate (%) at K=10 , seed 0 (10 episodes). Recovery robustness is computed on the truncated K -step window; the full 50-step interpretation is available only at K≥50 . These per-spec rates use their own single-spec targets and are not comparable to the composite-label rate in Tab. 10 or the any-violation rate in Tab. 1 (same seed-0 windows under noise 0.15: height 95.6%, composite 35.6%, any-violation 95.6%). Composite masks per-spec failures: Ant composite 0% while no_falls /recovery violate frequently; HalfCheetah violations concentrate in no_falls /recovery while stability_pitch / contact_safety are near-constant.
Condition
seed
n
Viol%
−P
Uρ
−Ot
baseline
0
36
88.9
1.00
0.76
0.81
mass 1.6x
0
24
79.2
0.98
0.83
0.87
friction 0.5x
42
44
95.5
1.00
0.42
1.00
Appendix
Table 9: Ant-v5 any-violation target: the three seed-condition slices ( K=10 ) whose labels admit both classes; all other evaluated slices are 100% positive (single class). AUROC is undefined for the remaining slices. The any-violation label is the union of all evaluated per-specification labels, including truncated recovery labels. Seeds are PPO training seeds {0,42,123} .
Figure 5: Horizon sensitivity under severe noise (HalfCheetah noise σ=0.15 , seed 0; values from Tab. 10 ). Longer horizons expose more violations (10.2% at K=1 to 67.5% at K=20 ), yet Uρ AUROC climbs only from 0.15 toward 0.41 while −P degrades gracefully from 0.90 to 0.71. Dashed gray line marks chance (0.5). Single-seed illustration of the pattern reported multi-seed at K=10 / 20 in Sec. 7.1 (Tab. 6 reports 66.7% at K=20 on the legacy single-seed windowing).
K
n
Viol%
AUROC( Uρ )
AUROC( −P )
AUPRC( Uρ )
AUPRC( −P )
1
990
10.2
0.15
0.90
0.06
0.74
5
190
23.7
0.29
0.79
0.17
0.67
10
90
35.6
0.36
0.73
0.28
0.63
20
40
67.5
0.41
0.71
0.64
0.82
Appendix
Table 10: Horizon sensitivity under severe noise (HalfCheetah noise σ=0.15 , seed 0). Viol% is the composite-label rate (fraction of windows with negative observed composite), not the per-specification or any-violation rates of Tab. 8 /Tab. 1 ; on the same windows the any-violation rate is higher (e.g. 95.6% at K=10 ). −P ranks failures across horizons while Uρ remains at or below chance. Baseline shows the same pattern at lower prevalence.
All windows (AUROC)
Safe-at-start
Condition
−Ot
−P
Uρ
Safe%
viol%
−Ot
−P
Uρ
baseline
0.90±0.09
0.92±0.08
0.50±0.08
63±12
36±31
0.90±0.09
0.90±0.10
0.38±0.11
noise 0.05
0.79±0.26
0.81±0.25
0.50±0.07
63±11
38±38
0.76±0.29
0.76±0.30
0.38±0.21
noise 0.15
0.97±0.01
0.98±0.00
0.56±0.18
65±7
36±40
0.93±0.04
0.95±0.05
0.52±0.24
mass 0.8x
0.93±0.07
0.96±0.05
0.47±0.09
63±10
32±28
0.92±0.11
0.91±0.12
0.36±0.03
mass 1.6x
0.92±0.02
0.94±0.01
0.47±0.03
60±10
45±40
0.86±0.06
0.87±0.06
0.62±0.12
Appendix
Table 11: Current-state baseline and safe-at-start analysis, HalfCheetah-v5, K=10 , mean ± std over 3 seeds (any-violation target). −Ot : instantaneous robustness at time t (no prediction). Safe: all pointwise predicates satisfied at t ; “safe viol.%” is the future ( t+1 .. t+K ) any-violation rate within that subset. SAFE columns: AUROC restricted to safe-at-start windows with the future-only label.
baseline
noise 0.15
hmin
viol%
−P
Uρ
viol%
−P
Uρ
0.08
54.8±23.7
0.90±0.10
0.51±0.09
55.9±28.6
0.98±0.00
0.56±0.18
0.10
56.3±25.0
0.92±0.08
0.50±0.08
55.9±28.6
0.98±0.00
0.56±0.18
0.12
57.0±26.0
0.94±0.05
0.48±0.05
56.3±28.3
0.99±0.00
0.56±0.18
Appendix
Table 12: Height-threshold sensitivity ( no_falls hmin ), HalfCheetah-v5, K=10 , mean ± std over 3 seeds, any-violation target.
λ
AUROC( −SUP )
Flag rate %
K=10
0
0.983±0.003
5.2±1.0
1
0.983±0.002
5.2±1.0
2
0.986±0.004
5.9±1.0
5
0.989±0.004
8.1±3.8
K=20
Appendix
Table 13: Disagreement-penalized score SUP=P−λUρ and risk–coverage on the HalfCheetah any-violation target (noise σ=0.15 , mean ± std over 3 seeds). Flag rate is the fraction of windows with SUP<0 (the fixed STL satisfaction boundary, applied uniformly across conditions and horizons). Penalization is flat ( Δ AUROC ≤0.01 ) while flag rate rises; abstention shows little change across coverage levels.
Large language model agents increasingly take consequential actions in digital and physical environments, where safety risks may emerge only after multiple interaction steps. This has motivated world-model-driven predictive safety guardrails, which anticipate future consequences before execution. However, existing evaluations largely focus on end-to-end safety outcomes, leaving unclear whether safety gains arise from reliable prediction and faithful use of predicted risks. In this work, we systematically diagnose the prediction-to-action pipeline along three dimensions: how world-model predictions are integrated into decision making, whether the predictions themselves are reliable, and whether their content is faithfully used. Across seven policy models and two safety environments, we find that stronger prediction involvement does not yield monotonic safety gains and can reduce task completion while substantially increasing inference cost. We further find that world-model predictions remain insufficiently reliable, especially over longer horizons, where safety prediction degrades substantially relative to near-term forecasting. Finally, we find that safety gains can persist even under corrupted predictions, while locally verified predictions still leave subsequent safety violations, showing that predictive content is not faithfully incorporated into the decision process. Together, these findings expose a fundamental prediction-to-action gap in current predictive guardrails: producing more or seemingly accurate foresight is insufficient unless that foresight is both reliable and faithfully translated into safer decisions.
Despite the Markov assumption, safety failures in robot reinforcement learning rarely occur instantaneously; they typically emerge over several steps as the policy enters unfamiliar states under disturbances and domain shift. We address this limitation by learning a receding-horizon safety critic that predicts whether a state will remain non-terminating over the next receding horizon, enabling anticipatory detection of impending locomotion failures. The critic is trained from rollout-derived horizon labels with a composite objective that combines horizon classification, control-barrier-function-inspired temporal consistency, and smoothness regularization, and we aggregate an ensemble of critics with a conservative Conditional Value at Risk estimate to account for uncertainty. Building on the learned critic, we derive a closed-form, differentiable CBF-style safety filter that minimally modifies the policy action to improve predicted safety, and integrate it into PPO with an anticipation loss to reduce policy-filter mismatch during training. In simulated quadruped locomotion, our method improves robustness under action noise, external perturbations, and terrain shifts, reducing catastrophic failures while maintaining competitive returns.
Siwei Ju, Jan Peters, Oleg Arenz
Department of Computer Science, Technical University of Darmstadt, Germany. · Hessian.AI. · German Research Center for AI (DFKI), Research Department: Systems AI for Robot Learning. +1
Reinforcement learning (RL) policies enable dynamic legged locomotion but lack mechanisms to avoid violations of safety constraints that are absent during training. Large-scale offline safe learning is impractical for covering all edge cases. Existing safety frameworks either rely on reduced-order models that cannot reason about whole-body behaviors or require conservative recovery controllers that degrade task performance. We propose a predictive safety filter that post-hoc filters the nominal contact locations fed to the RL policy. When a collision is predicted, a sampling-based optimizer asynchronously searches for safer contact sequences using a full-physics model, while a learned value function bootstraps long-horizon returns. Our three algorithmic components (geometric projection of sampled contacts, momentum-augmented updates, and replica-exchange) make the optimization tractable in a discontinuous contact landscape. We validate the filter on a quadruped robot in dense, cluttered environments, both in simulation and in the real world, showing substantial reductions in safety violations with minimal deviation from the nominal input.
Aditya Shirwatkar, Sebastian Sanokowski, Shishir Kolathaya +2
Robert Bosch Center for Cyber Physical Systems, Indian Institute of Science, Bangalore, India · Munich Institute of Robotics and Machine Intelligence (MIRMI), Technical University of Munich, Munich, Germany · Department of Computer Science & Automation, Indian Institute of Science, Bangalore, India +2