Papers
Topics
Authors
Recent
Search
2000 character limit reached

AdaSports-Traj: Adaptive Sports Trajectory Model

Updated 27 January 2026
  • 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 XRN×T×DX \in \mathbb{R}^{N \times T \times D} (with mask M{0,1}N×TM \in \{0, 1\}^{N \times T}). Its encoder qϕ(zTxT)q_\phi(z^{\leq T} | x^{\leq T}) and prior pθ(ztx<t,z<t)p_\theta(z^t | x^{<t}, z^{<t}) 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:

ELBO(θ,ϕ)=Eqϕ(zx)[t=1Tlogpθ(xtzt,x<t)KL(qϕ(ztxt,z<t)pθ(ztx<t,z<t))]\mathrm{ELBO}(\theta, \phi) = \mathbb{E}_{q_\phi(z|x)} \left[ \sum_{t=1}^T \log p_\theta(x^t | z^{\leq t}, x^{<t}) - \mathrm{KL}(q_\phi(z^t | x^{\leq t}, z^{<t}) \| p_\theta(z^t | x^{<t}, z^{<t})) \right]

A key innovation is the Role- and Domain-Aware Adapter (RDA), which modulates the encoder’s latent features zz based on agent role (r{Player,Ball}r \in \{\text{Player}, \text{Ball}\}) and sports domain (d{Basketball,Football,Soccer}d \in \{\text{Basketball}, \text{Football}, \text{Soccer}\}):

  • Embeddings: erole=Embrole(r), edomain=Embdomain(d)e_\mathrm{role} = \mathrm{Emb}_\mathrm{role}(r),\ e_\mathrm{domain} = \mathrm{Emb}_\mathrm{domain}(d), both of dimension Rh\mathbb{R}^h.
  • Cross-Attention: Using erole+edomaine_\mathrm{role} + e_\mathrm{domain} as query and zz as key/value:

zcond=CrossAttention(erole+edomain, z,z)z_\mathrm{cond} = \mathrm{CrossAttention}(e_\mathrm{role} + e_\mathrm{domain},\ z, z)

  • Token-wise Gating: Per-token gating weight αgate=σ(MLP([z,zcond]))\alpha_\mathrm{gate} = \sigma(\mathrm{MLP}([z, z_\mathrm{cond}])) determines the interpolation:

zadapted=αgatezcond+(1αgate)zz_\mathrm{adapted} = \alpha_\mathrm{gate} \odot z_\mathrm{cond} + (1 - \alpha_\mathrm{gate}) \odot z

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 zadaptedz_\mathrm{adapted}, the model produces two L²-normalized projections:

zrole=MLProle(zadapted),zdomain=MLPdomain(zadapted)z_\mathrm{role} = \mathrm{MLP}_\mathrm{role}(z_\mathrm{adapted}),\qquad z_\mathrm{domain} = \mathrm{MLP}_\mathrm{domain}(z_\mathrm{adapted})

  • 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:

Lrole=1Prole(i,j)Prolelogexp(sim(zrolei,zrolej)/τc)kiexp(sim(zrolei,zrolek)/τc) Ldomain=1Pdomain(i,j)Pdomainlogexp(sim(zdomaini,zdomainj)/τc)kiexp(sim(zdomaini,zdomaink)/τc)\begin{align*} \mathcal{L}_\mathrm{role} &= -\frac{1}{|P_\mathrm{role}|} \sum_{(i, j) \in P_\mathrm{role}} \log \frac{\exp(\mathrm{sim}(z^i_\mathrm{role}, z^j_\mathrm{role})/\tau_c)} {\sum_{k\neq i} \exp(\mathrm{sim}(z^i_\mathrm{role}, z^k_\mathrm{role})/\tau_c)} \ \mathcal{L}_\mathrm{domain} &= -\frac{1}{|P_\mathrm{domain}|} \sum_{(i, j) \in P_\mathrm{domain}} \log \frac{\exp(\mathrm{sim}(z^i_\mathrm{domain}, z^j_\mathrm{domain})/\tau_c)} {\sum_{k\neq i} \exp(\mathrm{sim}(z^i_\mathrm{domain}, z^k_\mathrm{domain})/\tau_c)} \end{align*}

  • Combined Hierarchical Loss:

Lhier=Lrole+λcLdomain\mathcal{L}_\mathrm{hier} = \mathcal{L}_\mathrm{role} + \lambda_c\,\mathcal{L}_\mathrm{domain}

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:

Lelbo=X^mXm2+λ1KL(N(μq,diag(σq2))N(0,I))\mathcal{L}_\mathrm{elbo} = \|\hat X_m - X_m\|^2 + \lambda_1\,\mathrm{KL}(\mathcal{N}(\mu_q, \mathrm{diag}(\sigma_q^2))\| \mathcal{N}(0, I))

Lrec=X^vXv2\mathcal{L}_\mathrm{rec} = \|\hat X_v - X_v\|^2

Lwta=mink{1..K}Y^(k)Y2\mathcal{L}_\mathrm{wta} = \min_{k\in\{1..K\}}\|\hat Y^{(k)} - Y\|^2

  • Final Training Loss:

L=Lelbo+λ2Lrec+λ3Lwta+λ4Lhier\mathcal{L} = \mathcal{L}_\mathrm{elbo} + \lambda_2\,\mathcal{L}_\mathrm{rec} + \lambda_3\,\mathcal{L}_\mathrm{wta} + \lambda_4\,\mathcal{L}_\mathrm{hier}

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 zdomainz_\mathrm{domain} and clear separation between Ball and Player roles in zrolez_\mathrm{role}. 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).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to AdaSports-Traj.