LongComp: Long-Tail Compositional Zero-Shot Generalization for Robust Trajectory Prediction

Benjamin Stoler, Jonathan Francis, Jean OharXiv 2025 · DOI

Introduction: The Challenge of the Long Tail

Autonomous driving (AD) systems have reached impressive levels of performance in standard traffic conditions. However, the "long tail" of rare, safety-critical events remains a significant hurdle. These out-of-distribution (OOD) scenarios—such as a pedestrian suddenly darting into a lane while the ego-vehicle is navigating a complex intersection—are infrequent in training data but essential for safety.

Current evaluation methods often fail to pinpoint why a model struggles with OOD data. Is it the road geometry, the ego-vehicle's maneuver, or the behavior of surrounding agents? LongComp addresses this by introducing a framework that factorizes driving scenarios into independent "ego" and "social" contexts, enabling a systematic study of compositional generalization.

Compositional Factorization of Driving Scenarios

The core innovation of LongComp is treating driving scenarios as compositions of distinct factors, much like how language combines adjectives and nouns. The researchers propose a three-stage pipeline to discretize the continuous space of driving behaviors:

  1. Safety-Informed Factorization: Scenarios are split into two axes: Ego Context (kinematics, map features, infrastructure proximity) and Social Context (interactions with other agents, safety metrics like time-to-conflict).
  2. Discretization via Autoencoders: High-dimensional features are compressed through autoencoders and clustered using k-means. This assigns discrete "context labels" to every scenario, defining it as a pair: (ego_label, social_label).
  3. Compositional Mapping: By labeling scenarios this way, the framework can identify which combinations have been seen during training and which are novel.
Figure 5: Scenarios as compositions of Ego and Social contexts.

Evaluating Generalization: Closed vs. Open Worlds

LongComp defines two rigorous settings for testing robustness:

  • Closed-World Compositional Generalization: The model is tested on a specific combination (e.g., Ego-A + Social-B) that was never seen together in training, even though both Ego-A and Social-B appeared in other pairings.
  • Open-World Compositional Generalization: A more difficult test where at least one of the contexts (Ego or Social) was entirely absent from the training set.

Experiments on the Waymo Open Motion Dataset (WOMD) revealed a stark reality: while models can learn to "mix-and-match" known behaviors (5.0% performance drop in closed-world), they are significantly more fragile when encountering fundamentally new behaviors (14.7% drop in open-world).

Enhancing Robustness with LongComp

To bridge this performance gap, the authors introduced two key modifications to the state-of-the-art Motion Transformer (MTR) baseline:

  • Task-Modular Gating Networks (TMN): This mechanism conditions the model's internal representations on the specific ego and social latents, allowing it to adapt its reasoning based on the identified context.
  • Auxiliary Difficulty-Prediction Head: The model is tasked with predicting the "difficulty" of a scenario (derived from Kalman filter error). This auxiliary signal forces the model to learn safety-aware features, helping it distinguish between routine maneuvers and high-risk situations.

Key Results and Insights

The LongComp enhancements yielded significant improvements across the board:

  • Reduced Gaps: The performance drop in OOD scenarios was reduced from 5.0% to 2.8% (closed-world) and from 14.7% to 11.5% (open-world).
  • In-Distribution Gains: Interestingly, the modifications also improved performance on "Seen" data by up to 4.0%, suggesting that context-awareness benefits all driving scenarios, not just the rare ones.
  • Difficulty as a Signal: The success of the difficulty-prediction head suggests that "knowing what you don't know" is a powerful internal regularizer for trajectory prediction models.

Conclusion

LongComp provides a scalable and systematic framework for evaluating and improving the robustness of autonomous driving systems. By leveraging Compositional Zero-Shot Learning, it moves beyond simple OOD testing toward a granular understanding of how models generalize. While challenges remain—such as incorporating more axes like weather or lighting—LongComp marks a significant step toward solving the "long tail" problem in safety-critical robotics.

Summary updated

BibTeX
@misc{stoler2025longcomp,
  author = {Benjamin Stoler and Jonathan Francis and Jean Oh},
  title = {{LongComp: Long-Tail Compositional Zero-Shot Generalization for Robust Trajectory Prediction}},
  year = {2025},
  eprint = {2511.10411},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.10411},
}
Figure