T-JEPA: A Joint-Embedding Predictive Architecture for Trajectory Similarity Computation

Lihuan Li, Hao Xue, Yang Song, Flora Salim · DOI · OpenReview

TL;DR

This paper introduces T-JEPA, a novel self-supervised learning framework for trajectory similarity computation. By adapting the Joint-Embedding Predictive Architecture (JEPA) to trajectories, T-JEPA automates data augmentation in representation space and learns high-level semantic understanding, outperforming existing methods on various datasets.

What Problem Does This Paper Address?

Analyzing moving patterns from GPS data is crucial for applications like traffic management and location-based services. A key challenge is accurately measuring the similarity between trajectories, especially with the vast amounts of unlabeled data available. Existing methods often rely on manual data augmentation, which is labor-intensive and limits the diversity of learned representations. Furthermore, these methods tend to focus on low-level spatial features, potentially missing higher-level semantic patterns that are vital for robust similarity computation. This paper aims to address these limitations by proposing a self-supervised approach that automates augmentation and captures richer semantic information.

Methods

The core of T-JEPA is its adaptation of the Joint-Embedding Predictive Architecture (JEPA). Unlike traditional contrastive learning, which relies on manually crafted data augmentations, T-JEPA's JEPA framework automates this process by sampling and predicting trajectory information in representation space. This means the model learns to infer missing parts of a trajectory's representation without needing explicit transformations of the raw data.

Key components include:

  • Joint-Embedding Predictive Architecture (JEPA): T-JEPA uses a two-branch structure: a target encoder and a context encoder. The target encoder extracts full trajectory representations, from which multiple "targets" are generated through automated resampling. The context encoder processes a sampled "context" trajectory (with overlaps removed relative to the targets). A predictor then learns to reconstruct the target representations from the context representations, forcing the model to learn underlying semantic relationships.
  • Automated Resampling: Instead of manual augmentations, T-JEPA resamples representations in an abstract space, allowing for diverse learning targets without domain knowledge.
  • AdjFuse Module: To handle noisy and irregularly sampled trajectories, an AdjFuse module is introduced. This module aggregates adjacent regional features using a sliding kernel, enriching the contextual information at each point and improving the robustness of learned representations.
  • Predictive Module: This module focuses on predicting representations rather than raw data points, emphasizing the learning of higher-order semantic dependencies.

Datasets

The paper evaluates T-JEPA on a combination of real-world GPS trajectory and check-in datasets:

  • GPS Trajectory Datasets:
    • Porto (taxi trajectories)
    • T-Drive (taxi trajectories)
    • GeoLife (user trajectories)
  • Check-in Sequence Datasets:
    • Foursquare-TKY (Tokyo check-ins)
    • Foursquare-NYC (New York City check-ins)

These datasets vary in size, sampling density, and the nature of the trajectories (e.g., taxi routes vs. individual user movements), providing a comprehensive evaluation.

Key Insights and Ideas

  • Representation Space Augmentation is Key: The most significant insight is that performing data augmentation in the representation space rather than the raw data space can lead to more robust and semantically rich trajectory embeddings. This bypasses the need for manual, domain-specific augmentation strategies.
  • JEPA's Predictive Power for Trajectories: Applying JEPA's predictive mechanism to trajectories allows the model to learn complex, high-level semantic relationships that might be missed by methods focused solely on spatial proximity or pixel-level reconstruction.
  • AdjFuse for Real-World Noisiness: The AdjFuse module effectively addresses the common problem of noisy and irregularly sampled GPS data, demonstrating that enriching local context can significantly improve representation stability.
  • Generalization Beyond Manual Augmentation: T-JEPA's success without manual augmentation highlights its potential for discovering novel patterns and adapting to unseen scenarios, a limitation of previous contrastive methods.

Key Results

  • Most Similar Trajectory Search: T-JEPA consistently outperforms baselines (t2vec, TrajCL) on most datasets, achieving lower mean ranks, especially on sparser datasets like Foursquare-NYC and TKY. For instance, it outperforms t2vec and TrajCL by 8.05x and 2.51x respectively in NYC for this task.
  • Robustness to Down-sampling and Distortion: T-JEPA shows strong robustness. While TrajCL sometimes performs better on down-sampled data due to its own augmentation strategy, T-JEPA generally excels across various distortion rates, demonstrating its ability to handle noisy data.
  • Approximating Heuristic Measures: After fine-tuning a decoder, T-JEPA's learned representations achieve superior performance in approximating heuristic measures (EDR, LCSS, Hausdorff, Fréchet) compared to baselines on Porto and GeoLife datasets, indicating better generalization.
  • Qualitative Improvements: Visualizations show T-JEPA capturing more accurate and relevant similar trajectories, especially for ranks 3-5, compared to TrajCL.

Limitations and Future Work

  • Challenging Cases: The paper acknowledges that T-JEPA, like other models, can struggle with highly challenging cases, such as closed-loop trajectories with significant spatial overlaps, where distinguishing subtle semantic differences is difficult.
  • Future Directions: The authors suggest enriching trajectory modeling with external behavioral information (e.g., points of interest, road networks) and improving geospatial knowledge fusion to further enhance accuracy, particularly for complex trajectory shapes.

Summary updated

BibTeX
@inproceedings{li2024t,
  author = {Lihuan Li and Hao Xue and Yang Song and Flora Salim},
  title = {{T-JEPA: A Joint-Embedding Predictive Architecture for Trajectory Similarity Computation}},
  booktitle = {SIGSPATIAL/GIS},
  year = {2024},
  doi = {10.1145/3678717.3691271},
}
Figure