Autonomous-vehicle testers currently have two tools that do not fit together. Adversarial stress testers train an attacker, such as a reinforcement-learning policy that steers pedestrians or other cars, to make the vehicle crash. The most careful versions keep the attacker "stealthy": its behavior stays physically possible and legally blameless, so every crash it finds is one the vehicle could have avoided. These tools find bugs quickly, but they report collision rates under the attacker, not how often such crashes happen in normal traffic. Importance sampling is the classical fix for that. It draws scenarios from a biased distribution that makes failures common, then reweights each sample by how much more likely it was under the biased distribution than under normal conditions. That yields an unbiased estimate of the true, rare failure rate.
The two cannot simply be combined. Restricting the attacker to plausible, blameless behavior removes part of the space of real scenarios, and importance sampling over a restricted space underestimates the rate. This note proposes to treat the stealth constraint as part of the definition of the failure event, not as a limit on where the sampler may look. The quantity estimated becomes the probability of an avoidable, ego-at-fault crash under nominal traffic. For that event, a shielded, plausibility-constrained attacker is a legitimate and near-optimal proposal distribution. Unavoidable crashes are then estimated separately and cheaply. The deliverable is a single test procedure that finds stealthy failures as fast as a stress tester and reports, with confidence intervals, how often they occur.
Core Claim
Let $\tau$ be a simulated episode, meaning the sequence of disturbances that the other road users and sensors apply at each timestep. Let $P$ be the nominal distribution of those disturbances. Let $E$ be the event "collision." Let $F$ be the event "the scenario stayed physically avoidable at every step before the collision." Avoidability is measured by the feasibility score from the Responsibility-Sensitive Safety model, a rule set that says whether a careful driver could still have avoided the crash, as used by ScenePilot.
We estimate two quantities separately:
$$p_{\text{avoid}} = P(E \cap F), \qquad p_{\text{unavoid}} = P(E \cap F^c).$$
The estimator for the first uses a defensive mixture proposal $Q_\alpha = \alpha P + (1-\alpha) Q_\phi$. Here $Q_\phi$ is a stochastic attacker policy with parameters $\phi$, shielded so that it only takes actions that keep the feasibility score non-negative, and $\alpha \in (0,1)$ is a small weight kept on nominal behavior. The estimate is
$$\hat p_{\text{avoid}} = \frac{1}{N}\sum_{i=1}^{N} \mathbb{I}(\tau_i \in E\cap F)\,\prod_{t} \frac{P(a_{i,t}\mid s_{i,t})}{Q_\alpha(a_{i,t}\mid s_{i,t})}, \qquad \tau_i \sim Q_\alpha,$$
where $a_{i,t}$ and $s_{i,t}$ are the disturbance and simulator state at step $t$ of episode $i$.
Two observations make this work.
First, the estimator is unbiased despite the shield. The shield only removes probability from trajectories outside $F$, where the indicator is already zero. The $\alpha P$ component guarantees that the proposal covers the support of $P$ everywhere, and it caps each per-step weight ratio at $1/\alpha$.
Second, the zero-variance proposal for this event is $P(\tau \mid E\cap F)$: nominal traffic conditioned on producing an avoidable crash. That is exactly the stealthiest possible attacker. It generates blameless failures in proportion to how naturally they occur. The log importance weight $\log W(\tau)$ therefore measures how unnatural a scenario is. The Mahalanobis plausibility penalty in Adaptive Stress Testing for Autonomous Vehicles is a Gaussian approximation of this quantity. So stealth and estimator variance are the same objective seen from two sides, and optimizing one improves the other.
Relation to Prior Work
Three stress-testing systems motivate the problem.
- Adaptive Stress Testing (AST) Adaptive Stress Testing for Autonomous Vehicles trains a deep RL adversary with a plausibility penalty. It finds collisions with under 1% of the simulator calls that tree search needs.
- Socially Acceptable Perturbations Generating Socially Acceptable Perturbations for Efficient Evaluation of Autonomous Vehicles penalizes a challenger vehicle whenever it is legally at fault. It exposed hundreds of victim-at-fault crashes where 1,000,000 naturalistic episodes found zero.
- ScenePilot ScenePilot restricts generation to a "boundary band" of avoidable-but-hard scenarios. It reports a mean collision rate of 0.893 on SafeBench.
None of the three tracks likelihood ratios, so their numbers describe the attacker, not the world. We keep their constraints but reinterpret them as the event definition.
Two importance-sampling papers supply the estimation machinery.
- Policy-gradient adaptive importance sampling (PG-AIS) A Deep Reinforcement Learning Approach to Rare Event Estimation trains proposal policies by descending a divergence to the zero-variance distribution. It mixes several policies to cover multiple failure modes. We reuse its training objective and mixture. Its limits are that it was shown only on a 20-step pendulum and that it counts every failure, avoidable or not.
- Latent-space importance sampling Enhanced Importance Sampling Through Latent Space Exploration in Normalizing Flows runs importance sampling in the latent space of a normalizing flow and succeeds on a 12-dimensional F-16 task where target-space methods failed. It needs known failure seeds to start. In our design, those seeds come from the shielded attacker, and the latent approach is a candidate parameterization of the proposal $Q_\phi$.
The language-model tail-risk work shows the same pattern in another domain. Estimating Tail Risks in Language Model Output Distributions steers a model's internal activations to build a proposal and tunes it with the cross-entropy method, an iterative procedure that refits the proposal to the samples that hit the failure. Measuring Nines of Reliability fits cross-entropy proposals over problem-template parameters. Both show that a well-tuned proposal gives order-of-magnitude savings. Neither faces a feasibility constraint that interacts with the support of the proposal.
Gap 3 in the research file is the constraint we must respect. Any truncated proposal used naively for the total crash rate is negatively biased. Our split into $p_{\text{avoid}}$ and $p_{\text{unavoid}}$ is designed to meet that objection directly.
Perceptual stealth is deliberately left out. That includes latent-space image attacks and road-marking patches such as Beware of Road Markings. Here, stealth means behavioral plausibility of other agents, where nominal densities are tractable.
Research Program
Nominal models. We first give each testbed an explicit nominal disturbance model $P$ with computable per-step densities. For pedestrians and sensor noise this is Gaussian, following AST. For other drivers it is a behavior policy with calibrated action noise. For SafeBench it is a distribution over the parameters of each pre-crash scenario.
Attacker training. The attacker $Q_\phi$ is a stochastic policy over the same disturbance space. It is trained with the PG-AIS objective, whose reward is the importance-weighted indicator of the event $E\cap F$. A step-level shield in the style of ScenePilot masks actions that would drive the feasibility score negative. An ensemble of $M$ attackers, combined by multiple importance sampling, guards against collapsing onto a single failure mode.
Unavoidable crashes. The complementary rate $p_{\text{unavoid}}$ gets its own unshielded proposal, rewarded on $E\cap F^c$. Such crashes are usually driven by gross physics, so we expect this proposal to be easy to learn. Reporting it separately still gives the full crash rate, $p_{\text{avoid}}+p_{\text{unavoid}}$, without bias.
Analysis. We will test the claim that the attacker's KL divergence from $P$ tracks estimator variance. We will also report the distribution of $\log W$ over discovered failures as a stealth score that can be compared with AST's plausibility penalty.
Baselines
The naive reference is plain Monte Carlo from $P$. We will run it with the same simulator-call budget as every other method, and also at a budget large enough to serve as ground truth where that is affordable. We expect it to return zero hits at low rates. The research file reports naive sampling at an average absolute deviation of 0.99 on the discrete pendulum in A Deep Reinforcement Learning Approach to Rare Event Estimation.
The strongest existing estimator is unshielded PG-AIS with $M=4$ attackers, rewarded on all collisions. On the pendulum its reported average absolute deviation is 0.11, against 0.52 for the cross-entropy method. We will run it with identical network sizes, training simulator calls, and hyperparameter search budget. We apply it two ways: to estimate $p_{\text{avoid}}$ directly by filtering on $F$ after the fact, and to estimate the total crash rate. Target-space cross-entropy over scenario parameters, as in O'Kelly et al., is a second strong baseline under the same budget. It is also the natural method for SafeBench's parametric scenarios.
To show the bias that motivates the work, we also report ScenePilot's collision rate under its own attacker, which is unweighted. No reported result was found on Lacuna for any rare-event estimation accuracy on SafeBench, and none for ScenePilot as an estimator. Its only reported figure is the 0.893 attacker-induced collision rate, which is not comparable to a nominal rate.
Two ablations isolate the key ingredients. The first uses the shielded attacker but applies it to the total crash rate. This is the naive use of a constrained proposal, and it should show the Gap-3 underestimate. The second removes the defensive mixture ($\alpha=0$), which tests whether bounded weights matter in practice.
We count the proposal as beating the baselines if it meets two conditions on estimates of $p_{\text{avoid}}$. It must reach 10% relative error in at least five times fewer simulator calls than post-filtered PG-AIS. And its 95% confidence intervals must cover the brute-force ground truth at close to the nominal rate.
Why not just…?
Why not just run naturalistic Monte Carlo at scale? The coefficient of variation of the naive estimate is about $1/\sqrt{Np}$, so the number of runs needed grows like $1/p$. The socially-acceptable-perturbations study saw zero at-fault crashes in 1,000,000 naturalistic episodes. That makes naive sampling useless below roughly $10^{-6}$ at simulator speeds. We will still use it as ground truth in regimes where $p$ is about $10^{-3}$ to $10^{-4}$.
Why not just take an existing stress tester and reweight its samples afterward? This is the most serious alternative, and to a degree it is our method. Reweighting requires a stochastic attacker with computable densities. ScenePilot and AST can be modified to provide them. What they lack is the event definition that makes their constraint compatible with unbiased estimation, together with the defensive mixture. Without both, reweighting either gives the wrong quantity or is biased. Our first ablation measures exactly this.
Why not just run unconstrained PG-AIS and filter out unavoidable crashes at the end? Post-filtering is unbiased for $p_{\text{avoid}}$, so the only question is variance. An unshielded attacker is drawn toward cheap unavoidable crashes, such as cut-ins inside the stopping distance, which is the "impossible crash" trap ScenePilot documents. Its samples then land in $E\cap F^c$ and contribute nothing. If post-filtering matches the shielded proposal in calls-to-10%-error, the shield is unnecessary, and we will say so. The head-to-head comparison against post-filtered PG-AIS settles this.
Why not just use target-space cross-entropy over scenario parameters? On the low-dimensional parametric scenarios in SafeBench it may be competitive. On sequential disturbances, cross-entropy collapses onto one failure mode: it scored 0.52 against 0.11 on the pendulum, and target-space methods reached a relative error of −1.000 on the F-16. We expect its advantage to disappear as the horizon grows, and we will report results broken down by horizon.
Proposed Experiments
Testbeds. We use three testbeds of increasing cost. The first is a pedestrian-crosswalk environment modeled on AST's, with an intelligent-driver-model car. The second is a three-lane highway reimplemented after the socially-acceptable-perturbations setup, with nominal driver noise. The third is SafeBench on CARLA SafeBench, using nominal distributions over its eight pre-crash scenario families. The ego policies are an RL policy and, for transfer, TransFuser.
Ground truth. In the first two testbeds we weaken the ego controller so that $p_{\text{avoid}}$ falls near $10^{-3}$ to $10^{-4}$, and obtain ground truth by brute force. We then strengthen the ego step by step. At rates where brute force is infeasible, we check agreement among independently trained estimators and against extrapolation from the brute-forced settings.
Metrics. We report relative error and log-ratio error of $\hat p_{\text{avoid}}$ and of the total crash rate, empirical coverage of the 95% confidence intervals, effective sample size, and simulator calls needed to reach 10% relative error.
Decisive checks. Three results would decide the question.
- The shielded-proposal ablation shows a clear underestimate of the total crash rate, while $\hat p_{\text{avoid}} + \hat p_{\text{unavoid}}$ matches ground truth.
- The shielded mixture beats post-filtered PG-AIS on calls-to-error for $p_{\text{avoid}}$.
- Across attackers, lower $\mathrm{KL}(Q_\phi\,\|\,P)$ restricted to failures predicts lower estimator variance, which is evidence that stealth and statistical efficiency coincide.
If the second check fails, the contribution narrows to the event decomposition and the stealth-as-likelihood analysis. That is still enough to turn existing stress testers into risk estimators.
References
- ScenePilot: Controllable Boundary-Driven Critical Scenario Generation for Autonomous Driving
- Adaptive Stress Testing for Autonomous Vehicles
- Generating Socially Acceptable Perturbations for Efficient Evaluation of Autonomous Vehicles
- A Deep Reinforcement Learning Approach to Rare Event Estimation
- Enhanced Importance Sampling Through Latent Space Exploration in Normalizing Flows
- Estimating Tail Risks in Language Model Output Distributions
- Measuring Nines of Reliability: Sample-Efficient LLM Evaluation on Saturated GSM Benchmark
- Beware of Road Markings: A New Adversarial Patch Attack to Monocular Depth Estimation
- Scalable End-to-End Autonomous Vehicle Testing via Rare-event Simulation
- SafeBench: A Benchmarking Platform for Safety Evaluation of Autonomous Vehicles