Table of Contents
Fetching ...

Unsupervised Anomaly Detection in Multi-Agent Trajectory Prediction via Transformer-Based Models

Qing Lyu, Zhe Fu, Alexandre Bayen

TL;DR

This work targets unsupervised discovery of safety-critical driving scenarios by modeling multi-agent trajectories with a Transformer and scoring anomalies via prediction residuals. A dual evaluation framework combines statistical stability (Kendall's $\tau$, Jaccard@K) and physical relevance by correlating anomaly scores with surrogate safety measures, enabling label-free, scene-level anomaly discovery. The approach identifies 388 unique anomalies not captured by Time-to-Collision or baseline methods and reveals four interpretable risk clusters, demonstrating nuanced interaction-driven risks like reactive braking under lateral drift. The method achieves strong trajectory forecasting performance and provides actionable insights for simulation and testing, supporting scalable, physically grounded safety validation. The results suggest potential for online deployment and integration with richer generative and testbed workflows to improve autonomous driving safety.

Abstract

Identifying safety-critical scenarios is essential for autonomous driving, but the rarity of such events makes supervised labeling impractical. Traditional rule-based metrics like Time-to-Collision are too simplistic to capture complex interaction risks, and existing methods lack a systematic way to verify whether statistical anomalies truly reflect physical danger. To address this gap, we propose an unsupervised anomaly detection framework based on a multi-agent Transformer that models normal driving and measures deviations through prediction residuals. A dual evaluation scheme has been proposed to assess both detection stability and physical alignment: Stability is measured using standard ranking metrics in which Kendall Rank Correlation Coefficient captures rank agreement and Jaccard index captures the consistency of the top-K selected items; Physical alignment is assessed through correlations with established Surrogate Safety Measures (SSM). Experiments on the NGSIM dataset demonstrate our framework's effectiveness: We show that the maximum residual aggregator achieves the highest physical alignment while maintaining stability. Furthermore, our framework identifies 388 unique anomalies missed by Time-to-Collision and statistical baselines, capturing subtle multi-agent risks like reactive braking under lateral drift. The detected anomalies are further clustered into four interpretable risk types, offering actionable insights for simulation and testing.

Unsupervised Anomaly Detection in Multi-Agent Trajectory Prediction via Transformer-Based Models

TL;DR

This work targets unsupervised discovery of safety-critical driving scenarios by modeling multi-agent trajectories with a Transformer and scoring anomalies via prediction residuals. A dual evaluation framework combines statistical stability (Kendall's , Jaccard@K) and physical relevance by correlating anomaly scores with surrogate safety measures, enabling label-free, scene-level anomaly discovery. The approach identifies 388 unique anomalies not captured by Time-to-Collision or baseline methods and reveals four interpretable risk clusters, demonstrating nuanced interaction-driven risks like reactive braking under lateral drift. The method achieves strong trajectory forecasting performance and provides actionable insights for simulation and testing, supporting scalable, physically grounded safety validation. The results suggest potential for online deployment and integration with richer generative and testbed workflows to improve autonomous driving safety.

Abstract

Identifying safety-critical scenarios is essential for autonomous driving, but the rarity of such events makes supervised labeling impractical. Traditional rule-based metrics like Time-to-Collision are too simplistic to capture complex interaction risks, and existing methods lack a systematic way to verify whether statistical anomalies truly reflect physical danger. To address this gap, we propose an unsupervised anomaly detection framework based on a multi-agent Transformer that models normal driving and measures deviations through prediction residuals. A dual evaluation scheme has been proposed to assess both detection stability and physical alignment: Stability is measured using standard ranking metrics in which Kendall Rank Correlation Coefficient captures rank agreement and Jaccard index captures the consistency of the top-K selected items; Physical alignment is assessed through correlations with established Surrogate Safety Measures (SSM). Experiments on the NGSIM dataset demonstrate our framework's effectiveness: We show that the maximum residual aggregator achieves the highest physical alignment while maintaining stability. Furthermore, our framework identifies 388 unique anomalies missed by Time-to-Collision and statistical baselines, capturing subtle multi-agent risks like reactive braking under lateral drift. The detected anomalies are further clustered into four interpretable risk types, offering actionable insights for simulation and testing.
Paper Structure (35 sections, 8 equations, 11 figures, 5 tables)

This paper contains 35 sections, 8 equations, 11 figures, 5 tables.

Figures (11)

  • Figure 1: Overview of unsupervised anomaly detection pipeline.
  • Figure 2: Structure of the Transformer-based trajectory predictor.
  • Figure 3: Dataset overview and scene construction: (a) the 640 m US101 study area, (b) the ego-centric scene representation with one ego vehicle and six surrounding vehicles.
  • Figure 4: Example qualitative results of the Transformer-based trajectory predictor
  • Figure 5: CCDF of scene-level anomaly scores on a log--log scale.
  • ...and 6 more figures