Dynamic Aware: Adaptive Multi-Mode Out-of-Distribution Detection for Trajectory Prediction in Autonomous Vehicles

Tongfei Guo, Lili SuarXiv 2025 · DOI

Abstract

Trajectory prediction is a cornerstone of safe autonomous driving, yet standard models often struggle with out-of-distribution (OOD) scenarios. Traditional OOD detection methods frequently rely on single-frame snapshots or assume a global error distribution, leading to high false alarm rates or delayed detection in dynamic environments. We present Mode-Aware CUSUM, a framework that explicitly models prediction errors as a Gaussian Mixture Model with latent "low-risk" and "high-risk" modes. By employing an adaptive thresholding policy based on real-time mode estimation, our approach achieves significantly faster detection of hazardous shifts while reducing false alarms by over 30% across diverse urban and highway datasets.

Introduction

Safe navigation for autonomous vehicles (AVs) depends on accurately predicting the future trajectories of surrounding agents. However, when an AV encounters traffic patterns or behaviors outside its training distribution—known as out-of-distribution (OOD) scenarios—prediction reliability plummets.

A critical challenge in OOD detection is that trajectory errors are often deceptive; a minor error in one frame can compound into a catastrophic collision over time. Existing "quickest change detection" (QCD) methods, such as the standard CUSUM algorithm, typically assume a static, global distribution for errors. In practice, prediction errors naturally fluctuate based on environmental complexity (e.g., a quiet highway vs. a crowded intersection), even when the model is performing correctly. Failing to account for these inherent "modes" results in a system that is either too sensitive, causing frequent false alarms, or too sluggish to react to genuine threats.

Methodology: Mode-Aware CUSUM

To address these limitations, we propose the Mode-Aware CUSUM framework. This system transitions from static error modeling to a dynamic, adaptive approach that tracks the vehicle's operational context through its prediction error patterns.

Overview of the Mode-Aware CUSUM framework, illustrating the pipeline from real-world data and model deployment to adaptive OOD detection.

The framework introduces several key innovations:

  1. Multi-Mode Error Modeling: In-distribution (ID) errors are modeled as a Gaussian Mixture Model (GMM) with two latent states: a low-risk mode and a high-risk mode.
  2. Mode Estimation: A Maximum A Posteriori (MAP) estimator is used to determine the current error mode based on a sliding window of recent observations.
  3. Adaptive Thresholding: The system implements an "adaptive step-down policy." It dynamically adjusts detection thresholds based on the estimated mode and recent error variance. This allows the system to remain robust in noisy, high-complexity settings while becoming highly sensitive when the driving context simplifies.
  4. Uncertainty Penalty: An adaptive term ($k_{\hat{M}_t}$) penalizes the CUSUM statistic when error variance is high, preventing premature OOD declarations due to transient noise.

Experimental Evaluation

We evaluated the framework using two state-of-the-art trajectory prediction models, GRIP++ and FQA, across three distinct real-world datasets: ApolloScape (urban interactions in Beijing), NGSIM (highway driving), and nuScenes (multimodal urban scenes in Boston and Singapore).

Key Insights: The Multi-Modal Nature of Errors

Our analysis confirms that prediction errors are not uniform; they cluster into distinct modes that evolve over time. For instance, in dense urban environments like ApolloScape, the model frequently switches between modes due to close-proximity interactions. In contrast, highway models tend to remain in a low-risk mode for extended periods.

Observed Gaussian mixture distributions of prediction errors across different models and datasets, highlighting the distinct low-risk and high-risk modes.

Interestingly, we found that standard scene statistics—such as the number of agents or average speed—do not reliably correlate with these error mode transitions. This underscores the necessity of monitoring the statistical behavior of the prediction errors themselves rather than relying solely on visual scene features.

Results

The Mode-Aware CUSUM consistently outperformed traditional baselines, including Likelihood GMM and Global CUSUM, across all tested scenarios:

  • Detection Performance: Achieved up to a 7.2% gain in AUROC and a remarkable 150% improvement in AUPR (Area Under Precision-Recall).
  • Responsiveness: In synthetic tests, the method reduced detection delay by 34.4% to 37.9% compared to non-adaptive approaches.
  • Reliability: False alarm rates (FAR) were reduced by approximately 31% to 35%, demonstrating the robustness gained by being "mode-aware."

Conclusion and Future Work

By explicitly modeling the multi-modal nature of prediction errors, Mode-Aware CUSUM provides a more nuanced and reliable mechanism for OOD detection in autonomous driving. While the current work assumes some knowledge of the post-change (OOD) distribution, future research will focus on online learning of error modes. This would enable AVs to adapt to novel environments and weather conditions on the fly without requiring pre-defined distributions for every possible scenario.

Summary updated

Abstract

Trustworthy trajectory prediction grounds autonomous vehicle (AV) safety, yet deployed models inevitably face out-of-distribution (OOD) scenes. Prior AV OOD detection targets perception, but planners act on predicted futures rather than raw scenes, so erroneous forecasts can slip past frame-level checks and corrupt control. We therefore tackle OOD detection at the trajectory-prediction level. Our analysis of real-world benchmarks reveals that prediction errors are often multi-modal, exhibiting distinct low- and high-error modes that evolve with open-world driving context. Observing this, we propose Mode-Aware CUSUM, which explicitly models multiple error modes while retaining the efficiency and general compatibility of classical CUSUM. By dynamically identifying the active error mode and adapting detection thresholds, our method enables robust monitoring across heterogeneous conditions. Experiments on large-scale trajectory benchmarks demonstrate consistent reductions in detection delay and false alarms.
BibTeX
@misc{guo2025dynamic,
  author = {Tongfei Guo and Lili Su},
  title = {{Dynamic Aware: Adaptive Multi-Mode Out-of-Distribution Detection for Trajectory Prediction in Autonomous Vehicles}},
  year = {2025},
  eprint = {2509.13577},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.13577},
}
Figure