Runtime Monitoring and Circuit Breakers
Description
Runtime monitoring and circuit breakers observe a deployed AI service and restrict model calls when configured signals breach specified limits. In the closed state, requests pass through and recent failures are counted, while an open breaker rejects requests or provides a configured fallback, such as a cached answer, a simpler model, a rule-based default or referral to a person. After a waiting period, the half-open state permits a few trial calls and closes again only if they succeed. Model-related triggers can include immediately available signals such as input-drift scores (how far incoming data has moved from the training data) or low prediction confidence, since accuracy usually needs later outcome labels. Logs record state changes and triggering signals, supporting review of why the service was restricted without guaranteeing that the fallback is safe.
Example Use Cases
Safety
A hospital's diagnostic-support service stops showing model suggestions to clinicians when the share of low-confidence predictions or the input drift score passes preset limits, for example after a scanner software update changes the images. A notice tells staff the standard workflow applies until engineers reset the breaker.
Reliability
Deploying runtime monitoring for a recommendation engine that tracks recommendation diversity, click-through rates, and user engagement patterns, automatically switching to simpler algorithms when complex models show signs of performance degradation or unusual behaviour patterns.
Transparency
A bank's credit-scoring service records every breaker state change, the metric that triggered it and the fallback used in an audit log. Model risk reviewers read the log each month to see how often, when and why the model was restricted, and whether the thresholds need revisiting.
General
An airline's customer-service assistant is wrapped in a circuit breaker that counts timeouts, blocked outputs and refusals. When they pass a limit after a faulty release, traffic switches to a scripted menu and the on-call engineer is paged, so the faulty version is stopped quickly without waiting for a manual decision.
Limitations
- Thresholds are hard to set. Too tight and the breaker trips on normal variation and withdraws a working service. Too loose and it stays closed through a real failure. Good settings need historical data from the live system, which is scarce at launch.
- Model-level triggers are proxies for correctness. Drift scores and confidence can look normal while the model is confidently wrong, so a breaker that never trips is not evidence that predictions are right.
- Gradual degradation and slow attacks can stay inside the limits, because each reading is acceptable while the cumulative effect is harmful. Catching them needs separate trend analysis or delayed accuracy checks alongside the breaker.
- The breaker only moves the risk to the fallback. A cached answer, a simpler model or a human referral must itself be tested, and referral fails if reviewers cannot absorb a sudden diversion of traffic.
- Tripping has a cost. A false trip withdraws a working service from users who may depend on it in time-critical settings, and reopening after a fixed cooldown, or on a few easy trial requests, can restore traffic before the underlying fault is fixed.
Resources
Research Papers
Release It! Design and Deploy Production-Ready Software
Design your application for maximum uptime, performance, and return on investment in the face of the harsh realities of the real world.
Hidden Technical Debt in Machine Learning Systems
Machine learning offers a fantastically powerful toolkit for building useful complexprediction systems quickly. This paper argues it is dangerous to think ofthese quick wins as coming for free. Using the software engineering frameworkof technical debt, we find it is common to incur massive ongoing maintenancecosts in real-world ML systems. We explore several ML-specific risk factors toaccount for in system design. These include boundary erosion, entanglement,hidden feedback loops, undeclared consumers, data dependencies, configurationissues, changes in the external world, and a variety of system-level anti-patterns.