Monitoring AI Performance in Production
How to detect degradation after deployment: data drift, concept drift, performance monitoring dashboards, and establishing feedback loops between clinical users and development teams.
A model is validated once, on a fixed dataset, and then used for years on data that keeps changing. Scanners are replaced, protocols are revised, the patient population moves, coding practices change, and occasionally a pandemic arrives. The model stays exactly as it was, and its performance on the new data may not.
In the lab you measure performance by comparing predictions with labels. In production there are no labels, or they arrive months later, or they exist only for some patients. So monitoring is mostly a matter of finding things you can measure now that warn you about the thing you can't.
6.12 Post-Market Surveillance and Real-World Monitoring covers what regulators require of a marketed device. This article is about the technical side: what changes, what to measure, and how to set up the loop between users and developers.
Three things that can change
Samuel Finlayson and colleagues wrote a useful overview for clinicians in 2021 under the title "The Clinician and Dataset Shift in Artificial Intelligence." The changes they describe fall into three kinds, and it helps to keep them apart because they are detected differently.
The inputs change. This is called data drift or covariate shift. A new scanner or a software upgrade alters the image texture. A protocol change alters slice thickness. A new clinic starts sending studies from a different population. The relationship between image and disease is the same as before, but the model is now seeing images unlike the ones it learned from.
The prevalence changes. The disease becomes more or less common among the patients the model sees, perhaps because of a change in referral patterns or a seasonal outbreak. Sensitivity and specificity may hold, while predictive values and calibration move (see 2.4 Class Imbalance).
The meaning changes. This is concept drift: the relationship between the input and the right answer is itself different. A diagnostic definition is revised, a new treatment changes which patients do badly, a new disease produces findings that look like an old one. The COVID-19 pandemic did all of these at once. Andrew Wong and colleagues reported that at 24 US hospitals the Epic sepsis model generated considerably more alerts in the first weeks of the pandemic than before it, even as the hospitals had fewer patients.
Drift can be sudden, as with a scanner replacement, or gradual. Sharon Davis and colleagues followed models predicting acute kidney injury in US Veterans Affairs hospitals over several years and found in 2017 that calibration deteriorated steadily, with predicted risks drifting away from observed rates, while discrimination held up much better. That pattern is common, and it means that checking AUC alone can miss the problem (see 4.4 Calibration).
What you can measure without ground truth
These signals are available immediately and automatically. None of them measures accuracy. They tell you that something has changed and you should look.
The inputs
The DICOM header is the cheapest monitor there is. Track the manufacturer, scanner model, software version, protocol name, slice thickness and reconstruction kernel of every study processed. A new value appearing, or a change in the mix, is an early and specific warning: the model is now being run on something it may never have been tested on.
Simple image statistics come next: intensity distributions, image dimensions, noise level, the fraction of images that fail quality checks. Patient mix is worth tracking too, by age, sex and referral source.
More elaborate methods compare the model's internal representation of new images with that of the training images, to detect inputs that look unfamiliar to the model. They can catch changes that header fields and simple statistics miss.
The outputs
Track the rate of positive results and the distribution of scores, by week or month. If a model that has flagged 4% of studies for a year starts flagging 9%, something has changed, in the inputs, the population or the system. The same goes for a drop.
Also track how often the model declines to give a result or fails outright. A rise in rejected inputs usually has a specific, findable cause.
The users
If the interface records whether clinicians accept, edit or reject the model's output (see 8.4 Human-AI Interaction and User Interface Design), the trend in those rates is informative. A rising rejection rate may mean the model has got worse. A rate that falls toward zero may mean people have stopped checking. Both are worth a look.
How to read the charts
For each quantity, establish a baseline over a stable period and then watch for departures from it. Statistical process control charts, borrowed from manufacturing, are the standard tool, and 6.12 describes them. There are also formal tests for comparing two distributions.
The difficulty is false alarms. With dozens of quantities tracked across many sites, something will cross a threshold every week by chance. Start with a few signals you understand and thresholds loose enough that an alert means something. A monitoring system that alerts every week gets ignored like any other noisy alert system.
Getting ground truth anyway
The proxies tell you to look. To know whether performance has changed, you need labels for at least some recent cases. There are several sources, each with a weakness.
The clinical report. For an imaging tool, the radiologist's final report is available within hours. Comparing the model's output with the report, usually by having software extract the finding from the report text, gives a running agreement rate. The weakness is that the radiologist saw the model's output, so the two aren't independent, and that the extracted labels are noisy.
Later results. Pathology, surgery, follow-up imaging and discharge diagnoses provide better truth, with a delay of days to months. They are also available only for some patients. Patients the model called negative are less likely to have had a biopsy, so the confirmed cases are a biased sample. This is verification bias, and it will tend to hide the model's misses.
A periodic audit. Take a random sample of recent cases, including ones the model called negative, and have them labelled by experts who can't see the model's output, to the same standard as the original test set. A few hundred cases every six or twelve months is expensive and is the only source that gives an unbiased estimate. If you can only afford one of these three, we'd choose this one.
Whichever you use, break the results down by subgroup, scanner and site. An overall figure can stay steady while one site with a new scanner has gone badly wrong (see 7.2 Demographic Fairness).
The model changes its own data
There is a complication specific to tools that influence care. Once clinicians act on a model's output, the outcomes that are later recorded have been affected by the model.
Take a model that predicts deterioration. If it works, high-risk patients get early treatment and some of them don't deteriorate. In the data they now look like false positives. The more effective the intervention, the worse the model appears. Matthew Lenert and colleagues described this in a 2019 paper with the title "Prognostic models will be victims of their own success."
The same effect contaminates retraining. Labels collected after deployment were produced by clinicians who had seen the model's suggestions, so they lean toward agreeing with the model. Retrain on those labels and the model's existing errors are reinforced. And patients the model steered away from further testing never get a confirmed diagnosis at all.
There isn't a clean fix. It helps to record whether the model's output was shown and whether anyone acted on it, so the analysis can account for it. Some sites keep a small random fraction of cases on which the output is withheld, which preserves an unaffected comparison group, though that needs ethical consideration. The blinded audit described above is unaffected by the first problem as long as the experts label what is in the image, independent of what was done.
The feedback loop
Automated monitoring finds statistical changes. Clinicians find the specific failures: the type of case the tool keeps getting wrong, the artefact it mistakes for disease. Their reports are often the first sign of a problem and nearly always the best clue to its cause.
A working feedback loop has a few parts. There is a way to flag a problem from inside the tool, in one or two clicks, with the case attached automatically. Someone reads every report and sorts it: user misunderstanding, input problem, or model error. Model errors go to the development team with enough information to reproduce them, which means logging the model version, the input and the output for every case. And the person who reported it hears back. That last step is the one most often dropped, and without it the reports dry up (see 8.5 Clinician Trust, Adoption, and Change Management).
Collected over time, the reported failures are also the best material for improving the model. They show which kinds of case need adding to the training data.
Deciding what happens when something is found
Monitoring is pointless without a plan for acting on it, agreed before anything goes wrong. It should say who reviews the monitoring results and how often, what size of change triggers an investigation, and what the options are.
The options run from mild to drastic. The team can warn users about a known weakness, or restrict the tool so it is no longer run on the affected scanner or patient group. They can recalibrate or adjust the threshold, retrain on newer data, or switch the tool off. Switching off should be technically easy and the workflow should survive it, which is one more reason to keep the pre-AI safety nets in place.
For a regulated device, changing the model, including a change of threshold, is a regulated act. Recalibration and retraining can be done without a new submission only if they were described in advance in a Predetermined Change Control Plan (see 6.8 Predetermined Change Control Plans). Any new version needs to be validated before release, on a test set that hasn't been used to develop it, and you need the ability to roll back to the previous version.
One last point: decide who owns this. Between the vendor, the hospital's IT department and the clinical department, it is easy for each to assume one of the others is watching. The vendor can see across sites and can't see local outcomes. The hospital can see outcomes and may not have the logs. Write down who monitors what.
Key takeaways
- A deployed model stays fixed while its data changes. Inputs drift, prevalence shifts, and the relationship between input and answer can change.
- Calibration tends to degrade before discrimination, so tracking AUC alone can miss a problem.
- Without ground truth, monitor the inputs (starting with DICOM header fields), the output rate and score distribution, and how often clinicians overrule the tool. These tell you to look, and don't measure accuracy.
- For accuracy you need labels: agreement with reports, later confirmed diagnoses, and a periodic blinded audit of a random sample. The audit is the only unbiased one.
- Report monitoring results by site, scanner and subgroup.
- A model that influences care alters the outcomes used to judge it and the labels used to retrain it. Record when its output was shown and acted on.
- Clinician reports need a low-effort channel, a person who triages them, and a reply.
- Agree in advance who reviews the monitoring, what triggers action and what the options are, including switching the tool off.
What to read next
- 6.12 Post-Market Surveillance and Real-World Monitoring: the regulatory obligations monitoring has to satisfy
- 6.8 Predetermined Change Control Plans (PCCP): how to update a cleared model
- 2.6 Multi-Site and Multi-Device Data: The Generalization Challenge: why performance moves when the data does
- 4.4 Calibration: Does a 90% Confidence Score Really Mean 90%?: measuring the property that drifts first
- 7.3 Generalization Across Devices, Sites, and Geographies: shift between places as well as over time
This article is part of the AI in Clinical Research Knowledge Base.