THOMAS: Trajectory Heatmap Output with learned Multi-Agent Sampling

Thomas Gilles, Stefano Sabatini, Dzmitry Tsishkou, Bogdan Stanciulescu, Fabien Moutarde

Introduction

In autonomous driving, predicting where a single car will go is challenging; predicting the simultaneous movements of dozens of interacting vehicles is exponentially harder. Most current models perform marginal prediction, meaning they predict the best paths for each agent independently.

The problem with this approach is a lack of scene consistency. If two vehicles approach an intersection, a marginal model might predict that the "most likely" path for both is to go straight—resulting in a predicted collision. This makes it difficult for an autonomous vehicle to plan safe maneuvers. While using "heatmaps" (grids representing the probability of a car being at a certain spot) is highly effective for capturing multiple possible futures, generating dense grids for dozens of agents is computationally expensive.

To address these issues, researchers introduced THOMAS (Trajectory Heatmap Output with learned Multi-Agent Sampling), a joint multi-agent trajectory prediction framework. THOMAS ensures predicted paths for multiple vehicles are accurate individually and socially consistent as a group, effectively preventing "ghost collisions."

The THOMAS Framework

THOMAS Framework Overview

The THOMAS architecture consists of three primary stages designed to balance computational efficiency with scene-wide coherence:

  1. Graph Encoding: The model uses a standard graph neural network to encode the "lanelet" map and the past trajectories of all agents. This allows agents to "talk" to each other via attention mechanisms, establishing a shared context.
  2. Hierarchical Grid Decoder: To solve the efficiency bottleneck of traditional heatmaps, THOMAS employs a "coarse-to-fine" approach. It first evaluates a very low-resolution grid. It then identifies the highest-probability cells, up-samples only those areas, and repeats the process. This allows the model to achieve a fine 0.5m resolution while processing only ~1.2% of the total possible grid points.
Hierarchical Coarse-to-Fine Heatmap Generation
  1. Modality Recombination: This is the core innovation of the paper. Instead of just picking the top $K$ paths for each car independently, THOMAS uses a learnable module to "realign" these paths. By applying cross-attention between "scene modality embeddings" and individual agent proposals, the model learns to assign a coherent "role" to each agent (e.g., "Agent A yields while Agent B turns"). This ensures the final set of trajectories for the whole scene is collision-free.

Key Insights and Performance

The authors emphasize a crucial shift in evaluation metrics: we must move beyond average error (minFDE) and prioritize Scene Collision Rate (SCR) and Joint Miss Rate (SMR). A model that is 99% accurate but predicts a collision between two agents is fundamentally flawed for self-driving applications.

By recombining existing proposals rather than generating new joint ones from scratch, THOMAS remains highly efficient while drastically improving these joint metrics.

Key Results: * Leaderboard Dominance: THOMAS ranked 1st on the Interaction multi-agent online test leaderboard (Interaction v1.2 dataset). It was also evaluated on standard single-agent benchmarks like Argoverse and NuScenes to demonstrate versatility. * Consistency Gains: Compared to strong baselines like SceneTransformer, THOMAS improved the Scene Miss Rate (SMR) by approximately 25% and reduced the Scene Collision Rate (SCR) by nearly 30%. * Real-Time Efficiency: Despite the complexity of joint prediction, the hierarchical decoder is incredibly fast. It performs inference for 128 simultaneous agents in just 31ms, well within the strict latency requirements for real-time autonomous systems.

Limitations and Future Work

While highly effective, THOMAS has a few limitations:

  • Proposal Dependency: The recombination module relies entirely on the candidates provided by the initial heatmap. If the "correct" joint behavior involves a trajectory that wasn't in the top marginal picks, the model cannot recover it.
  • Residual Collisions: While significantly reduced, the SCR is not zero (2.4% in validation). Future iterations might require explicit physics-based constraints or "hard" collision-avoidance layers.
  • Long-Term Horizons: The current framework focuses on a 3-second prediction horizon. Extending this to 5 or 8 seconds would introduce significantly more multi-modal uncertainty, potentially testing the limits of the recombination module.

Summary updated

BibTeX
@inproceedings{gilles2022thomas,
  author = {Thomas Gilles and Stefano Sabatini and Dzmitry Tsishkou and Bogdan Stanciulescu and Fabien Moutarde},
  title = {{THOMAS: Trajectory Heatmap Output with learned Multi-Agent Sampling}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
}
Figure