Occluded hazards challenge autonomous driving because visibility timing determines available avoidance actions. Existing scenario generators control hazard motion without jointly specifying exposure and reference-contact times. We propose OnCue, a framework that generates safety-critical encounters in real driving logs with these temporal conditions. Scene geometry provides hidden starts and timed waypoints for pedestrian, cyclist, and vehicle trajectory generation. An offline response oracle labels encounters as Reactive (avoidable after exposure) or Anticipatory (avoidable only with earlier visibility) and stores safe maneuvers as training demonstrations. On the Waymo Open Motion Dataset, 90.1-96.6% of valid trajectories meet both requested times within +/-0.2 s. OnCue matches the requested reaction window between them in 92.8% of shared vehicle requests versus at most 42.1% for adapted adversarial generators. Across matched cyclist encounters, longer windows lower PDM-Closed collision from 59.1% to 5.5%, while the learned planner LatentDriver shows the opposite trend. OnCue demonstrations reduce LatentDriver target collision by 54.8 points on held-out Reactive tests, but reduce overall no-target progress by 12.7 m. These results highlight the value of temporal control for evaluating and improving planners under occlusion.
Figures & tables
Figure 1: OnCue controls when a hidden hazard becomes visible. (a) Two requests with the same reference contact and requested reaction windows W∗=2.0 s and 0.5 s. (b) Target and ego speeds under the same braking from exposure E . Earlier exposure leaves time to slow before contact tc∗ (red line).
Figure 2: OnCue framework. Timed conditions guide generation, followed by response labeling and planner evaluation.
Figure 3: Temporal control. (a) Exposure and contact timing errors and percentages for valid outputs. Orange marks both errors within ±0.2 s. Gray marks the 0.2 s window tolerance. (b) Median window error with 10th to 90th percentile bands. Raw candidates are evaluated before checks at the first constructed start.
Figure 4: Generated occluded encounters across pedestrian, cyclist, and vehicle scenarios. The top row shows hidden approaches, while the bottom row shows first exposure before reference contact.
Controlled encounters
PDM-Closed
Motion quality
Method
W match
Coverage
Collision
Adv. reward
Speed WD
Accel. WD
Yaw-rate WD
Road edge
BG contact
(%) ↑
(%) ↑
(%) ↑
↑
(m/s) ↓
(m/s 2 ) ↓
(rad/s) ↓
(%) ↓
(%) ↓
External generators
CAT [ 55 ]
26 .8
57 .5
19 .4
0 .943
4 .086
1 .151
0 .339
26 .5
56 .6
KING [ 24 ]
42 .1
57 .3
12 .0
0 .707
4 .033
2 .014
0 .352
25 .2
48 .1
GOOSE [ 35 ]
38 .9
47 .2
9 .2
0 .576
3 .753
0 .939
0 .284
30 .2
49 .0
Table 1: Generator comparison. OnCue achieves the highest window match, coverage, and masked PDM-Closed collision on 2,624 shared requests from 446 logs. Requests are selected from valid OnCue outputs. OnCue (rule) keeps its first candidate when none passes the hard checks (900 requests), so both OnCue variants return an output for each request; requests without an output from another generator count as failures. Blue shades mark the top three values across all rows, darkest first, with the best in bold.
Variant
Pedestrian
Cyclist
Vehicle
(a) Learned motion: generation success ↑
Rule
94.2
86.2
29.5
OnCue
90.5 (-3.7)
93.7 (+7.5)
43.3 (+13.8)
(b) Constructed starts: on-time generation ↑
Grid
84.4
69.1
27.7
OnCue
87.4 (+3.0)
90.3 (+21.2)
38.7 (+11.0)
Table 2: Components of temporal control. Starts and waypoints improve timing, and learned motion improves cyclist and vehicle generation. Rates are percentages, with gray point changes from each panel’s first row. Panels (b, c) use shards 12–35, unlike Figure 3 .
Figure 5: Oracle action timing. In (a, b), the same braking action is safe when started at tv (purple) and collides when started at exposure (blue). Dots mark target contact. In (c), the post-exposure action is safe. Guides mark exposure and reference contact.
Figure 6: Response time separates planner behavior. Target collision under masked observations. Each curve keeps situations complete at all windows, so counts differ by planner. Bands: pointwise 95% driving-episode bootstrap intervals.
Planner
Collision (%) ↓
Success ↑ (%)
Progress ↑ (m)
Masked
Unoccluded
Pedestrian: 61 tests, 43 driving episodes
IDM-base
100 .0
7 .2 (-92 .8 )
0 .0
40 .9
IDM-conservative
11 .6
3 .1 (-8 .4 )
6 .1
23 .9
IDM-occlusion-aware
23 .7
7 .2 (-16 .5 )
9 .9
17 .1
PDM-Closed
83 .8
53 .5 (-30 .3 )
11 .1
41 .1
Table 3: Anticipatory planner tests. Earlier visibility reduces collision for IDM-base and PDM-Closed. Rates are weighted by eligible-test counts, and progress is median 4 s no-target distance. Gray parentheses give unoccluded minus masked collision (points). Blue marks each class’s largest reduction and highest masked success.
Rates (%)
Progress
Training
Target coll. ↓
Safe resp. success ↑
Untriggered or late ↓
Other-agent contact ↓
No-target dist. (m) ↑
(a) Full evaluation set
Pretrained
73 .3
8 .1
0 .2
17 .5
103 .1
Logs only
78 .4 ± 0.2
6 .5 ± 0.4
11 .1 ± 0.3
0 .4 ± 0.1
71 .1 ± 0.1
Logs + OnCue
23 .7 ± 0.1
37 .8 ± 0.2
28 .6 ± 0.4
4 .6 ± 0.2
58 .4 ± 0.2
(b) No-target distance: OnCue ≥ Logs only
Table 4: LatentDriver adaptation. OnCue demonstrations reduce collision by 54.8±0.4 points on held-out Reactive tests and 35.1±0.8 points on a subset with equal or greater no-target progress. Differences use unrounded values.
Symbol
Definition
Event times
te∗,tc∗
Requested exposure and reference-contact times.
te,tc
Realized confirmed exposure and first reference contact.
W∗,W
Requested and realized windows: tc∗−te∗ and tc−te .
tv
First confirmed visibility with relevant occluders transparent to observation.
J
Indicator that both events are on time (Algorithm S1 ).
Table S1 : Notation. Event times are measured from replay start. Target start denotes a position, and movement start time denotes when motion begins.
(a) Generation rates, full evaluation set
OnCue (rule)
OnCue (model)
Target
Requests
Start / request (%)
Valid / start (%)
On time / valid (%)
Valid / start (%)
On time / valid (%)
Pedestrian
130,140
22 .6
94 .2
99 .9
90 .5
96 .6
Cyclist
81,468
16 .5
86 .2
99 .7
93 .7
95 .5
Vehicle
234,366
13 .4
29 .5
95 .9
43 .3
90 .1
Table S2 : Generation rates and raw-candidate timing. (a) The share of requests that get a start and, for each OnCue variant, the share of these with a valid output and the share of valid outputs on time. (b) OnCue (model)'s own timing before checks and selection, on 1/10 of the requests with a start; selected outputs may come from later starts and pass every check. A valid output passes every hard check of Algorithm S1 , and an output is on time if both events are within ±0.2 s.
(a) Conditional timing: 2,624 requests shared by all generators, same starts
Rates (%)
Uncovered requests ( n ) ↓
Method
Contact / request ↑
W match / contact ↑
Events unmet
Unre- solved
Not judged
CAT [ 55 ]
70 .0
38 .2
1,107
3
4
KING [ 24 ]
69 .9
60 .2
1,114
2
4
GOOSE [ 35 ]
58 .0
67 .0
1,322
1
63
SEAL [ 43 ]
59 .9
37 .1
1,251
1
62
Table S3 : Conditional timing and rates over all requests. (a) Window match given reference contact on the shared requests, and why the other requests lack the Reactive or Anticipatory label that coverage requires: events unmet (no reference contact, confirmed exposure, or long enough hidden interval), Unresolved (no safe response in the library), or not judged (no output, too little recording, contact before any action, or incomplete search; B.1 and Algorithm S2 ). (b) Main Table 1 over all requests, counting missing outputs as failures; coverage counts requests whose output is labeled Reactive or Anticipatory, and shades rank the top three per column. OnCue (rule) keeps a failing first candidate on 4,321 requests, so only 1,733 of its outputs (28.6% of requests) pass every check, whereas all OnCue (model) outputs do. W match requires reference contact and ∣W−W∗∣≤0.2 s; higher PDM-Closed collision means a harder test.
(a) Vehicles: every generator, 2,624 shared requests
Behavior penalty
Method
Mean
Median
Background contact (%)
CAT [ 55 ]
1 .361
0 .513
42 .6
KING [ 24 ]
0 .370
0 .211
37 .7
GOOSE [ 35 ]
4 .934
0 .225
38 .5
SEAL [ 43 ]
1 .763
0 .539
39 .9
Table S4 : Motion quality for vehicles and for pedestrians and cyclists. (a) Behavior penalties for sharp and low-speed turns up to the test cutoff, and background contact before reference contact (before the cutoff if contact is absent); main Table 1 gives it over the full interval. (b) Wasserstein distances to class-matched moving road users in the same WOMD scenes, and background contact, both over the whole generated trajectory. Main Table 1 and (a) compare the two variants on vehicles. Lower is better in every column.
(a) Braking jerk 30 to 13.9 m/s 3 : labels of the 644 tests
Labels ( n )
Target
Tests
Unchanged
Reactive to Anticipatory
Anticipatory to Unresolved
Pedestrian
277
269
2
6
Cyclist
266
264
2
0
Vehicle
101
93
8
0
All
644
626
12
6
Table S5 : Response-label sensitivity to oracle settings. (a) Transitions not shown are zero; 61, 53, and 31 of the tests are Anticipatory, 15 vehicle tests are Unresolved, and the rest are Reactive. (b) Pooled over the 101,323 labeled outputs of both OnCue variants; 1,316 is the full library of Algorithm S2 .
(a) Generation rates
Rate (%) ↑
Main ego
0.8 × speed
2.0 s headway
Pedestrian
Valid / start
90 .5
90 .9
90 .6
On time / valid
96 .6
96 .4
96 .2
Cyclist
Valid / start
93 .7
94 .5
94 .2
Table S6 : Response-label sensitivity to the reference ego. The evaluation set is regenerated with another reference ego: 0.8 × speed (0.8 × in (b) and (c)) scales its desired speed by 0.8, and 2.0 s headway (2.0 s in (b) and (c)) raises its time headway from 1.2 s; main is the main run's reference ego. (c) Target classes are pooled without population weighting; blue marks the two lowest rates in each column.
(a) Response label: population-weighted rates, all attempted tests
Table S7 : Planner outcomes by response label and scene validity. (a) The rates main Table 3 does not report: unoccluded safe-response success on Anticipatory tests, and collision on Reactive tests, which counts target contact at any ego speed. (b) Keeps the tests valid for every recorded planner and observation mode; the counts show how the denominator changes. Unocc. denotes unoccluded observation, and success is safe-response success.
Δ collision (pp)
Planner
Collision (%), fixed timetable, masked ↓
Triggered vs fixed
Masked vs unoccluded
Pedestrian Reactive : 59 tests
IDM-base
28 .8
− 3 .4
+23 .7
IDM-conservative
0 .0
+3 .4
+0 .0
IDM-occlusion-aware
1 .7
+0 .0
− 3 .4
PDM-Closed
33 .9
+11 .9
+8 .5
Table S8 : Target timing versus visibility. Results cover all 247 triggered-start tests, none of which is a vehicle test: a triggered target starts when the ego meets a position-and-speed trigger, and a fixed timetable starts it at the reference encounter's time. Δ collision is triggered minus fixed timetable under masked observation, and masked minus unoccluded observation under fixed timetables.
(a) Same situations: collision at W∗=1 s and its change at 3 s
Masked
Unoccluded
Planner
Situations
At 1 s (%) ↓
Δ collision (pp)
At 1 s (%) ↓
Δ collision (pp)
Pedestrian : 45 unoccluded situations for every planner
IDM-base
45
42 .2
+42 .2
0 .0
0 .0
IDM-conservative
0
–
–
0 .0
0 .0
IDM-occlusion-aware
29
37 .9
+37 .9
0 .0
0 .0
Table S9 : Reaction-window comparisons on the same situations. (a) Each row keeps the situations with valid, not late, and complete runs at all three windows (1, 2, and 3 s), so counts can differ by planner and observation mode; late means the ego trails the reference ego by more than 0.2 s at exposure. (b) Restricts the masked columns of (a) to situations whose tests are Reactive at every window; pedestrian results are unchanged. Rates are not population weighted. Δ collision is the 1 s minus the 3 s rate; blue marks positive values, fewer collisions at 3 s. IDM-conservative is late in every masked situation, so its masked cells are empty (–).
(a) Training-gain checks: target collision, Reactive tests and subsets
Target collision
Test subset
Tests
Logs only (%)
Δ collision (pp) ↑
LatentDriver , triggered starts (main setting)
All
484
78 .4 ± 0.2
54 .8 ± 0.4
All, unoccluded
484
78 .2 ± 0.2
55 .4 ± 0.1
Both runs triggered, not late
332–336
86 .9 ± 0.5
53 .8 ± 0.8
Table S10 : Training-gain checks and late runs under fixed target timing. (a) Whether the reduction holds in each subset and setting; (b) how often trained and logs-only models arrive late. Logs only is the pretrained model fine-tuned on logged windows only, for the same number of steps. Observation is masked unless a row says unoccluded; test-count ranges vary by seed. Δ collision is logs-only minus trained collision within each seed; both runs means the trained and the logs-only run; not slower than logs only keeps tests where the trained model, run without the target, travels at least as far in 8 s. In the last two rows, the filtered logs-only model collides on the same tests in both observation modes.
Figure S1 : Slowed logs-only control. Gray: logs-only actions scaled by the marked factor at evaluation. Untriggered means the standing target never starts, and late that the ego trails the reference ego by more than 0.2 s at exposure. The two other variants lie within 1 m of Logs + OnCue's distance and are given in Table S12 . The open circle is the slowed control interpolated to Logs + OnCue's distance, and the arrow is the collision gap, 23.5±1.0 points ( 43.0±2.1% of Logs + OnCue's collision reduction over the unscaled control, so the slowed control recovers 57.0±2.1% ); against ×0.8 the paired gap is 21.3±0.4 points. Triggered starts, means ± SD over seeds; rates use the 484 Reactive tests, and contact and distance all 644 tests.
(a) Tests and planners: Reactive vehicle tests by generator, fixed timing
Δ collision (pp) ↑
Test generator
Tests
LatentDriver
PlanT
OnCue
300
43 .0 ± 0.9
19 .2 ± 2.6
CAT
300
46 .2 ± 0.7
21 .0 ± 1.5
SAGE ( w=0.5 )
300
45 .4 ± 0.8
19 .7 ± 2.4
SAGE ( w=1.0 )
179
45 .1 ± 0.6
19 .9 ± 1.6
Table S11 : Transfer across tests, planners, and conditions. (a) Whether the collision reduction of Logs + OnCue over logs only holds on other generators' tests and for PlanT. (b) Whether it holds for conditions left out of the demonstrations; held-out models use fewer training steps. Δ collision is logs-only minus Logs + OnCue masked target collision, and the increase is held-out minus all-demonstration collision, in percentage points. Values are mean ± SD over three seeds. Underlined: OnCue's own tests, for reference.
Reactive tests ( n=484 )
All generated tests ( n=644 )
Planner
Training
Target collision (%) ↓
Δ collision (pp) ↑
Safe-response success (%) ↑
Untriggered or late (%) ↓
Other-agent contact (%) ↓
8 s no-target distance (m) ↑
LatentDriver
Pretrained
73 .3
—
8 .1
0 .2
17 .5
103 .1
Logs only
78 .4 ± 0.2
—
6 .5 ± 0.4
11 .1 ± 0.3
0 .4 ± 0.1
71 .1 ± 0.1
Logs + OnCue
23 .7 ± 0.1
54 .8 ± 0.4
37 .8 ± 0.2
28 .6 ± 0.4
4 .6 ± 0.2
58 .4 ± 0.2
w/o stationary windows
26 .6 ± 0.6
52 .2 ± 1.1
35 .5 ± 0.7
29 .1 ± 0.2
2 .1 ± 0.2
59 .4 ± 0.2
25% demos
24 .3 ± 0.2
54 .1 ± 0.4
36 .8 ± 0.3
28 .6 ± 0.3
2 .3 ± 0.3
59 .0 ± 0.2
Table S12 : Training gains, costs, and data ablations. Pretrained is the checkpoint without fine-tuning. Logs only fine-tunes it on logged windows; Logs + OnCue (bold; the main-paper configuration) mixes these equally, for the same number of steps, with demonstrations, oracle safe responses on OnCue tests from training shards disjoint from evaluation, in both observation modes. Indented rows each change one setting of Logs + OnCue (F.5.3); 25% demos halves its 50% demonstration share, and w/o stationary windows is compared with a logs-only model trained on the same filtered windows. Δ collision is logs-only minus trained collision, paired within each seed; other-agent contact is at-fault contact with road users other than the target. Rates are unweighted, and trained models give mean ± SD over three seeds.
(a) Target contact: log replay and braking followers
Log-replay target contact (%) ↓
Target contact when followers brake (%) ↓
Planner
Training
All (148)
Follower encounters (109)
Other encounters (39)
Ego at fault only
See ego 0.1 s late
See ego 1.0 s late
LatentDriver
Pretrained
17 .6
0 .9
64 .1
14 .9
16 .9
16 .9
Logs only
3 .4 ± 0.0
0 .0 ± 0.0
12 .8 ± 0.0
2 .5 ± 0.4
3 .4 ± 0.0
3 .4 ± 0.0
Logs + OnCue
23 .4 ± 0.8
26 .3 ± 1.1
15 .4 ± 0.0
3 .4 ± 0.0
4 .1 ± 0.0
6 .1 ± 0.0
masked demos only
12 .4 ± 1.0
10 .7 ± 1.1
17 .1 ± 1.5
4 .3 ± 0.8
5 .0 ± 0.8
5 .0 ± 0.8
Table S13 : Target contact and ego behavior in natural-log encounters. 148 natural encounters with masked observation; columns without a count use all 148. (a) Under log replay and with following targets that brake; encounters are classified as follower or other before evaluation, ego at fault only uses the background-contact rule (B.2), and braking followers brake within the Gipps bound and see the ego 0.1 or 1.0 s late (F.5.4). (b) No-target distance is an 8 s mean. Training rows are as in Table S12 ; trained models give mean ± SD over three seeds, and pretrained models, which are not fine-tuned, one run.
Figure S2 : Excess target contact in natural-log encounters. Target contact of each OnCue-trained model (Logs + OnCue, or its masked demos only variant) minus its same-seed logs-only model, in percentage points, on 148 masked encounters; points give mean ± SD over three seeds. The first two conditions use the same log-replay runs and count all or only ego-at-fault contacts; in the last two, a target following the ego brakes and sees the ego 0.1 or 1 s late (F.5.4).
Figure S3 : Occluded encounters across target classes. Pedestrian and cyclist targets emerge near parked or stopped traffic or through queues, and a vehicle follows a crossing lane. Each row shows one saved test at the hidden start, confirmed exposure, and first reference contact. Row headers give the oracle label and requested window W∗ . Times are measured from replay start. The three views in each row share the same metric scale. Scale bars indicate 5 m. In the hidden-start view, the dashed orange outline marks the hidden target; in the exposure view, dashed outlines show contact poses. Colors and sightlines follow Figure 4 .
Autonomous driving scenario generation creates realistic, controllable traffic situations for training and testing vehicles, especially in rare and safety-critical cases.
The deployment of autonomous vehicles in urban environments introduces significant safety challenges, particularly in scenarios with occlusions, where critical traffic participants may be hidden from view. Recent accidents involving driverless vehicles highlight the importance of motion planners that explicitly addresses the risks posed by occlusions. In this work, we propose a formal, occlusion-aware trajectory planning framework that guarantees collision avoidance even when there are possible hidden traffic participants. Building on our previous methods that apply reachability analysis to sequentially determine the possible states of hidden traffic participants, we integrate a tree-based motion planner capable of reasoning over future observations and the absence thereof. This approach reduces conservativeness while maintaining safety guarantees. We demonstrate the effectiveness of our framework in a challenging simulated occluded scenario, showing that it pro-actively and efficiently guarantees collision-avoidance.
Truls Nyberg, Anna Gautier, Jana Tumova
KTH Royal Institute of Technology · Traton AB · Chalmers University of Technology +1
Safety-critical interactions are rare in recorded driving data, leaving end-to-end driving planners with limited exposure to evasive behaviour during training. This lack of critical supervision can lead to unsafe behaviour and, in rare instances, collisions. To address this gap, we introduce CriticalScenes, a reconstruction-based framework that transforms ordinary recorded driving scenes into photorealistic safety-critical interactions with corresponding collision-avoidance supervision. Across 53 reconstructed source scenes, 979 of 1,060 attempted interactions yield feasible threat trajectories (92.4%), while the inserted threat actors remain detectable in more than 95% of non-occluded observations within 5--35,m. Experiments with two structurally different end-to-end planners show that the generated supervision improves critical-scenario planning, while closed-loop transfer varies across planner architectures. SparseDrive achieves a 46.5% relative reduction in collision rate on an independent photorealistic closed-loop benchmark, whereas UniAD shows only a modest closed-loop improvement despite substantial open-loop gains. The results further highlight the importance of closed-loop evaluation, as improvements in open-loop trajectory prediction do not necessarily translate into equivalent safety gains.
Alexandros Theocharous, Holger Caesar, Ziqi Zhang
Delft University of Technology, Delft, The Netherlands
The generation of safety-critical traffic scenarios is essential for training and evaluating autonomous vehicles. Prior approaches typically perturb the trajectories of existing agents in a traffic scenario using simplified adversarial objectives to induce safety-critical interactions, which can limit the plausibility and diversity of the generated scenarios. Although inserting new adversarial vehicles can alleviate this limitation, determining when and where to introduce them in a scenario-specific manner remains challenging. In this work, we introduce COllision Snapshot guided TimE-Reversed safety-critical scenario generation (COSTER), a framework that leverages learned traffic priors to determine plausible collision times and locations. COSTER first constructs a collision snapshot by inserting a new vehicle in contact with the target vehicle at the identified collision state within a traffic scenario. Starting from this collision snapshot, a conditional variational autoencoder is used to perform a time-reversed rollout, reconstructing the trajectory of the inserted vehicle backward toward earlier timesteps. Experiments show that COSTER outperforms existing methods in plausibility, diversity, and data efficiency. Moreover, agents trained on COSTER-generated scenarios reduce collision rates by 31% on safety-critical scenarios from the Waymo Open Motion Dataset while also improving ego task completion. The project website is available at https://anonym-121.github.io/COSTER/.