Topology-Flip Counterfactuals for Distilling Interactive Driving Planners into Auditable Trees

A neural driving planner that negotiates merges and unprotected turns makes its important choices at a handful of moments: whether to go before or after a particular car. If we want to replace or audit such a planner with a small decision tree, the tree has to learn exactly where those choices flip. Logged driving data rarely shows these flips, and random scenario generation spends most of its budget on situations where nothing about the decision changes. We propose to generate training scenes by editing a real scene as little as possible so that one discrete interaction relation flips. A relation here means "car $j$ crosses the ego vehicle's path before it" versus "after it." We query the black-box planner on the edited scene and keep only edits where the planner's own choice also flips. The resulting small, targeted dataset is used to fit an interpretable tree whose splits are stated over these per-pair relations.

The bet is that the discrete interaction graph is the right unit of edit for synthetic data in multi-agent driving. The "diversity curse" suggests why. LookOut found that trajectory diversity which does not change the required control decision degrades planning, and that a few decision-relevant futures (15 samples) suffice. DISCO found that 75,000 teacher-filtered counterfactuals beat more than a million unfiltered ones for text classifiers. We carry the DISCO recipe into continuous multi-agent scenes: minimal edits, a teacher filter, and a student trained on the boundary. The edit space is defined by interaction topology rather than by words or continuous noise.

Core Claim

When distilling a black-box interactive planner into an auditable controller, the main cost is teacher queries and simulator rollouts. We claim that generating minimal scenes that flip one pair's crossing order, and keeping those where the teacher's decision flips, reaches a given student fidelity on interaction-critical decisions with substantially fewer teacher queries than three alternatives:

  • distilling from logs with dataset aggregation (DAgger, i.e., repeatedly querying the teacher on states the student visits),
  • random continuous perturbation with the same teacher filter,
  • teacher-uncertainty sampling.

As a by-product, the tree's splits read as contrastive explanations, such as "ego proceeds because every car whose path it crosses is predicted to cross after it, with margin above $\delta$." Because these splits are defined over the same relations we edit, their faithfulness can be tested by intervention.

This is different from the closest existing work in three ways.

  • HYDRAVIPER distills multi-agent neural policies into decision trees. It resamples states by centralized Q-values, prunes rollouts adaptively, and clusters agents with heuristic influence scores. It draws states from the teacher's own rollouts in discrete benchmarks (particle environments, traffic signals). It never synthesizes counterfactual scenes, and it needs the teacher's Q-function, which we do not assume.
  • BeTop/BeTopNet supplies the topological vocabulary: braid-style crossing order and yield-versus-proceed edges. It learns these end to end inside a transformer, so its planner stays opaque. We use the topology only as an externally computed edit and feature space.
  • Learning Interpretable, High-Performing Policies for Autonomous Driving supplies the student form, interpretable continuous control trees (ICCTs) with sparse linear leaves. It operates on fixed flat state vectors in Flow, not on variable-size interaction graphs.

Research Program

Interaction graph. For each scene from nuPlan (Towards learning-based planning: The nuPlan benchmark), we build a graph whose nodes are the ego vehicle and nearby agents. An edge connects the ego vehicle to agent $j$ whenever their predicted paths share a conflict region. Each edge receives a discrete topology label: ego passes first, $j$ passes first, or no conflict. We also attach continuous attributes: time-to-conflict, arrival-time gap, relative speed, and lane relation. The labels are computed geometrically from trajectories, so no model internals are needed.

Reading the teacher's decision. The teacher's planned trajectory is read the same way. Its decision is the vector of edge labels it induces, plus a target speed profile. This makes the teacher's black-box output and the student's target live in the same discrete space. It also turns "decision boundary" into something precise: a scene where a small edit changes at least one teacher edge label.

Generator. For a log scene and a chosen edge $(\text{ego}, j)$, the generator searches over small, physically bounded edits to agent $j$. The edits are a time shift along its path, an initial speed change, or a small lateral offset within its lane. Accelerations stay within bounds similar in spirit to the RSS-style feasibility shields of ScenePilot. The search finds the smallest edit that flips $j$'s crossing order relative to the ego vehicle's original plan. Because the search is one-dimensional per edit type, bisection needs only a few cheap kinematic checks. No teacher call is made during the search.

Teacher filter. Only the final edited scene is sent to the teacher. Writing $D$ for the teacher's decision (its edge-label vector) and $s'$ for the edited scene, we keep the pair $(s, s')$ when

$$D(s') \neq D(s),$$

that is, when the teacher also flips. A small fraction of unflipped edits is retained as negatives. The cost we account for is teacher calls plus simulator steps per kept pair.

Student. The student is an ICCT-style tree. To make it independent of how many agents are present, its inputs are fixed-size aggregates over edges:

  • attributes of the $k$ edges with the smallest time-to-conflict, sorted by time-to-conflict;
  • counts of edges per topology label;
  • minimum gaps per label.

Internal nodes choose a discrete maneuver (proceed, yield to the nearest conflicting agent, creep). Sparse linear leaves set the target speed, and a fixed trajectory generator executes it.

Training loop. The student is trained on kept pairs. We then run DAgger-style rounds in which edits are seeded from scenes where the student currently disagrees with the teacher. Tree depth is capped, and fidelity is reported as a function of depth so the expressivity trade-off flagged by the ICCT work is visible rather than hidden.

Baselines

Naive references. The "do nothing" reference is nuPlan's rule-based Intelligent Driver Model (IDM) planner. The nuPlan benchmark paper reports it at 0.76 closed-loop reactive score and 0.30 open-loop, against 0.67 closed-loop for UrbanDriver and 0.895 for the top hybrid entry (CS Tu). Any student that falls below IDM in closed loop has bought interpretability with no performance. A second naive point is the same tree trained by plain behavior cloning on logged nuPlan scenes. It uses the same number of labeled scenes as our method uses teacher calls.

Strongest existing distillation method. This is HYDRAVIPER-style tree distillation (Making Teams and Influencing Agents), adapted to our setting. It runs DAgger over teacher and student rollouts in nuPlan's reactive simulator, with adaptive rollout pruning. Its Q-based resampling is replaced by the teacher's own decision-change signal, because our teacher exposes no Q-function. It gets the same student class, the same depth cap, the same teacher-query budget, and the same simulator-step budget, and its sampling weights receive the same tuning budget as our generator. The file reports no absolute runtime or fidelity number for HYDRAVIPER: it says it matches MAVIPER "using a fraction of the runtime," and that distilled trees "even outperformed the original NN experts" in Ingolstadt. So we will have to establish its numbers ourselves. Beating it means reaching its plateau fidelity on interaction-critical decisions with clearly fewer teacher calls, which we pre-register as at most half, or exceeding its fidelity at equal budget, without losing closed-loop score.

Teacher. The teacher is BeTopNet (Reasoning Multi-Agent Behavioral Topology). The file reports only relative gains for it: +7.9% planning score on challenging cases, +6.2% non-reactive closed-loop, and +3.8% social compliance on Test14-Inter. It reports no absolute nuPlan score, so we will measure the teacher's absolute score ourselves. That measured score is the ceiling for the student.

Ablations. Two ablations isolate the key ingredient. The first, random-edit-plus-filter, applies continuous perturbations of the same magnitude to random agents and keeps teacher-flipped scenes. It separates topology targeting from mere teacher filtering. The second, topology-edit-without-filter, keeps all crossing-order flips whether or not the teacher flips. It separates the value of the filter. A third, uncertainty sampling, selects edits where an ensemble of students disagrees. It tests whether a generic active-learning criterion does as well.

Why not just…?

Why not just distill from logged data with DAgger and skip synthesis? This is the real threat. If interaction-critical boundary states are well covered by the scenes a DAgger student visits, the generator adds cost and nothing else. Our reason to expect otherwise is that such states are rare: nuPlan's Test14-Inter subset exists precisely because interactive corner cases are a small minority. The HYDRAVIPER comparison at matched budget settles the question. If the two methods reach equal fidelity on held-out flip pairs, the proposal's central claim is false, and we will report it as such.

Why not just perturb scenes randomly or fuzz them, then filter with the teacher? Random edits do find some boundary cases, and the file's evidence on efficiency comes from different settings. Causal Bayesian network scenario generation needed 1.2 iterations per risk scenario against 3.1 for random sampling, but over static macro parameters, not interaction graphs. The random-edit-plus-filter ablation measures directly how many teacher calls are wasted on edits that change nothing about the decision. If its yield of kept pairs per teacher call matches ours, topology targeting is unnecessary.

Why not just prompt a promptable simulator for interactive scenes? ProSim generates reactive traffic from text, sketches, and goals, and reports 0.28 m ADE (average displacement error, the mean distance between generated and target positions) with all prompt modalities. However, it needed 520k scenarios and 10M prompts to train, and it reportedly struggles with fine-grained relational instructions such as "Car A overtakes Car B." Crossing-order control is exactly the capability we need. Our edits are cheap kinematic searches with an exact guarantee that the relation flips. As a secondary comparison, we will measure the flip rate ProSim achieves when prompted with crossing-order instructions.

Why not just keep the neural planner and explain it post hoc? Post-hoc causal explanations like the action influence model of Explainable RL through a Causal Lens require a hand-specified causal graph, and they explain without constraining what the planner does. An auditable tree is itself the controller. Its explanation is therefore faithful by construction to the student, and its faithfulness to the teacher is measured below.

Proposed Experiments

Main curve. The main experiment plots student fidelity against teacher calls on nuPlan training scenes, with separate curves for our method, HYDRAVIPER-style DAgger, behavior cloning, and the three ablations. Fidelity has two parts:

  • agreement with the teacher's decision on a held-out set of real-plus-edited flip pairs, where agreement requires the student to flip whenever the teacher does;
  • agreement on ordinary held-out scenes.

Closed-loop evaluation. Students at fixed budgets run in nuPlan's reactive and non-reactive closed-loop simulation, overall and on Test14-Inter. We report against IDM's 0.76 reactive score and the teacher's measured ceiling, at tree depths from 3 to 8.

Explanation faithfulness. For each tree split on an edge relation, we intervene on the edge with the generator and check whether both the student's and the teacher's decisions change as the split predicts. We report the fraction of explanations confirmed by the teacher.

Generalization. To check that the edits are not exploiting simulator artifacts, we run a cross-dataset test. Students are trained on nuPlan edits and their decision agreement with the same teacher architecture is evaluated on Waymo Open Motion Dataset interactive scenes.

Decisive outcomes. Two outcomes would sink the idea. The first is that logged DAgger matches us at equal budget. The second is that random-edit-plus-filter matches us, which would mean topology is irrelevant. One outcome would confirm it: a flip-yield-per-call advantage that persists in closed-loop scores on Test14-Inter.