Explainability and Interpretability in Clinical AI

What it means for a model to be "interpretable." Saliency maps, attention visualization, SHAP values, concept-based explanations, and the tradeoff between performance and transparency.


Clinicians reasonably want to know why a model said what it said. A colleague who announces "malignant" and won't say why doesn't get much of a hearing, and it seems fair to hold software to the same standard. A whole field has grown up to supply the "why," and its output, mostly coloured heat maps laid over images, is in nearly every medical imaging paper.

We'll be upfront about where this article ends up. The tools are useful for debugging a model. They are much weaker as evidence that a particular prediction is right, and they don't replace validation. But they're everywhere, reviewers ask for them, and you need to know how to read one.

Two words that get used interchangeably

An interpretable model is one whose workings you can follow directly. A logistic regression with six coefficients, a short decision tree and a points-based score like CHA2DS2-VASc are all interpretable. You can see what each input contributes and work out the answer by hand.

An explanation is something produced after the fact, for a model you can't follow. A deep network with millions of weights is the usual subject. A second method examines the network and produces a picture or a ranking that is meant to summarize what it did.

That difference is pretty important. With an interpretable model, what you read is the model. With an explanation, what you read is an approximation made by a different procedure, and it can be wrong about the model it describes.

Saliency maps

These are the heat maps. For a given image and prediction, a saliency method assigns each pixel or region a score for how much it contributed, and the scores are drawn as a colour overlay. Grad-CAM, published by Ramprasaath Selvaraju and colleagues in 2017, is the one you'll see most. It uses the activity in the network's last convolutional layer, so its maps are coarse blobs. Other methods, such as integrated gradients, work at the pixel level and give speckled maps. Occlusion is the simplest idea of all: cover part of the image, run the model again, and see how much the output changes.

Where they help is in finding shortcuts. If the map for a pneumonia classifier lights up the corner of the film where the hospital's marker sits, you've learned something. Alex DeGrave and colleagues used saliency maps this way in their 2021 study of COVID-19 chest X-ray models, as one line of evidence that the models were relying on text markers and image borders. In that kind of use a map is a prompt to investigate, and the investigation confirms it or doesn't.

Where they fall short is as proof that the model is right. There are a few separate reasons.

The first is that some methods don't depend much on the model. This is the result from Julius Adebayo and colleagues in 2018 that we described in 1.6 What AI Cannot Do: for several popular methods, replacing the trained weights with random numbers left the maps looking much the same. A map like that is closer to an edge detector run on the image.

The second is that they localize poorly. Nishanth Arun and colleagues tested eight saliency methods on chest radiographs in 2021 and found that all of them did worse at locating findings than a model trained to localize, and that most were also less repeatable and reproducible. Adriel Saporta and colleagues compared seven methods against radiologists' outlines in 2022, and all of them were worse than a human at marking the abnormality, particularly for small or oddly shaped findings.

The third is the one a clinician is most exposed to. A map shows where and never shows what. A warm patch over the right lower lobe is consistent with the model having recognized consolidation, and equally with it having responded to a rib, a lead or the image texture in that region. The viewer supplies the reasoning, and tends to supply their own. Marzyeh Ghassemi, Luke Oakden-Rayner and Andrew Beam made this argument in a 2021 Lancet Digital Health paper titled "The false hope of current approaches to explainable AI in health care," and it's worth reading in full.

Attention

Transformer models compute attention weights, which say how much each part of the input was combined with each other part (see 1.3 Common AI Architectures in Medicine). It's tempting to draw these and call them the explanation, since they come from inside the model.

They have the same limits. Sarthak Jain and Byron Wallace showed in a 2019 paper, "Attention is not explanation," that in text models quite different attention patterns could produce the same prediction, and that attention often disagreed with other measures of which inputs counted. Attention maps are as good for spotting shortcuts as other maps, and no better as proof.

SHAP and feature attribution for tabular models

For models built on tables of clinical variables, the common tools are SHAP, from Scott Lundberg and Su-In Lee in 2017, and its older relative LIME. SHAP borrows an idea from game theory to divide a prediction among the input variables: for this patient, age added this much to the risk, creatinine added that much, and so on. Averaged over many patients it gives a ranking of which variables the model leans on.

This is more trustworthy than a saliency map, partly because the inputs are named variables with clinical meaning. It's good for checking a model against clinical sense. If the top-ranked variable in a mortality model turns out to be "time of day the lab was drawn," you've found something to look into.

A few cautions. SHAP describes the model, not the patient's physiology. A large SHAP value for a variable means the model used it, and that isn't a causal statement. When variables are correlated, as clinical variables nearly always are, the credit gets split between them in ways that can look odd. And the per-patient breakdowns are less stable than the population-level rankings.

Concept-based methods

A newer line of work tries to explain models in terms a clinician already uses. Testing with concept activation vectors, introduced by Been Kim and colleagues in 2018, asks whether a model's internal state responds to a human-defined concept, such as "spiculated margin," by showing it examples with and without. Concept bottleneck models, from Pang Wei Koh and colleagues in 2020, go further: the network first predicts a set of named concepts and then makes its final prediction from those alone, so a clinician can see, and even correct, the intermediate findings.

These fit the way radiologists reason, and we think they're promising. Their cost is that somebody has to label the concepts, which multiplies the annotation work, and the model can only use concepts someone thought to include.

Is there a tradeoff with performance?

The usual claim is that accurate models are opaque and transparent models are less accurate, so we have to choose. That's partly true.

For tabular clinical data it's much less true than people assume. Cynthia Rudin argued in a widely read 2019 paper, "Stop explaining black box models for high stakes decisions and use interpretable models instead," that on structured data a carefully built interpretable model usually comes within a hair of the black box, and that the supposed tradeoff is often just a failure to try. If your inputs are twenty lab values and some demographics, it's worth trying the simple model first (see 1.5 Matching the Problem to the Approach).

For images, signals and free text the tradeoff is real. Nobody has an interpretable model that reads a CT as well as a deep network. There the choice is between post-hoc explanations, with the limits above, and designs that put interpretable steps in the pipeline, such as segmenting a structure and then measuring it, so that at least the intermediate output can be checked by eye.

Explanations and the people reading them

There is an assumption behind all this that showing an explanation helps the clinician make a better decision. The evidence for that is mixed, at best.

Gagan Bansal and colleagues ran experiments in 2021 in which people made decisions with AI advice, with and without explanations. Explanations made people more likely to accept the AI's recommendation whether it was right or wrong. So an explanation can raise trust without raising accuracy, which is the opposite of what it's for. A confident-looking heat map on a wrong prediction may be worse than no heat map.

If your tool is going to show explanations to users, we'd treat that as part of the intervention and test it. Do readers with the explanation perform better than readers with the prediction alone? 5.5 Reader Studies and 8.4 Human-AI Interaction and User Interface Design cover how.

What to do in your own project

Use explanation methods during development, as a debugging tool. Look at maps for a few hundred cases, including the errors, and look for attention on things that shouldn't count: markers, borders, devices, text.

Run a sanity check on the method. Randomize the model's weights or shuffle the labels and see whether the maps change. If they don't, the method isn't telling you about the model.

Follow up anything suspicious with a direct test. Mask the suspected shortcut and re-measure performance, or evaluate on the subgroup where the shortcut is absent.

In a paper, present maps as illustrations. A panel of four well-chosen heat maps shows that the model looked in the right place four times. If you include them, say how the examples were selected, and include some failures.

Don't offer explanations as a substitute for validation. The grounds for trusting a model are its performance on independent data, in the relevant subgroups, with a sound reference standard. Ghassemi and colleagues' conclusion was that for now, rigorous validation is the more reliable route to trust, and we agree.

Regulators have taken a similar line. Their emphasis is on transparency about the model: what it was trained on, how it performs and for whom, and what its limits are (see 7.5 Transparency and Reproducibility). A per-prediction explanation is not generally required.

Key takeaways

  • An interpretable model can be followed directly. An explanation is a separate approximation of a model that can't be, and it may be wrong about that model.
  • Saliency maps are good for finding shortcuts during development. They localize findings worse than radiologists, some are insensitive to the model's weights, and they show where the model responded without showing why.
  • Attention maps have the same limits.
  • SHAP rankings are useful for checking a tabular model against clinical sense. They describe the model and are not causal.
  • Concept-based methods explain in clinical terms and need concept labels.
  • For tabular data, try an interpretable model first; it often performs about as well. For images the tradeoff is real.
  • Explanations can increase trust in wrong predictions. If users will see them, test their effect.
  • Explanations support debugging. Trust comes from validation.

This article is part of the AI in Clinical Research Knowledge Base.