Table of Contents
Fetching ...

Capturing Context-Aware Route Choice Semantics for Trajectory Representation Learning

Ji Cao, Yu Wang, Tongya Zheng, Jie Song, Qinghong Guo, Zujie Ren, Canghong Jin, Gang Chen, Mingli Song

TL;DR

CORE addresses a key gap in trajectory representation learning by injecting context-aware route-choice semantics into embeddings. It introduces an environment perception module that uses LLMs to distill POI-driven environmental semantics into a context-enriched road network, and a mixture-of-experts route choice encoder that models heterogeneous routing decisions; a Transformer aggregates these representations with contrastive pretraining. Across four real-world datasets and six downstream tasks, CORE consistently outperforms twelve baselines with about 9.8% average gains, and ablations confirm the necessity of both semantic perception and route-choice modeling. The work demonstrates the value of marrying LLM-derived urban semantics with MoE-based decision modeling to produce more faithful, versatile trajectory representations and points toward future cross-city generalization via a trajectory foundation model.

Abstract

Trajectory representation learning (TRL) aims to encode raw trajectory data into low-dimensional embeddings for downstream tasks such as travel time estimation, mobility prediction, and trajectory similarity analysis. From a behavioral perspective, a trajectory reflects a sequence of route choices within an urban environment. However, most existing TRL methods ignore this underlying decision-making process and instead treat trajectories as static, passive spatiotemporal sequences, thereby limiting the semantic richness of the learned representations. To bridge this gap, we propose CORE, a TRL framework that integrates context-aware route choice semantics into trajectory embeddings. CORE first incorporates a multi-granular Environment Perception Module, which leverages large language models (LLMs) to distill environmental semantics from point of interest (POI) distributions, thereby constructing a context-enriched road network. Building upon this backbone, CORE employs a Route Choice Encoder with a mixture-of-experts (MoE) architecture, which captures route choice patterns by jointly leveraging the context-enriched road network and navigational factors. Finally, a Transformer encoder aggregates the route-choice-aware representations into a global trajectory embedding. Extensive experiments on 4 real-world datasets across 6 downstream tasks demonstrate that CORE consistently outperforms 12 state-of-the-art TRL methods, achieving an average improvement of 9.79% over the best-performing baseline. Our code is available at https://github.com/caoji2001/CORE.

Capturing Context-Aware Route Choice Semantics for Trajectory Representation Learning

TL;DR

CORE addresses a key gap in trajectory representation learning by injecting context-aware route-choice semantics into embeddings. It introduces an environment perception module that uses LLMs to distill POI-driven environmental semantics into a context-enriched road network, and a mixture-of-experts route choice encoder that models heterogeneous routing decisions; a Transformer aggregates these representations with contrastive pretraining. Across four real-world datasets and six downstream tasks, CORE consistently outperforms twelve baselines with about 9.8% average gains, and ablations confirm the necessity of both semantic perception and route-choice modeling. The work demonstrates the value of marrying LLM-derived urban semantics with MoE-based decision modeling to produce more faithful, versatile trajectory representations and points toward future cross-city generalization via a trajectory foundation model.

Abstract

Trajectory representation learning (TRL) aims to encode raw trajectory data into low-dimensional embeddings for downstream tasks such as travel time estimation, mobility prediction, and trajectory similarity analysis. From a behavioral perspective, a trajectory reflects a sequence of route choices within an urban environment. However, most existing TRL methods ignore this underlying decision-making process and instead treat trajectories as static, passive spatiotemporal sequences, thereby limiting the semantic richness of the learned representations. To bridge this gap, we propose CORE, a TRL framework that integrates context-aware route choice semantics into trajectory embeddings. CORE first incorporates a multi-granular Environment Perception Module, which leverages large language models (LLMs) to distill environmental semantics from point of interest (POI) distributions, thereby constructing a context-enriched road network. Building upon this backbone, CORE employs a Route Choice Encoder with a mixture-of-experts (MoE) architecture, which captures route choice patterns by jointly leveraging the context-enriched road network and navigational factors. Finally, a Transformer encoder aggregates the route-choice-aware representations into a global trajectory embedding. Extensive experiments on 4 real-world datasets across 6 downstream tasks demonstrate that CORE consistently outperforms 12 state-of-the-art TRL methods, achieving an average improvement of 9.79% over the best-performing baseline. Our code is available at https://github.com/caoji2001/CORE.
Paper Structure (53 sections, 15 equations, 27 figures, 11 tables)

This paper contains 53 sections, 15 equations, 27 figures, 11 tables.

Figures (27)

  • Figure 1: Even with the same OD pair, different drivers may choose substantially different routes, reflecting complex route choice behaviors.
  • Figure 2: Overview of CORE. The Environment Perception Module first constructs a context-aware road network based on the environmental semantics implied by POI distributions. Building on this backbone, the Route Choice Encoder models route choices by jointly leveraging the context-enriched road network and navigational factors. A Transformer encoder finally aggregates the resulting route-choice-aware representations into global trajectory embeddings.
  • Figure 3: Visit count distributions over road segments in Beijing and Chengdu. Segments to the left of the red dashed line are the top 20% most visited.
  • Figure 4: Spatial distributions of the four trajectory datasets.
  • Figure 5: Performance comparison of CORE and its ablated variants on the Beijing dataset (refer to Appendix \ref{['subsec:appendix_ablation']} for other datasets).
  • ...and 22 more figures

Theorems & Definitions (4)

  • Definition 1: GPS Trajectory
  • Definition 2: Road Network
  • Definition 3: Road Network Constrained Trajectory
  • Definition 4: Point of Interest