Social-SSL: Self-supervised Cross-Sequence Representation Learning Based on Transformers for Multi-agent Trajectory Prediction

Li-Wu Tsao, Yan-Kai Wang, Hao-Siang Lin, Hong-Han Shuai, Lai-Kuan Wong, Wen-Huang Cheng

Abstract

Predicting multi-agent trajectories in crowded environments requires understanding complex social interactions. While Transformer-based models have shown promise, they typically require vast amounts of labeled data. Social-SSL introduces a self-supervised pre-training framework that leverages cross-sequence representation learning. By training on three pretext tasks—interaction type, closeness, and masked path reconstruction—the model learns robust social and motion priors. Experimental results on ETH/UCY and the Stanford Drone Dataset (SDD) show that Social-SSL outperforms state-of-the-art methods by up to 20% and maintains high performance even with minimal labeled data.

Introduction

Human and vehicle movement in shared spaces is a social negotiation. An agent's path is influenced not just by their own momentum, but by the positions and velocities of others. Traditional models using Recurrent Neural Networks (RNNs) often struggle with the long-term dependencies inherent in these interactions. While Transformers have improved the state-of-the-art through superior attention mechanisms, they are notoriously data-hungry and are usually trained from scratch for trajectory forecasting.

Social-SSL addresses this by bringing the "pre-train then fine-tune" paradigm—successful in Natural Language Processing (NLP)—to trajectory prediction. This approach allows the model to learn generalizable social priors from unlabeled data before being fine-tuned for specific coordinate prediction.

Proposed Method

The core of Social-SSL is a Transformer-based architecture that utilizes cross-sequence representation. Instead of processing all agents simultaneously, the model focuses on pairs: a "target agent" ($a_g$) and a "social agent" ($a_s$). This pair-wise focus allows for more granular interaction modeling.

Self-Supervised Pretext Tasks

The model is pre-trained on three innovative tasks designed to capture the "physics" of social movement:

  1. Interaction Type Prediction: The model classifies the relationship between two agents as Closing, Leaving, or Neutral based on how their distance changes over time.
  2. Closeness Prediction: This task forces the model to understand spatial proximity through both sparse (binary nearby/far) and dense (exact distance) prediction heads.
  3. Masked Cross-Sequence to Sequence: Inspired by Masked Language Modeling, the model masks a portion of the target agent’s trajectory. It must then reconstruct the missing path using the remaining segments and the full trajectory of the social neighbor.
The Social-SSL architecture showing the three pretext tasks (Interaction Type, Closeness, and Masked Reconstruction) used for pre-training the Social Encoder.

After pre-training, the Social Encoder is frozen, and a Trajectory Decoder is fine-tuned to predict future coordinates.

Key Results and Insights

Social-SSL was evaluated on the ETH/UCY and Stanford Drone Dataset (SDD) benchmarks. It achieved a significant performance boost, outperforming existing methods like Star, AgentFormer, and Social-GAN by at least 12% on ETH/UCY and 20% on SDD in terms of Average Displacement Error (ADE).

Data Efficiency and Generalization

A standout feature of Social-SSL is its data efficiency. When fine-tuned on just 1% of the available data, the model remains competitive. With 10% of the data, it outperforms several state-of-the-art models trained on 100% of the data. Furthermore, the model showed superior generalizability on the HOTEL dataset, improving performance by 33-38% on complex 90-degree turns not seen during training.

Qualitative comparison of Social-SSL predictions against ground truth and other baseline methods, demonstrating its ability to accurately forecast complex paths.

Social Priors

By pre-training on interaction types and closeness, the model effectively learns "social etiquette," such as maintaining personal space. The masked reconstruction task specifically teaches the model the "neighbor hint"—the idea that a neighbor's movement is a strong indicator of the target's likely path.

Conclusion

Social-SSL demonstrates that self-supervised pre-training is a powerful tool for trajectory prediction. By learning deep social and motion priors through cross-sequence tasks, the model achieves superior accuracy and remarkable data efficiency. Future work will focus on incorporating multi-modality to account for the multiple possible paths an agent might take and integrating environmental context to further refine predictions.

Summary updated

BibTeX
@inproceedings{tsao2022social,
  author = {Li-Wu Tsao and Yan-Kai Wang and Hao-Siang Lin and Hong-Han Shuai and Lai-Kuan Wong and Wen-Huang Cheng},
  title = {{Social-SSL: Self-supervised Cross-Sequence Representation Learning Based on Transformers for Multi-agent Trajectory Prediction}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20047-2\_14},
}
Figure