TL;DR
SMARTraj² is a novel machine learning framework designed to learn spatio-temporal trajectory representations that generalize across multiple cities. By disentangling universal mobility patterns from city-specific quirks and using a dynamic gating mechanism, it overcomes the "seesaw phenomenon" where optimizing for one city or task degrades performance in another. This approach yields state-of-the-art results in downstream urban applications like travel time estimation and destination prediction.
What Problem Does This Paper Address?
Understanding how people and vehicles move through urban environments—spatio-temporal trajectory representation learning—is critical for traffic management, urban planning, and ride-hailing systems. The most powerful models today use a "multi-view" approach, combining raw GPS coordinates, road network structures, and semantic grid data (like Points of Interest).
However, these multi-view models usually only work well in the specific city they were trained on. When applied to new cities, they stumble due to two major roadblocks:
- Multi-city structural heterogeneity: Every city has a unique layout. A road ID or grid index in New York means nothing in Tokyo. This misalignment makes it incredibly hard to share learned embeddings across different urban landscapes.
- The amplified "seesaw" phenomenon: In multi-task, multi-view learning, improving the model's performance on one specific view, task, or city often inadvertently degrades its performance on others. Balancing these competing objectives is notoriously difficult.
Methods
To build a model that can seamlessly adapt to new cities without forgetting what it learned, the authors propose SMARTraj². It relies on two core architectural innovations to stabilize learning across domains:
- Feature Disentanglement Module: Instead of learning a single, tangled representation of a trajectory, the model explicitly separates the features into two buckets: domain-invariant features (universal mobility patterns shared across all cities) and domain-specific features (characteristics unique to a specific city's layout). It enforces this separation using a mathematical orthogonality constraint (difference loss), ensuring the universal and specific features don't overlap.
- Personalized Gating Mechanism: To solve the seesaw phenomenon, the model uses a dynamic gate to decide how much weight to give the universal versus city-specific features. This gating happens at two levels: the city-level (using macro stats like average city speed) and the trajectory-level (using specific trip data like the start/end point semantics).
The model is trained using a self-supervised approach, combining Masked Language Modeling (hiding parts of a trajectory and forcing the model to guess them) and Contrastive Learning (teaching the model that different views of the same trajectory should have similar embeddings).
Datasets
The authors evaluated their model using real-world trajectory datasets from two major Chinese cities:
- Chengdu and Xi'an Trajectory Data: Provided by DiDi Chuxing, containing GPS trajectories collected over 15 consecutive days.
- OpenStreetMap: Used to extract the underlying road network structures.
- Points of Interest (POI) Data: 13 categories of POIs (e.g., Dining, Education, Healthcare) used to enrich the semantic meaning of the spatial grids.
Key Insights and Ideas
- Multi-city training beats single-city training: Counterintuitively, training the model simultaneously on data from multiple cities actually improved its performance on individual city tasks compared to training it exclusively on that single city. This proves the model successfully learns transferable, underlying rules of urban mobility.
- Disentanglement is highly effective: Forcing the network to explicitly separate "what is true everywhere" from "what is true only here" is a powerful way to achieve cross-domain generalization in spatial data.
- Gating stabilizes multi-task learning: The personalized gating mechanism successfully acts as a shock absorber for the seesaw phenomenon. By dynamically adjusting feature weights per trajectory, it prevents the model from over-optimizing for one specific task or view at the expense of others.
Key Results
SMARTraj² was tested on four downstream tasks: Road Label Classification, Travel Time Estimation, Destination Road Prediction, and Destination Grid Prediction. It consistently outperformed 10 baseline methods, including state-of-the-art models like MVTraj and JGRM.
- Massive gains in Travel Time Estimation: In Chengdu, SMARTraj² reduced the Mean Absolute Error (MAE) by 29.30% and the Root Mean Square Error (RMSE) by 23.75% compared to the next best baseline.
- Highly accurate routing: For Destination Road Prediction in Xi'an, the model achieved a top-1 accuracy of 74.09%, outperforming SOTA baselines.
- Data Efficiency: Ablation studies showed that the self-supervised pre-training phase significantly accelerates convergence and reduces the model's reliance on large amounts of labeled data during fine-tuning.
Limitations and Future Work
Limitations: The model's success heavily depends on having access to rich, multi-view data (GPS, route, and grid semantics). If a city has missing modalities or inconsistent data quality, the model's performance could take a hit.
Future Work: The authors plan to develop robust data fusion mechanisms that can gracefully handle missing data views. They also intend to scale their experiments to larger networks (e.g., 10+ cities simultaneously) to truly test scalability, and explore model compression techniques to make training and inference more computationally efficient for real-world deployment.
Summary updated