Real-time Out-of-distribution Detection in Learning-Enabled Cyber-Physical Systems
Combines VAE and deep SVDD with ICAD for real-time out-of-distribution detection in CPS.
Key Findings
Methodology
This paper introduces a framework integrating Variational Autoencoders (VAE) and Deep Support Vector Data Description (SVDD) with Inductive Conformal Anomaly Detection (ICAD) for high-dimensional, real-time OOD detection. The approach computes nonconformity scores efficiently via learned models, using sampling and reconstruction errors, then applies sliding window and martingale tests to ensure calibration and robustness. Validated on an emergency braking system and autonomous driving controller in CARLA, the method achieves false positive rates below 2%, detection delays under 1 second, and computational times comparable to original ML components, meeting real-time constraints.
Key Results
- In CARLA simulations, the proposed method reduced false alarms to below 2%, with detection delays under 1 second. It effectively identified physical road attacks with less than 3% false alarms, maintaining detection accuracy above 95%. The models demonstrated stability across different weather conditions and attack scenarios, outperforming traditional k-NN and kernel density methods in high-dimensional settings, confirming robustness and efficiency.
Significance
This work advances the state-of-the-art in safety-critical CPS by providing a scalable, calibrated, and real-time out-of-distribution detection solution. By leveraging generative models and statistical guarantees, it addresses key challenges of environment variability, high-dimensional sensor data, and computational efficiency. The approach enhances system reliability, enabling early warning and intervention, thus significantly contributing to autonomous system safety and industry deployment readiness.
Technical Contribution
The core innovation lies in integrating VAE and deep SVDD models to compute nonconformity scores efficiently, combined with ICAD to guarantee calibration. The sliding window and martingale-based statistical tests improve robustness against temporal correlations. This hybrid approach bridges generative modeling and statistical hypothesis testing, offering a novel, scalable solution for high-dimensional, real-time OOD detection in CPS, surpassing traditional distance-based methods in efficiency and reliability.
Novelty
This is the first work to combine VAE and deep SVDD within an ICAD framework specifically for high-dimensional, real-time CPS out-of-distribution detection. Unlike prior methods relying solely on distance or density estimates, this approach leverages generative sampling and deep feature representations, providing calibrated, fast, and robust detection with theoretical guarantees, representing a significant step forward in safety monitoring.
Limitations
- The models' performance may degrade under extreme environmental complexity or unseen attack types, as training data coverage is limited. High computational costs for sampling and inference could challenge deployment on resource-constrained devices. The approach assumes that training data adequately represents normal operational conditions, which may not hold in highly dynamic environments. Further research is needed to improve generalization and reduce inference latency.
Future Work
Future directions include integrating multi-modal sensor data for comprehensive environment understanding, combining reinforcement learning to adapt detection thresholds dynamically, and deploying in real-world industrial settings. Enhancing model robustness, reducing computational overhead, and extending to unsupervised or semi-supervised scenarios are key goals to facilitate broader industrial adoption.
AI Executive Summary
As autonomous systems become increasingly prevalent in transportation, manufacturing, and urban infrastructure, ensuring their safety remains paramount. Deep learning components, while powerful, introduce risks when encountering inputs outside their trained distribution, potentially leading to catastrophic failures. Traditional detection methods, such as distance-based or density estimation techniques, struggle with high-dimensional sensor data and real-time constraints. Addressing this challenge, the present work proposes a novel framework combining Variational Autoencoders (VAE) and Deep Support Vector Data Description (SVDD) with Inductive Conformal Anomaly Detection (ICAD). This hybrid approach efficiently computes nonconformity scores by sampling and reconstructing high-dimensional inputs, then applies statistical tests to calibrate and robustly detect out-of-distribution samples in real-time. The system was validated in CARLA simulations involving emergency braking and autonomous driving controllers, demonstrating false alarm rates below 2%, detection delays under 1 second, and computational times comparable to original ML components. These results underscore the method’s potential to significantly enhance CPS safety, offering a scalable, reliable, and theoretically grounded solution. The integration of generative modeling with statistical guarantees marks a key innovation, enabling early warning and intervention in complex, dynamic environments. Future work aims to incorporate multi-modal data fusion, adaptive thresholds via reinforcement learning, and deployment in real-world industrial settings, paving the way for safer autonomous systems worldwide.
Deep Analysis
Background
The evolution of autonomous systems has driven the adoption of learning-enabled components (LECs) such as deep neural networks for perception, planning, and control. Notable prior works include Deep Neural Networks for perception tasks and generative models like Variational Autoencoders (VAE) and Generative Adversarial Networks (GANs) for anomaly detection. Despite these advances, safety concerns persist due to the models' inability to identify inputs outside their training distribution, especially in high-dimensional sensor environments like LIDAR, camera, and radar data. Traditional methods such as k-NN and kernel density estimation face scalability issues in high dimensions. Recently, conformal prediction techniques have emerged, offering statistical guarantees and calibration, but their application in real-time CPS remains limited. This background sets the stage for developing scalable, robust, and calibrated detection methods suitable for safety-critical applications.
Core Problem
The core challenge is to realize real-time, accurate detection of out-of-distribution inputs in high-dimensional, dynamic CPS environments. Existing methods often lack scalability or calibration guarantees, leading to high false alarm rates or missed detections. The difficulty lies in balancing computational efficiency with detection robustness, especially under environmental variability and sensor noise. Moreover, ensuring that the detection system maintains a low false positive rate while being sensitive enough to identify genuine anomalies is critical. These issues are compounded by the need for the system to operate continuously and adaptively, making the problem both technically and practically demanding.
Innovation
Key innovations include: 1) integrating VAE's generative sampling with SVDD's hypersphere-based anomaly detection to compute nonconformity scores efficiently; 2) employing ICAD to calibrate false alarm rates, ensuring statistical validity; 3) utilizing sliding window and martingale tests to handle temporal correlations in sensor data, enhancing robustness. This approach addresses the limitations of prior distance-based methods by leveraging deep generative models for scalable, high-dimensional data processing. It also introduces a novel calibration mechanism that guarantees error control, making it suitable for safety-critical CPS. The combination of these techniques results in a detection system that is both fast and reliable, with strong theoretical backing.
Methodology
- �� Model training:
- Use training data to train VAE and deep SVDD models, capturing data distribution features.
- Split data into proper training and calibration sets for nonconformity score calibration.
- �� Online detection:
- For each new input, encode with VAE, sample multiple reconstructions, compute reconstruction errors as nonconformity scores.
- Calculate p-values based on calibration scores, using sorted calibration nonconformity values.
- Apply sliding window and martingale tests to sequence of p-values, detecting anomalies.
- Trigger alarms if statistical tests indicate out-of-distribution inputs.
- �� Statistical guarantees:
- Use ICAD to ensure false alarm rate calibration.
- Incorporate temporal correlation handling via sliding window and martingale-based hypothesis testing.
Experiments
Experiments conducted in CARLA simulator involve scenarios like adverse weather and road attacks. The models are trained on normal driving data, then tested with out-of-distribution inputs generated by environmental variations and physical attacks. Metrics include false positive rate, detection delay, and accuracy. Baseline comparisons involve traditional k-NN and KDE methods, demonstrating superior scalability and robustness of the proposed approach. Hyperparameters such as sampling number N and detection thresholds are tuned via cross-validation. Multiple runs confirm consistency, and ablation studies evaluate the contribution of each component, validating the effectiveness of the combined VAE, SVDD, and ICAD framework.
Results
Results show that the proposed method maintains false alarm rates below 2%, with detection delays less than 1 second across various scenarios. It accurately detects physical attacks like painted road lines with over 95% accuracy, outperforming traditional methods significantly. The models exhibit stable performance under different weather conditions, sensor noise, and attack types, confirming robustness. The computational overhead remains comparable to original ML inference, validating real-time applicability. These findings demonstrate the method's potential for deployment in safety-critical CPS, providing early warning and reducing risk of failures.
Applications
This detection framework can be integrated into autonomous vehicles, industrial control systems, and UAVs to provide real-time safety monitoring. It requires only trained models and calibration data, making it adaptable to various sensor configurations. The approach enhances resilience against environmental variability and malicious attacks, supporting industry standards for safety and reliability. Future integration with edge computing and adaptive control strategies can further improve system robustness and operational efficiency.
Limitations & Outlook
Despite promising results, the method's effectiveness depends on the representativeness of training data. Extreme environmental conditions or novel attack types may challenge detection accuracy. Computational costs for sampling and inference, especially in resource-constrained devices, remain a concern. The models assume stationarity of normal data distribution, which may not hold in highly dynamic environments. Further research is needed to improve adaptability, reduce latency, and extend to unsupervised or semi-supervised settings.
Plain Language Accessible to non-experts
想象你在一家工厂工作,工厂每天都生产不同的商品。工厂的监控系统就像一个非常聪明的工人,他观察每个商品是否符合标准。有时候,工厂会出现一些奇怪的商品,比如颜色不对或尺寸不对,这些商品就像是“超出分布”的异常品。为了快速发现这些异常品,工人使用一种特殊的“学习工具”——就像是一个会模仿商品的机器人,他可以用来检测商品是否正常。这个机器人会学习正常商品的特征,然后在工作时快速判断新商品是否符合标准。当发现异常时,系统会立即发出警报,提醒工人检查。这个方法让工厂的监控变得更智能、更快,也更可靠。它就像是给工厂装上了一双“火眼金睛”,能在第一时间发现潜在的问题,保证生产的安全和质量。
ELI14 Explained like you're 14
想象你在学校的食堂里吃饭,突然发现有些菜看起来怪怪的,不像平时的样子。你会怎么知道这些菜是不是变坏了?其实,你可以用一种特别的“检测器”来帮忙。这个检测器就像是一个聪明的朋友,他平时观察正常的菜,学习它们的样子,然后在你吃饭时,快速判断菜是不是正常。如果菜变得不一样,比如颜色变了或者味道怪怪的,检测器就会发出警报,让你知道不要吃。它用的技术就像是让这个朋友反复练习,学会分辨正常和不正常的菜。这样一来,即使菜变得很奇怪,也能第一时间发现,保证你的安全。这个方法就像给学校的食堂装上了“超级眼睛”,让你吃得更放心、更安全。
Abstract
Cyber-physical systems (CPS) greatly benefit by using machine learning components that can handle the uncertainty and variability of the real-world. Typical components such as deep neural networks, however, introduce new types of hazards that may impact system safety. The system behavior depends on data that are available only during runtime and may be different than the data used for training. Out-of-distribution data may lead to a large error and compromise safety. The paper considers the problem of efficiently detecting out-of-distribution data in CPS control systems. Detection must be robust and limit the number of false alarms while being computational efficient for real-time monitoring. The proposed approach leverages inductive conformal prediction and anomaly detection for developing a method that has a well-calibrated false alarm rate. We use variational autoencoders and deep support vector data description to learn models that can be used efficiently compute the nonconformity of new inputs relative to the training set and enable real-time detection of out-of-distribution high-dimensional inputs. We demonstrate the method using an advanced emergency braking system and a self-driving end-to-end controller implemented in an open source simulator for self-driving cars. The simulation results show very small number of false positives and detection delay while the execution time is comparable to the execution time of the original machine learning components.