Temporal Naive Bayes for real-time detection of maneuvers and anomalies in autonomous driving
Abstract
We present Temporal Naive Bayes (TNB), a novel lightweight extension of the classical Naive Bayes classifier tailored for sequential sensor data. TNB embeds a first-order autoregressive (AR(1)) model into the feature likelihood, modeling each observation xₜ conditionally on its predecessor. Parameters μ, α, and σ are estimated via maximum-likelihood on sliding windows of IMU readings, yielding an interpretable three-parameter model per class. We validate TNB on (i) synthetic AR(1) data with Gaussian noise, demonstrating perfect parameter recovery and 100% classification accuracy; (ii) synthetic data with Laplace noise, achieving 96.0% accuracy and an AUC of 0.9981 under estimated parameters; and (iii) real-time deployment in the CARLA driving simulator, achieving 72.0% multiclass maneuver classification accuracy and an AUC of 0.9660 at 15–20 FPS. Our open-source pipeline—from automated labeling to live dashboard—highlights TNB’s efficacy for onboard anomaly detection and maneuver classification in resource-constrained autonomous systems.