Abstract
Accurate trajectory prediction is essential for the safe operation of autonomous vehicles in real-world environments. Even well-trained machine learning models may produce unreliable predictions due to discrepancies between training data and real-world conditions encountered during inference. In particular, the training dataset tends to overrepresent common scenes (e.g., straight lanes) while underrepresenting less frequent ones (e.g., traffic circles). In addition, it often overlooks unpredictable real-world events such as sudden braking or falling objects. To ensure safety, it is critical to detect in real-time when a model's predictions become unreliable. Leveraging the intuition that in-distribution (ID) scenes exhibit error patterns similar to training data, while out-of-distribution (OOD) scenes do not, we introduce a principled, real-time approach for OOD detection by framing it as a change-point detection problem. We address the challenging settings where the OOD scenes are deceptive, meaning that they are not easily detectable by human intuitions. Our lightweight solutions can handle the occurrence of OOD at any time during trajectory prediction inference. Experimental results on multiple real-world datasets using a benchmark trajectory prediction model demonstrate the effectiveness of our methods.
The Challenge of Out-of-Distribution Scenarios
Trajectory prediction serves as the "crystal ball" for autonomous vehicles (AVs), enabling them to anticipate the future movements of surrounding agents. However, the reliability of deep learning models is fundamentally limited by their training data. Most existing datasets overrepresent simple, common scenarios—such as driving in straight highway lanes—while significantly underrepresenting complex or rare environments like chaotic traffic circles or roundabouts.
When an AV enters an unfamiliar environment, the model may produce "hallucinated" or highly inaccurate predictions. The most dangerous instances are deceptive OOD scenes: subtle shifts in driving behavior that appear normal to a human observer but cause the model's accuracy to plummet. Current anomaly detection methods often fail to flag these subtle shifts in real-time, leading to silent failures that could result in collisions.
Methodology: Real-time Detection via Sequential Analysis
This research proposes a shift from static, frame-by-frame anomaly detection to Sequential Analysis. By framing OOD detection as a Quickest Change-Point Detection (QCD) problem using the CUSUM algorithm, the system can identify exactly when a distribution shift occurs.
The core approach involves:
- Error Modeling: The system monitors the sequence of prediction errors (ADE, FDE, and RMSE). The authors discovered that these errors are best modeled as Gaussian Mixture Models (GMMs), which capture the multi-modal nature of model failures better than simple Gaussian distributions.
- CUSUM (Cumulative Sum) Algorithm: The researchers adapted the CUSUM algorithm to detect shifts in error distributions. Unlike simple threshold checks, CUSUM is "memory-aware," accumulating evidence over time to detect subtle but persistent shifts.
- Knowledge Variants: Three versions of the detector were evaluated based on available prior knowledge: CUSUM Mix (full knowledge), CUSUM Sinmix (partial OOD knowledge), and CUSUM Single (a lightweight version using simplified Gaussian assumptions).
Experimental Setup and Datasets
The framework was evaluated using two state-of-the-art prediction models—GRIP++ (graph-based) and FQA (fuzzy attention-based)—across three major real-world datasets: ApolloScape, NGSIM, and nuScenes.
To rigorously test the system, the authors used adversarial perturbations to generate "physically plausible" but deceptive OOD trajectories that specifically target model weaknesses.
Key Results and Safety Implications
The experimental results demonstrate that treating OOD detection as a temporal change-point task is highly effective for filtering noise and identifying genuine model degradation.
- Rapid Detection: CUSUM-based methods were significantly faster than traditional benchmarks. In specific tests, CUSUM Mix detected a shift in just 3 samples, compared to 50 samples required by the standard Chi-Square method. This represents a 95% improvement in detection speed, providing a critical safety window for human intervention.
- Optimal Trade-offs: Across all datasets, CUSUM variants provided a superior balance between detection delay and false alarm rates.
- Practicality: Even the "CUSUM Single" variant, which requires minimal pre-computed information, consistently outperformed traditional Z-score and Chi-Square benchmarks, making it suitable for real-time deployment where OOD characteristics are unknown.
Conclusion and Future Work
While this framework provides a robust foundation for real-time OOD awareness, future research may focus on developing "tiered" alarm systems to distinguish between benign anomalies and critical failures. Furthermore, integrating these detectors into closed-loop systems could allow AVs to adapt their driving style or hand over control immediately once an OOD scene is flagged. Future studies should also explore the computational overhead of running GMM-based likelihood ratios alongside high-frequency trajectory predictors on production hardware.
Summary updated