TL;DR
Reconstructing dense, map-matched vehicle trajectories from sparse GPS data is notoriously difficult due to data scarcity and varying sampling rates. PLMTrajRec solves this by adapting pre-trained language models (PLMs) to spatiotemporal data using parameter-efficient fine-tuning, explicit natural language prompts, and a novel road-condition passing mechanism. It achieves state-of-the-art recovery accuracy even with highly limited training data.
What Problem Does This Paper Address?
GPS tracking data is crucial for urban planning and traffic management, but it is frequently sparse due to network instability, device malfunctions, or battery-saving settings. Map-matched trajectory recovery aims to fill in these missing points directly onto a road network.
However, existing deep learning models face three major hurdles:
- Data Scarcity: They require massive amounts of dense trajectory data to train from scratch, which is rarely available in real-world scenarios.
- Varying Sampling Intervals: Models struggle to generalize across different or unseen sampling intervals (e.g., a model trained on 1-minute intervals often fails when deployed on 4-minute intervals).
- Unknown Environmental Context: Incorporating dynamic road conditions (like traffic congestion) is incredibly hard for missing points because their exact locations are unknown, yet traffic heavily dictates route choices.
Methods
The authors introduce PLMTrajRec, a framework that repurposes a pre-trained BERT model for trajectory recovery. Instead of treating trajectories purely as coordinate sequences, the model translates the problem into a sequence-completion task that a language model can understand.
The pipeline consists of three main stages:
- Dual Trajectory Prompts: To provide context, the model uses an Interval and Feature-guided (IF-guided) explicit prompt (natural language text describing the sampling rate, trip duration, and distance) and an Area Flow-guided (AF-guided) implicit prompt (capturing regional traffic patterns via 2D/1D CNNs).
- Interval-aware Trajectory Embedder: This module standardizes varying sparse intervals into a unified target interval by inserting a placeholder
[m]for missing points. Observed points are encoded using Learnable Fourier Features (LFF) and road network embeddings. For missing points, a Road Condition Passing Mechanism estimates traffic conditions by interpolating from the nearest forward and backward observed points using a time-decay factor. - PLM-based Trajectory Encoder: A pre-trained BERT model is frozen except for its attention layers, which are fine-tuned using Low-Rank Adaptation (LoRA). This allows the model to leverage its inherent sequence-modeling capabilities to capture bidirectional spatiotemporal relationships and predict the correct road segment and moving ratio for every point.
Datasets
The model was evaluated on two large-scale, real-world taxi trajectory datasets:
- Chengdu Dataset: Trajectory data from Chengdu, China (November 2016), containing 118,354 trajectories over a road network of 2,504 segments.
- Porto Dataset: Trajectory data from 442 taxis in Porto, Portugal (July 2013 – June 2014), containing 322,079 trajectories over 2,224 road segments.
Both datasets were standardized to a dense 15-second ground truth interval and downsampled to 1-minute, 2-minute, and 4-minute intervals to simulate sparse data.
Key Insights and Ideas
- LLMs as Spatiotemporal Engines: Instead of training complex spatial-temporal networks from scratch, freezing a pre-trained language model and fine-tuning it with LoRA provides an incredibly strong inductive bias for sequence reconstruction.
- Prompting with Numbers and Text: Converting abstract sampling rates into natural language prompts (e.g., "The sparse trajectory is sampled every four minutes...") allows the PLM to dynamically adjust its internal attention mechanisms to handle different temporal gaps.
- Message Passing for Traffic: Since the exact location of a missing point is unknown, traffic conditions can be effectively "passed" down from known endpoints. The time-decayed interpolation perfectly mirrors how traffic congestion propagates over short intervals.
Key Results
- State-of-the-Art Performance: PLMTrajRec consistently outperformed 12 baseline models (including specialized trajectory models like RNTrajRec and MM-STGED) across all sampling intervals.
- Massive Error Reduction: On the challenging 4-minute interval task, PLMTrajRec reduced the coordinate recovery error (RMSE) by an average of 351.8 meters in Chengdu and 119.2 meters in Porto compared to the best baselines.
- High Data Efficiency (Scalability): When trained on just 20% of the dense trajectory data, PLMTrajRec still outperformed almost all baselines trained on 100% of the data, demonstrating its exceptional data efficiency.
- Zero-Shot Generalization: When trained only on 1-minute and 4-minute intervals and tested on an unseen 2-minute interval, PLMTrajRec maintained high accuracy with minimal performance drop, whereas baseline models collapsed.
Limitations and Future Work
- Model Size and Footprint: Because it relies on a pre-trained language model framework, PLMTrajRec has a larger model size (around 175 MB) compared to smaller end-to-end deep learning baselines, though its parallel inference strategy makes it faster during execution.
- Grid-Based Traffic Simplification: The road condition prompt relies on a fixed spatial grid (64x64) to calculate traffic flows, which might lose fine-grained road-level traffic dynamics.
- Future Directions: The authors suggest exploring even larger foundation models or extending the framework to handle multimodal trajectory data (e.g., combining GPS with cellular signaling data).
Summary updated