Blurred Encoding for Trajectory Representation Learning

Silin Zhou, Yao Chen, Shuo Shang, Lisi Chen, Bingsheng He, Ryosuke Shibasaki

Introduction

Analyzing GPS trajectories is fundamental for modern smart city applications, ranging from traffic management to travel time estimation. However, raw GPS data is inherently noisy and irregular. To process this information, current state-of-the-art (SOTA) methods typically transform trajectories into rigid structures like grids or road segments. While these abstractions simplify the data, they often sacrifice precision and fail to generalize across different urban environments.

The Challenge of Trajectory Representation

Existing grid-based and road-based approaches suffer from three primary limitations:

  1. Limited Resolution: Grouping GPS points into fixed grid cells (e.g., 100m) or road segments loses the fine-grained timing and speed variations within those areas.
  2. Poor Generalization: Models trained on specific grid IDs or road segments are tied to a particular city's map, making transfer learning to new locations nearly impossible.
  3. Brittleness: Performance is highly sensitive to chosen grid sizes or the accuracy of map-matching algorithms.
Comparison of trajectory representation methods: (a) GPS, (b) Grid, (c) Road, and (d) the proposed Patch trajectory.

The BLUE Framework

The authors propose BLUE (BLUrred Encoding), a novel framework that replaces rigid discretization with a hierarchical "patch" approach. Instead of arbitrary grids, BLUE creates patches by progressively reducing the precision of GPS coordinates (dropping decimal places). This "blurred" encoding naturally groups points that share a common prefix, allowing the model to capture both local maneuvers and high-level regional travel patterns.

Pyramid Encoder-Decoder Architecture

BLUE utilizes a pyramid architecture to process these hierarchical patches:

  • Encoder: Employs Transformers at multiple levels (Level 1 at ~1m resolution, Level 2 at ~100m, and Level 3 at ~1km). An attention-based pooling mechanism compresses low-level spatial-temporal data into higher-level semantic patches.
  • Decoder: Reconstructs the original high-resolution trajectory from the compressed representation using cross-attention, allowing for length-insensitive restoration.
  • Self-Supervised Learning: The model is trained to reconstruct both spatial coordinates and timestamps using Mean Squared Error (MSE) loss, which is more computationally efficient than traditional classification-based losses.
The BLUE pyramid encoder-decoder architecture for hierarchical patch representation learning.

Experimental Evaluation

The model was evaluated on massive real-world taxi datasets from Porto and Chengdu, with transferability tested on a Roma dataset. BLUE outperformed SOTA baselines (such as TrajCL and START) by an average of 30.90% across various tasks.

Key Results

  • Travel Time Estimation: BLUE achieved a significant reduction in Mean Absolute Error (MAE), improving performance by up to 88.31% on the Porto dataset.
  • Similarity Search: In identifying similar trajectories within a database, BLUE improved the Mean Rank (MR) by 37.99%.
  • Cross-City Generalization: Because BLUE relies on normalized coordinate prefixes rather than city-specific IDs, it demonstrated superior performance in transfer tests (e.g., training on Porto and testing on Chengdu) compared to road-based models that fail when the map changes.

Conclusion and Future Work

BLUE introduces a universal vocabulary for trajectory data that maintains semantic consistency without requiring external road maps. While highly effective, the authors note that performance can vary with extreme sampling irregularities. Future research may involve incorporating external context—such as weather, road types, or Points of Interest (POIs)—to further enrich the learned embeddings. By "zooming out" through blurred encoding, BLUE provides a robust and generalizable foundation for urban trajectory analysis.

Summary updated

BibTeX
@inproceedings{zhou2025blurred,
  author = {Silin Zhou and Yao Chen and Shuo Shang and Lisi Chen and Bingsheng He and Ryosuke Shibasaki},
  title = {{Blurred Encoding for Trajectory Representation Learning}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
}
Figure