TL;DR
This paper introduces the first method to generate counterfactual explanations for 3D computed tomography (CT) classifiers. By processing volumes slice-by-slice using a 2D VQ-GAN and selectively computing gradients across small "chunks" of slices, the approach bypasses the massive memory and data constraints of 3D generative models while successfully auditing the features driving clinical predictions.
What Problem Does This Paper Address?
Deep learning models excel at predicting clinical phenotypes, survival rates, and organ segmentations from 3D CT scans. However, understanding why a model makes a specific prediction remains a major challenge, especially in high-stakes medical environments.
Counterfactual (CF) explanations—synthetic images that show the minimal anatomical changes required to alter a classifier's prediction—are highly effective tools for interpretability in 2D imaging. Unfortunately, scaling them to 3D CT volumes introduces severe bottlenecks:
- Data Scarcity: Training full 3D autoencoders requires massive volumetric datasets to avoid overfitting.
- Memory Constraints: Computing the gradients of a 3D classifier with respect to a high-resolution 3D latent space easily exceeds the memory capacity of modern GPUs.
This paper tackles these limitations to make 3D counterfactual generation computationally tractable.
Methods
The authors extend the Latent Shift counterfactual framework from 2D to 3D by introducing a Slice Autoencoder (Slice AE) approach combined with gradient blocking.
Instead of utilizing a complex 3D autoencoder, the framework operates as follows:
- Slice-by-Slice Processing: A 2D VQ-GAN (Vector Quantized Generative Adversarial Network) is trained to encode and decode individual 2D CT slices.
- 3D Context Preservation: To evaluate a 3D volume, all slices are encoded individually, decoded, and then concatenated back into a full 3D volume before being passed to the 3D classifier.
- Chunk-based Gradient Blocking: To compute the gradient of the classifier's output with respect to the latent space ($\partial f(D(z)) / \partial z$), gradients are propagated through only a small subset or "chunk" of slices (typically 10–12 slices) at a time. The remaining slices have their gradients blocked.
This optimization allows the framework to iteratively shift the latent representation of specific slices, modifying the image in a direction that reduces the classifier's confidence while keeping memory consumption within a manageable 32GB.
Datasets
The 2D VQ-GAN was trained on a massive aggregated dataset of 1,447,551 slices from 12,686 CT scans across three public repositories:
- LUNA16: 227,225 slices from 888 volumetric scans (focused on lung cancer lesions).
- TotalSegmentator: 312,400 slices from 1,204 scans (covering all major organs).
- DeepLesion: 907,926 slices from 10,594 scans (diverse healthy and diseased tissues).
For quantitative evaluation of the counterfactuals, the authors utilized the PleThora dataset (a subset of the public NSCLC-Radiomics dataset), evaluating 399 CT volumes, 77 of which were positive for pleural effusion.
Key Insights and Ideas
- 2D Generative Models Suffice for 3D Explanations: You do not need a native 3D autoencoder to explain a 3D classifier. Processing volumes slice-by-slice provides enough structural fidelity to successfully manipulate and audit a 3D model's predictions.
- Gradient Blocking Doubles as a Localization Tool: Restricting gradient updates to specific slice chunks does more than just save memory; it allows researchers to systematically isolate exactly which regions of the 3D volume are most influential to the classifier's final output.
- Direct Model Auditing: Unlike alternative methods that conditionally generate images using independent causal models, Latent Shift directly queries the specific classifier's gradients. This ensures the counterfactual strictly reflects the internal decision-making process of the model under review.
Key Results
- Sanity Check (Lung Size): The method successfully generated counterfactuals for a lung segmentation regression task, showing a clear, monotonic reduction in lung volume as the shift coefficient ($\lambda$) was modified.
- Pleural Effusion Auditing: When evaluating a pleural effusion classifier, the generated counterfactuals accurately targeted and faded out the bright, fluid-filled regions along the lung periphery, confirming the model was looking at clinically relevant features.
- Quantitative Impact: On the PleThora dataset, positive examples had a baseline prediction score of $0.24 \pm 0.03$. Applying the counterfactual method reduced this score by 8 points to $0.15 \pm 0.02$, successfully shifting the distribution toward the negative class ($0.05 \pm 0.01$).
- Saliency Comparison: The counterfactual heatmaps provided significantly cleaner, more localized, and more interpretable feature attributions than traditional pixel-attribution methods like Grad-CAM or Guided Backprop.
Limitations and Future Work
- Potential Domain Bias: The underlying VQ-GAN was trained entirely on public datasets, which may not fully reflect the diversity of scanning protocols, reconstruction kernels, or patient populations found in varied clinical settings.
- Lack of Clinical Validation: Although the counterfactual changes visually align with expected pathology, the authors have not yet conducted a formal reader study with medical practitioners to confirm their utility in clinical workflows.
- Identity Preservation Issues: Because the latent space of the 2D autoencoder is not perfectly disentangled, shifting the latent vector can occasionally introduce minor, unintended distortions to anatomical features unrelated to the target pathology.
Summary updated