AdaSports-Traj: Adaptive Sports Trajectory Model
- AdaSports-Traj is an adaptive multi-agent trajectory framework that addresses intra- and inter-domain discrepancies using role- and domain-aware mechanisms.
- It integrates a CVAE backbone with a Role- and Domain-Aware Adapter and hierarchical contrastive learning to effectively model heterogeneous sports data.
- Empirical evaluations on Basketball-U, Football-U, and Soccer-U demonstrate significant prediction improvements compared to traditional methods like UniTraj.
AdaSports-Traj is an adaptive framework for multi-agent trajectory modeling in sports, explicitly designed to address both intra-domain and inter-domain distributional discrepancies that arise from heterogeneous agent roles (such as players versus balls) and varying sports domains (e.g., basketball, football, soccer). By introducing a Role- and Domain-Aware Adapter in conjunction with a hierarchical contrastive learning paradigm, AdaSports-Traj achieves robust performance in both unified and cross-domain trajectory prediction scenarios, as demonstrated empirically on Basketball-U, Football-U, and Soccer-U datasets (Xu et al., 19 Sep 2025).
1. Model Architecture and Adapter Design
At its core, AdaSports-Traj employs a Conditional Variational Autoencoder (CVAE) backbone, following the unified trajectory modeling conventions of UniTraj (Xu & Fu ’25). The model processes masked multi-agent trajectories (with mask ). Its encoder and prior model the latent states as Gaussian distributions, while the decoder reconstructs both visible and missing portions of input trajectories. The training maximizes the evidence lower bound (ELBO), as formalized by:
A key innovation is the Role- and Domain-Aware Adapter (RDA), which modulates the encoder’s latent features based on agent role () and sports domain ():
- Embeddings: , both of dimension .
- Cross-Attention: Using as query and as key/value:
- Token-wise Gating: Per-token gating weight determines the interpolation:
This lightweight, plug-and-play adapter setup requires minimal additional computational overhead and is fully differentiable, supporting end-to-end learning through the primary modeling and contrastive losses.
2. Hierarchical Contrastive Learning
AdaSports-Traj introduces a hierarchical contrastive objective to separately supervise role-sensitive and domain-aware latent representations, thereby encouraging their disentanglement.
- Projection Heads: Starting from , the model produces two L²-normalized projections:
- InfoNCE Contrastive Losses: For a given batch, role-positive pairs share the same agent type, domain-positive pairs share the same sport, and all other batch members serve as negatives:
- Combined Hierarchical Loss:
Projecting into orthogonal subspaces eliminates optimization conflict between agent role and domain supervision. Empirical ablations confirm that variants lacking this separation (e.g., shared-feature projection) yield significantly inferior results.
3. Training Objectives and Implementation
The complete loss function of AdaSports-Traj augments the CVAE objectives with the hierarchical contrastive term and a Winner-Take-All (WTA) sampling loss to promote diversity:
- Reconstruction and Regularization:
- Final Training Loss:
Training employs Adam (β₁=0.9, β₂=0.999), an initial learning rate of 0.001 decayed by 0.9 every 20 epochs, and batch size 128. Mixed-domain batches in unified-to-single (U2S) settings permit simultaneous domain and role contrastive supervision, while single-to-single (S2S) batches enable only role-based losses. The hardware consists of an NVIDIA A6000 GPU and PyTorch implementation.
4. Experimental Evaluation
Datasets
Experiments use three unified multi-agent trajectory datasets:
| Dataset | Agents (N) | Train/Test Size |
|---|---|---|
| Basketball-U | 11 (5+5+1) | 93,490 / 11,543 |
| Football-U | 23 (22+1) | 10,762 / 2,624 |
| Soccer-U | 23 (22+1) | 9,882 / 2,448 |
Metrics
- minADE₍₂₀₎: Minimum Averaged Displacement Error over 20 samples (lower is better)
- OOB: Fraction of predicted points outside field boundaries
- Step: Mean stepwise trajectory displacement (closeness to ground truth)
- Path-L: Total agent path length
- Path-D: Net start-to-end agent displacement
Results
AdaSports-Traj consistently outperforms UniTraj across all settings. Example: In S2S, Basketball-U minADE₍₂₀₎ drops from 4.77 (UniTraj) to 4.21; similarly, unified-to-single (U2S) settings show clear improvement (Basketball-U minADE₍₂₀₎: 11.12 → 8.74). Detailed ablations reveal:
- Combining RDA and HC yields the best outcome (S2S: 4.21/3.04/91.52 versus RDA or HC alone).
- Token-wise gating in the adapter surpasses feature-wise or no gating configurations.
- Role-only and domain-only contrastive variants underperform relative to hierarchical contrastive learning.
5. Analysis, Visualization, and Limitations
t-SNE analysis of learned projections shows distinct clustering for the three sports domains in and clear separation between Ball and Player roles in . Qualitative rollout visualizations indicate improved plausible completion and forecast trajectories, especially under heavy observation masking, with fewer out-of-bounds outputs compared to UniTraj.
A principal limitation is that AdaSports-Traj relies on pre-defined role and domain annotations during training, which precludes unsupervised deployment across novel agent types or sports. Future research directions include unsupervised or weakly-supervised discovery of role/domain labels and extending the adapter mechanism to generative backbones beyond CVAEs, such as diffusion models, and to real-time online adaptation contexts.
6. Context and Significance
AdaSports-Traj directly addresses the structured heterogeneity and distributional shift challenges characteristic of multi-agent sports trajectory prediction. By introducing a modular and lightweight plug-in for latent space adaptation and validating the necessity of disentangled, orthogonal subspace supervision, it establishes a new methodological baseline for cross-domain, multirole trajectory forecasting. Empirical results on Basketball-U, Football-U, and Soccer-U demonstrate domain-agnostic improvements. This framework represents a substantial step toward unified, adaptable models for structured multi-agent systems in sports and potentially other domains requiring explicit role and context awareness (Xu et al., 19 Sep 2025).