NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MORTAR: A Model-based Runtime Action Repair Framework for AI-enabled Cyber-Physical Systems

Renzhi Wang, Zhehua Zhou, Jiayang Song, Xuan Xie, Xiaofei Xie, Lei MaarXiv 2024 · DOI

Abstract

Deep Reinforcement Learning (DRL) policies are increasingly used in Cyber-Physical Systems (CPS), yet their "black-box" nature poses significant safety risks. We present MORTAR (Model-based Runtime Action Repair), a framework that acts as a real-time safety net for AI-controlled robots. MORTAR identifies and corrects unsafe actions without requiring internal access to the AI model or expensive retraining. By leveraging a lightweight prediction model and gradient-based optimization, MORTAR achieves safety repairs with a computational overhead of less than 1.5 milliseconds, making it suitable for high-frequency robotic control.

Introduction

The deployment of AI in autonomous drones and industrial robots is often hindered by the lack of formal safety guarantees. While DRL policies excel at complex tasks, they can produce unpredictable or unsafe outputs in edge cases. Existing safety methods, such as neural network repair, typically require "white-box" access to model weights or involve costly retraining cycles. This creates a critical need for a runtime solution that can monitor and "patch" black-box AI decisions on the fly while adhering to strict real-time hardware constraints.

Methodology

MORTAR operates in two distinct phases: offline prediction model construction and online action repair.

Prediction Model Construction

Before deployment, the system observes the AI controller's behavior under various conditions, including added noise. This data is used to train a lightweight Prediction Model that estimates a Signal Temporal Logic (STL) score. Unlike binary safety labels, the STL score provides a continuous numerical value where positive scores indicate safety and negative scores indicate violations.

Runtime Action Repair

During operation, MORTAR monitors the actions proposed by the AI policy. If the Prediction Model forecasts an unsafe STL score, the framework triggers a repair process.

The MORTAR runtime flow: monitoring policy actions and applying optimization-based repair when safety thresholds are breached.

To find a safe alternative rapidly, MORTAR employs what the authors call the "Aha" Technique, which utilizes a targeted Basic Iterative Method (BIM). While BIM is traditionally used to generate adversarial attacks, MORTAR uses it constructively to find the minimal modification required to push the robot's action back into the safe zone. An early-stopping strategy ensures that the optimization terminates as soon as a "safe enough" action is found, preventing computational delays that could cause the system to "freeze."

Experimental Evaluation

The framework was evaluated using the NVIDIA Omniverse Isaac Sim physics engine and a Franka Emika robotic arm across five manipulation tasks.

The five robotic manipulation tasks used for evaluation: (a) Point Reaching, (b) Cube Stacking, (c) Peg In Hole, (d) Ball Balancing, and (e) Ball Catching.

Key Results

  • Performance Gains: MORTAR consistently improved success rates compared to baseline PPO controllers and state-of-the-art linear repair methods like Safe Exploration (SafeExp). In the dynamic "Ball Balancing" task, success rates rose from 21% to 29% under strict safety constraints. In "Peg In Hole," success improved from 82% to 86%.
  • Real-Time Efficiency: MORTAR added an average computational overhead of only 1.3ms per step. In a 60Hz control loop (16.67ms budget), the total processing time remained well within limits at approximately 8.8ms.
  • Optimization Superiority: Gradient-based repair via BIM significantly outperformed traditional search-based optimizers like Nelder-Mead and COBYLA in both speed and reliability.

Conclusion and Future Work

MORTAR demonstrates that safety can be "bolted on" to existing black-box AI policies. By treating safety as a continuous gradient rather than a binary state, the framework enables rapid, real-time repairs. Future work will focus on handling high-dimensional inputs like raw camera pixels and extending the repair logic to consider longer time horizons for smoother control trajectories.

Summary updated

BibTeX
@misc{wang2024mortar,
  author = {Renzhi Wang and Zhehua Zhou and Jiayang Song and Xuan Xie and Xiaofei Xie and Lei Ma},
  title = {{MORTAR: A Model-based Runtime Action Repair Framework for AI-enabled Cyber-Physical Systems}},
  year = {2024},
  eprint = {2408.03892},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.03892},
}
Figure