NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Social NCE: Contrastive Learning of Socially-aware Motion Representations

Yuejiang Liu, Qi Yan, Alexandre Alahi

Introduction: The Challenge of Covariate Shift

Most current models for human motion forecasting and robot navigation are trained exclusively on "positive" data—recordings of humans successfully navigating crowds without incident. While this approach seems intuitive, it introduces a fundamental problem known as covariate shift.

Because training data only contains safe behaviors, models never learn the characteristics of a "bad" state. In real-world "closed-loop" scenarios, a minor prediction error can lead an agent into an unfamiliar state dangerously close to another person. Lacking the "common sense" to recognize a collision, the model often fails to recover, leading to safety violations like walking through a pedestrian. Essentially, these models learn to mimic success without understanding the boundaries of failure.

Social NCE identifies 'negative' events like collisions and discomfort to regularize motion representations.

Methods: Social Noise Contrastive Estimation

The authors introduce Social NCE (Noise Contrastive Estimation), a framework that regularizes motion representations by "learning from the opposites." Instead of merely minimizing prediction error (e.g., Mean Squared Error), Social NCE adds an auxiliary loss that encourages the model's internal representation of a scene to be similar to the ground-truth future and dissimilar to a set of synthetic "negative" events.

Social Sampling Strategy

The core innovation of this work is the Social Sampling Strategy. Standard contrastive learning often utilizes random noise as negative samples. However, random points in space rarely teach a model about social norms. Social NCE instead samples negatives from the neighborhood of other agents in the future. By adapting the InfoNCE loss, the model must identify the true future position of the primary agent among a sea of synthetic negative points placed where other pedestrians are expected to be. This forces the encoder to extract features that are specifically sensitive to potential collisions and social discomfort.

Comparison of (a) conventional random negative sampling versus (b) the proposed social negative sampling.

Model Agnostic Framework

Because Social NCE is a loss function applied to the representation layer, it is model-agnostic. It can be integrated into various existing architectures, including LSTMs, Graph Neural Networks (STGCNN), or Transformers (Trajectron++), acting as a learned safety layer that "twists" trajectories locally to ensure they remain collision-free.

Experimental Evaluation

The researchers evaluated Social NCE across three distinct tasks using standard benchmarks:

  • ETH & UCY: The gold standard datasets for pedestrian trajectory forecasting.
  • Trajnet++: A large-scale benchmark designed for complex social scenarios like avoidance and group walking.
  • Crowd Navigation Simulator: An open-source environment for testing Reinforcement Learning (RL) and Imitation Learning (IL) in robot navigation.

Key Results and Insights

  • Significant Collision Reduction: On ETH/UCY benchmarks, Social NCE reduced collision rates by 37.0% for Social-STGCNN and 45.7% for Trajectron++, while maintaining or improving prediction accuracy (FDE). In robot navigation tasks, collision rates dropped by approximately 69% compared to vanilla baselines.
  • Data and Sample Efficiency: Social NCE significantly improves data efficiency. A model trained with Social NCE on 2,000 examples can outperform a vanilla model trained on 5,000 examples. In RL tasks using the Rainbow DQN algorithm, Social NCE reached safe, high-reward policies in roughly half the training episodes required by the baseline.
  • Robustness in Low-Data Regimes: In scenarios with only 10% of training data, Social NCE maintained high performance (reward of 69.0) while vanilla models collapsed (reward of 14.4).
  • Informative Negatives: The study confirms that random negatives provide almost no benefit for social navigation; negatives must represent actual social violations to be effective.

Conclusion and Future Work

Social NCE provides a robust method for making motion models safer by explicitly teaching them what to avoid. While highly effective, the performance is sensitive to the "sampling horizon" (the look-ahead time), and currently relies on predefined "social comfort" radii. Future research may extend this framework to more complex constraints, such as traffic rules or environmental obstacles like walls and furniture, by sampling negatives from those restricted regions.

Summary updated

BibTeX
@misc{liu2020social,
  author = {Yuejiang Liu and Qi Yan and Alexandre Alahi},
  title = {{Social NCE: Contrastive Learning of Socially-aware Motion Representations}},
  year = {2020},
  eprint = {2012.11717},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.11717},
}
Figure