Introduction
Deep Neural Networks (DNNs) are increasingly integrated into Cyber-Physical Systems (CPS) such as autonomous vehicles, power grids, and industrial robots. While DNNs excel at handling complex, non-linear environments, they often function as "black boxes"—opaque and prone to unpredictable failures in edge cases. While existing research focuses on falsification (identifying inputs that cause system failure), there is a significant gap in automatically repairing these systems once a failure is discovered.
AutoRepair addresses this challenge by providing an automated framework to diagnose why a controller failed and subsequently "repair" its behavior, ensuring the system learns to avoid dangerous states while maintaining operational performance.
The AutoRepair Framework
The AutoRepair framework operates through a closed-loop process involving signal diagnosis, optimization-based repair, and robust retraining.
The process consists of three main stages:
- Signal Diagnosis: Using Signal Temporal Logic (STL), AutoRepair identifies "violation episodes" where system execution deviates from safety requirements. It localizes the exact timeframe when the system begins drifting toward a hazard.
- Optimization-based Repair: The framework generates a control signal patch using a multi-objective genetic algorithm (NSGA-II). This patch aims to maximize safety (satisfying STL requirements) while minimizing deviation from the original controller's intent to prevent erratic behavior.
- Robust Retraining: Unsafe traces in the training data are replaced with these optimized "repaired" traces. The DNN controller is then retrained, effectively teaching it the correct response to previously failed scenarios.
Evaluation and Key Insights
The authors evaluated AutoRepair on six industry-level DNN-enabled CPS instances modeled in Simulink, including Adaptive Cruise Control (ACC), Abstract Fuel Control (AFC), and Water Tank (WT) systems.
Key Results
- Safety Improvement: AutoRepair significantly boosted safety rates. For instance, in the AFC#1 benchmark, the safety rate increased from 82.9% to 99.4%.
- Performance Preservation: Repaired controllers maintained utility metrics (e.g., driving efficiency and comfort) nearly identical to the originals, demonstrating that safety enhancements do not necessitate performance trade-offs.
- Generalization: Retraining on repaired traces improved controller performance on unseen test sets, suggesting the repair process helps the DNN internalize underlying physical constraints.
Strategic Considerations
A critical insight of the study is that safety violations propagate backward in time; fixing a failure at time $T$ requires rectifying control signals at an earlier time $t < T$. Furthermore, the choice of selection strategy from the Pareto front (MinSat, Random, or Similar) impacts effectiveness. While "Random" and "MinSat" were generally robust, the "Similar" strategy—which prioritizes minimal change—was occasionally too conservative to correct fundamental logic errors.
Limitations and Future Directions
Despite its success, AutoRepair faces challenges regarding computational overhead, as the NSGA-II optimization step requires numerous simulations. Additionally, the framework currently requires "white-box" access for retraining. Future work aims to extend the framework to more complex temporal logic formalisms and explore "shielding" techniques for proprietary third-party controllers where retraining is not feasible.
Citation: Deyun Lyu, et al. "AutoRepair: Automated Repair for AI-Enabled Cyber-Physical Systems under Safety-Critical Conditions." arXiv:2304.05617v1 [cs.SE] 12 Apr 2023.
Summary updated