Leave-One-Finding-Out Counterfactuals for Separating Overlapping Chest X-ray Findings

Many chest X-ray findings look almost the same. Consolidation, atelectasis (partial lung collapse), infiltration and generic "lung opacity" can all appear as a whitish region in the same lower lung zone, and they often occur together in one patient. Drawing boxes or masks for each finding requires a radiologist, so most training data carries only image-level labels mined from reports. The usual ways of turning image-level labels into locations either highlight only the single most class-specific blob, or, for counterfactual methods that "heal" the image, return one merged map of everything abnormal. Neither tells you which pixels belong to which of two look-alike findings, or which pixels are evidence for both.

We propose to train one image-editing generator, guided by a multi-label classifier, that removes exactly one finding at a time while keeping every other present finding intact, and also removes all findings at once. The pixels that change when only finding k is removed form k's map. The pixels that change when k or j is removed, but that cannot be removed for one without lowering the classifier's score for the other, form an explicit shared-evidence map. The method therefore does not force a separation that the image may not support. It reports where the evidence is specific to one finding and where it overlaps. We test this on VinDr-CXR, whose training images were each labeled by three radiologists independently. That allows a check no prior method in this area has run: whether the predicted shared-evidence regions coincide with the places where expert readers themselves disagreed about which look-alike finding was present.

Core Claim

Counterfactual inpainting can produce class-separated weak localization for visually overlapping, co-occurring findings, without pixel labels, if two conditions hold. First, the counterfactual is "leave one finding out" rather than "make the image healthy." Second, the per-finding edits must jointly account for the all-findings edit. The second condition turns the classifier's own confusion into something measurable, where before it silently corrupted the masks.

This builds on COIN, which trains a perturbation generator to flip a binary classifier from abnormal to normal and uses the residual as a segmentation mask. It also builds on PathoGAN, which subtracts a synthesized healthy image from the diseased one. Both are binary. With pleural effusion plus consolidation, they return one undifferentiated difference map, and they inherit any confusion in the upstream classifier. CoFE does use class-changing counterfactuals between anatomically similar images, but it swaps discrete patches until the diagnosis flips, and it uses the result only to improve report text, never to output locations. Our proposal differs from all three in being multi-label and holding other findings fixed. Its central new element is the shared-evidence decomposition.

Research Program

We first train a multi-label classifier $f$ on image-level labels. Then we train a generator $G(x, \tilde{y})$ that edits a radiograph $x$ so that $f$ predicts a target label vector $\tilde{y}$ while changing as little as possible. For an image with present findings $P$, let $y^{-k}$ be the observed labels with finding $k$ switched off, and let $\mathbf{0}$ be the all-absent vector. The residuals are $r_k = |x - G(x, y^{-k})|$ and $r_\text{all} = |x - G(x, \mathbf{0})|$. The training objective is

$$ \mathcal{L} = \sum_{k \in P} \Big[ \ell\big(f(G(x,y^{-k})), y^{-k}\big) + \lambda \lVert r_k \rVert_1 \Big] + \ell\big(f(G(x,\mathbf{0})), \mathbf{0}\big) + \mu \,\big\lVert r_\text{all} - \max_{k\in P} r_k \big\rVert_1 . $$

Here $\ell$ is binary cross-entropy summed over classes. $\lambda$ sets how sparse each edit is, and $\mu$ weights the consistency term. The consistency term says the healthy-making edit should equal the pixelwise union of the single-finding edits. Without it, a generator can satisfy "remove consolidation" through a small discriminative patch and leave the rest of the opacity unexplained. That is the discriminative bias that the ISIC localization paper documents for natural images.

The cross-entropy over $y^{-k}$ includes the other present classes. Because of that, removing consolidation is penalized if the classifier's atelectasis score also falls. Pixels the generator cannot remove for one finding without hurting the other show up as large in both $r_k$ and $r_j$. We define the shared map $s_{kj} = \min(r_k, r_j)$ and the specific maps $r_k - s_{kj}$. Maps are thresholded and converted to boxes for evaluation against box-labeled benchmarks.

The analysis has two strands. One measures how localization changes for confusable pairs relative to well-separated findings. The other tests whether the size of $s_{kj}$ predicts reader disagreement. That second strand speaks to an open tension in the file: DeepLesion found that forcing category separation helped detection, while Point Beyond Class had to merge rare classes into "Others" for training to stay stable. Our hypothesis is that explicitly allowing shared evidence avoids the collapse that forced merging was working around.

Baselines

The naive reference point is Class Activation Mapping from the same multi-label classifier, in the style of ChestX-Ray8. That paper trains with log-sum-exp pooling on report-mined labels and reads heatmaps per class. We use our own classifier $f$, so every method shares one backbone and one set of labels. Beating it means higher per-class box overlap on confusable classes, not only on easy ones such as cardiomegaly.

The closest existing method is COIN run per class. One binary generator is trained for each finding against a one-vs-rest head of $f$, with no constraint on other findings and no joint consistency. This is the most direct competitor because it already turns counterfactual residuals into masks. It gets the same generator architecture, training images and tuning budget: an equal number of hyperparameter trials on a held-out split with VinDr boxes, and the same GPU-hours. The file gives no reported IoU for COIN ("no reported result found on Lacuna for COIN's IoU"), so we reproduce it ourselves on the TUH kidney setting as a sanity check before using it on chest X-rays. We beat it if our method has a lower rate of class-swapped localizations on images with co-occurring confusable findings, at equal or better overall mean average precision (mAP, the standard detection score averaged over classes).

We include AGXNet, which injects anatomical-landmark attention and uses positive-unlabeled learning against reporting bias, as the strongest report-supervised localizer. The file reports a mean AUROC (area under the ROC curve, a classification score) of 0.84 on transfer, but no localization number ("no reported result found on Lacuna for AGXNet box mAP"). We retrain it on the same MIMIC-CXR labels. AGXNet is a real competitor on separable findings. Our expectation is that it fails specifically on pairs that share a landmark.

We also include Disease-Aware Prompting as the vision-language grounding competitor. It reports a 20.74% improvement in grounding accuracy, measured by contrast-to-noise ratio (CNR), on MS-CXR and RSNA, without absolute values in the file.

As a reference ceiling we use the strongest supervised figures in the file. On RSNA, Point Beyond Class reports 43.1% mAP with full boxes and 40.5% mAP with 30% boxes plus points. On VinDr-CXR, DualAttNet reports a fully supervised mAP of 0.116 over 14 abnormality types. We do not expect to beat these with zero boxes. Reaching a stated fraction of them, and placing ourselves on the cost curve below, is the honest framing.

Two ablations isolate the key ingredients. The first removes the consistency term ($\mu = 0$). The second removes the hold-other-findings-fixed requirement by masking other classes out of the loss. If neither ablation hurts confusable-pair localization, the central claim is wrong.

Why not just…?

Why not just run binary COIN once per finding? This is the main threat. If independent per-class generators already localize confusable pairs well, our decomposition is unnecessary. Our concern is that an independent generator asked to remove consolidation will freely erase atelectasis evidence in the same pixels, because nothing penalizes it, so the two maps overlap almost entirely. The per-class COIN baseline and the second ablation test exactly this. We will report the class-swap rate and the overlap between the k-map and the j-map for each method. If those numbers match ours, we will drop the claim.

Why not just use a medical vision-language model with text prompts? Disease-Aware Prompting shows that pretrained models such as BioViL and CheXzero are dominated by high-norm background anatomy. EM-DETR reports a 10–30% sensitivity gain over Grounding DINO on ambiguous findings by adding visual exemplars. DAP corrects the background problem, but its prompts come from the model's own explanation maps. If the model confuses two overlapping findings, DAP amplifies the confused region. We run DAP on the same confusable-pair subset to see whether that happens.

Why not just annotate a few points or boxes? This may honestly be cheaper per unit of accuracy. Point Beyond Class reaches 23.3% mAP on VinDr-CXR with 5% boxes and 40.5% on RSNA with 30%. We will not argue around this. We plot accuracy against annotation cost for their method at 1%, 5% and 30% boxes and report where our label-free method sits. We also test the two together, using our maps as pseudo-boxes for their student detector. Our method's distinct contribution, the shared-evidence map, is something point supervision does not provide even when it localizes better.

Why not add an inter-class similarity loss to CAM? The ISIC method penalizes over-differentiation of similar classes and reaches 97.3% GT-Known localization accuracy (localization accuracy given the true class) on CUB-200-2011. It assumes a single object per image and natural backgrounds. We port its similarity loss onto the CAM baseline. If that port matches us on co-occurring pairs, the simpler fix wins.

Proposed Experiments

We train on MIMIC-CXR report labels and on VinDr-CXR image-level labels. Evaluation uses VinDr-CXR test boxes (5-radiologist consensus), MS-CXR and RSNA. We focus on the confusable group consolidation / atelectasis / infiltration / lung opacity and on effusion versus pleural thickening, with cardiomegaly and pneumothorax as well-separated controls.

The metrics are per-class box mAP at IoU 0.5, the pointing-game hit rate, and a pairwise class-swap rate. The class-swap rate is computed on test images containing both members of a confusable pair, and counts the fraction where the predicted map for k overlaps j's box more than k's own box.

The decisive check uses VinDr-CXR's three independent training reads. For each image and confusable pair, we ask whether the share of map mass in $s_{kj}$ predicts reader disagreement between k and j, measured as AUROC against the event "readers split between k and j." Agreement should be well above chance for confusable pairs and near zero shared mass for the controls.

A second decisive check uses synthetic ground truth. Following COIN's TotalSegmentator protocol, we paste two simulated lesion types with controlled appearance overlap into healthy CT. As we raise the overlap, the specific maps should shrink and the shared map should grow smoothly, whereas per-class COIN should start swapping classes.

Failure on either check, or no gain over the two ablations, would mean that leave-one-out counterfactuals do not separate overlapping evidence beyond what independent per-class editing already gives.