Source-linked AI summary

How corner is a corner case? Percentile control for highway scenario generation

Jiaxi Liu, Hang Zhou, Hangyu Li, Yifan Wang, Keke Long, Chengyuan Ma, Bin Ran, Xiaopeng Li

arXiv:2610.05003v1cs.AI

TL;DR

Existing scenario generators offer limited calibration of adversity relative to plausible futures in the same context. This paper turns a history-conditioned risk percentile into a physical target and uses a guided joint diffusion model to generate futures; on the primary evaluation set, 1,422 of 1,440 requests fall within the 0.05 percentile tolerance.

  • Problem

    Existing scenario generators can specify behavior, adversity, or feasibility, but provide limited control over how extreme a scenario is relative to plausible futures in the same traffic context.

    Source: §1 · p. 1
  • Method

    The method defines adversity as a history-conditioned risk percentile, maps requests to physical targets with a reference distribution, and guides a percentile-conditioned joint diffusion model.

    Source: §1 · p. 2, §7 · p. 22
  • Results

    1,422 of 1,440 requests meet the 0.05 percentile tolerance, with mean percentile error 0.00673 and PET-target error 0.00991 seconds.

    Source: §7 · p. 22
  • Takeaways & Limitations

    The interface connects context-relative risk specification, physical realization, and evaluation through a common risk scale.

    Source: §7 · p. 22

    The evidence is limited to highway scenarios on highD; other highway datasets and further surrogates remain to be tested.

    Source: §6 · p. 19

Abstract

from arXiv · show

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. Project website and videos of generated scenarios are available at https://hhj233.github.io/CornerPercentile/.

1. Introduction

Existing scenario generators can specify desired behaviors or risk conditions, but offer limited control over adversity relative to plausible futures in the same context. The paper defines adversity as a history-conditioned risk percentile and uses it to specify and evaluate generated scenarios.

1. Introduction

  • Existing controls specify scenario properties but offer limited control over how extreme outcomes are relative to plausible futures in the same traffic context.The introduction situates the gap among methods for rare-event sampling, adversarial generation, diffusion-based control, and language conditioning.Source: §1 · p. 1
  • The same physical risk value can be critical in one history and ordinary in another, so adversity is represented by its percentile in the conditional future-risk distribution.This contextual percentile provides a common scale for describing and fine-tuning cornerness.Source: §1 · pp. 1–2
  • A requested percentile maps through a reference risk distribution to a physical target; in this study, the surrogate is PET and smaller values indicate greater criticality.For example, a request of p = 0.9 selects the 0.1 quantile of the surrogate distribution.Source: §1 · p. 2
  • A percentile-conditioned joint diffusion model uses sampling-time risk guidance to pursue the target while generating physically consistent multi-agent futures.The generator also incorporates road and background-separation constraints in its sampling path.Source: §1 · p. 2
  • The contribution links percentile specification, a physical risk target, and reference-based evaluation through one consistent request interface.The paper also reports decomposed evidence for reference prediction, request realization, conditioning, guidance, and same-history external-prior samples.Source: §1 · p. 2

2. Related work

Prior work offers multiple ways to control generated traffic and to model risk, but commonly expresses conditions on fixed scales or scene properties. This paper frames the request as a position in the natural risk distribution conditioned on a particular history.

2.1. Traffic generation and control interfaces

  • Traffic-generation methods provide inputs for desired scene properties, while this work specifies the requested position of a risk outcome among natural futures conditioned on history.Examples include rare-event estimation and stress testing [1, 2], scenario libraries [3, 4], learned adversarial agents [5, 6], joint diffusion [7, 8], and language-conditioned methods [9].Source: §2.1 · pp. 2–3

2.2. Risk surrogates and context-relative severity

  • Risk-related generation and planning methods generally express conditions on fixed physical scales; here the percentile refers instead to natural futures of one observed history.The closest cited formulation uses a quantile over a simulated scenario-space risk index, rather than a history-conditioned natural-future distribution.Source: §2.2 · p. 3

2.3. Conditional distributions and calibration

  • Conditional-distribution learning and recalibration tools provide the statistical basis for a reference whose CDF supports percentile supervision, inverse-target queries, and outcome scoring.The implementation combines temporal history encoders with set attention over ego–SV relations and evaluates reference prediction separately from request realization.Source: §2.3 · p. 3

3. History-conditioned risk-percentile requests

A request specifies how critical a future should be relative to natural futures after the observed history, not a fixed physical risk value. The paper defines compatible percentile scoring for outcomes and instantiates the interface with minimum ego–SV PET.

3.1. From a risk value to a contextual request

  • A request selects a percentile of an oriented surrogate’s history-conditioned natural distribution, and its inverse-CDF target adapts physically while preserving the requested relative criticality.Larger percentiles indicate greater criticality; for smaller-is-worse surrogates, p = 0.9 selects the lower tenth of the conditional distribution.Source: §3.1 · pp. 3–4

3.2. Evaluating a percentile request consistently

  • When the reference distribution has point masses, multiple percentiles can share one physical outcome, so realization is scored against the outcome’s compatible percentile interval.The interval reduces to the usual percentile at continuous outcomes; interval error and physical-target MAE preserve both percentile and surrogate-scale information.Source: §3.2 · p. 4

3.3. PET instantiation for a multi-vehicle future

  • The experiments use minimum ego–SV occupancy PET over a 6.96-second future window, with point masses at zero and the cap and a variable number of vehicles.The generated future includes every vehicle selected from the history; applying the formulation to another surrogate requires suitable reference data and a generation mechanism.Source: §3.3 · pp. 4–5

4. An executable reference-to-generation framework

The framework first estimates a context-specific risk distribution, then conditions and guides a joint diffusion generator toward the physical target implied by a requested percentile. Its estimator and generator are an executable design for multi-vehicle highway scenes, not the only possible implementation.

4. An executable reference-to-generation framework

  • The complete system maps a relative request to a physical risk target with a calibrated reference, then uses a generator conditioned on the request and target to produce the future.Training labels come from leave-recording-out references, while a reference fitted on all training recordings translates test-time requests.Source: §4 · pp. 5–6

4.1. Learning a distribution from historical interactions

  • The reference learns a shared conditional risk distribution from one observed future per natural clip, using CRPS and historical ego–SV interactions.Its calibrated CDF represents continuous PET values and endpoint masses, with queries for CDF values, left limits, and inverse targets.Source: §4.1 · p. 6

4.2. Direct percentile-conditioned joint diffusion

  • The joint diffusion model receives history, percentile, noise, physical target, and a reference-distribution descriptor to generate coordinated vehicle motion.A compact acceleration-coefficient representation and masked actor attention accommodate varying vehicle counts; training includes natural futures and auxiliary requested futures.Source: §4.2 · p. 7

4.3. Realizing the physical risk target within one sampling path

  • During sampling, risk guidance moves the decoded future toward the physical target while road and background-separation projections constrain scene geometry.Risk guidance uses feasible perturbations of the joint coefficients; the active road and background constraints operate within one noise path.Source: §4.3 · pp. 7–8

5. Empirical evaluation on natural traffic

The evaluation on natural highD traffic tests whether history-relative risk-percentile requests can be realized precisely while preserving plausible motion, transferring to TTC, and producing graded planner difficulty. It also examines how requests tune encounter adversity relative to each history, including their physical effects and how they reach the planner through surrounding vehicles.

5.2. A contextual scale and its learned reference

  • At PET = 1 second, the empirical CDF rises from 0.319 for histories with 3–5 vehicles to 0.609 for histories with at least nine, motivating a history-conditioned risk scale.The range-query reference lowers CRPS from 0.33817 seconds for the best classical estimator to 0.10550, and lowers PITtail from 0.04318 for the static-query reference to 0.01051.Source: §5.2 · pp. 8–9, Figure 3 · p. 9, Table 1 · p. 9

5.3. Realizing the requested percentile

  • 1,422 of 1,440 requests (98.75%) fall within the 0.05 percentile tolerance, with P-MAE 0.00673 and PET-target MAE 0.00991 seconds.The primary evaluation uses 96 histories, five requested percentiles, and three noise draws; point-mass targets are all matched exactly, and additional sets achieve 95.07% and 99.24%.Source: §5.1 · p. 8, §5.3 · pp. 9–10, Table 2 · p. 10

5.4. Which P pathway realizes the request?

  • Sampling-time risk guidance reaches 95.07% Fine on its own; adding learned conditioning raises Fine to 98.75% and reduces P-MAE from 0.01469 to 0.00673.The two pathways are complementary: guidance toward the reference-derived physical target carries most of the precision, while learned conditioning adds further precision.Source: §5.4 · pp. 10, 12, Figure 6 · p. 12

5.5. What external priors generate without a request

  • Natural priors place only 13–16% of output–request pairs within tolerance, showing that their range of adversity does not reliably reach a requested position.The compared priors receive no percentile request, and their outputs are scored against all five requests for each history.Source: §5.5 · pp. 12–13

5.6. Generated multi-vehicle behavior

  • Generated examples realize similar percentiles through distinct interactions, including ego lane changes, witness lane changes, and faster ego–leader car following as the request rises.Across 3,930 futures from the three evaluation sets, none has background–background overlap and one has ego-related contact; 75 of 83 primary-set strict road violations are inherited from the initial scene.Source: §5.6 · pp. 13, 16, Figure 8 · p. 14

5.7. Kinematic realism of generated futures

  • Our method is closest to observed futures in longitudinal acceleration and matches other generators in lateral acceleration, while harsh braking occurs in 0.18% of vehicle-time samples versus 0.12% observed.Median speed rises from 25.2 m/s at p = 0.1 to 29.8 m/s at p = 0.9, reflecting the requested adversity.Source: §5.7 · p. 16, Table 4 · p. 16

5.8. Percentile requests on time to collision

  • TTC guidance realizes 98.61% of requests versus 17.22% without guidance, and the bounded TTC reference more than halves CRPS versus the unconditional distribution, from 1.21 to 0.52 seconds.Higher requests produce closer approaches as the leader slows more and minimum TTC shifts toward the end of the future window.Source: §5.8 · pp. 16–17, Table 5 · p. 17

5.9. Testing a rule-based planner

  • For an IDM/MOBIL planner, generated encounters have median percentiles of 0.21 at p = 0.1 and 0.68 at p = 0.9, and median within-history percentile correlation is 0.74.At p = 0.9, planner hard braking reaches 12.85%, rear TET reaches 0.578 seconds, and SVs approach from behind with TTC below 3 seconds increasingly late in the window.Source: §5.9 · pp. 17–18, Table 6 · p. 18
  • In one history, the minimum PET fell from 2.74 to 0.30 s as the encounter shifted from a distant leader at p=0.1 to a vehicle changing into the planner’s lane behind it at p=0.9.Other examples showed a follower closing in, a vehicle cutting in ahead, or the planner changing lanes behind an SV at the higher request.Source: §5.9 · p. 18
  • With a leader ahead, median planner PET was 1.53 s at both p=0.1 and p=0.9, whereas for a closing follower it fell from 1.79 to 0.86 s.Across scenarios, leaders ahead remained the most common encounter type; the request mainly affected vehicles behind and beside the planner.Source: §5.9 · p. 18
  • At p=0.9, the planner met hard braking 4.1 times as often as in observed futures from the same histories, while p=0.1 shifted encounters to the calm side.Source: §5.9 · p. 18

6. Implications for scenario-based AV testing

A risk percentile can index scenario-library entries by history and adversity while its physical target supports severity-based selection and controlled sweeps. The implications remain bounded by the highway/highD evidence and the study’s nonreactive planner replay.

6. Implications for scenario-based AV testing

  • Known physical targets let test campaigns select histories meeting a severity threshold, while paired sweeps over p fine-tune cornerness for fixed H and z.Library entries can be indexed by history and adversity percentile while recording the realized surrogate value.Source: §6 · pp. 18–19
  • Planner difficulty can be tracked through the share of scenarios with a following SV below 3 s TTC and the share in which the planner has braked harder than 4 m/s2.The figures illustrate p=0.9 encounters including a closing follower, a lane change behind the planner, a cut-in ahead, and a lane change by the planner.Source: Figure 10 · p. 19, Figure 11 · p. 20, Figure 12 · p. 21
  • Changing the reference requires recomputing percentile labels, CDF conditions, and physical targets together, then adapting the generator.Source: §6 · p. 19
  • The study uses highway scenarios from highD, so other highway datasets and additional risk surrogates remain untested; its planner test replays nonreactive SV futures.Each model was trained once, and the reported intervals describe variation across histories and recordings for that trained model.Source: §6 · p. 19
  • Extensions include merging and urban crossing conflicts, multiple or semantic requests, reactive SVs, and adaptive request selection; combining grid results could estimate natural-traffic planner failure frequency if generated futures follow natural futures at each risk level.Source: §6 · p. 19

7. Conclusions

The paper defines adversity as a history-conditioned risk percentile and connects the request to a physical target, generation, and evaluation through a shared reference. Its primary PET evaluation realizes 1,422 of 1,440 requests within tolerance, while the evidence is limited to highway highD and the reported implementation.

7. Conclusions

  • The request defines adversity as a percentile in the history-conditioned future-risk distribution, whose reference maps requests to physical targets and evaluates realization consistently.Source: §7 · p. 22
  • 1,422 of 1,440 requests were within the 0.05 percentile tolerance, with mean percentile error 0.00673 and PET-target error 0.00991 seconds.Source: §7 · p. 22
  • The evaluation separates reference prediction from request realization and identifies sampling-time guidance as the main source of fine precision, with further gain from learned conditioning.Source: §7 · p. 22
  • PET-derived risk levels shift scene severity but control each context’s requested percentile no better than learned percentile conditioning; TTC requests also transfer to car following without generator retraining.Source: §7 · p. 22
  • Across three evaluation sets, generated futures had no footprint overlap between background vehicles, while the current evidence concerns highway scenarios on highD.Source: §7 · p. 22

CRediT authorship contribution statement

The contribution statement assigns writing, technical, and supervisory responsibilities across the named authors.

CRediT authorship contribution statement

A. Implementation details

The implementation defines clips from history-selected vehicles and uses only complete observed futures to fit the reference. It specifies the PET calculation, data splits, and model inputs while excluding future-derived information from inputs.

A. Implementation details

  • A clip uses 13 observations sampled every two native frames across 0.96 seconds, and its future spans 6.96 seconds over 175 native states.Source: §A.1 · pp. 22–23
  • Scenes include the ego and same-direction vehicles within 120 longitudinal meters that have complete histories, with at least three vehicles including the ego.Candidate histories are selected in an order independent of their futures.Source: §A.1 · p. 23
  • Only clips where every scene vehicle is observed throughout the future are retained; incomplete clips are excluded rather than completed, and their observed minimum PET is not an ordinary CRPS target.The observation event defines the reference population, not a model input, and does not guarantee deployment observability.Source: §A.1 · p. 23
  • Training uses 13 recordings, with 53,248 candidate histories and 9,913 complete-future clips; separate recordings provide early stopping, calibration, and development, while evaluation sets are held out.Inputs include history, dimensions, road bounds, masks, and ego indicators, but not future visibility, recording or vehicle identifiers, or measured future PET.Source: §A.1 · p. 23
  • Minimum ego–SV PET is computed exactly from closed axis-aligned footprints with measured dimensions and linearly interpolated positions over the observed or generated 6.96-second window.The calculation does not extrapolate beyond the window; closed-edge contact counts as shared occupancy.Source: §A.1 · p. 23

A.2. Reference architecture, training and calibration

The reference estimates a history-conditioned PET risk distribution using temporal and ego–surrounding-vehicle interaction information. Leave-recording-out references provide percentile labels for generator training, while calibration adjusts the estimated distribution.

A.2. Reference architecture, training and calibration

  • The reference pairs ego–vehicle relation tokens with PET-range queries to read the components of the mixed CDF.Absolute and ego-relative temporal encoders summarize histories; road-boundary pooling, vehicle count, and an ego-context token provide scene context.Source: §A.2 · p. 23
  • Calibration selects a count-conditioned warp with ridge strength 1, using leave-one-recording-out validation and safeguards on overall, group, and tail-weighted CRPS.The calibration objective is normalized CRPS, with ridge shrinkage toward the identity map.Source: §A.2 · p. 23

A.3. Leave-recording-out percentile labels

  • Training clips receive percentile labels, CDF descriptors, and inverse targets from the same leave-recording-out reference, whose training data exclude that clip’s recording.Five references are trained on four of five groups; the full-training reference is used for early-stopping clips and generation requests.Source: §A.3 · p. 24
  • At an atom, the training label is the center of the compatible percentile interval, while evaluation scores a request against the whole interval.Because leave-recording-out references use fewer recordings, their estimates can differ from the full reference.Source: §A.3 · p. 24

A.4. Generator and sampling details

The generator represents future trajectories with acceleration-cosine modes and conditions a joint diffusion model on percentile requests and reference-risk information. Sampling-time guidance adjusts risk while road and interaction constraints shape proposed futures; the section also describes TTC request settings and an acceleration caveat.

A.4. Generator and sampling details

  • The future decoder fits observed positions with eight acceleration-cosine modes per coordinate, introducing a coefficient-reconstruction approximation while fixing initial positions and velocities.The denoiser uses 50-step deterministic DDIM, and its risk branch receives the request percentile, inverse-risk target, and CDF descriptor.Source: §A.4 · p. 24
  • The final risk-aware training stage combines natural diffusion loss with direction and condition-response terms, plus rollout penalties for percentile and PET errors and feasibility-related violations.Gradients pass through the full rollout; the released generator uses weights after the stage’s third epoch without averaging.Source: §A.4 · p. 24
  • Sampling-time risk guidance operates during the final 15 DDIM steps and stops once center-rank error is at most 0.01.Proposals are checked with a complete feasible PET query and a probe of at most 10^-4 meters.Source: §A.4 · p. 24
  • Road projection enforces outer-road footprint inequalities, while background quadratic programs alter only longitudinal coefficients and keep the ego and lateral coefficients fixed.Observed initial states with insufficient clearance remain unchanged.Source: §A.4 · p. 24
  • Accelerations above 8 m/s2 occur in 0.09% of generated vehicle-time samples, versus 0.01% in observed futures.They concentrate on the ego (0.45% of its samples) and low requests: 0.23% at p=0.1 versus 0.01% at p=0.7.Source: §A.4 · p. 24

A.5. Time-to-collision requests

  • TTC evaluation draws histories from 1,240 of 7,712 primary-set car-following clips, selected for a bounded reference with at most half its mass at the cap.Guidance settings and the cap were chosen on two early-stopping recordings.Source: §A.5 · p. 25

A.6. Interval-compatible evaluation

The interval-compatible criterion evaluates a generated outcome against every percentile compatible with its physical value, rather than selecting a randomized rank at atoms. The section relates this generation error to reference error and notes what aggregate diagnostics cannot establish for an individual history.

A.6. Interval-compatible evaluation

  • At an atom, interval error counts every request percentile compatible with the same physical outcome as realized; for continuous outcomes it equals ordinary percentile error.The criterion uses the distance from the requested percentile to the outcome’s compatible interval.Source: §A.6 · p. 25
  • The deterministic center rank assigns one percentile to each outcome and is used for training penalties and the sampler’s stopping rule, whereas evaluation uses the whole compatible interval.Minimum PET has point masses at zero and at the four-second cap.Source: §A.6 · p. 25
  • The reference evaluation error bounds the endpoint differences between estimated and true compatible-percentile intervals, and therefore bounds their Hausdorff distance.Distance to an interval is Lipschitz with respect to that interval distance.Source: §A.6 · p. 25
  • Estimating reference error for an individual history requires history-specific information beyond the aggregate CRPS and pooled PIT diagnostics reported here.Source: §A.6 · p. 25

B. Reference encoders and calibration diagnostics

The encoder comparison finds that neural references have similar calibrated CRPS, with the range-query reference used in the experiments performing best on development data. Its tail deviation is also smaller than the static-query reference on additional and single-recording sets.

B. Reference encoders and calibration diagnostics

  • 0.0991 seconds calibrated CRPS is the range-query reference’s development-set value, versus at least 0.1125 for the other encoders.It also has the smallest critical-tail deviation; on additional and single-recording sets it ranks second in CRPS, with tail deviation at or below 0.018 versus 0.054 and 0.064 for the static-query reference.Source: B. Reference encoders and calibration… · p. 25, Table 7 · p. 26
  • All neural encoders reach calibrated CRPS between 0.103 and 0.116 seconds, three to six times below the classical estimators in Table 1.The absolute-history-only encoder is most accurate by a small margin, and any of the encoders could supply a reference.Source: B. Reference encoders and calibration… · p. 25
  • Table 7 compares six calibrated reference encoders using CRPS, PITtail, and PITmax, with lower values better in every column.Source: Table 7 · p. 26
  • PITtail measures expected-PIT deviation over levels 0.05–0.30, while PITmax measures the largest deviation over the 0.05–0.95 grid.The diagnostics integrate randomization analytically at atoms; these grid errors differ from a Kolmogorov–Smirnov statistic on sampled PIT values.Source: B. Reference encoders and calibration… · p. 26

C. External components without percentile requests

This section compares external motion-generation components that receive histories without percentile requests against the paper’s percentile-conditioned outputs. It describes their sampling setup and uses selected examples to illustrate lane changes, car following, and road-compliance flags.

C. External components without percentile requests

  • External models receive only observed history and static scene information; TrafficGen contributes one deterministic top-1 output, while CTG++ and STRIVE each contribute 15 samples per history.Their native time grids are mapped to the common 175-state, 6.96-second evaluation grid, preserving the observed initial state.Source: C. External components without… · p. 26
  • STRIVE produces many strict road flags, most in scenes that start compliant; its native road loss supervises only the ego, while evaluation checks all vehicles.The comparison concerns adapted motion-generation components, each with its own training and inference budget.Source: C. External components without… · p. 26
  • Display-only post-selection uses realized outcomes for each target, but aggregate external results use all samples; Fig. 13 shows first samples and complete PET sets beside the method’s three requested-percentile futures.TrafficGen has one top-1 output; CTG++ and STRIVE each have 15 samples per history.Source: C. External components without… · pp. 26–27, Figure 13 · p. 28
  • Lane-change examples are selected by maneuver occurrence rather than request error; completed ego lane changes occur only in the additional and single-recording sets, although requests specify risk percentile alone.The PET-witness example’s lane change occurs only at p=0.9; the table distinguishes boundary crossings from completed lane changes.Source: C. External components without… · p. 27, Table 8 · p. 27
  • The car-following example comes from the primary set and is selected among qualifying same-witness, same-lane futures by the smallest maximum interval error.The qualifying history has at least six vehicles, and the ego and witness are cars shorter than 7 meters.Source: C. External components without… · p. 27
Loading 2610.05003v1…