Explaining Masked-Pretrained Medical Models Without a Surrogate

Medical imaging models now reach strong diagnostic accuracy from very few labels because they are first pretrained on large unlabeled archives by masked modeling: hiding most of an image (and sometimes its report) and learning to reconstruct it. Clinicians also need to know why a model flagged a scan. The faithful way to answer is to remove parts of the input and watch the prediction change, which costs hundreds or thousands of forward passes through a large network. Fast "amortized" explainers, meaning a second network trained to output an explanation in one pass, remove that test-time cost. They then pay it during training instead. The best-known one, FastSHAP, first trains a separate surrogate model that learns how the classifier behaves when features are missing, and its attributions are only as good as that surrogate.

Our observation is that a masked-pretrained model already knows how to predict from an incomplete input, since that was its pretraining task. If we keep that ability alive during low-label fine-tuning by continuing to drop image patches at random, the fine-tuned classifier can serve as its own surrogate. Removing a patch then simply means not feeding that token. An amortized Shapley explainer can be trained on the abundant unlabeled scans with no surrogate network and no precomputed attribution labels, and it is served as a small head on the same backbone. The property that makes these models label-efficient is the same property that could make them cheap to explain faithfully. We propose to test whether that holds.

Core Claim

Consider a Vision Transformer classifier fine-tuned on 1% of CheXpert labels from a masked image-report pretrained backbone, such as MRM. We claim that its native missing-feature behavior, obtained by dropping tokens with mask-preserving fine-tuning, gives a value function for Shapley attribution that is at least as faithful as a separately trained FastSHAP surrogate. We further claim that an explainer amortized on that value function, trained only on unlabeled MIMIC-CXR images, matches FastSHAP's fidelity at a fraction of its training compute, and does so at a cost of one extra head evaluation at test time.

Concretely, for an image $x$ split into $d$ patch groups and a subset $S$ of those groups, define the value $v_x(S) = f(x_S)$. Here $f$ is the fine-tuned classifier's log-odds for the class of interest, and $x_S$ means only the tokens in $S$ are passed to the encoder. The explainer $\phi_\theta(x) \in \mathbb{R}^d$ is trained with FastSHAP's weighted least-squares objective,

$$ \mathcal{L}(\theta) = \mathbb{E}_{x}\,\mathbb{E}_{S \sim p_{\text{Sh}}}\Big[\big(v_x(S) - v_x(\varnothing) - \mathbf{1}_S^\top \phi_\theta(x)\big)^2\Big], $$

where $p_{\text{Sh}}$ is the Shapley kernel distribution over subsets and $\mathbf{1}_S$ is the indicator vector of $S$. The minimizer of this objective is the Shapley value of $v_x$. The objective needs only queries to $f$ on unlabeled images, never ground-truth attributions. What is new is that $v_x$ requires no learned surrogate, because masked pretraining plus mask-preserving fine-tuning makes $f(x_S)$ an in-distribution evaluation rather than a guess on zero-filled or blurred images.

Relation to Prior Work

Two lines of work motivate the proposal. The first shows that explanation latency blocks deployment. Farrukh et al. describe intrusion-detection systems forced to delay explanations behind automatic mitigation. Nagesh et al. find iterative counterfactual search too slow for clinical workflows and replace it with a generative model. The second line shows that masked and cross-modal pretraining delivers strong accuracy at 1% labels. MRM masks 75% of radiograph patches and half the report tokens and reports 88.5% mean AUC on CheXpert at 1% labels. MGCA aligns image and report at instance, token and prototype level and reports 88.8% AUROC at the same budget. Neither paper addresses how these models are explained, and both produce large Transformer backbones for which perturbation explainers are expensive.

The method comes from amortization. FastSHAP supplies the objective above. It also supplies the two-stage design we remove: a surrogate model trained to imitate the classifier under missing features. That paper notes attributions are biased when the surrogate misestimates missing-feature behavior. We keep its objective and replace the surrogate with the model itself.

Three adjacent works try to make explainers cheaper to train. CoRTX learns explanation representations contrastively and still fine-tunes on a 5% seed set of precomputed Shapley values. It was evaluated on tabular data and CIFAR-10. DeepFaith reaches 3.1 ms per explanation on ImageNet with DeiT, but bootstraps from 14 teacher explainers computed over the whole training set. TVE and its companion LETA attribute patches to a generic backbone embedding, transfer zero-shot across downstream classifiers, and run at about 100 images per second. They are bounded by what the natural-image backbone encodes and were not tested on medical images. All of these assume the target model's missing-feature behavior must be learned or approximated from outside. We test whether masked pretraining has already learned it.

AIM produces attribution in the forward pass through learned masks, but uses a convolutional feature pyramid with full labels. We use it as a point of contrast, not a baseline, because it changes the classifier's architecture.

One prior concern constrains the design directly. The research file's reading of masked models like MRM and Brant is that their robustness to missing patches may make perturbation-based importance look artificially small. We take this seriously rather than dismissing it. Robustness to removal is exactly what a conditional-expectation value function should show when other patches carry redundant evidence, but it could also wash out real signal. For that reason the proposal judges fidelity not only by deletion curves, which share the removal operator and can be circular, but also against independent expert localization.

Research Program

The first component is mask-preserving fine-tuning. Starting from MRM's released pretrained ViT, we fine-tune on CheXpert 1% and 10% splits with two loss terms. One is the standard loss on full images. The other is the same classification loss on views where a random fraction of patch tokens is dropped, with the fraction drawn uniformly so that all subset sizes are covered. We report classification AUC to check that this costs no accuracy. MGCA serves as a second backbone to test generality across pretraining objectives.

The second component is the native value function. We compare four ways of removing patches from $x$: token dropping in the mask-preserved model, token dropping in a conventionally fine-tuned model, zero or mean filling, and FastSHAP's trained surrogate. The comparison is made on a subset of 500 test images. On each, we estimate near-exact Shapley values for a $7\times7$ grid of patch groups by running KernelSHAP with a large budget. This step is expensive but done once.

The third component is the amortized head. It is a small transformer head reading the backbone's patch tokens and is trained with the objective above on unlabeled MIMIC-CXR images, with FastSHAP's efficiency normalization. We record total training compute in model queries and GPU-hours, against FastSHAP's surrogate-plus-explainer pipeline.

The fourth component, conditional on success, is a 1D extension to 12-lead ECG on PTB-XL. There, segments of time and leads take the place of patches, and Mehari and Strodthoff supply the label-scarce setting. We include it only as a transfer check, since no masked ECG backbone in the file has released localization ground truth.

Baselines

The naive reference points are gradient methods, which are free or cheap. GradCAM and attention rollout are computed from the same fine-tuned ViT. Integrated Gradients is run with a 50-step path. These show what a deployment team gets with no added machinery. For latency context, DeepFaith reports Integrated Gradients at nearly 100 ms per sample on ImageNet with DeiT. On Imagenette, FastSHAP reports an Exclusion AUC of 0.65 for Integrated Gradients against 0.51 for FastSHAP, where lower is better.

The fidelity reference is KernelSHAP with token dropping on the mask-preserved model, run at a budget matched to our explainer's total training queries and also at a large budget. It defines the target but is far too slow for deployment.

The strongest competitor is standard FastSHAP. It uses a surrogate trained on the same unlabeled MIMIC-CXR images to imitate the classifier under masking, followed by an explainer of identical architecture to ours. Both pipelines get the same unlabeled data and the same total query budget, and each gets the same tuning budget of 20 hyperparameter trials. FastSHAP's reported Imagenette Exclusion AUC of 0.51 (against 0.68 for KernelSHAP) is the published number to reproduce in our sanity run. On chest radiographs, no reported result for FastSHAP was found on Lacuna. Beating it means one of two outcomes: our explainer matches FastSHAP's error against the near-exact Shapley values within confidence intervals while using at most half the training compute, or it lowers that error at equal compute.

We also run TVE zero-shot with its ImageNet backbone. It needs no training on the target, so it is the cheapest amortized option. CoRTX is run with its 5% Shapley seed set as a label-dependent reference.

Two ablations isolate the key ingredient. The first removes mask-preserving fine-tuning but keeps token dropping. The second keeps mask preservation but removes patches by zero filling. If either matches the full method, the claim that masked pretraining kept alive by fine-tuning is what does the work is wrong.

Why not just…?

Why not just use attention maps or GradCAM, which are already single-pass? They are the right default if they are faithful, and the experiment checks that directly. The prior evidence goes against them. FastSHAP reports that Integrated Gradients is clearly worse than amortized Shapley on Imagenette exclusion. CoRTX reports that GradCAM highlights are noisier and broader on CIFAR-10. Neither result is on radiographs, so we compare all methods against RSNA Pneumonia bounding boxes and SIIM-ACR pneumothorax masks. If GradCAM localizes as well as our explainer and agrees with the large-budget Shapley values as closely, the added head is not justified and we will say so.

Why not just run FastSHAP with its own surrogate on unlabeled data? This is the real threat. A surrogate distilled on abundant unlabeled scans may imitate the classifier under masking perfectly well, in which case our contribution shrinks to skipping one training stage. The head-to-head comparison at matched compute settles it. Our hypothesis predicts a fidelity advantage specifically where the surrogate must extrapolate, namely very small subsets and rare findings. A compute advantage should appear everywhere. If neither appears, the hypothesis is refuted.

Why not just apply TVE zero-shot? It needs no target training at all, which makes it attractive. But its own authors note that it cannot attribute features its natural-image backbone failed to encode, and subtle radiographic findings are a likely case. If zero-shot TVE matches localization on RSNA and SIIM, that would argue for transferable explainers over per-model ones in medicine. That would be a useful finding even though it counts against us.

Why not just run KernelSHAP offline, since radiology reads are not millisecond-critical? For single reads this is reasonable. Latency matters for worklist triage and interactive review, where every scan in a queue needs an explanation. We report wall-clock cost for a realistic queue so readers can judge where the threshold falls.

Proposed Experiments

The decisive check rests on three measurements. The first is the classification AUC of mask-preserving fine-tuning on CheXpert at 1% and 10%, compared with standard fine-tuning of the same MRM backbone. A drop of more than half a point would make the approach unattractive regardless of explanation quality. MRM's reported 88.5% mean AUC at 1% is the reference.

The second is attribution error against near-exact Shapley values on the 500-image subset, together with insertion and exclusion AUC. Insertion and exclusion are computed under both token-drop removal and zero-fill removal. Comparing the two directly tests whether masking robustness causes importance to be underestimated.

The third is localization against expert annotation, which does not depend on any removal operator: the pointing game and energy-in-box on RSNA Pneumonia boxes, and overlap with SIIM-ACR pneumothorax masks, at the 1% label budget where MGCA reports 12.9% detection mAP and 49.7% Dice.

Throughout, we report latency per image, explainer training cost in model queries, and the Imagenette sanity run against FastSHAP's published 0.51 Exclusion AUC.

The central claim is supported if three things hold together: the native value function tracks the large-budget Shapley values at least as well as FastSHAP's surrogate, the ablations without mask preservation lose that advantage, and localization on RSNA and SIIM beats GradCAM. If FastSHAP matches us at equal compute, the claim reduces to an engineering simplification and will be reported as such.