Locating the cause of simulated driving failures

We injected faults into a driving planner, collected 468 at-fault failures, and simulated every counterfactual from every decision before each one. Search turned out to be cheap. Defining the failure, the cause and the simulator’s share of the blame did not.

October 2026

Findings

  1. The point of no return is cheap and exact to find: checkpointed bisection takes 3.8 forks, about 1.25 s of CPU, and agrees with exhaustive search on 467 of 468 failures.
  2. The last decision before a failure is the wrong thing to blame. Braking from it avoids the crash in 12% of failures; the last recoverable decision comes a median 0.9 s earlier.
  3. Cause is usually a window. 41% of failures have no single decision whose replacement prevents them, and 42% have several.
  4. A quarter of failures against simulated traffic are simulator artifacts. They vanish when the other vehicle replays its recorded path, and a displacement threshold cannot tell which ones.
  5. The collision label matters. A rule that counts rear-end contacts made recoverability look non-monotone in 9.4% of failures; an at-fault rule brings that to 0.2%.
  6. Collision checks miss traffic-law failures: 7.5% of collision-free runs of the fault-free planner run a red light or share a crosswalk with a pedestrian.

Setup

Twenty real scenes from the Waymo Open Motion Dataset, simulated in Waymax with the 32 nearest objects. Other vehicles follow Waymax’s IDM route policy; pedestrians and cyclists replay their logs.

The ego vehicle runs a reactive test planner. Every 0.5 s it chooses among accelerate, maintain, decelerate and brake, keeping the fastest option whose path stays clear of perceived agents extrapolated at constant velocity.

We ran 300 start states (20 scenes, five start times, three speed offsets) under 19 configurations. Faults came in three families: perception outages of 1.5 s, acceleration glitches of 1 s, and persistent faults in perception range, pedestrian detection, observation latency and planning horizon. That produced 468 at-fault failures.

For every decision up to each failure, we forked the run four ways from a saved checkpoint: emergency brake from that decision onward, the fault-free planner from that decision onward, the fault-free choice at that decision only, and a brake at that decision only. Forks reproduce the original run exactly. The table holds 525,000 simulated steps; the whole study ran about 1.1 million on a 2-vCPU machine without a GPU.

Four different “whens”

Each is computed exactly from the fork table. They are not the same moment.

MomentDefinitionMedian before failure
First observableAn independent 3 s constant-velocity conflict check first fires1.9 s
Behavioural divergenceThe faulty planner’s command first differs from the fault-free planner’s1.5 s
Point of no returnThe last decision from which an emergency brake (−6 m/s²) avoids any at-fault collision0.9 s
But-for causeA decision whose single replacement by the fault-free choice averts the failureNone in 41%, several in 42%

The alarm comes after the point of no return in 5.6% of failures, so they are detected only once they can no longer be fixed. For time-localized faults, the point of no return falls inside the injected fault window in 89% of failures.

Finding the point of no return

Each method blames one decision per failure. “In fault window” is scored on the 298 failures with a trusted window; the other columns on all 468.

MethodCost per failureIn fault windowBraking from it avoids the crashBraking only there avoids it
Last decision before failurenone41.6%11.8%5.3%
First alarmmicroseconds49.7%94.4%42.1%
First alarm the planner ignoresmicroseconds97.3%91.0%60.5%
Checkpointed bisection3.8 forks, 1.25 s88.6%100%44.7%
Exhaustive scan5.4 forks, 1.85 s88.6%100%44.7%
Jev on a telemetry timeline0.23 s83.6%98.3%67.1%
Claude Haiku 5.5, same timeline3.9 s67.3%99.6%63.4%
GPT-6 Luna, same timeline5.2 s92.3%97.4%65.6%

One full 6 s replay costs 0.41 s on this CPU, so bisection costs about three replays. Checkpointing saves 19% of wall-clock time against bisection that replays from the start.

The zero-simulation heuristic, the first alarm the planner ignores by accelerating or holding speed, lands in the fault window 97% of the time. But a single brake there avoids the crash only 61% of the time. It is a good proposal and a poor verdict: propose with it, verify with one fork.

Cause is a window, not a decision

In 41% of failures, no single decision replaced by the fault-free planner’s choice prevents the failure. For persistent faults it is 63%, because the fault reasserts itself at the next decision. In another 42%, several different single decisions each suffice.

The definition that stays well-defined is fix-forward: hand control to the fault-free planner from decision k onward, and find the latest k that still avoids the failure.

Was it the planner or the simulator?

We reran every failure against an IDM vehicle with only that vehicle switched back to its recorded path.

Failures against IDM vehiclesPersistsVanishes: simulator artifactVanishes: depends on the vehicle reactingOther
Constant-speed plans (97)82%18%00
Accelerating plans (143)91%9%00
Planner with injected faults (462)67%29%0.4%3%
Fault-free planner (5)1301
Ego replaying the human log (15)01500
All (722)72%25%0.3%2%

An artifact here means the vehicle had already left its recorded path in a run where the ego replayed its own log, so nothing the ego did caused the deviation. Only 2 of 722 failures depend on the vehicle genuinely reacting to the ego.

The common test, “the other vehicle is more than 1 m off its log”, flags 434 failures, and 58% of those persist against the recorded driver. Separating real failures from simulator artifacts takes a counterfactual on the world, not a threshold.

With the ego replaying exactly what the human driver did, IDM traffic still produces 15 at-fault collisions. Of the IDM vehicles that moved in the log, 90% end more than 1 m off their recorded path after 6 s.

The collision label matters

Waymax’s IDM follower does not stop after contact, so a fast rear-ender drives through the ego. A rule that counts any later overlap labels those as ego failures.

Under that rule, 9.4% of failures look non-monotone (braking earlier fails, braking later succeeds) and bisection returns the wrong decision for 7.1%. Under an at-fault rule that classifies each vehicle’s first contact and excludes rear hits and hits on a stopped ego, 0.2% are non-monotone and bisection matches exhaustive search in 99.8%.

The same correction moves earlier baselines: an always-brake policy goes from 3.1% unsafe to 0.2%, and the fault-free planner’s failure rate from 9.7% to 1.7%.

Collision-free is not rule-compliant

Runs with no at-fault collision that run a red light or share a crosswalk with a pedestrian
DriverCollision-free runsBreaks a traffic rule
Logged human driver1000%
Fault-free planner2957.5%
Planner with a 1 s acceleration glitch2418.7%
Constant-speed plan1979.1%
Planner with a 1.5 s perception outage21110.9%
Accelerating plan14718.4%

Where language models help

Physics and search stay in code. As a proposer in front of the simulator, Jev (TypeSafe’s decision model) saves 0.28 forks per failure, about 0.1–0.3 s of CPU, and costs a 0.23 s call: no net gain. Language models earn their place where the requirement is written in words.

Checking 840 rollouts against plain-language rules, such as “the ego waits at the red light and proceeds once it turns green”. Empty answers count as wrong.
VerifierAccuracyLatency
Jev96.0%0.21 s
Claude Haiku 5.596.8%1.7 s
GPT-6 Luna97.5%2.2 s
Jev, escalating 8% of checks to Luna97.9%0.46 s
Jev, escalating 18% of checks to Luna98.2%0.71 s
Classifying the cause of 421 failures: perception gap, bad command, late reaction or other agent
ClassifierAccuracyBalanced accuracyLatency
Hand-written rule86.7%74.7%microseconds
Jev80.5%63.5%0.23 s
Claude Haiku 5.586.2%59.1%3.9 s
GPT-6 Luna83.1%67.7%5.2 s
Jev, escalating 48% to Haiku89.3%67.0%2.1 s

Jev is the only model that recognizes a late reaction, where the planner tracked the other agent but kept going: it catches 65% of those cases. The hand-written rule was authored by the person who designed the fault taxonomy, which favours it.

Limits

Questions about the method: devin.r.liu@gmail.com