TRIDENT: Cross-Domain Trajectory Spatio-Temporal Representation via Distance-Preserving Triplet Learning

Guan Yi Jhang, Jeng-Chung Lien, Yu Hui-Ching, Hsu-Chao Lai, Jiun-Long HuangICLR 2026 · OpenReview

TL;DR

TRIDENT is a new "generalist" framework for trajectory representation that works across vastly different domains, from smooth urban taxi trips to erratic, high-intensity badminton rallies. By combining a dual-attention encoder with a novel distance-preserving loss, it achieves state-of-the-art retrieval accuracy while training up to 72% faster than previous models.

The Challenge of Diverse Trajectory Data

Trajectory analysis—the study of how objects move through space and time—is vital for applications ranging from urban planning to sports analytics. However, most existing models suffer from a "smoothness bias." They are designed for vehicles following predictable roads with continuous GPS pings.

When applied to "event-driven" data—like a badminton player lunging for a shuttlecock or a taxi navigating an "urban canyon" with spotty GPS—these models often fail. Such scenarios involve abrupt direction changes, irregular sampling, and high "tortuosity" (the ratio of the actual path length to the straight-line distance). Furthermore, most models struggle to generalize; a model trained on Beijing traffic usually cannot interpret a match on a badminton court.

Datasets: From Urban Mobility to Sports

To prove its "generalist" credentials, researchers tested TRIDENT on a diverse set of benchmarks representing two extremes: low-tortuosity (taxis) versus high-tortuosity (sports).

Examples of diverse trajectory datasets including T-Drive, Rome, and Badminton.
  • Urban Mobility: T-Drive (Beijing taxis), Rome (taxi traces), and larger-scale datasets from Chengdu and Xian.
  • Sports: A specialized Badminton dataset featuring singles match rallies, characterized by high-frequency shifts and discrete "hit" events.

Methods: The TRIDENT Architecture

The authors introduce TRIDENT (TRIplet-based Distance-preserving Embedding Network for Trajectories), which relies on three technical pillars to process these diverse inputs:

The TRIDENT architecture featuring the DAEncoder, NTAP, and DMT Loss.
  1. Dual-Attention Encoder (DAEncoder): Instead of processing space and time separately or in a simple sequence, this module uses cross-attention to fuse spatial features (from a Graph Convolutional Network) and temporal features (via Date2Vec) in parallel.
  2. Nonlinear Tanh-Projection Attention Pooling (NTAP): Standard pooling often loses the "local order" of a sequence. NTAP uses a non-linear projection to capture higher-order interactions, making the model robust against noise and better at identifying "sharp turns" or critical event points.
  3. Distance-preserving Multi-kernel Triplet Loss (DMT): Traditional triplet losses only care about relative ranking (e.g., A is closer to B than C). DMT goes further by forcing the distances in the mathematical embedding space to reflect real-world spatio-temporal distances. It uses multiple "kernels" to ensure the model pays attention to both tiny local details and the overall global shape of the path.

Key Insights and Results

TRIDENT significantly outperformed established baselines like ST2Vec and TrajCL across multiple metrics:

  • Accuracy: On the Badminton dataset, TRIDENT improved retrieval performance (measured by Hit Rate) by a staggering 271% over the mean of all baselines. On urban datasets (T-Drive and Rome), it saw improvements of 96% to 127%.
  • Efficiency: The model is remarkably lean. It achieved a 34.8% reduction in training time on Badminton and a 72.4% reduction on T-Drive compared to state-of-the-art models.
  • Cross-Domain Mastery: In "zero-shot" style tests—training on one city and testing on another—TRIDENT retained significantly more performance than its competitors, proving it learns the nature of movement rather than just memorizing a specific map.

Why it works: * Geometry Matters: By regressing to actual distances rather than just ranking samples, TRIDENT avoids "dimension collapse," where a model accidentally maps different types of trajectories to the same point. * The Power of Anchors: The study found that having a stable "anchor" in the triplet loss is crucial for smooth data (taxis), whereas contrastive strategies without anchors struggle to maintain the spatial layout of a city. * Actionable Analytics: The model doesn't just "match" trajectories; it understands them. In the badminton case study, TRIDENT’s embeddings allowed researchers to cluster rallies into specific tactical patterns that are more useful for coaches than simple win/loss classifications.

Limitations and Future Work

While TRIDENT is a powerful generalist, the authors note that "cross-city" transfer still sees a performance drop (retaining about 31% of original accuracy) due to intrinsic differences in road topologies and traffic rules.

Future work aims to extend the framework to even more complex scenarios, such as multi-agent trajectories (doubles badminton or basketball team plays) and improving the "interpretability" of the embeddings so humans can better understand exactly why the model thinks two paths are similar.

Summary updated

Abstract

We present the TRIplet-based Distance-preserving Embedding Network for Trajectories (TRIDENT), a spatio-temporal representation framework for compressing and retrieving trajectories across scales, from badminton courts to large-scale urban environments. Existing methods often assume smooth, continuous motion, but real trajectories exhibit event-driven annotation, abrupt direction changes, GPS errors, irregular sampling, and domain shifts, exposing the inefficiency, limited generalization, and inability to robustly integrate temporal order with spatial sequence structure of prior models. TRIDENT addresses these challenges by combining Graph Convolutional Network (GCN) spatial embeddings with temporal features in a Dual-Attention Encoder (DAEncoder), along with a Nonlinear Tanh-Projection Attention Pooling (NTAP) module that preserves local order and robustness under noise. For metric learning, we introduce a Distance-preserving Multi-kernel Triplet Loss (DMT) to preserve pairwise spatio-temporal distances in the native feature space and their rank order within the embedding, thereby reducing geometry distortion and improving cross-domain generalization. Experiments on urban mobility and badminton datasets show that TRIDENT outperforms strong baselines in retrieval accuracy, efficiency, and cross-domain generalization. Furthermore, the learned embeddings capture spatio-temporal sequence patterns, facilitating tactical analysis of badminton rallies via silhouette-guided spectral clustering that provides more actionable insights than direct trajectory classification.
BibTeX
@inproceedings{jhang2026trident,
  author = {Guan Yi Jhang and Jeng-Chung Lien and Yu Hui-Ching and Hsu-Chao Lai and Jiun-Long Huang},
  title = {{TRIDENT: Cross-Domain Trajectory Spatio-Temporal Representation via Distance-Preserving Triplet Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=gOk3o4lMRD},
}
Figure