In safety-critical Cyber-Physical Systems (CPS), trajectory prediction guides downstream planning and control. Deep learning models forecast well on validation data, but their reliability drops in out-of-distribution (OOD) scenarios driven by environmental uncertainty or rare traffic behaviors [1, 2]. Such failures are often silent: forecasts stay spatially plausible while accuracy collapses, and reported uncertainty does not rise [3]. Detection is hard because traffic conditions and interaction patterns keep evolving, yet the safety-critical nature of autonomous driving (AD) demands formal guarantees on detection delay and false-alarm rate. Following [4], we reframe OOD monitoring as quickest changepoint detection (QCD), a principled statistical framework with well-established theory. We find that the evolution of prediction errors on in-distribution (ID) data is well modeled by a Hidden Markov Model (HMM). Building on this, we extend a recent cumulative Maximum Mean Discrepancy approach to our setting. The method needs no detailed prior knowledge of the post-change distribution, yet admits provable delay and false-alarm guarantees. On three real-world driving datasets, it reduces detection delay while staying robust to heavy-tailed distributions and unknown post-change conditions.
Figures & tables
Fig. 1: Benchmarking trajectory prediction across real-world driving datasets. Examples from nuScenes (top), ApolloScape (middle), and NGSIM (bottom) illustrate the diversity in agent interactions and scene dynamics.
Scene
Src
Emission
Transition
Δμ
σˉ2
p
Highway — structured, low-density
Car-following (platoon)
N
Mod.
Easy
0.15
Congested stop-and-go
N
Mod.
Mod.
0.32
Mixed Urban — transitional, Mod. complexity
On-ramp merge
Nu A
Mod.
Mod.
0.55
TABLE I: Latent error dynamics across driving datasets, modeled as HMMs with emission parameters and transition probability. Emission parameters: Δμ (mean gap between modes) and σˉ2 (within-mode variance) characterize detection difficulty as Easy (large Δμ , small σˉ2 ), Moderate (Mod.), or Hard (small Δμ , large σˉ2 ). Transition parameter: p (mode-switching probability) reflects how often the latent state changes. Each marker denotes the dataset source: N = NGSIM, Nu = nuScenes, A = ApolloScape.
Fig. 2: Non-stationary switching behavior of prediction errors across three driving environments: NGSIM (Highway), nuScenes (Mixed Urban), and ApolloScape (Unstructured Urban). The x -axis represents the time step ( t ) and the y -axis denotes the error (log ADE). Preliminary results on other metrics (i.e., FDE and RMSE) show similar behaviors. Background shading indicates the inferred latent error mode: Low-Error Mode ( Blue ) and High-Error Mode ( Red ). The two modes are separated via MAP estimation under a Gaussian mixture model posterior, which assigns each observation to the component with the highest posterior responsibility.
Fig. 3: WADD–MTFA trade-off curves across driving domains. Each curve traces one detection method under two models: GRIP++ (top) and FQA (bottom) prediction. WADD down = faster detection; MTFA up = fewer false alarms.
Dataset
Model
Dev. (m)
ADE (ID / OOD)
Δ (%)
NGSIM
GRIP++
0.46
0.73 / 1.82
+149
FQA
0.44
0.81 / 2.05
+153
nuScenes
GRIP++
0.52
1.12 / 2.71
+142
FQA
0.49
1.24 / 3.01
+143
ApolloScape
GRIP++
0.55
1.48 / 3.74
+153
FQA
0.53
1.61 / 4.02
+150
TABLE III: Impact of subtle OOD generation on prediction accuracy. Dev. denotes the average spatial shifts ( ≤1 m). Δ (%) denotes the error (ADE) increase from ID to OOD setting.
WADD ↓
Δ (%)
Method
Gaussian
Laplace
Student- t
LP
ST
DC-MMD (Ours)
17.52
20.50
20.67
+17
+18
Mode-CUSUM
26.87
31.97
34.39
+19
+28
GMM-CUSUM
36.18
43.42
47.03
+20
+30
G-CUSUM
41.35
57.06
62.85
+38
+52
lGMM
47.58
59.95
66.14
+26
+39
TABLE IV: Detection delay (WADD; in time steps) at MTFA ≈2 under heavy-tailed emission misspecification. Δ (%) denotes degradation relative to the Gaussian baseline.
Fig. 4: Latent-dynamic performance across benchmarks. Each radar axis represents a progressively weaker stationarity assumption, arranged clockwise: S (strictly stationary) → WS (weakly stationary) → NS (non-stationary). The Global Profile (left) overlays all six methods; individual panels isolate each method’s footprint with per-axis average WADD annotated (at MTFA ≈2 ; 500 runs). Larger area ⇔ WADD ↓ (faster change-point response).
Fig. 5: Robustness to heavy-tailed distribution. Left: Detection delay (WADD) at MTFA≈2 . DC-MMD (Ours) maintains the lowest delay across all distributions: Gaussian (light-tailed, blue ), Laplace (moderate-tailed, tan ), and Student- t (heavy-tailed, red ).
Method
Robust
Delay
DC-MMD (Ours)
✓
16.7
Robust CUSUM ( κ -shift)
✓
16.4
G-CUSUM (misspecified)
25.8
NLL
32.6
TABLE V: Detection delay (WADD; in time steps) when the post-change distribution is unknown. All methods operate at MTFA ≈1 . Results are averaged over 500 independent runs. Robust CUSUM uses a shift-based surrogate with κ=2 selected following [ 4 ] .
Method
Complexity (Per Step)
Parameters
Real-Time
NLL [ 27 ]
O(1)
0
⋆⋆⋆
G-CUSUM [ 12 ]
O(1)
0
⋆⋆⋆
lGMM [ 24 ]
O(1)
Low
⋆⋆⋆
Deep Ensembles [ 7 ]
O(N)
N× Model
⋆
DC-MMD (Ours)
O(1)‡
Minimal
⋆⋆⋆
TABLE VI: Computational Complexity and Real-Time Suitability.
Out-of-Distribution (OOD) data poses a significant threat to machine learning models, often leading to model failure during deployment. All existing OOD detection methods are post-hoc, relying on evaluation metrics such as accuracy and AUC-ROC during inference to indirectly assess the model's response to OOD data by measuring deviations. In contrast to existing approaches, the proposed work shifts the paradigm from OOD detection to OOD prediction by proposing a pre-hoc anticipatory framework called PLSP for OOD prediction. We make several key contributions: (a) a dataset-independent metric called the CREDibility Score (CREDS) is proposed for OOD prediction; (b) credibility curves are introduced to study the maximum credibility a model can attain; and (c) credibility heat maps (and volume under surface) are introduced to characterize pre-hoc model behavior across different datasets. This work provides a novel perspective on signal processing under distributional shifts. Experiments across multiple datasets demonstrate that the proposed metric serves as a valuable measure for improving the robustness of machine learning models toward OOD prediction.
University of Wisconsin Madison Madison, WI, USA · IMC University of Applied Sciences Krems, Austria · Indian Institute of Technology Roorkee Roorkee, India
3D semantic occupancy prediction is central to autonomous driving, yet current methods are vulnerable to long-tailed class bias and out-of-distribution (OOD) inputs, often overconfidently assigning anomalies to rare classes. We present ProOOD, a lightweight, plug-and-play method that couples prototype-guided refinement with training-free OOD scoring. ProOOD comprises (i) prototype-guided semantic imputation that fills occluded regions with class-consistent features, (ii) prototype-guided tail mining that strengthens rare-class representations to curb OOD absorption, and (iii) EchoOOD, which fuses local logit coherence with local and global prototype matching to produce reliable voxel-level OOD scores. Extensive experiments on five datasets demonstrate that ProOOD achieves state-of-the-art performance on both in-distribution 3D occupancy prediction and OOD detection. On SemanticKITTI, it surpasses baselines by +3.57% mIoU overall and +24.80% tail-class mIoU; on VAA-KITTI, it improves AuPRCr by +19.34 points, with consistent gains across benchmarks. These improvements yield more calibrated occupancy estimates and more reliable OOD detection in safety-critical urban driving. The source code is publicly available at https://github.com/7uHeng/ProOOD.
Yuheng Zhang, Mengfei Duan, Kunyu Peng +5
Hunan University · Karlsruhe Institute of Technology · INSAIT, Sofia University “St. Kliment Ohridski”
Trajectory prediction models often fail in real-world automated driving due to distributional shifts between training and test conditions. Such distributional shifts, whether behavioural or environmental, pose a critical risk by causing the model to make incorrect forecasts in unfamiliar situations. We propose a self-supervised method that trains a decoder in a post-hoc fashion on the self-supervised task of forecasting the second half of observed trajectories from the first half. The L2 norm of the gradient of this forecasting loss with respect to the decoder's final layer defines a score to identify distribution shifts. Our approach, first, does not affect the trajectory prediction model, ensuring no interference with original prediction performance and second, demonstrates substantial improvements on distribution shift detection for trajectory prediction on the Shifts and Argoverse datasets. Moreover, we show that this method can also be used to early detect collisions of a deep Q-Network motion planner in the Highway simulator. Source code is available at https://github.com/Michedev/forecasting-the-past.
Michele De Vita, Julian Wiederer, Vasileios Belagiannis