Manuscript Offprint
arXiv:2610.35448Model-Aware Generation of Safety-Critical Scenes for Robust End-to-End Driving via Distilled Planner Surrogates
Khaled M. Seyam , Julian Wiederer , Samar Fathalah , Markus Braun , Bin Yang
Institute of Signal Processing and System Theory, University of Stuttgart, Germany
Mercedes-Benz AG, Stuttgart, Germany
Abstract—End-to-end driving models perform well on standard benchmarks but collide frequently in safety-critical scenarios. We present a failure-mode analysis on NeuroNCAP which shows that 95.9% of DiffusionDrive's collisions are planning failures despite reliable detection, pinpointing the bottleneck in planning rather than perception. We attribute this to a fundamental data imbalance, as safety-critical interactions are rare in real driving logs, so planners are hardly ever trained on them. We close this gap with a novel model-aware framework that generates safety-critical training scenes against a specific planner. Each planner is attacked at the bird's-eye-view (BEV) level through a differentiable surrogate distilled from its own planning head. This keeps the expensive video renderer out of the attack loop. We extract 50 scenes per planner, each pairing an attack with a safe escape trajectory that serves as the fine-tuning label. A fully automated quality-diversity search generates both the attacks and the escapes, so that their variety is not specified by hand. Only these scenes are rendered to fine-tune the planner, which reduces the computational cost significantly. Fine-tuning on these scenes roughly halves the closed-loop collision rate of two planners on NeuroNCAP (SparseDrive 28.0%→12.2%, DiffusionDrive 37.5%→19.2%) while largely preserving normal driving. A cross-planner transfer experiment shows that the gain comes from targeting the specific planner. Each planner improves most on the scenes generated against itself, and DiffusionDrive fine-tuned on SparseDrive's scenes retains only 6.7 of its 18.3-point collision-rate reduction.
I. INTRODUCTION
End-to-end (E2E) autonomous driving has shown strong performance on standard benchmarks, yet the models are limited by the data they are trained on. Real-world driving datasets are heavily skewed toward normal, uneventful driving, with safety-critical interactions accounting for less than 0.03% of real-world driving time [1]. Such situations are inherently rare in naturalistic driving and cannot be deliberately staged at scale for safety, cost, and legal reasons. As soon as these models encounter scenarios outside their training distribution, performance degrades sharply. On Challenger, which generates physically plausible videos for adversarial scenarios such as cut-ins, sudden lane changes, and blind-spot intrusions, the collision rate of state-of-the-art E2E models increases by up to compared to standard nuScenes evaluation [2]. While Challenger stress-tests models through video-based adversarial replay, NeuroNCAP evaluates in closed-loop, where the ego executes its own plan and failures hidden in open loop appear, on harder scenarios including oncoming vehicles, stationary vehicles, and side collisions [3]. There SparseDrive results in a collision rate of 28.0% and

Fig. 1. Model-aware adversarial fine-tuning. We distill an end-to-end planner into a differentiable surrogate, optimize adversarial scenarios against it, and render them to fine-tune that planner. The renderer never enters the optimization loop. Bottom: closed-loop collision rate on NeuroNCAP. Each planner improves most on the scenes generated against itself.
DiffusionDrive in 37.5%.
Since collecting safety-critical driving data at scale remains impractical, several directions have been explored to synthetically close this gap. Video generation models such as MagicDriveV2 [4] can synthesize photorealistic multi-view driving videos. Yet they are evaluated almost exclusively on perceptual quality metrics like FID and FVD, and their videos have so far served perception tasks such as 3D detection and tracking [5], [6] rather than planning. Methods that do generate training data for the planner either derive it from validation failures without closed-loop evaluation [7] or simulate hundreds of thousands of scenes reconstructed from logged drives [8]. In both cases the scenarios come from existing data rather than being designed as interactions. Adversarial scenario generation designs such interactions deliberately, but either at the state level without photorealistic rendering [9]–[11] or, as in Challenger [2], against the logged ego trajectory rather than against a planner. No existing method generates photorealistic adversarial scenes optimized against a specific vision-based planner.
To locate the bottleneck behind these E2E failures, we decompose every closed-loop collision on NeuroNCAP into a perception or a planning failure by checking whether the planner detected and tracked the adversary. In 95.9% of DiffusionDrive's collisions, the threat is detected, so the model sees the danger but fails to react. Targeting this weakness with generated scenes requires the gradient of a collision objective with respect to the adversary's behavior. For a vision-based planner, whose input is rendered video, this gradient would have to pass through the video renderer, which is computationally infeasible. We therefore attack a surrogate instead. We distill the target planner into a differentiable surrogate planner , which consists of the planner's own planning head, copied and frozen, behind a small trained adapter that takes ground-truth bird's-eye-view (BEV) state instead of images. The failure analysis justifies this construction, since perception is reliable. Gradients through are cheap and point at the planner's specific failure modes rather than at a generic driving prior. Every generated scene is therefore optimized against the planner to be fine-tuned.
Those gradients drive the attack search, steering an adversarial vehicle in BEV to maximize collision risk for the planner. A quality-diversity search spreads the attacks over different behaviors, so the types of attack are found by the search rather than specified by hand. A geometric solver then computes a safe escape trajectory for every scene as its fine-tuning label and rejects scenes for which no escape exists. The search costs around 30 GPU-hours per planner, and only the 50 surviving scenes are later rendered photorealistically. We evaluate closed-loop on NeuroNCAP, open-loop on Challenger's adversarial replay, and on clean nuScenes to confirm that fine-tuning does not degrade normal driving. These 50 scenes roughly halve each planner's closed-loop collision rate on NeuroNCAP (SparseDrive 28.0% to 12.2%, DiffusionDrive 37.5% to 19.2%; Fig. 1) while normal driving is largely preserved.
In short, our contributions are:
-
A failure-mode analysis on NeuroNCAP showing that 95.9% of DiffusionDrive’s closed-loop collisions are planning failures despite reliable detection, which motivates fine-tuning the planning head only.
-
A novel differentiable surrogate of a vision-based E2E planner, built from the planner’s own frozen planning head behind a small adapter over ground-truth BEV state and validated against the real planner.
-
To our knowledge, the first model-aware pipeline for generating photorealistic safety-critical scenes for vision-based E2E planners. It optimizes attacks through the surrogate with a quality-diversity search, labels each scene with a geometrically solved escape, and rejects scenes for which no escape exists. With 50 scenes per planner, it roughly halves the closed-loop collision rate of two planners.
-
A cross-planner transfer experiment showing that each planner improves most on the scenes generated against itself, and that this benefit is larger for DiffusionDrive than for SparseDrive. The gain therefore comes from targeting the specific planner rather than from adversarial data in general.
We will release the code, the distilled surrogates, and the generated adversarial scenes for both planners.
Generative Driving Data and Photorealistic Evaluation. Generative video models expand driving data distributions, from structured-controllability work [6], [23], [24] to MagicDriveV2 [4], which synthesizes high-resolution multi-camera video with fine-grained control over scene layout via 3D bounding boxes and trajectories, making it a suitable backbone for targeted scenario synthesis. Generated video has mostly served perception tasks, with quality measured by FID and FVD rather than downstream planning. Delphi [7] guides generation with validation-set failure patterns, which risks benchmark-specific overfitting and is never evaluated closed-loop. SimScale [8] improves planner robustness through sim-real co-training on 147K recovery-based simulated scenes reconstructed from logged drives rather than designed as interactions. On the evaluation side, NeuroNCAP [3] tests vision-based planners closed-loop in neurally rendered collision scenarios and Challenger [2] renders adversarial video for open-loop stress testing, and we adopt both as benchmarks. Surrogates and Attack Transfer. Attacking a substitute model is standard in adversarial machine learning, where transferability across models is well documented but partial [25], and STRIVE's rule-based proxy planner is the scenario-generation analogue. Our surrogate is not a generic proxy, as it reuses the target's own frozen planning head. So its gradients are specific to that planner, and our transfer

(B) Attack through 's gradients differentiated back to the adversary's controls
MAP-Elites: best attack per behavior cell diverse attack types emerge, none hand-scripted
(C) Solve the escape
pure geometry — no planner involved

same MAP-Elites on the responses:
brake accelerate left right
solvability gate
no valid escape → scene rejected (15%)
best-clearance escape = expert label
(D) Render and fine-tune
rendered with MagicDriveV2 → fine-tune within of
Fig. 2. Method. (A) Only the adapter trains; the planner's own planning head is copied and frozen, so gradients through point at the planner's failure modes. (B) Adversary controls are optimized against the collision objective J through the surrogate, and a quality-diversity grid keeps the attack closest to the ego per cell, so attack types are found rather than specified. (C) The escape is solved by geometry with the attacker held fixed, and scenes with no valid escape are rejected. (D) Surviving scenes are rendered and only parameters inside the planning head of are updated.
experiment measures the effect of that specificity. To our knowledge, this is the first work to distill a vision-based end-to-end planner into a differentiable surrogate and generate its own training attacks through it.
III. METHOD
A vision-based end-to-end planner maps surround-view images through a perception module to context features c, which a planning head decodes into the ego trajectory . Given a trained and real driving logs, we seek a small set of safety-critical training scenes. Each scene is a photorealistic video of an adversarial vehicle paired with an expert label for the ego's escape, and fine-tuning on these scenes should reduce its closed-loop collision rate without degrading normal driving. The generation of the scenes is model-aware in the sense that every attack is optimized against 's own planning head. Thus two different planners receive different safety-critical scenes. The pipeline runs in four stages (Fig. 2): (A) distill into a differentiable surrogate that plans from ground-truth BEV state, (B) optimize adversarial trajectories through the surrogate under a quality-diversity search, (C) solve a safe escape for every attack and reject scenes that admit none, and (D) render the surviving scenes photorealistically and fine-tune the real planner on them.
A. Distilling a Differentiable Surrogate
Optimizing an adversary against the planner requires the gradient of a collision objective with respect to the adversary's motion, taken through the planner. Since consumes images, that puts the video renderer inside the optimization loop. Rendering a single scene, a six-camera clip of 65 frames at 12 Hz (5.4 s) and pixels per camera, already costs about 1.4 GPU-hours, one attack needs on the order of sixty renders, and each optimization step would additionally have to differentiate through the video renderer. Attacking the real planner directly is therefore computationally out of reach. We build a surrogate that maps the BEV state instead of images.
The surrogate keeps the planner's decision logic and replaces only its input path,
where is the planner's own planning head with weights copied and frozen, and is a differentiable adapter that maps the ground-truth BEV scene state b into the space of context features c. The state b collects agent boxes with class and motion history, map lanes, the ego state and the navigation command. is deliberately small, 0.83 M parameters against 86.2 M for SparseDrive and 92.1 M for DiffusionDrive. It uses one encoder per input group (agents, map lanes, ego state), and each encoder produces one part of the features c.
Training data comes from the planner itself. We run on nuScenes and record, per sample, the context features c its perception produces and the trajectory its head outputs, while b is assembled from the same samples' ground-truth annotations. Only trains using the loss
so the adapter is matched to the head twice, once in the feature space the head reads and once in the trajectory the head produces from those features.
For DiffusionDrive, whose head scores several trajectory modes and executes the best, the mode selection is softened so the forward path stays differentiable. We validate the construction before any use. First, we confirm that the extracted head reproduces the real planner's trajectory when given the recorded features. Second, the gradient of a distance-to-ego-path objective with respect to the adversary's controls, computed through the surrogate, is finite and has a similar magnitude across scenes for both planners. The construction rests on the assumption that ground-truth BEV approximates what the planner actually perceives. Our failure analysis supports this hypothesis, as 95.9% of DiffusionDrive's (95.8% of SparseDrive's) closed-loop collisions occur with perception working (Sec. IV-B).
B. Model-Aware Attack Generation
An attack is a sequence of controls for one adversarial vehicle, an acceleration and a steering angle at each of the timesteps of the scene. A kinematic bicycle model unrolls the controls into a trajectory, and replacing the adversary's original trajectory in with it gives the attacked BEV state . We minimize a collision objective by gradient descent on the controls through the bicycle model and the surrogate. consists of several terms. The main term draws the adversary toward the ego path that predicts for . A timing term forces the attacker and the ego to reach the meeting point at the same time. Further terms keep the attack on the drivable area, clear of other agents, and within realistic steering, acceleration and jerk. Optimizing controls rather than positions keeps every attack physically drivable. The controls for the full horizon are optimized jointly in a single gradient run. During the run, is evaluated at several frames along the rolled-out trajectory, so the ego's predicted reaction stays consistent with the attacker's committed path. Because re-plans as the adversary moves, the attack is dynamically coupled to what this planner would actually do rather than to a static script.
A single optimized attack, however, tends to rediscover the same failure. To cover a planner's failure modes without hand-picking scenario types, we run the optimization inside MAP-Elites [26], a quality-diversity search. MAP-Elites divides a space of behavior descriptors into a grid and keeps, in each grid cell, the attack that comes physically closest to the ego. We use two descriptors, contact time-gap and approach angle, on a grid. The grid forces the attacks to spread over the descriptor space, while the type of attack in each cell, such as a cut-in or a head-on approach, is not specified and emerges from the optimization. We run one grid per base scene and keep, among its filled cells, the attack with the smallest ego-attacker distance, so each base scene contributes one attack. The resulting distribution over attack types differs between the two planners (Sec. IV-G). Generating a dataset of 50 scenes costs around 30 GPU-hours of search per planner, plus 70 for rendering the survivors (Sec. III-D). Even a gradient-free search with the real planner in the loop would need one render per candidate, roughly 4,300 GPU-hours. Our surrogate planner, together with the automated search of diverse attacks before any scene is rendered, therefore reduces the search cost substantially.
C. Solving Safe Escapes
The attack defines the situation; the escape defines the correct response to it. Holding the attacker's trajectory fixed, we solve for an escape, the ego trajectory that maximizes clearance to the adversary while staying on-road, avoiding all other agents, remaining kinematically feasible, and keeping the route goal. No planner participates in this stage. We run the same MAP-Elites search over the escapes, with a longitudinal descriptor (brake to accelerate) and a lateral one (left to right) on a grid. It returns several qualitatively distinct escapes per scene, and the escape with the largest clearance serves as the label. Any scene where no trajectory clears the adversary by 4m after a 1 s (12-frame) reaction delay is rejected as unavoidable (15% of attacks). Thus, the planner is never fine-tuned on adversarial situations it could not have survived.
D. Rendering and Fine-Tuning
To prepare each surviving scene for rendering, all scene tensors (BEV maps, 3D bounding boxes, camera visibility masks and relative pose embeddings) are recomputed for spatial consistency with the attacker's trajectory and the ego's escape. Each scene is then rendered with MagicDriveV2 [4] into a six-camera photorealistic clip of 65 frames at per camera. The base scenes come from the nuScenes train split, so no evaluation scene is used. The renderer itself is trained only on nuScenes. Rendering takes about 1.4 GPU-hours per scene, around 70 GPU-hours for the 50 scenes of one planner. We fine-tune the E2E model on the 50 rendered scenes mixed with clean nuScenes, so normal driving is not forgotten. Perception stays frozen and only parameters inside the planning head are updated. The surrogate is used only to find the 50 scenes and is not deployed.
IV. EXPERIMENTS
A. Setup
We evaluate two vision-based E2E planners from their released checkpoints, SparseDrive [16] and DiffusionDrive [15]. Both planners are evaluated as released, with their own inference pipelines unchanged. NeuroNCAP [3] provides closed-loop evaluation in photorealistic collision scenarios of three categories (stationary, frontal, side), reporting a score (↑, macro-averaged over categories) and a collision rate (↓). Challenger [2] provides open-loop adversarial replay. Its adversaries are optimized to come close to the ego without colliding, and scenes that the logged ego trajectory cannot traverse safely are discarded. The logged trajectory serves as ground truth, so the ground-truth ego passes close to the adversary without reacting to it. Challenger renders with the same generative model as our pipeline, MagicDriveV2, while NeuroNCAP uses neural reconstruction of the original scenes. Clean nuScenes val [27] checks that normal driving is preserved. Fine-tuning runs use three seeds and we report mean and standard deviation.
We compare against three data-generation baselines. The first is recovery-based augmentation inspired by SimScale [8], where ego trajectories are perturbed within the nuScenes vocabulary and recovery trajectories are retrieved from a large human-driven trajectory bank via pose-matching. The second is rule-based, which places scripted stationary and oncoming adversaries on the ego's route, with escape labels produced by a CEM-Diffusion expert. It is safety-critical by design but blind to the planner. The third is Challenger-style, which runs Challenger's own generation on 50 nuScenes train scenes. Its adversaries are optimized to pass close to the ego without colliding, and the logged ego trajectory serves as label, so the data is adversarial but neither aimed at a planner nor paired with an evasive label. All three baselines use MagicDriveV2 [4] for video synthesis and receive the
TABLE I FAILURE DECOMPOSITION ON NEURONCAP (STOCK DIFFUSIONDRIVE). AN AGENT COUNTS AS DETECTED AT RECALL@5–35 M ≥ 0.5 ON THE MODEL'S OWN DETECTIONS. RATES WEIGHT EVERY EPISODE EQUALLY, UNLIKE NEURONCAP'S FAMILY-WEIGHTED COLLISION RATE.
| Scenario | Det.+Cr. | Det.+No Cr. | Miss+Cr. | Miss+No Cr. | Recall |
|---|---|---|---|---|---|
| Stationary | 6.8% | 82.9% | 0.0% | 10.2% | 0.822 |
| Frontal | 52.5% | 41.7% | 4.5% | 1.2% | 0.861 |
| Side | 50.0% | 50.0% | 0.0% | 0.0% | 0.915 |
| Overall | 27.8% | 65.3% | 1.2% | 5.7% | 0.866 |
same budget of 50 scenes and the same fine-tuning recipe as ours. So the comparison isolates the scenario design strategy rather than the renderer.
The adapter trains for 20 epochs on the nuScenes train split with AdamW at learning rate , weight decay 0.01 and batch size 8, weighting the two terms of Eq. 2 at and . Each attack search fills a MAP-Elites grid over contact time-gap and approach angle with a budget of 60 optimizations per scene, each 40 Adam steps, stopping early after 15 optimizations without improvement. The escape solver uses the same grid size and budget over its response descriptors.
The 50 generated scenes are repeated eight times in the training mix, so that they make up approximately of the training samples. For both models, the perception stack is fully frozen and only layers inside the planning head of Eq. 1 are trained. For DiffusionDrive, the motion-interact layers train at a base learning rate of and the diffusion branch at half of that rate. For SparseDrive, the planning output branches train at a rate of with batch size 8. Both models train for 30 epochs with cosine annealing. The detection, map and motion losses are disabled, so only the planning loss is active.
B. Failure Analysis of E2E Models
When an E2E model collides with an adversarial agent, we ask whether the agent was undetected or detected and mishandled. We decompose every NeuroNCAP episode of the unmodified (stock) DiffusionDrive by whether its own detections tracked the adversary before the collision. We count the adversary as detected when recall at 5–35 m is at least 0.5. Recall is computed on the detections the planner actually consumes, at the model's native operating point with no additional confidence threshold. Table I shows the result. Detection is reliable in every category, and in 95.9% of the collision episodes the adversary was detected, while pure perception failures account for only 4.1% of them. SparseDrive decomposes the same way, with 95.8% of its collisions occurring while the threat was detected. The per-scenario pattern sharpens the diagnosis, as stationary threats are mostly handled properly, frontal interactions are crashed more often than avoided, and side scenarios collide in half of all episodes despite the best recall of the three. The diagnosis does not hinge on the recall threshold, as sweeping it from 0.3 to 0.7 moves the detected-and-crashed share from 97.0% to 92.5% on SparseDrive and 97.8% to 89.3% on DiffusionDrive, while episodes that crash with the threat undetected never exceed 3.1% of all episodes. Detection also holds at close range, with recall rising from 0.84 beyond 15 m to 0.91 within 15 m on DiffusionDrive and from 0.84 to 0.90 on SparseDrive. The bottleneck is therefore planning, which motivates freezing perception and fine-tuning only the planning layers.
C. Main Results
Fig. 3 shows two of the generated scenes, one per planner, a daytime in-path attack aimed at DiffusionDrive and a night front-brake attack aimed at SparseDrive. Each scene is rendered across all six cameras with the attack and its solved escape traced in BEV. In addition, Table II gives the quantitative results. Our scenes roughly halve the closed-loop collision rate of both planners, to on SparseDrive and to on DiffusionDrive. Every individual seed improves the stock planner. The per-scenario scores locate the gain. Side collisions, the hardest category for both stock planners and the one our failure analysis flagged, improve by about 1.5 points on each, the largest gain of any category. Frontal improves more modestly and remains the hardest category after fine-tuning. Stationary scores, already the highest category for both planners, increase further, and SparseDrive reaches the maximum score of 5.0. Normal driving is largely preserved. The nuScenes collision rate is unchanged on SparseDrive (0.088 vs. 0.094) and slightly lower on DiffusionDrive (0.071 vs. 0.079), and the nuScenes L2 is at most 0.06 higher than that of the stock planner (0.668 vs. 0.609 for SparseDrive, 0.580 vs. 0.574 for DiffusionDrive). On open-loop Challenger, our collision rate is lower than that of the stock planner on both planners, while all three baselines score better on DiffusionDrive. The larger L2 is expected, since the Challenger ground truth does not react to the adversary (Sec. IV-A) while our fine-tuned planners do.
Our model-aware data is also the best row in both planner blocks, ahead of all three baselines on both score and collision rate. Recovery data lowers the collision rate from to on SparseDrive and from to on DiffusionDrive, a gain of 4.2 and 2.8 points against 16 to 18 points with our data. So photorealistic augmentation that varies the ego's own trajectory, without an adversarial vehicle, gives only a small gain. Designing adversarial interactions helps, but neither scripted nor untargeted threats are sufficient. Rule-based scenes correspond to two of NeuroNCAP's three categories, yet their collision rate is on SparseDrive and on DiffusionDrive, against and with our data, 15 points lower on DiffusionDrive. The difference is that our attacks are optimized against the planner's own head and cover the attack types at which that planner actually fails, rather than the types a script prescribes. Challenger-style scenes, adversarial but aimed at no planner and labeled with the non-reacting logged trajectory, lower SparseDrive's collision rate to and leave DiffusionDrive at , no better than stock. The same data gives the best Challenger L2 on both planners and the best Challenger collision rate on DiffusionDrive. Open-loop Challenger metrics therefore do not track closed-loop safety on these planners.
TABLE II
MAIN RESULTS. CLOSED-LOOP NEURONCAP DECIDES; stat. / front. / side ARE ITS PER-SCENARIO SCORES. CHALLENGER IS OPEN-LOOP ADVERSARIAL REPLAY, AND CLEAN NUSCENES CHECKS THAT NORMAL DRIVING IS PRESERVED. ours DENOTES OUR MODEL-AWARE SCENES. STOCK ROWS EVALUATE THE RELEASED CHECKPOINTS WITHOUT FINE-TUNING; ALL OTHER ROWS ARE MEANS OVER 3 SEEDS.
| Planner | Training data | NeuroNCAP (closed-loop) | Challenger | nuScenes | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| score ↑ | CR (%) ↓ | stat. ↑ | front. ↑ | side ↑ | CR (%) ↓ | L2 ↓ | CR (%) ↓ | L2 ↓ | ||
| SparseDrive | none (stock) | 4.009 | 28.0 | 4.935 | 3.692 | 3.399 | 1.00 | 1.66 | 0.094 | 0.609 |
| recovery | 4.144±0.07 | 23.8±2.5 | 4.999 | 3.815 | 3.619 | 0.94±0.05 | 1.66±0.06 | 0.114±0.006 | 0.636±0.013 | |
| rule-based | 4.373±0.13 | 17.9±1.0 | 4.843 | 4.134 | 4.141 | 0.91±0.05 | 1.60±0.05 | 0.116±0.014 | 0.652±0.003 | |
| Challenger-style | 4.276±0.04 | 19.1±0.9 | 4.839 | 4.282 | 3.708 | 0.87±0.08 | 1.55±0.03 | 0.135±0.029 | 0.689±0.070 | |
| ours | 4.639±0.04 | 12.2±0.8 | 5.000 | 4.010 | 4.907 | 0.86±0.03 | 1.68±0.01 | 0.088±0.020 | 0.668±0.070 | |
| DiffusionDrive | none (stock) | 3.624 | 37.5 | 4.806 | 3.220 | 2.847 | 1.67 | 2.37 | 0.079 | 0.574 |
| recovery | 3.700±0.16 | 34.7±3.7 | 4.702 | 3.277 | 3.119 | 0.86±0.07 | 1.53±0.09 | 0.090±0.006 | 0.589±0.009 | |
| rule-based | 3.759±0.06 | 34.3±1.5 | 4.876 | 3.296 | 3.104 | 0.78±0.05 | 1.38±0.03 | 0.095±0.016 | 0.580±0.009 | |
| Challenger-style | 3.581±0.21 | 38.8±4.5 | 4.764 | 2.998 | 2.983 | 0.63±0.03 | 1.22±0.13 | 0.080±0.030 | 0.580±0.007 | |
| ours | 4.394±0.19 | 19.2±4.6 | 4.967 | 3.861 | 4.354 | 1.02±0.17 | 1.98±0.09 | 0.071±0.008 | 0.580±0.005 | |

x (m)
Ego (escape)
Attacker
★ Closest approach (avoided)
○ Rendered frame
Fig. 3. Generated training scenes, one per planner. Six cameras at the moment the ego must react, attacker boxed in red, with the BEV trail below, where footprints darken with time and the escape clears the attacker by the marked distance. Left: DiffusionDrive-targeted in-path attack. Right: SparseDrive-targeted front-brake at night, where the ego swerves around the near-stationary attacker.
TABLE III
CHOICE OF EXPERT LABEL. SCENES, BUDGET AND RECIPE ARE IDENTICAL; ONLY THE LABEL CHANGES. CEM-DIFFUSION REFINES SAMPLES FROM A NUPLAN-TRAINED TRAJECTORY DIFFUSION PRIOR [2], [28], AND BRAKE-ALWAYS APPLIES MAXIMUM DECELERATION. DIFFUSIONDRIVE, MEAN OVER 3 SEEDS.
| Expert label | NeuroNCAP (closed-loop) | CHALLENGER | ||
|---|---|---|---|---|
| score ↑ | CR (%) ↓ | CR (%) ↓ | L2 ↓ | |
| none (stock) | 3.624 | 37.5 | 1.67 | 2.37 |
| CEM-Diffusion | 3.759 | 34.3 | 0.78 | 1.38 |
| brake-always | 3.833 | 33.1 | 1.32 | 1.95 |
| solved (ours) | 3.939 | 30.8 | 1.00 | 1.75 |
D. Choice of Escape Label
Table III compares three escape labels on the same rule-based scenes: the CEM-Diffusion expert, a brake-always label, and our solved escape. The solved escape has the highest mean closed-loop score and the lowest collision rate, but its margin over brake-always is small. Brake-always comes close in closed-loop because, with a single adversary and no cross traffic, stopping usually avoids the collision. The three labels differ clearly on Challenger. Brake-always has the highest Challenger collision rate, since the label must
TABLE IV
SURROGATE FIDELITY ON THE 5,119 NUSCENES VAL SAMPLES WITH ANNOTATED FUTURES. INCIDENCE IS THE FRACTION OF SAMPLES WITH A COLLISION WITHIN 3 S. IT IS STRICTER THAN THE NUSCENES COLLISION RATE OF TABLE II, WHICH AVERAGES OVER TIMESTEPS.
| SparseDrive | DiffusionDrive | |
|---|---|---|
| π vs. GT, L2 (the bar) | 0.609 | 0.575 |
| hat vs. π, L2 | 0.620 | 0.643 |
| ratio to the bar | 1.02× | 1.12× |
| collision incidence, π | 1.60% | 1.33% |
| collision incidence, hat | 1.52% | 1.07% |
| precision | 0.603 | 0.673 |
| lift over base rate | 38× | 51× |
| recall | 0.573 | 0.544 |
provide an evasive path rather than a stop. CEM-Diffusion has the lowest Challenger collision rate and L2 but the lowest closed-loop score. Even with our label, rule-based scenes remain below our scenes in Table II (3.939 vs. 4.394); that difference is the contribution of the model-aware attacker.
E. Is the Surrogate Faithful?
The surrogate does not need to reproduce the planner in every situation. Its purpose is to find the scenes in which the
TABLE V
TRANSFER AND TARGETING PREMIUM. EACH PLANNER FINE-TUNED ON DATA GENERATED AGAINST ITSELF (DIAGONAL) AND AGAINST THE OTHER (OFF-DIAGONAL). CELLS GIVE CLOSED-LOOP NEURONCAP SCORE / COLLISION RATE, MEAN OVER 3 SEEDS.
| data ↓ / model → | SparseDrive | DiffusionDrive |
|---|---|---|
| SparseDrive-targeted | 4.639 / 12.2% | 3.837 / 30.8% |
| DiffusionDrive-targeted | 4.460 / 15.7% | 4.394 / 19.2% |
| premium (own - cross) | +0.18 | +0.56 |
planner fails. We therefore evaluate two properties. The first is how far deviates from the planner, relative to how far the planner deviates from ground truth. The second is how reliably a collision predicted by corresponds to a collision of the real planner. Table IV reports both on nuScenes val, using real images only, because on rendered scenes the comparison would mix adapter error with any drift of the planner's features on synthetic pixels.
On the first property, deviates from its planner by about as much as the planner deviates from ground truth, 1.02 times that deviation for SparseDrive and 1.12 times for DiffusionDrive. On the second, we compare collision incidence, which counts a sample as colliding if any predicted timestep collides. Incidence is a per-sample quantity and differs from the per-timestep collision rate of Table II. A collision predicted by corresponds to a real collision with precision 0.603 on SparseDrive and 0.673 on DiffusionDrive, against base rates near , i.e., 38 and 51 times the base rate. Recall is 0.573 on SparseDrive and 0.544 on DiffusionDrive. For a scene generator, low recall is acceptable, since a missed failure mode only reduces coverage. On the rendered attack scenes themselves, the stock planner, which has never seen them, collides with the attacker in 32 of 50 SparseDrive scenes and 26 of 50 DiffusionDrive scenes. Scenes the stock planner survives still supply a corrective label, since the solved escape maximizes clearance. The transfer experiment in Sec. IV-F provides further evidence of fidelity.
F. The Targeting Premium Is Planner-Dependent
If the surrogate's gradients carry planner-specific information, data generated against planner should help more than it helps . Table V shows the full two-by-two comparison, in which each planner is fine-tuned on its own scenes and on the scenes of the other planner, with 3 seeds per entry. We call the difference between the own-data score and the cross-data score the targeting premium. Both premiums are positive. Every own-data seed scores higher than every cross-data seed on both planners. The premiums nonetheless differ, +0.18 for SparseDrive against +0.56 for DiffusionDrive. In terms of collision rate, DiffusionDrive trained on SparseDrive's scenes keeps only 6.7 of the 18.3-point reduction it obtains on its own scenes.
Fig. 4 shows the distribution of attack types found against each planner. The attacks against DiffusionDrive concentrate on cut-ins with almost no head-on threats, while those against SparseDrive are spread over cut-ins, head-on and front-brake. Since every attack is optimized against one planner's head, attacks of the same type are also expected to differ between the two planners. The transfer result reflects this, since the scenes found through each surrogate help that surrogate's own planner most, which requires that the gradients behind those scenes encode failure modes specific to that planner. A planner-independent proxy would not produce this asymmetry.

Fig. 4. Attacks discovered against each planner differ. Those against DiffusionDrive are predominantly cut-ins and almost never head-on threats, while those against SparseDrive also include head-on and front-brake attacks.
G. Emergent Diversity
The pipeline does not specify scenario types, yet six attack types emerge from the single collision objective (Fig. 4). We assign each attack to a type with a fixed geometric rule based on the adversary's position and heading relative to the ego at the moment of first contact and during the approach. The proportions of the types differ between the two planners. DiffusionDrive's concentration on cut-ins reflects a weakness of that planner rather than a lack of diversity in the search, since the same search against SparseDrive produces a wider spread. The escapes are similarly varied and include braking, holding speed, swerving, and accelerating past the adversary, with several qualitatively distinct valid escapes per scene on average. The main results use only the escape with the largest clearance; the remaining escapes are left for future multi-label training.
V. LIMITATIONS
The first limitation is breadth. Our evidence covers two planners, so the targeting premium is measured at two points only, and a third architecture would be needed to confirm the trend. The renderer also restricts us to nuScenes-based planners, and we evaluate on a single closed-loop simulator. NeuroNCAP's neural rendering differs from the generative renderer behind our training data, so the gains are not specific to one renderer, but evaluation on further simulators would strengthen this claim. The second limitation is depth. DiffusionDrive's surrogate has a recall of 0.544 on that planner's real collisions (Table IV), so it misses roughly half of them, and the attacks we find are a subset of the attacks that would succeed against the real planner. The measured premium is therefore a lower bound on what a better surrogate would expose. The third limitation is the scope of the scenes. Each scene contains a single adversarial vehicle and no vulnerable road users. We plan to extend the search to multiple adversaries and to vulnerable road users in the future.
Two problems remain open. Frontal scenarios remain the hardest category after fine-tuning. We also train on one escape per scene although the solver produces several, and training with multiple labels per scene is left for future work.
VI. Conclusion
This paper began with a failure analysis of current E2E models. Decomposing closed-loop collisions showed that end-to-end planners detect the threat in the large majority of collisions but fail to respond to it. The failures are thus mainly a planning problem and not a perception problem, and the missing safety-critical training data must target planning. The obstacle to generating such data against a specific planner is that a vision-based planner consumes images, and a video renderer inside an optimization loop is computationally infeasible. Distilling the planner into a differentiable surrogate built from its own frozen planning head, but operating on BEV inputs instead of images, removes this obstacle. With the renderer outside the optimization loop, gradients are cheap and the attacks are specific to one planner.
Fifty such scenes per planner, each pairing an optimized attack with a safe escape label, roughly halve the closed-loop collision rate of two vision-based planners while normal driving is largely preserved, at around 30 GPU-hours of search per planner. The transfer experiment shows that this gain depends on the planner the scenes were generated for. Each planner improves most on the scenes generated against itself, on every seed, and DiffusionDrive keeps only about a third of its collision-rate reduction when trained on scenes generated against SparseDrive. This asymmetry is consistent with the method. Safety-critical training data is therefore planner-specific, and generating it against the planner's own surrogate is an efficient way to obtain it.
REFERENCES
[1] R. Xu, H. Lin, W. Jeon, H. Feng, Y. Zou, L. Sun, J. Gorman, E. Tolstaya, S. Tang, B. White, et al., “WOD-E2E: Waymo open dataset for end-to-end driving in challenging long-tail scenarios,” arXiv:2510.26125, 2025.
[2] Z. Xu, B. Li, H.-a. Gao, M. Gao, Y. Chen, M. Liu, C. Yan, H. Zhao, S. Feng, and H. Zhao, "Challenger: Affordable adversarial driving video generation," arXiv:2505.15880, 2025.
[3] W. Ljungbergh, A. Tonderski, J. Johnander, H. Caesar, K. Åström, M. Felsberg, and C. Petersson, “NeuroNCAP: Photorealistic closed-loop safety testing for autonomous driving,” in Eur. Conf. Comput. Vis. (ECCV), pp. 161–177, 2024.
[4] R. Gao, K. Chen, B. Xiao, L. Hong, Z. Li, and Q. Xu, “MagicDrive-V2: High-resolution long video generation for autonomous driving with adaptive control,” in Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), pp. 28135–28144, 2025.
[5] N. Agarwal, A. Ali, M. Bala, Y. Balaji, E. Barker, T. Cai, P. Chattopadhyay, Y. Chen, Y. Cui, Y. Ding, et al., “Cosmos world foundation model platform for physical AI,” arXiv:2501.03575, 2025.
[6] G. Zhao, X. Wang, Z. Zhu, X. Chen, G. Huang, X. Bao, and X. Wang, "DriveDreamer-2: LLM-enhanced world models for diverse driving video generation," in Proc. AAAI Conf. Artif. Intell., vol. 39, pp. 10412–10420, 2025.
[7] E. Ma, L. Zhou, T. Tang, Z. Zhang, D. Han, J. Jiang, K. Zhan, P. Jia, X. Lang, H. Sun, et al., “Unleashing generalization of end-to-end autonomous driving with controllable long video generation,” arXiv:2406.01349, 2024.
[8] H. Tian, T. Li, H. Liu, J. Yang, Y. Qiu, G. Li, J. Wang, Y. Gao, Z. Zhang, L. Wang, H. Ye, L. Chen, and H. Li, “SimScale: Learning to drive via real-world simulation at scale,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 36365–36374, 2026.
[9] D. Rempe, J. Philion, L. J. Guibas, S. Fidler, and O. Litany, “Generating useful accident-prone driving scenarios via a learned traffic prior,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 17305–17315, 2022.
[10] W.-J. Chang, F. Pittaluga, M. Tomizuka, W. Zhan, and M. Chandraker, "SAFE-SIM: Safety-critical closed-loop traffic simulation with diffusion-controllable adversaries," in Eur. Conf. Comput. Vis. (ECCV), pp. 242–258, 2024.
[11] N. Hanselmann, K. Renz, K. Chitta, A. Bhattacharyya, and A. Geiger, "KING: Generating safety-critical driving scenarios for robust imitation via kinematics gradients," in Eur. Conf. Comput. Vis. (ECCV), pp. 335–352, 2022.
[12] L. Chen, P. Wu, K. Chitta, B. Jaeger, A. Geiger, and H. Li, “End-to-end autonomous driving: Challenges and frontiers,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 46, no. 12, pp. 10164–10183, 2024.
[13] Y. Hu, J. Yang, L. Chen, K. Li, C. Sima, X. Zhu, S. Chai, S. Du, T. Lin, W. Wang, et al., “Planning-oriented autonomous driving,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 17853–17862, 2023.
[14] B. Jiang, S. Chen, Q. Xu, B. Liao, J. Chen, H. Zhou, Q. Zhang, W. Liu, C. Huang, and X. Wang, “VAD: Vectorized scene representation for efficient autonomous driving,” in Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), pp. 8340–8350, 2023.
[15] B. Liao, S. Chen, H. Yin, B. Jiang, C. Wang, S. Yan, X. Zhang, X. Li, Y. Zhang, Q. Zhang, et al., “DiffusionDrive: Truncated diffusion model for end-to-end autonomous driving,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 12037–12047, 2025.
[16] W. Sun, X. Lin, Y. Shi, C. Zhang, H. Wu, and S. Zheng, “SparseDrive: End-to-end autonomous driving via sparse scene representation,” in IEEE Int. Conf. Robot. Autom. (ICRA), pp. 8795–8801, 2025.
[17] D. Dauner, M. Hallgarten, T. Li, X. Weng, Z. Huang, Z. Yang, H. Li, I. Gilitschenski, B. Ivanovic, M. Pavone, et al., “NAVSIM: Data-driven non-reactive autonomous vehicle simulation and benchmarking,” Adv. Neural Inf. Process. Syst., vol. 37, pp. 28706–28719, 2024.
[18] Z. Zhong, D. Rempe, Y. Chen, B. Ivanovic, Y. Cao, D. Xu, M. Pavone, and B. Ray, “Language-guided traffic simulation via scene-level diffusion,” in Conf. Robot Learn. (CoRL), pp. 144–177, 2023.
[19] L. Zhang, Z. Peng, Q. Li, and B. Zhou, “CAT: Closed-loop adversarial training for safe end-to-end driving,” in Conf. Robot Learn. (CoRL), pp. 2357–2372, 2023.
[20] J. Wang, A. Pun, J. Tu, S. Manivasagam, A. Sadat, S. Casas, M. Ren, and R. Urtasun, “AdvSim: Generating safety-critical scenarios for self-driving vehicles,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 9909–9918, 2021.
[21] Y. Mei, T. Nie, J. Sun, and Y. Tian, “LLM-Attacker: Enhancing closed-loop adversarial scenario generation for autonomous driving with large language models,” IEEE Trans. Intell. Transp. Syst., vol. 26, no. 10, pp. 15068–15076, 2025.
[22] Y. Liu, Z. M. Peng, X. Cui, and B. Zhou, “Adv-BMT: Bidirectional motion transformer for safety-critical traffic scenario generation,” Adv. Neural Inf. Process. Syst., vol. 38, pp. 55310–55335, 2025.
[23] J. Lu, Z. Huang, Z. Yang, J. Zhang, and L. Zhang, “WoVoGen: World volume-aware diffusion for controllable multi-camera driving scene generation,” in Eur. Conf. Comput. Vis. (ECCV), pp. 329–345, 2024.
[24] K. M. Seyam, J. Wiederer, M. Braun, and B. Yang, “SVS-GAN for semantic synthesis of traffic videos for autonomous driving,” in Proc. IEEE/CVF Winter Conf. Appl. Comput. Vis. (WACV), pp. 8650–8659, 2026.
[25] A. Demontis, M. Melis, M. Pintor, M. Jagielski, B. Biggio, A. Oprea, C. Nita-Rotaru, and F. Roli, “Why do adversarial attacks transfer? Explaining transferability of evasion and poisoning attacks,” in USENIX Security Symp., pp. 321–338, 2019.
[26] J.-B. Mouret and J. Clune, “Illuminating search spaces by mapping elites,” arXiv:1504.04909, 2015.
[27] H. Caesar, V. Bankiti, A. H. Lang, S. Vora, V. E. Liong, Q. Xu, A. Krishnan, Y. Pan, G. Baldan, and O. Beijbom, “nuScenes: A multimodal dataset for autonomous driving," in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), pp. 11621–11631, 2020.
[28] H. Caesar, J. Kabzan, K. S. Tan, W. K. Fong, E. Wolff, A. Lang, L. Fletcher, O. Beijbom, and S. Omari, “nuPlan: A closed-loop ML-based planning benchmark for autonomous vehicles,” arXiv:2106.11810, 2021.