Forecasting models for self-driving cars are trained mostly by penalizing how far each predicted position lands from the true one. That penalty scores every agent separately. It never asks whether the predicted scene gets the interaction right: which car goes first at a merge, whether a gap closes and then reopens, whether two pedestrians pass left or right of each other. Image synthesis had the same problem in another form. Per-pixel losses blur edges, and the standard remedy was a structural similarity loss (SSIM), which compares local patches by their mean, their spread and their correlation rather than pixel by pixel. We propose to apply that remedy to multi-agent forecasting. The comparison is made on the time series of distances and relative orderings between agents, not on image pixels. A patch-style comparison of these gap signals rewards a prediction that gets the shape of an interaction right even when absolute positions drift, and it penalizes predictions that hedge between "I yield" and "you yield."
The only prior bridge between the two fields is Prediction by Anticipation. It applies SSIM to rasterized occupancy grids, which are top-down images of where vehicles are, over 2-second horizons. That keeps vehicle blobs sharp, but it measures appearance on an image plane. It does not measure the relational structure between actors, and it does not carry over to the vectorized, raster-free models that now dominate 6–8 second benchmarks. Our loss operates directly on continuous trajectories. It can be attached to any vectorized joint predictor.
Core Claim
Interaction errors in joint forecasting are mostly shape errors in pairwise gap signals: the sign, timing and curvature of how the distance between two agents evolves. Point-wise losses, whether on positions or on raw distances, handle these poorly. They average competing interaction outcomes and let large absolute offsets at long horizons dominate the gradient. A windowed structural similarity term fixes this. It works over short time windows of each pair's signed gap and relative velocity, and it separates "level," "variability" and "correlation" (shape). The prediction is that adding it to a strong vectorized joint predictor reduces predicted inter-agent overlaps and misread yield/pass outcomes on interactive benchmarks, with no loss on displacement error. The prediction further says the benefit comes specifically from the normalized correlation term, not from simply supervising pairwise distances. The last part is the falsifiable heart of the proposal. If plain pairwise-distance regression matches it, the claim is wrong.
The Loss
For agents $i,j$ in a predicted joint future, let $g_{ij}(t)$ be their signed gap along their conflict path. The conflict path is the lane-graph route where the two futures intersect, or Euclidean separation when there is none. The sign encodes who is ahead. A second signal $v_{ij}(t)$ is the rate at which that gap closes. For a sliding time window $w$ with Gaussian weights, compute the local means $\mu$, standard deviations $\sigma$ and cross-covariance $\sigma_{\hat g g}$ of predicted versus ground-truth gap. This is exactly the SSIM decomposition, applied to one-dimensional signals indexed by agent pairs:
$$ S_w(\hat g, g) = \frac{2\mu_{\hat g}\mu_g + c_1}{\mu_{\hat g}^2+\mu_g^2+c_1}\cdot\frac{2\sigma_{\hat g}\sigma_g+c_2}{\sigma_{\hat g}^2+\sigma_g^2+c_2}\cdot\frac{\sigma_{\hat g g}+c_3}{\sigma_{\hat g}\sigma_g+c_3}, $$
The constants $c_1, c_2, c_3$ stabilize small denominators.
The auxiliary loss averages $1-S_w$ over windows, over both signals, and over pairs weighted by interaction relevance $\omega_{ij}$:
$$ L = L_{\text{base}} + \lambda \sum_{i<j}\omega_{ij}\,\frac{1}{|W|}\sum_{w\in W}\big(1 - S_w(\hat g_{ij}, g_{ij})\big). $$
$L_{\text{base}}$ is the predictor's usual winner-take-all regression plus mode-classification loss. $\omega_{ij}$ is inverse minimum time-to-collision in the ground truth, clipped. This weighting directly answers the gap the file identifies: plain SSIM treats a discrepancy in empty space the same as one inside a collision corridor.
The loss is applied to the joint mode selected by the base winner-take-all rule. We do not change mode assignment, so the known square-root dilation of the variety (minimum-over-$N$) loss, analyzed by Analyzing the Variety Loss, is neither fixed nor worsened by construction. That paper's log-likelihood diagnostics can be used to check this.
Research Program
We first reimplement a vectorized joint predictor in the style of MultiPath++. That model encodes roads as polylines and agents as raw state histories, fused by gated context layers, and outputs a Gaussian mixture of trajectories. We extend it with a joint head over the two interacting agents. This is the host model; the proposal changes only the loss.
We then add the gap-signal SSIM term and study three questions.
The first question is which of the three factors carries the effect. We ablate luminance, contrast and structure separately. The mean-invariance of the structure term is what, in images, made SSIM-trained anomaly detectors ignore global lighting shifts (Bergmann et al.). Here the analogous invariance should let the loss reward a correct yield pattern even when the whole joint future is offset.
The second question is window scale. The file flags patch-size sensitivity as a known SSIM weakness (Scale Aggregation Network). We therefore compare single windows of 1, 2 and 4 seconds against a multi-scale average.
The third question is whether the loss transfers to crowds. On ETH/UCY pedestrians, pairs are dense and there are no lane conflict paths. The pedestrian predictor is a Social-STGCNN–type model, as used by HighGraph and Social NCE, and gaps fall back to Euclidean separation.
Baselines
The naive reference point is the host predictor trained with its standard winner-take-all regression and classification loss and nothing else. For the strongest existing method on the Waymo Open Motion Dataset, the file reports MultiPath++ at mAP 0.409 and minADE 0.556 m, ranked first on the Waymo Motion Prediction Challenge (MultiPath++). That is the marginal track. We found no reported result on Lacuna for any method on the WOMD interactive (joint) track or for joint overlap rate. On Argoverse 2 multi-world forecasting, the file reports only a leaderboard rank of 4th for OGD diffusion, with no numeric metric. Because we reimplement rather than reuse checkpoints, our first deliverable is a reproduced host number close to 0.409 mAP on the marginal track. Improvements are judged against our reproduction, not against leaderboard entries.
The most dangerous baseline is relational L2: the same host with an auxiliary Huber loss on the same signed-gap and closing-rate signals, using the same $\omega_{ij}$ weighting. It isolates whether the benefit comes from supervising pairwise relations at all or from the SSIM decomposition.
The second competitor is Social NCE (Social NCE). It adds a contrastive loss that pushes representations away from sampled collision states and reports collision-rate reductions of 37.0% on Social-STGCNN and 45.7% on Trajectron++. It is the strongest existing interaction-aware auxiliary objective in the file. Its companion codebase also shows its fragility: in behavioral-cloning crowd navigation, local negative sampling raised collisions to 19.3% against a 12.7% vanilla rate (vita-epfl/social-nce).
The third is an explicit overlap penalty: a hinge on predicted bounding-box intersection between the two joint agents.
The fourth is raster SSIM, a Prediction-by-Anticipation–style occupancy-grid SSIM rendered from the vector outputs, which tests whether our relational formulation adds anything over the only prior bridge.
Every auxiliary gets the same host, data, training steps and hardware. Each also gets the same tuning budget: a sweep of eight values of its weight and, where relevant, its radius or window, selected on the validation split. We count as beating a competitor a statistically reliable reduction, over three seeds, of predicted overlap rate and yield/pass-outcome error on WOMD interactive validation, with mAP and minADE within one seed-standard-deviation of the host or better.
Why not just…?
Why not just regress pairwise distances with L2? This is the real threat. It is cheap, supervises exactly the relations we care about, and might capture most of the gain. Our argument is mechanistic. At long horizons, absolute gap errors are large and dominated by speed uncertainty. L2 then spends its gradient on gap level, while the normalized correlation term targets gap shape, such as which agent's gap opens first. The relational-L2 baseline settles this directly. If it matches the structure-only ablation on overlap and outcome error, we will report that the SSIM machinery is unnecessary and that the finding reduces to "supervise relative states." We do not plan to argue around that outcome.
Why not just use Social NCE or an overlap penalty? Both target collisions rather than interaction shape. Social NCE depends on hand-set comfort radii, and its own codebase shows a sampling variant making collisions worse than vanilla. An overlap hinge is active only when boxes intersect, so it gives no signal about a mistimed yield that avoids contact but misreads who goes first. Our outcome-error metric is designed to separate "no collision" from "correct interaction." If these baselines match us on outcome error as well, the proposal adds little.
Why not just keep raster SSIM as in Prediction by Anticipation? That approach measures blob sharpness on an image, requires rendering full scenes at a resolution that discards sub-cell precision, and was shown only up to 2 seconds (Prediction by Anticipation). The raster-SSIM baseline tests whether it helps at all at 8 seconds on a vectorized host. We expect it to cost more compute for less relational signal, but we report its compute and accuracy side by side.
Why not just fix the variety loss instead? The dilation shown by Analyzing the Variety Loss is a mode-calibration problem, orthogonal to within-mode interaction shape. We leave mode assignment unchanged. We report that paper's sharpening correction on top of both the host and our model, to show that the effects combine rather than overlap.
Proposed Experiments and Decisive Checks
The primary benchmark is the WOMD interactive split with its 8-second horizon (WOMD). We report joint mAP, joint minADE/minFDE, and predicted-overlap rate. We also report an outcome metric we define: the fraction of interacting pairs whose predicted top joint mode gets the sign of the final signed gap wrong, meaning it reverses who passes first.
Argoverse 2's 6-second multi-world forecasting (Argoverse 2) serves as a second vehicle benchmark. ETH/UCY with collision rate tests transfer to crowds, where the Social NCE numbers above are the reference. On the NGSIM ramp-merge setting, we report the fatality-aware score of Towards a Fatality-Aware Benchmark. There, MDN reaches Brier 0.1099 and $B_c$ 0.2361, and IRL reaches 0.1821 and 0.2053. That comparison tests whether TTC-weighted structure loss narrows the gap between likelihood quality and safety-aware quality.
Three checks decide the project. First, the structure-only ablation must beat relational L2 on outcome error and overlap on WOMD interactive; if it does not, the core claim fails. Second, the advantage should grow with horizon, from small at 3 seconds to largest at 8 seconds. This is where the mean-invariance argument predicts it, since absolute offsets grow with horizon while interaction shape does not. Third, removing the TTC weighting should shrink the gain on high-criticality pairs specifically, stratified by ground-truth minimum TTC, while leaving low-criticality pairs unchanged. A flat or reversed pattern on any of these would mean the SSIM analogy does not transfer to agent relations.
References
- Prediction by Anticipation: An Action-Conditional Prediction Method based on Interaction Learning
- Analyzing the Variety Loss in the Context of Probabilistic Trajectory Prediction
- MultiPath++: Efficient Information Fusion and Trajectory Aggregation for Behavior Prediction
- MVTec AD - A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection
- Scale Aggregation Network for Accurate and Efficient Crowd Counting
- Higher-order Relational Reasoning for Pedestrian Trajectory Prediction
- Social NCE: Contrastive Learning of Socially-aware Motion Representations
- Optimizing Diffusion Models for Joint Trajectory Prediction and Controllable Generation
- Large Scale Interactive Motion Forecasting for Autonomous Driving : The Waymo Open Motion Dataset
- Argoverse 2: Next Generation Datasets for Self-Driving Perception and Forecasting
- Towards a Fatality-Aware Benchmark of Probabilistic Reaction Prediction in Highly Interactive Driving Scenarios