Relational Distillation from Track-Based Teachers to Camera-Only Driving Models

Vision-language models can describe a traffic scene, but they are poor at saying how the agents in it relate to each other. On STSBench, a benchmark of multiple-choice questions about multi-agent driving scenarios from nuScenes, a text-only language model that is handed ground-truth trajectory coordinates answers more questions correctly than vision-language models that watch the actual multi-camera video. All models also lose 20–30 points when questions shift from what the ego car did to what two other agents did to each other (STSBench). The information needed for relational reasoning is plainly in the geometry. The camera-based models just do not extract it.

We propose to close that gap with knowledge distillation, meaning training a student model to imitate a teacher's internal signals rather than only the ground-truth labels. The teacher sees privileged, structured input: a variable-size set of 3D agent tracks, available at training time from nuScenes annotations. The student sees only camera frames. What is new is what gets transferred. We do not distill answers or per-object features. We distill the teacher's table of pairwise agent-to-agent relations. That table is compared with the student's own relation table using a partial matching that tolerates different numbers of entities on each side, and it never requires the two models' feature spaces to be aligned. The student is only asked to reproduce how agents relate, a quantity that has the same meaning whether it is computed from coordinates or from pixels.

Core Claim

Relational structure is the right thing to transfer when three conditions hold together. First, the teacher and student see different modalities, so their features live in incompatible spaces. Second, the number of entities changes from scene to scene. Third, the student and teacher will not even agree on how many entities are present, because the student misses some agents and hallucinates others. Pointwise distillation fails on the first condition and on the third. Fixed-size relation matching fails on the second and third. We claim that partial relational matching handles all three, and that it will specifically shrink the Agent-to-Agent deficit on STSBench more than it moves the Ego category.

Let $S \in \mathbb{R}^{K\times K}$ be the student's pairwise affinities among its $K$ detected entity tokens, and $T \in \mathbb{R}^{N\times N}$ the teacher's affinities among its $N$ tracked agents. The distillation loss is a partial Gromov–Wasserstein objective:

$$ \mathcal{L}_{\text{rel}} = \min_{P \in \Pi_m(K,N)} \sum_{i,j,a,b} P_{ia}P_{jb}\,(S_{ij}-T_{ab})^2 \;+\; \lambda \sum_{i,a} P_{ia}\,c_{ia}. $$

Here $P$ is a soft assignment between student entities and teacher agents. The set $\Pi_m$ contains assignments that transport only a fraction $m$ of the total mass, which leaves unmatched mass for missed or spurious entities. The term $c_{ia}$ is a cheap geometric cost, such as the image-plane distance between the student's predicted box and the projected track. The weight $\lambda$ controls how strongly that geometric cue guides the matching. The first term never compares student and teacher features directly, only their relation values, so the cross-modal feature gap does not enter the loss.

Relation to Prior Work

Several papers motivate the design. STSBench supplies the gap and the evaluation, but it proposes no method. Deep Scenes builds graph networks over variable traffic graphs from simulator states and shows that relational message passing beats set pooling (p < 0.001). It never ingests perception and never acts as a teacher, and we use it as one. Exchangeable Input Representations for RL shows that padded, order-dependent inputs fail to converge while permutation-invariant encoders succeed. That result constrains our teacher and student to be set-based.

Four papers supply methods we reuse and also define the contrasts:

  • Object-centric relation distillation. Object-centric Cross-modal Feature Distillation distills slot-to-slot affinity matrices from a frame teacher to an event-camera student. It relies on pixel-synchronized sensors and on slot sets that correspond one-to-one. We drop both assumptions, since our teacher's entities are tracks rather than slots over the same image grid.
  • Relation spaces for fusion. EGO shows that N×N relation spaces fuse heterogeneous modalities compactly and robustly. It uses them for fusion without any distillation. We use relation spaces as the currency of distillation.
  • Soft labels across modalities. C2KD shows that soft labels transfer poorly across modalities: vanilla KD reaches 32.3% versus 34.7% for C2KD on AVE. This is a constraint on our design, and it is why we avoid answer-level distillation as the main signal.
  • Pointwise object-level distillation. 3D open-vocabulary panoptic distillation pulls 3D queries toward the paired 2D CLIP features of their regions. It is the clearest instance of the pointwise alternative we must beat.

Hilbert Distillation preserves spatial locality when distilling across dimensionality. It is tied to power-of-two grids, however, and cannot represent unordered agent sets. Finally, Leaner and Faster and DeCo-DETR both find that small models destabilize when representation learning and alignment are optimized jointly. That finding motivates the staged schedule below.

Research Program

Teacher. The teacher is a graph network over nuScenes ground-truth 3D tracks. Nodes are agents, carrying position, velocity, heading and class over a short window, and edges connect agents within a radius. It takes an encoded question and is trained on multiple-choice questions produced by running STSBench's scenario-mining templates on the nuScenes training scenes only. The STSBench questions come from the validation split, so this keeps test scenes out of training. The teacher's pairwise affinities $T$ are cosine similarities of its edge-conditioned node embeddings.

Student. The student is InternVL 2.5 8B, the strongest generalist reported on STSBench. We add a lightweight query head that produces $K$ entity tokens from the vision features, and a relation head that computes $S$. The student answers questions from camera frames alone. The teacher is discarded at test time.

Training schedule. Training runs in two stages, following the decoupling lesson above. Stage one trains the entity head with a detection loss while the vision-language model stays frozen. Stage two adds $\mathcal{L}_{\text{rel}}$ and the question-answering loss, using low-rank adapters on the vision-language model.

Analyses. We will study how the transported mass $m$ trades off against the student's detection recall. We will measure how accuracy scales with the number of agents in a scene. We will also test whether the gains concentrate on questions whose answers depend on a pair of non-ego agents.

Baselines

The do-nothing reference is zero-shot InternVL 2.5 8B, which STSBench reports at 46.07% accuracy on STSnu. We will re-run it under our prompts so that the comparison is internal. The teacher-side ceiling is the text-only GPT-4o given ground-truth coordinates, reported at 57.08% in the same paper.

The label-only fine-tune trains the same student on the same mined questions with the same adapters, steps and hyperparameter search, but without $\mathcal{L}_{\text{rel}}$. It is the most important control, because it separates the value of relational distillation from the value of in-domain data.

Answer-level distillation matches the student's answer distribution to the teacher's with temperature-scaled KL divergence. We also run a C2KD-style variant that filters discordant samples by rank correlation (C2KD). This tests whether relations beat soft labels.

Pointwise entity distillation first Hungarian-matches student entity tokens to teacher nodes. It then regresses the matched student features onto the teacher's node embeddings through a projection head, in the manner of the object-level loss in 3D open-vocabulary panoptic distillation. This is the strongest existing competitor, since it also uses privileged entities, and beating it isolates the claim that relations transfer better than features.

The modular pipeline runs a camera-based 3D detector and tracker on nuScenes, serializes the predicted tracks to text as STSBench did for ground truth, and queries the same language model. We found no reported result on Lacuna for STSBench accuracy with predicted rather than ground-truth tracks, so we will measure it ourselves.

Two ablations isolate the key ingredient. The first sets $m=1$, which forces full matching. The second pads both relation tables to a fixed maximum size and matches them index-by-index after sorting agents by distance.

All methods share data, the number of adapter parameters, training steps, and a tuning budget of twenty configurations each. Beating a baseline means a paired improvement on the 971 questions that is significant under McNemar's test. With this test size, one standard error is about 1.6 points, so we expect to need roughly 4 or more points. The improvement must also concentrate in the Agent-to-Agent category.

Why not just…?

Why not just fine-tune the vision-language model on more scenario questions? This may deliver most of the gain, and the label-only baseline measures exactly that. The case for distillation is that question labels supervise one relation per question, whereas the teacher's relation table supervises every pair of agents in every frame. If the label-only student matches ours on Agent-to-Agent questions, the relational loss adds nothing, and we will report it that way.

Why not just run a tracker and give the tracks to a language model? This is the real threat. The coordinate-fed language model already reaches 57.08%, and tracking on nuScenes is mature. The pipeline is heavier, however, and it inherits tracker failures with no way to recover. If the pipeline beats the distilled student, the proposal becomes a negative result about end-to-end students. That would still be worth publishing, but it would change the claim to one about latency and robustness to tracker errors, which we will measure by injecting controlled track noise.

Why not just distill the teacher's answers? C2KD shows that plain soft-label transfer across modalities is barely above no transfer: 32.3% versus 31.6% on AVE. Answers are also a low-bandwidth signal about relations. The answer-distillation baseline tests this directly.

Why not just distill matched per-object features? Features from a coordinate encoder and features from a vision encoder live in unrelated spaces. Forcing one onto the other through a projection head is the single-layer bridging that Extending Multi-modal Contrastive Representations finds loses fine-grained structure. The pointwise baseline settles whether that concern matters here.

Proposed Experiments

The primary evaluation is STSnu accuracy, overall and split into Ego, Agent, Agent-to-Ego and Agent-to-Agent questions. The main prediction is that relational distillation narrows the Agent-to-Agent deficit relative to Ego by more than any baseline does.

Three checks decide the question. The first is a shuffle control: randomly permuting the teacher's relation table while keeping its value distribution should erase the gain, which shows that relational content rather than regularization is responsible. The second is a cardinality stress test. We bucket questions by the number of agents in the scene and train a variant only on scenes below the median agent count. Partial matching should degrade more gracefully on dense scenes than the padded ablation does, mirroring the density fragility reported in Deep Scenes. The third is the pipeline comparison. We measure accuracy and latency against the modular pipeline, both on clean inputs and under tracker noise.