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.
University of Wisconsin Madison Madison, WI, USA · IMC University of Applied Sciences Krems, Austria · Indian Institute of Technology Roorkee Roorkee, India