Forecasting Deployment Failure by Deleting Shortcut Nodes

Medical imaging models often score well on historical test sets and then fail in the clinic. A common cause is that the historical data contain a cue the live setting does not. The textbook case is pneumothorax, a collapsed lung. In archived chest X-rays, many positive images were taken after a chest tube was already inserted, so a classifier learns "tube means pneumothorax." At the moment the model is actually needed, which is the first film of an untreated patient, the tube is not there. The standard audit, scoring the model separately on archived films without tubes, cannot fully answer the question. The deployment population it should represent, large untreated pneumothoraces, is almost missing from the archive, because those patients were treated and re-imaged. The cell of the data we need to measure is nearly empty.

We propose to fill that cell with counterfactuals. We would build a model that reads an image as a graph: anatomical regions and local patches are the nodes, and edges connect neighbors. The model is trained, as graph networks in routing and pursuit problems are, to handle node sets of varying size and layout. Hardware and text markers become separate nodes. Deleting a node then produces an input the model has already seen many times, just a smaller graph, and not a corrupted image. Scoring post-tube films with the tube node removed gives a pre-deployment estimate of how the model will perform on untreated patients. We would check that estimate against real pre-tube films of the same patients.

Core Claim

The retrospective-prospective gap in imaging contains a component that tabular analyses have not named: shortcut-availability shift. This is the change in how often label-correlated artifacts are present between the archive and the intended-use population. We claim this component can be forecast before deployment, per case and in aggregate, by deleting nodes from a graph model trained to generalize across topologies. We further claim that this forecast is more accurate than either of the two usual audits. The first usual audit scores the model on the naturally artifact-free subset. The second usual audit applies pixel-level inpainting to a convolutional network.

The key ingredient is not graphs as such. It is that node absence is in-distribution. A convolutional or vision-transformer model trained on complete images treats an inpainted hole as a new artifact. A message-passing model trained on variable-size graphs treats a missing node the same way it treats a patient who never had a tube.

The prior work plays three roles here. Motivating it, Hidden Stratification showed pneumothorax AUC of 0.94 with chest drains versus 0.77 without on NIH ChestX-ray14. Mind the Performance Gap decomposed a live deployment gap into infrastructure and temporal shift on tabular records. That decomposition has no term for artifact availability and no imaging component. We add both.

Supplying the method, message-passing networks with shared local parameters transfer zero-shot across topologies. The file documents this in routing (Towards Real-Time Routing Optimization) and in pursuit on unseen street graphs of up to about 2,000 nodes (R2PS). We borrow that property for anatomy, a domain the file notes it has not been tested in.

Closest to our design are two graph-based shortcut papers. GD-ViG builds patch graphs from chest X-rays and prunes edges to regions radiologists did not look at. XIGL removes shortcuts from graph networks through human-corrected explanations, but only on synthetic and superpixel graphs. Both use graph structure to train a more robust classifier on static benchmarks. Neither uses node deletion as an intervention, and neither estimates deployment performance or checks such an estimate against a deployment-like population. Our main output is a validated forecast, not a new classifier.

Research Program

Building the graph. A lung-and-heart segmentation divides each frontal film into anatomical zones: apices, upper, middle and lower zones, costophrenic angles, and mediastinum. Each zone is tiled into patches. Two edge types connect the patches: patches adjacent within a zone, and adjacent zones.

To prevent leakage from devices into anatomy, patch features come from an encoder with no cross-patch attention. A device pixel can therefore only affect the patch it lies in. A device segmenter, trained on the non-expert tube annotations distributed with TheoSourget/clip_cxr_fairness, flags patches covered by tubes, catheters, or burned-in text. Those patches are reassigned as device nodes, connected to the zones they overlap. Deleting a device node therefore removes all pixel evidence about that device. The cost is that the lung tissue under the tube is removed as well.

Training for topological generalization. A message-passing classifier is trained with random subgraph sampling. Zones and patches are dropped at random, including anatomical ones, so node count and layout vary widely across training examples. This mirrors how routing and pursuit models are trained over many topologies. The deletion variability is what makes "the same graph minus the tube" an input the model has effectively seen.

The forecast. Let $f$ be the model's score and $G_i \setminus D_i$ the graph of image $i$ with its device and marker nodes $D_i$ deleted. The estimated deployment AUROC is computed on a synthetic intended-use cohort. Its positives are the naturally tube-free positives together with $G_i \setminus D_i$ for each tube-positive image. Its negatives are tube-free negatives. The two positive groups are reweighted to match an assumed intended-use mix of pneumothorax sizes:

$$\widehat{\mathrm{AUC}}_{\mathrm{dep}} = \Pr\big(f(\tilde G^{+}) > f(G^{-})\big),$$

where $\tilde G^{+}$ is a positive drawn from the reweighted pool and $G^{-}$ is a tube-free negative. We also report sensitivity at the operating point fixed on the archive. That number is the one a live deployment would actually feel.

Extending the gap decomposition. Following Mind the Performance Gap, we split the observed gap between archive and index films into three terms. The first is shortcut availability, which the counterfactual captures. The second is pipeline differences, such as burned-in text and resolution. The third is residual population shift, which counterfactuals cannot capture.

Baselines

The naive reference point is the aggregate retrospective test AUROC used as the deployment estimate. This is what most papers implicitly report. On CXR14 it corresponds to the pooled figure that Hidden Stratification showed hides a drop from 0.94 to 0.77.

The strongest existing audit is stratified evaluation in the manner of that paper: scoring the model only on archived tube-free cases, with tube status taken from the same device segmenter or from expert annotations. It is the strongest competitor because it needs no counterfactual machinery and is already accepted clinical practice.

The strongest pixel-space competitor applies device inpainting to a standard DenseNet-121. We then score the inpainted images with both the DenseNet and our graph model.

All three estimators receive the same trained models, the same device masks, and the same test images, so they differ only in how the deployment number is computed. The forecast is beaten if our estimator's absolute error against the realized index-film AUROC is smaller than stratified evaluation's. The margin must hold under a paired bootstrap across the audited models, and our per-case counterfactual scores must track the real pre-tube scores better.

For context on the models being audited, we include the strongest published robust classifiers as audit targets, not as forecasting competitors. The multi-stage lung-crop pipeline of Pneumothorax and chest tube classification reports AUC 0.948 on tube-free images versus 0.958 overall on its private cohort. Full-mask supervision in Reducing Reliance on Spurious Features reports robust AUROC of 0.82 on SIIM-ACR, against 0.46 for binary labels.

The ablation that isolates our key ingredient is the identical graph model trained without random subgraph sampling. In that version, node deletion is out-of-distribution. If its forecasts are as good, the "absence is in-distribution" argument fails.

Why not just…?

Why not just score the model on tube-free archived cases? This is the real threat. If archived tube-free positives resembled first-presentation films, it would suffice. The concern is that they are enriched for small, untreated, or missed pneumothoraces. Pneumothorax and chest tube classification found 9 confirmed missed pneumothoraces in a 20,000-study audit, which hints at how odd this stratum is. The paired index-film experiment below settles it directly. If stratified error is no worse than ours, we report that honestly and drop the forecasting claim.

Why not just inpaint the tube and rerun a standard CNN? Inpainting creates a region the network never saw during training. The file also shows that pixel-level explanations of such networks track pathology poorly: Benchmarking saliency methods and Agreement Between Saliency Maps and Human-Labeled Regions report failures against expert regions. So there is little reason to expect pixel edits to yield faithful counterfactuals. We run this baseline anyway. If inpainting on the DenseNet forecasts as well as node deletion on the graph model, then the graph model is unnecessary.

Why not just build a robust model, such as a lung-crop pipeline, and skip forecasting? Robust models still need a pre-deployment estimate, and that estimate is what regulators and hospitals lack. A crop also does not remove a tube lying inside the lung field. We audit the crop pipeline with our estimator, so this alternative is a customer for the method rather than a replacement.

Why not just drop tokens in a vision transformer? A transformer over patches is a fully connected graph, so this is inside our family. The difference is the training variability and the absence of cross-patch leakage in the features. The subgraph-sampling ablation, plus a token-drop transformer trained on complete images, tests whether those ingredients matter.

Proposed Experiments

Data. We use NIH ChestX-ray14 and MIMIC-CXR, which have tube annotations via the fairness repository, plus SIIM-ACR for pneumothorax masks.

The decisive experiment uses longitudinal pairs. Within patient histories, we identify pneumothorax patients whose first positive film is tube-free and whose later film has a tube. The first films form a real index cohort, the closest available proxy for prospective first-detection use. For each audited model we compare three estimates against the realized AUROC and fixed-threshold sensitivity on these index films: the naive estimate, stratified evaluation, and inpainting versus node deletion. The audited models are DenseNet binary, mask-supervised, lung-crop, graph model, and GD-ViG where gaze data permit on EGD-CXR.

At the patient level we measure the rank correlation between each post-tube film's counterfactual score and the same patient's real pre-tube score. Because pneumothorax size can change between the two films, we stratify by size from the SIIM-style masks where available. No reported result found on Lacuna for paired pre-/post-tube forecasting on any of these datasets.

The second check is shortcut dependence under training-set scaling. Rethinking annotation granularity found that adding 179,919 CheXpert images hurt external performance. We train models on nested subsets and ask whether the forecast predicts which scale degrades on index films before the index films are scored.

The third check is the pipeline term. We apply the same deletion to burned-in text nodes to separate the text contribution from the tube contribution in the decomposed gap.

Conditional prospective step. If the retrospective checks pass, a partner site would run the audited models in silent mode on incoming frontal films for a pre-registered window. The pre-registered forecast would be compared against the live number. No prospective figure is claimed here.

The proposal fails cleanly in three cases: if stratified evaluation matches our error, if the no-sampling ablation matches it, or if counterfactual and real pre-tube scores are uncorrelated.