Abstract
Trajectory forecasting is essential for safe autonomous navigation but is often limited by the scarcity of annotated trajectory data. In contrast, High-Definition (HD) semantic maps are widely available. We introduce PreTraM (Pre-training via connecting Trajectory and Map), a self-supervised framework designed to bridge this gap. By aligning trajectories and maps in a shared embedding space, PreTraM enables models to learn environmental priors from vast amounts of un-annotated map data. Our experiments on the nuScenes dataset demonstrate that PreTraM significantly improves the accuracy and data efficiency of leading forecasting models like AgentFormer and Trajectron++.
Introduction: The Data Scarcity Problem
Deep learning models for trajectory forecasting—predicting the future paths of agents like vehicles and pedestrians—require large-scale datasets to generalize effectively. However, annotating trajectories is a labor-intensive process involving sensor fusion and manual refinement. Consequently, popular datasets like nuScenes contain relatively few samples (approx. 34,000) compared to standard benchmarks in other domains.
Conversely, these datasets are rich in HD-map information. While traditional models only utilize map patches immediately surrounding an agent, PreTraM leverages the entire map, including regions where no agents are present, to provide a robust spatial prior. This allows the model to learn from significantly more environmental data than standard training.
Methodology
PreTraM employs a dual-stream self-supervised pre-training strategy consisting of two main components: Trajectory-Map Contrastive Learning (TMCL) and Map Contrastive Learning (MCL). These modules share weights to ensure a unified representation.
Trajectory-Map Contrastive Learning (TMCL)
Inspired by vision-language models like CLIP, TMCL aligns the trajectory encoder and the map encoder. By pulling paired trajectory-map embeddings closer and pushing non-paired ones apart, the model learns the topological constraints of the environment—such as vehicles following lanes and pedestrians staying on sidewalks.
Map Contrastive Learning (MCL)
To exploit map regions without trajectories, MCL uses a SimCSE-style augmentation. A single map patch is processed twice through the encoder with different random dropout masks. The model learns to identify these as positive pairs, effectively learning from 782x more map data than standard supervised methods. This approach preserves the delicate topology of HD maps, which could be corrupted by traditional augmentations like rotation.
Experimental Setup
We evaluated PreTraM using the nuScenes dataset, which includes 1,000 driving scenes from Boston and Singapore with 11 semantic map classes. The pre-trained encoders were integrated into AgentFormer and Trajectron++ architectures and fine-tuned on the standard prediction task using the standard split of 500 training scenes.
Key Results and Insights
- Performance Gains: PreTraM reduced the Final Displacement Error (FDE) by 5.5% for AgentFormer and 6.9% for Trajectron++.
- Enhanced Safety: Predicted paths showed a 1.8% reduction in boundary violations, indicating a better understanding of road geometry.
- Data Efficiency: Models pre-trained with PreTraM using only 70% of the training data outperformed baseline models trained on 100% of the data from scratch.
- Efficiency: The pre-training phase is highly efficient, requiring only 30 minutes on a single V100 GPU.
Conclusion and Future Work
PreTraM demonstrates that self-supervised alignment of trajectories and maps is a powerful way to overcome data scarcity in motion forecasting. While this work focuses on rasterized map representations, future research could explore applying similar contrastive regimes to graph-based models (e.g., VectorNet) or incorporating multi-agent social interactions and raw sensor inputs like 3D point clouds.
Summary updated