Abstract
Effective smart-city applications require sophisticated models capable of understanding "Temporal Path Representations" (TPRs)—embeddings that capture both the static geometry of a route and its time-dependent traffic dynamics. This paper introduces WSCCL, a framework that leverages inexpensive "weak labels" (e.g., peak vs. off-peak hours) and a curriculum-based contrastive learning strategy to generate versatile TPRs. Experimental results across three real-world datasets demonstrate that WSCCL outperforms state-of-the-art supervised and unsupervised methods in tasks such as travel-time estimation and path recommendation, while significantly improving data efficiency.
1. Introduction
In the context of urban mobility, a path is more than a sequence of coordinates; it is a dynamic entity. A highway segment at 8:00 AM during rush hour presents a fundamentally different environment for navigation and logistics than the same segment at 10:00 PM. To build effective AI tools for these environments, models need fixed-length vectors that encode both spatial geometry and temporal context.
2. The Challenge of Temporal Paths
Existing representation learning methods generally fall into two categories, both of which have significant drawbacks:
- Supervised Methods: These are often task-specific and require massive amounts of "strong labels" (e.g., exact travel times). They lack generalizability; a model optimized for travel-time estimation rarely performs well for path ranking.
- Unsupervised Methods: These are more generic but typically ignore temporal dynamics, treating road segments identically regardless of the time of day.
WSCCL aims to bridge this gap by learning generic, time-aware representations without the need for expensive, task-specific labeled data.
3. The WSCCL Framework
The proposed Weakly-supervised Contrastive Curriculum Learning (WSCCL) framework is built upon three main pillars designed to create robust, multi-scale embeddings.
3.1 Temporal Path Encoder
The model utilizes a dual-embedding approach to capture spatial features (road type, lane count, and network topology via node2vec) and temporal features (time slots and day of the week). These inputs are processed through a Long Short-Term Memory (LSTM) network to capture the sequential dependencies of the path, resulting in a unified TPR vector.
3.2 Weakly-Supervised Contrastive (WSC) Learning
Instead of precise travel durations, WSCCL utilizes easily obtainable weak labels like "Morning Peak" or "Off-Peak." The contrastive learning objective trains the model to pull representations of the same path at the same time-of-day closer together (positive samples) while pushing away representations of different paths or the same path at different times (negative samples). This process incorporates both local (edge-level) and global (path-level) losses to ensure robustness.
3.3 Curriculum Learning
To handle the complexity of urban trajectories, the authors implement a "simple-to-hard" training strategy. An ensemble of "Expert" models scores the difficulty of training samples based on representation consistency. The framework then partitions data into stages, allowing the model to master consistent, simple paths before tackling high-variance, complex routes.
4. Experimental Setup and Datasets
The framework was evaluated on three large-scale real-world trajectory datasets with road networks sourced from OpenStreetMap:
- Aalborg, Denmark: 28,370 paths from a two-year GPS study.
- Harbin, China: 58,977 taxi-based paths.
- Chengdu, China: 57,404 paths from Didi Chuxing.
5. Key Insights and Results
5.1 The Sufficiency of Weak Labels
A primary finding is that precise travel durations are not necessary for learning high-quality embeddings. Categorical context (e.g., "this is a peak-hour trip") provides sufficient signal for the contrastive loss to organize the embedding space effectively.
5.2 Performance Metrics
WSCCL was tested against 12 baselines across several downstream tasks:
- Travel Time Estimation: On the Aalborg dataset, WSCCL achieved a Mean Absolute Error (MAE) of 31.66, significantly lower than the best supervised baseline, PathRank (37.09).
- Path Ranking: The model demonstrated superior alignment with ground-truth rankings, achieving higher Kendall’s $\tau$ and Spearman’s $\rho$ scores than all competitors.
- Data Efficiency: When used for pre-training, WSCCL allowed supervised models to reach peak performance using 30% less labeled data compared to training from scratch.
6. Conclusion and Future Work
WSCCL demonstrates that weakly-supervised contrastive learning, paired with a curriculum strategy, can produce highly effective and generalizable temporal path representations. Future research may explore incorporating more diverse weak labels, such as driver behavior or vehicle type, and improving the model's ability to adapt to real-time "black swan" events like accidents or sudden closures.
Summary updated