Follower closing in behind the planner
At p = 0.9, a follower 50 m behind in the planner's lane accelerates from 34.0 to 45.8 m/s and closes in.
Department of Civil and Environmental Engineering, University of Wisconsin–Madison
*Corresponding author: xli2485@wisc.edu
Generating corner-case scenarios with appropriate adversity in a simulation environment is critical for testing an autonomous vehicle (AV) software stack’s safety performance before deployment. Existing autonomous-driving scenario generators can enforce specific behavior, adversity, or feasibility conditions, but they provide limited control over how extreme a generated scenario is relative to plausible futures in the same traffic context. This study represents the adversity of a generated scenario as its percentile in the conditional distribution of future risk given the observed history. This view supports calibrated answers to two questions: how “corner” a generated corner-case scenario is and how its “cornerness” can be fine-tuned.
To this end, we formulate history-conditioned risk-percentile requests and learn a reference risk distribution that maps each requested percentile to a physical risk target. We then use a percentile-conditioned joint diffusion model with sampling-time risk guidance to generate multi-agent futures, together with a reference-based criterion for evaluating percentile realization.
Experiments use the minimum post-encroachment time (PET) between the ego and its surrounding vehicles as the risk surrogate on highD. On the primary evaluation set, our method realizes 1,422 of 1,440 requests within a 0.05 percentile tolerance (98.75%), with mean percentile error 0.00673 and PET-target error 0.00991 seconds. The resulting interface connects context-relative risk specification, physical realization, and evaluation through a common risk scale.
The same one-second PET can be routine in one traffic context and rare in another. A physical threshold alone therefore says little about how extreme a scenario is for its situation. We index a corner case by its percentile among the natural futures of the observed history, so a request such as p = 0.9 means the same degree of adversity in sparse and in dense traffic.
Three-layer workflow: data preprocessing, training and testing. The percentile predictor denotes the reference risk distribution, trained by CRPS on observed scene-risk measurements. The request enters the joint generator directly and guides its sampling path, together with road and background-separation constraints.
The reference and the generator are one implementation of the request. Any calibrated conditional distribution can serve as the reference, and any generator that can be steered toward a physical target can realize the request.


External scenario generators learn natural traffic but take no percentile input. On one car-following history, we even give two of them an advantage: from the 15 samples of CTG++ and STRIVE, we pick after generation the one whose PET comes closest to each target. TrafficGen gives one output per history. Our method still lands closer to every target, and across all 96 test histories the external priors meet only 13–16% of the requests within the 0.05 tolerance.

A percentile request is useful for AV testing when it translates into graded difficulty for the system under test. We replace the ego of each generated scenario with an IDM+MOBIL planner, and the surrounding vehicles replay their generated futures without reacting. The videos are rendered in MetaDrive from the exact trajectories of the paper's planner test, in real time at 25 frames per second. Each case shows one history under three requests, and the first four are the histories of Figs. 11 and 12 of the paper. In both views the planner is orange, the vehicle that reaches the minimum PET with it is blue and the other vehicles are gray. In the top-down view, a red cross marks the point both of them pass.
At p = 0.9, a follower 50 m behind in the planner's lane accelerates from 34.0 to 45.8 m/s and closes in.
At p = 0.9, a vehicle in the adjacent lane accelerates from 27.0 to 33.4 m/s and changes into the planner's lane just behind it.
At p = 0.9, a faster vehicle that starts 4.5 m behind the planner in the adjacent lane overtakes it and changes into its lane ahead.
At p = 0.5 and 0.9, the planner itself changes into the adjacent lane, about 30 m behind a faster vehicle, which then sets its minimum PET. At p = 0.9 the lane change comes 0.8 s earlier.
At p = 0.9, a vehicle 95 m behind in the planner's lane closes in at up to 41.7 m/s and starts to change into the adjacent lane as it reaches the planner.
At p = 0.9, a follower 46 m behind in the planner's lane speeds up from 23.6 to 29.9 m/s and closes in.
At p = 0.9, a follower 57 m behind in the planner's lane speeds up from 21.9 to 23.7 m/s and closes in on a dense two-lane carriageway.
@article{liu2026corner,
title = {How corner is a corner case? Percentile control for
highway scenario generation},
author = {Liu, Jiaxi and Zhou, Hang and Li, Hangyu and Wang, Yifan and
Long, Keke and Ma, Chengyuan and Ran, Bin and Li, Xiaopeng},
journal = {Transportation Research Part C: Emerging Technologies},
note = {Under review},
year = {2026}
}