Abstract
Predicting a user's next destination is a complex task due to the interplay between ingrained habits and spontaneous decisions. This paper proposes a dual-stream spatiotemporal attention model that disentangles long-term routines from short-term intentions. By enriching raw GPS data with activity duration semantics and utilizing external context (e.g., weather, traffic) via a dynamic fusion gating network, the model achieves state-of-the-art performance on real-world mobility datasets.
Introduction
For ride-hailing platforms and location-based services, accurately predicting a passenger's next pickup location is critical for optimizing fleet dispatching and dynamic pricing. However, individual travel behavior is multifaceted. Existing deep learning models often treat user trajectories as simple sequences of raw GPS coordinates, leading to two major flaws: a lack of semantic understanding (e.g., distinguishing a quick stop from a long stay) and an inability to disentangle habitual preferences from contextual, short-term intentions.
Methodology
The proposed Semantic-Embedding-Based Dual-Stream Spatio-Temporal Attention Model addresses these challenges through a multi-stage process.
Semantic Trajectory Preprocessing
Instead of raw GPS points, the model uses DBSCAN clustering to group coordinates into discrete functional regions. A key innovation is the calculation of activity duration—the time spent at a location. This transforms raw coordinates into semantic "events," allowing the model to distinguish between different types of stays.
Dual-Stream Architecture and Fusion
The model architecture consists of three main components:
- Short-term context stream: Captures immediate intentions using recent history (e.g., last 48 hours), high-precision timestamps, and activity duration.
- Long-term pattern stream: Captures stable, cyclical habits using macroscopic periodic embeddings (day of week, time of day).
- Context-Aware Dynamic Fusion: A gating network integrates external factors—such as POI type, real-time traffic, and weather—to dynamically weight the contribution of each stream for a specific prediction.
Finally, an attention-based matching mechanism scores candidate locations to output a probability distribution for the next destination.
Experimental Evaluation
The model was evaluated on two real-world mobility datasets: Foursquare-NYC and Foursquare-TKY. These datasets contain 11 months of user check-in records, preprocessed to filter inactive users and low-frequency POIs.
Key Results
The proposed model consistently outperformed 12 baselines, including statistical models and advanced graph-based frameworks.
- NYC Dataset: Achieved a Recall@10 of 0.6600 and an NDCG@5 of 0.3943.
- TKY Dataset: Achieved a Recall@10 of 0.6200 and an NDCG@5 of 0.2972.
Ablation studies highlighted the importance of the "activity duration" feature. Adding this feature to a baseline self-attention model (STAN) improved Recall@10 on the TKY dataset from 0.3317 to 0.4900.
Discussion
- The Value of Duration: Activity duration provides a quantitative metric to distinguish between brief transfers and primary destinations, significantly boosting predictive accuracy.
- Contextual Balancing: The fusion gate mimics human psychology by adjusting the reliance on routine versus spontaneity based on environmental factors like weather and traffic.
- Optimal History: Performance peaks with approximately 100 historical events; longer sequences introduce noise and lead to overfitting.
Conclusion and Future Work
While effective, the model currently uses fixed time windows (e.g., 48 hours) to separate short-term and long-term streams. Future work will focus on adaptive, learnable gating strategies to generate personalized "soft partition masks" that better reflect individual behavioral rhythms.
Summary updated