TranSPORTmer: A Holistic Approach to Trajectory Understanding in Multi-Agent Sports

Guillem Capellera, Luis Ferraz, Antonio Rubio, Antonio Agudo, Francesc Moreno-Noguer

Abstract

Understanding trajectories in multi-agent scenarios requires addressing various tasks, including predicting future movements, imputing missing observations, inferring the status of unseen agents, and classifying different global states. Traditional data-driven approaches often handle these tasks separately with specialized models. We introduce TranSPORTmer, a unified transformer-based framework capable of addressing all these tasks, showcasing its application to the intricate dynamics of multi-agent sports scenarios like soccer and basketball. Using Set Attention Blocks, TranSPORTmer effectively captures temporal dynamics and social interactions in an equivariant manner. The model's tasks are guided by an input mask that conceals missing or yet-to-be-predicted observations. Additionally, we introduce a CLS extra agent to classify states along soccer trajectories, including passes, possessions, uncontrolled states, and out-of-play intervals, contributing to an enhancement in modeling trajectories. Evaluations on soccer and basketball datasets show that TranSPORTmer outperforms state-of-the-art task-specific models in player forecasting, player forecasting-imputation, ball inference, and ball imputation.

Introduction

In the field of multi-agent sports analytics, researchers typically build specialized models for distinct problems: forecasting future movements, imputing missing data from occlusions, or inferring the location of unseen agents like the ball. However, these tasks are deeply interconnected; a player's movement depends on the game state (e.g., a pass versus a dribble), and the ball's location is intrinsically tied to player behavior. Most existing methods treat these as isolated problems, often failing to maintain permutation equivariance or struggling with long-range sequences.

Overview of TranSPORTmer tasks: Forecasting, Imputation, Inference, and State Classification across soccer and basketball.

Methods

TranSPORTmer utilizes a "holistic" architecture to handle all these tasks simultaneously. The model is guided by an input mask that identifies which observations are missing or need to be predicted, allowing the same architecture to switch between forecasting, imputation, and inference seamlessly.

The TranSPORTmer architecture featuring sequential Set Attention Blocks (SABs) and a CLS extra agent for state classification.

Key technical innovations include:

  • Sequential Set Attention Blocks (SABs): Instead of performing full spatio-temporal attention, the model alternates between temporal attention (individual agent movement over time) and social attention (agent interactions at a specific moment). This decoupling makes the model roughly 4x faster at inference than standard flattened Transformer architectures.
  • The CLS Extra Agent: Borrowing from NLP, a virtual "extra agent" is added to the social dimension to aggregate global information and classify the game state (e.g., pass, possession, uncontrolled) for every frame.
  • Coarse-to-Fine Refinement: The architecture uses two sequential encoders. The first provides a "coarse" approximation of missing data, while the second "fine" encoder refines these predictions, which is particularly effective for difficult tasks like ball inference.
  • Learnable Uncertainty Mask: The loss function incorporates a learnable mask that weights errors differently near observed data points, helping the model manage boundary uncertainty.

Experiments and Datasets

The model was rigorously evaluated on several high-quality datasets:

  • Soccer: Real-world tracking data from LaLiga’s 2022-2023 season (283 matches).
  • Basketball-VU: STATS SportVU data from the 2016 NBA season.
  • Basketball-TIP: A 2012 NBA dataset pre-processed to simulate complex occlusion scenarios.
  • ETH-UCY: A standard pedestrian motion dataset used to prove generalizability outside of sports.

Key Results and Insights

  • Holistic Learning Wins: Adding the classification task (the CLS agent) actually improves the accuracy of trajectory prediction. Understanding the game state helps the model better predict movement.
  • Ball Inference: TranSPORTmer achieved a 25% improvement in Average Displacement Error (ADE) for ball trajectory inference compared to the previous state-of-the-art (ballradar).
  • State Classification: The model achieved approximately 90% accuracy in identifying game states in soccer, even when the ball itself was unseen by the model.
  • SOTA Performance: In basketball player forecasting, it consistently outperformed established models like DAG-Net and U-MAT across both offensive and defensive scenarios.

Conclusion

TranSPORTmer demonstrates that a unified framework can effectively address multiple trajectory tasks while maintaining high computational efficiency. While the "uncontrolled" state in soccer remains difficult to classify accurately due to annotation subjectivity and class imbalance, the model sets a new standard for multi-agent trajectory understanding. Future work will explore 3D trajectory understanding and the incorporation of raw broadcast video features.

Summary updated

Abstract

Understanding trajectories in multi-agent scenarios requires addressing various tasks, including predicting future movements, imputing missing observations, inferring the status of unseen agents, and classifying different global states. Traditional data-driven approaches often handle these tasks separately with specialized models. We introduce TranSPORTmer, a unified transformer-based framework capable of addressing all these tasks, showcasing its application to the intricate dynamics of multi-agent sports scenarios like soccer and basketball. Using Set Attention Blocks, TranSPORTmer effectively captures temporal dynamics and social interactions in an equivariant manner. The model's tasks are guided by an input mask that conceals missing or yet-to-be-predicted observations. Additionally, we introduce a CLS extra agent to classify states along soccer trajectories, including passes, possessions, uncontrolled states, and out-of-play intervals, contributing to an enhancement in modeling trajectories. Evaluations on soccer and basketball datasets show that TranSPORTmer outperforms state-of-the-art task-specific models in player forecasting, player forecasting-imputation, ball inference, and ball imputation. https://youtu.be/8VtSRm8oGoE
BibTeX
@inproceedings{capellera2024transportmer,
  author = {Guillem Capellera and Luis Ferraz and Antonio Rubio and Antonio Agudo and Francesc Moreno-Noguer},
  title = {{TranSPORTmer: A Holistic Approach to Trajectory Understanding in Multi-Agent Sports}},
  booktitle = {ACCV},
  year = {2024},
  doi = {10.1007/978-981-96-0901-7\_20},
}
Figure