Medical image classifiers often get the right answer for the wrong reason. A classic case is a pneumothorax detector, which is meant to spot a collapsed lung. On the SIIM-ACR chest X-ray benchmark, such a detector learns to look for the chest drain that clinicians insert to treat the condition. On patients who have no drain yet, which are exactly the patients who need the detector, it scores a robust AUROC of 0.46, worse than chance (Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity). Robotics and control have long handled this kind of untrustworthy neural output with a safety shield: a small, deterministic rule checker that intercepts each output before it is acted on and overrides it when a rule is broken (Shield synthesis; RoboSafe). We propose putting such a shield in front of a medical diagnosis. The rule it enforces is simple and clinical: a diagnosis is accepted only if the image findings that define that disease are visibly present. If they are not, the case goes to a radiologist.
A shield is only as honest as the facts it is fed. A known weakness of runtime shields is that when the perception module is fooled, the shield certifies a false world (A Survey on Verification and Validation, Testing and Evaluations of Neurosymbolic Artificial Intelligence). Concept-based medical models can feed the shield readable facts such as "visible pleural line" or "chest tube present." These are concept bottleneck models, which predict human-named findings first and the diagnosis second (Concept Bottleneck Models). However, their concept scores come from a black-box image encoder that can leak shortcuts and can be flipped by small perturbations. The second half of the proposal therefore hardens those concept scores against perturbation. It does so without the large cost of full adversarial training, by freezing the encoder and training only a handful of appended input tokens (Robustness Tokens). In two sentences: route each diagnosis through a rule that demands its defining findings, and make those finding scores hard to fake. We expect this to catch shortcut-driven diagnoses, including shortcuts nobody named in advance, at a cost of a few hundred optimization steps rather than a full min-max retraining.
Core Claim
Our central claim is that a rule of the form "this diagnosis requires these findings," evaluated on concept scores that are robust to perturbation, catches a large share of shortcut-driven errors that a classifier's own confidence does not catch. The reason is structural. Shortcut errors are typically confident, which is what a below-chance AUROC means. They are also driven by evidence outside the disease's defining findings. A linear concept-to-label layer can freely weight any concept that correlates with the label, including concepts that silently encode the drain tube. A necessity rule cannot do this. Because the rule only references findings, it does not need the confounder to be named in advance. That property addresses the dependence on pre-specified confounders that limits disentanglement methods like MIMM-X.
The claim has a second, falsifiable part. The rule only helps if the finding scores themselves are not shortcut-driven or easily flipped. We predict that a shield running on unhardened concept scores lets through a substantial fraction of shortcut cases, because the "pleural line" score partly fires on tubes. We also predict that cheap token hardening closes much of that gap. If hardening does not reduce the shield's leak rate, the second half of the idea is wrong, and the proposal reduces to a rule layer over a standard concept model.
Research Program
The predicate layer reuses the recipe of Robust and Interpretable Medical Image Classifiers via Concept Bottleneck Models. That work elicits clinical concepts with a language model, scores them with a frozen medical vision-language encoder, and reports 50.7% versus 9.4% accuracy on NIH-age over raw features. It is our predicate supplier. It contains no rule checking and no adversarial evaluation, and we add both. We also apply the visual filtering of Concept Bottleneck with Visual Concept Filtering, which removes non-visual concepts like "common in elderly patients," because a shield predicate must be something the image can show. Robustness tokens attach to transformer inputs, so we use a transformer image encoder. Where the prior concept model's encoder is not a transformer, we re-run that baseline on our encoder so the comparison is like for like.
For each task, the shield's rule set is small and written with a clinician. It has three kinds of rule. The first is necessary findings per diagnosis, for example pneumothorax requires a visible pleural line or absent peripheral lung markings, and melanoma requires asymmetry, border irregularity or colour variation. The second is mutual-exclusion and anatomical-consistency rules between diagnoses. The third is artifact predicates, such as chest tube, skin marker, ruler or open growth plates, whose presence raises the evidence bar.
Concretely, let $s_f(x)$ be the hardened score of finding $f$ on image $x$, let $R(d)$ be the required findings of diagnosis $d$, and let $a(x)$ indicate that any artifact predicate fires. A positive call for $d$ is accepted only if
$$\max_{f \in R(d)} s_f(x) \ \ge\ \tau + \Delta \cdot a(x),$$
where $\tau$ is an acceptance threshold and $\Delta \ge 0$ is the extra margin demanded when an artifact is visible. Symmetrically, a negative call is deferred when some required finding clears the same bar. This second direction targets untreated positives that the shortcut model misses. Every rejected or deferred case goes to a human reader with the violated rule attached. That attached rule doubles as the explanation, and it is checkable in a way that saliency maps are not (Benchmarking saliency methods for chest X-ray interpretation).
Hardening follows the dual objective of Robustness Tokens, moved from feature space to concept space. With the encoder frozen, we train about ten appended tokens. One term keeps clean concept scores unchanged relative to the untokened model. The other keeps concept scores under a bounded perturbation close to their clean values. Perturbations come from a few attack steps per batch. Gradients still flow through the frozen encoder, but only the tokens update, and the original work converges in about 200 steps. We report the full accounting of forward and backward passes rather than claiming the cost is free.
A natural concern is that hardening against pixel-level adversaries is unrelated to hardening against shortcuts. Two pieces of evidence suggest otherwise. Improving Interpretability in Medical Imaging Diagnosis using Adversarial Training shows that robust training on HAM10000 pulls attributions onto lesion borders and colour variation, so robustness acts partly as a shortcut regularizer. That work used full PGD training, which costs many extra passes per step, and lost accuracy from about 72% to about 62%. We test whether the token version buys the same effect at the predicate level.
Baselines
The naive reference point is a standard binary classifier fine-tuned on the same encoder. Its reported robust AUROC on SIIM-ACR is 0.46 (Reducing Reliance on Spurious Features). The same paper reports only "worse than random" on the robust ISIC split, with no number given.
The first strong competitor is the unshielded concept bottleneck model of Robust and Interpretable Medical Image Classifiers via Concept Bottleneck Models, rebuilt on our encoder, with concept filtering applied. It is the closest existing system to ours: it has the same concepts and the same frozen encoder, and it lacks only the rules and the hardening. Its reported 50.7% on NIH-age is the bar on that benchmark.
The second competitor is spatial supervision. It reports robust AUROC of 0.72 on SIIM-ACR with bounding boxes and 0.82 with segmentation masks, and 0.73 on ISIC with masks (Reducing Reliance on Spurious Features). It uses dense annotation that our method does not. We therefore compare at two points: full masks, and the roughly 600-mask regime that paper highlights.
On the age-confounded Covid CXR set, the comparator is eXBL, which reports 0.90 accuracy and 0.35 lung activation precision (Unlearning Spurious Correlations in Chest X-ray Classification). On CheXpert pleural effusion with inverted correlations, the comparator is MIMM-X at 70.4%. MIMM-X is given its confounder labels, which our method does not receive.
For robustness, the competitor is full PGD adversarial training of the same encoder plus concept head. We report its cost alongside its results. We found no reported result on Lacuna for adversarial robustness of concept bottleneck models on medical images, so all attacked-accuracy numbers there will be new. The only reference figure for tokens is the natural-image one: 63.1% attacked accuracy versus 0.3% undefended on DINOv2-G ImageNet.
Shielding changes coverage, so every non-deferring baseline is also run as a selective classifier. That is, it abstains on its least-confident cases, at exactly the shield's deferral rate. Accuracy on accepted cases is then compared at matched coverage.
All methods share the same images, encoder, concept set, and a fixed hyperparameter-search budget. Thresholds $\tau$ and $\Delta$ are tuned on a validation split drawn from the confounded training distribution, never from the robust test split.
Four ablations isolate the key ingredients. The first runs the shield on unhardened scores. The second runs hardened scores without the shield. The third drops artifact predicates, setting $\Delta=0$. The fourth replaces the necessity rule with a learned threshold on the concept model's output.
Beating the field means two things. First, a higher robust AUROC or robust accuracy on accepted cases than the matched-coverage concept model and the selective classifier. Second, robust AUROC on SIIM-ACR approaching the 0.72 that bounding boxes achieve, without box annotation.
Why not just…?
Why not just abstain when the concept model is unsure? This is the most serious threat. If shortcut errors were low-confidence, selective prediction would match the shield at no design cost. The 0.46 robust AUROC on SIIM-ACR suggests these errors are confidently wrong, but that is an inference. The matched-coverage comparison settles it. If confidence-based abstention reaches the same accepted-case accuracy on the robust split, the rules add nothing and we will report that.
Why not just remove artifact concepts from the bottleneck? Deleting "chest tube" from the concept list is cheap. It does not stop other concepts from absorbing the tube signal, which is the concept-leakage problem. Algorithms Trained on Normal Chest X-rays Can Predict Health Insurance Types shows that encoders carry hidden confounders even in normal images. We measure leakage directly by training a probe to predict tube presence from the remaining finding scores. We also run the artifact-dropped concept model as an extra baseline.
Why not just use segmentation masks or full adversarial training? Both work. Masks reach 0.82 robust AUROC, and PGD training sharpens attributions on HAM10000. Masks, however, need dense radiologist labour per disease. PGD training costs many passes per step and lost about ten points of accuracy in the dermatology study. Our claim is not that we beat masks at full annotation. It is that we approach the box-level result with no spatial labels and, unlike either method, give a per-case, rule-level reason for rejection. The cost-matched PGD comparison shows whether tokens recover most of PGD's effect on predicate stability.
Why not just balance the training data? MIMM-X reports baselines collapsing to 27.2% on inverted brain-MRI splits even when trained on multi-site data. Confounders such as acquisition protocol cannot all be balanced away without discarding large parts of the cohort.
Decisive Checks
We run on SIIM-ACR and ISIC with their robust splits, Covid CXR, confounded NIH-CXR, CheXpert-inverted, and HAM10000.
The headline check is the leak rate: the fraction of counter-correlated cases misclassified by the base model that the shield nonetheless accepts. The cases are untreated pneumothorax, tube-present negatives, and marker-bearing benign lesions. We predict that the leak rate falls substantially from unhardened to hardened predicates, and that it is well below the matched-coverage abstention baseline.
The unknown-confounder check uses Covid CXR, whose growth-plate shortcut is deliberately excluded from the artifact rules. There, only the necessity rule can catch the shortcut. If it does not, the claim of catching shortcuts nobody named fails.
The robustness check attacks the concept scores directly. We report the predicate flip rate and the fraction of attacks that make the shield accept a false diagnosis, against both undefended and PGD-trained encoders, with GPU-hours reported.
Finally, a clinician audit on a sample of deferred cases records how often the violated rule correctly names why the case is suspect. This tests whether the shield's explanations are more trustworthy than saliency maps, which Agreement Between Saliency Maps and Human-Labeled Regions of Interest found often disagree with expert regions.
References
- Reducing Reliance on Spurious Features in Medical Image Classification with Spatial Specificity
- Shield synthesis
- RoboSafe: Safeguarding Embodied Agents via Executable Safety Logic
- A Survey on Verification and Validation, Testing and Evaluations of Neurosymbolic Artificial Intelligence
- Concept Bottleneck Models
- Robustness Tokens: Towards Adversarial Robustness of Transformers
- MIMM-X: Disentangling Spurious Correlations for Medical Image Analysis
- Robust and Interpretable Medical Image Classifiers via Concept Bottleneck Models
- Concept Bottleneck with Visual Concept Filtering for Explainable Medical Image Classification
- Benchmarking saliency methods for chest X-ray interpretation
- Improving Interpretability in Medical Imaging Diagnosis using Adversarial Training
- Unlearning Spurious Correlations in Chest X-Ray Classification
- Algorithms Trained on Normal Chest X-rays Can Predict Health Insurance Types
- Agreement Between Saliency Maps and Human-Labeled Regions of Interest: Applications to Skin Disease Classification