Introduction
Cyber-Physical Systems (CPS)—ranging from autonomous vehicles and smart grids to industrial robotics—are increasingly governed by AI controllers, particularly Deep Reinforcement Learning (DRL) agents. While these AI models offer superior performance in complex, non-linear environments, they are essentially "black boxes." This lack of transparency and formal safety guarantees poses a significant barrier to their deployment in mission-critical applications where failure can be catastrophic.
Traditional safety analysis methods, such as fault tree analysis, often fail to scale with the high-dimensional nature of AI-CPS. Furthermore, "falsification"—the process of identifying specific inputs that trigger system failures—becomes a "needle in a haystack" problem. Mosaic addresses these challenges by creating a reliable, efficient mathematical "map" of an AI system's behavior to predict and prevent failures.
The Mosaic Framework
Mosaic is a model-based framework designed to bridge the safety gap by abstracting complex AI behavior into a manageable mathematical form. The framework operates through a three-stage pipeline: Data Collection, Abstraction & Refinement, and Safety Analysis.
1. Model Abstraction and Refinement
Rather than analyzing the high-dimensional AI controller directly, Mosaic simulates the system to collect experience data. This data is used to construct a Markov Decision Process (MDP), which serves as a simplified "surrogate" model. To manage the state-space explosion, Mosaic employs Principal Component Analysis (PCA) for dimensionality reduction and grid partitioning for discretization.
To ensure the surrogate is accurate, Mosaic uses a Support Vector Machine (SVM) to learn the precise boundaries between safe and unsafe states. The model is iteratively refined in regions where the estimation error is highest, ensuring the abstraction remains a faithful representation of the underlying system.
2. Safety Analysis and Evaluation
Mosaic utilizes the abstracted MDP for two primary safety functions:
- Online Model-based Safety Monitoring: During real-time operation, the system uses Probabilistic Model Checking (PMC) to look ahead several time steps. If the probability of entering an unsafe state exceeds a predefined threshold, a Decision Module intervenes, switching control from the AI to a traditional, verified "safe" controller.
- Offline Model-guided Falsification: To identify bugs before deployment, Mosaic employs a two-stage search strategy. It uses the MDP to identify "suspicious regions" (Global Search) and then applies optimization techniques like hill-climbing to pinpoint the exact inputs that trigger a violation (Local Search).
Experimental Evaluation
The framework was evaluated on three industry-standard benchmarks: Adaptive Cruise Control (ACC), Abstract Fuel Control (AFC), and Exothermic Chemical Reactor (CSTR). These were tested against nine different AI architectures, including DDPG, SAC, TD3, and standard Deep Neural Networks (DNNs).
Key Results
- Model Precision: The MDP abstractions achieved an average labeling accuracy of 92.22%, demonstrating that simplified surrogates can reliably represent complex AI-CPS behavior.
- Enhanced Safety: In ACC-DNN tests, the safety score (the percentage of time the system remained in a safe state) improved from 0.51 to 0.97 when Mosaic’s online monitoring was active.
- Superior Falsification: Mosaic significantly outperformed traditional tools like Breach. In the ACC-DNN2 benchmark, Mosaic identified 20 successful falsifications, whereas Breach only found 4.
- Real-time Viability: The computational overhead is minimal. A safety query takes approximately 0.1032 seconds on average, making it well-suited for real-time monitoring in systems where full simulations take significantly longer (e.g., ~35 seconds).
Conclusion and Future Work
Mosaic demonstrates that it is possible to maintain the performance benefits of AI controllers while providing the safety guardrails necessary for CPS. By using "safety-aware" surrogates labeled with Signal Temporal Logic (STL) robustness, the framework quantifies risk and intervenes only when necessary.
Future research will focus on scaling these abstraction techniques to even higher-dimensional systems and exploring the automated generation of safety-backup controllers. Additionally, the authors aim to extend Mosaic to support automated policy repair, allowing the system to not only detect failures but also learn to avoid them.
Summary updated