Learning Contextual Runtime Monitors for Safe AI-Based Autonomy
Alejandro Luque-Cerpa, Mengyuan Wang, Emil Carlsson, Sanjit A. Seshia, Devdatt Dubhashi, Hazem Torfah
TL;DR
The paper tackles safety challenges in AI-enabled autonomy by reframing control ensembles as contextual runtime monitors that select the most context-appropriate controller and fall back to a verified safe policy when needed. It formulates Monitor-Guided Systems and proves regret-bound guarantees for learning the monitor using contextual bandits with a logistic violation model, aided by Hessian-based uncertainty and Sherman-Morrison updates. Empirical evaluation in two autonomous driving scenarios shows that contextual monitors outperform non-contextual baselines, with active learning delivering data-efficient, less-conservative decision-making and near-zero false positives under favorable conditions. The work advances safe AI-based autonomy by combining theoretical guarantees with practical, lightweight runtime monitoring, enabling better use of controller diversity in real-world contexts.
Abstract
We introduce a novel framework for learning context-aware runtime monitors for AI-based control ensembles. Machine-learning (ML) controllers are increasingly deployed in (autonomous) cyber-physical systems because of their ability to solve complex decision-making tasks. However, their accuracy can degrade sharply in unfamiliar environments, creating significant safety concerns. Traditional ensemble methods aim to improve robustness by averaging or voting across multiple controllers, yet this often dilutes the specialized strengths that individual controllers exhibit in different operating contexts. We argue that, rather than blending controller outputs, a monitoring framework should identify and exploit these contextual strengths. In this paper, we reformulate the design of safe AI-based control ensembles as a contextual monitoring problem. A monitor continuously observes the system's context and selects the controller best suited to the current conditions. To achieve this, we cast monitor learning as a contextual learning task and draw on techniques from contextual multi-armed bandits. Our approach comes with two key benefits: (1) theoretical safety guarantees during controller selection, and (2) improved utilization of controller diversity. We validate our framework in two simulated autonomous driving scenarios, demonstrating significant improvements in both safety and performance compared to non-contextual baselines.
