Abstract
Analysis of 3D segmentation models, especially in the context of medical imaging, is often limited to segmentation performance metrics that overlook the crucial aspect of explainability and bias. Currently, effectively explaining these models with saliency maps is challenging due to the high dimensions of input images multiplied by the ever-growing number of segmented class labels. To this end, we introduce Agg^2Exp, a methodology for aggregating fine-grained voxel attributions of the segmentation model's predictions. Unlike classical explanation methods that primarily focus on the local feature attribution, Agg^2Exp enables a more comprehensive global view on the importance of predicted segments in 3D images. Our benchmarking experiments show that gradient-based voxel attributions are more faithful to the model's predictions than perturbation-based explanations. As a concrete use-case, we apply Agg^2Exp to discover knowledge acquired by the Swin UNEt TRansformer model trained on the TotalSegmentator v2 dataset for segmenting anatomical structures in computed tomography medical images. Agg^2Exp facilitates the explanatory analysis of large segmentation models beyond their predictive performance.
Introduction
Explaining 3D medical image segmentation models is notoriously difficult because the "explanation" (saliency map) is often as complex and high-dimensional as the data itself. Deep learning models for CT or MRI segmentation are frequently treated as "black boxes." While accuracy is measurable, understanding why a model labels a specific group of voxels as a particular organ is a challenge.
Standard explainability (XAI) tools produce feature attributions—heatmaps showing which input voxels were most important. However, in 3D segmentation, the dimensionality is overwhelming: an image with $512^3$ voxels and 17 class labels results in nearly 2.3 billion attribution values. Manually inspecting these is impossible for a radiologist or developer. Furthermore, there has been little research on which specific XAI methods actually work best for 3D volumes.
Methods: The AGG²EXP Framework
The authors propose a hierarchical approach called AGG²EXP (Aggregate²Explain) to move from "micro" voxel data to "macro" anatomical insights.
The framework follows three main steps:
- Voxel Attribution: Fine-grained importance scores are computed for every voxel. The authors benchmarked several methods, including Vanilla Gradient, Integrated Gradients, SmoothGrad, and KernelSHAP.
- Local RoI Aggregation: Instead of individual voxels, scores are aggregated over Regions of Interest (RoIs), such as specific organs or pathological areas. This quantifies how much one segment (e.g., the heart) contributes to the prediction of another (e.g., the aorta).
- Global Aggregation: By averaging these local importance scores across an entire dataset, a global "knowledge graph" is created to reveal the model's internal logic and dependencies.
The study utilized the TotalSegmentator v2 (TSV2) dataset for anatomical structures and the B50 dataset for thoracic pathologies.
Benchmarking and Results
A major finding was that gradient-based methods are significantly more "faithful" and computationally efficient for 3D data than perturbation-based methods like KernelSHAP, which struggled with high dimensionality.
Key results include:
- Faithfulness & Efficiency: SmoothGrad achieved a faithfulness score of ~0.33 while being orders of magnitude faster than KernelSHAP. KernelSHAP (cubes) took over 4,000 seconds per scan, while SmoothGrad took roughly 200 seconds.
- Contextual Knowledge Discovery: AGG²EXP revealed that the model uses surrounding context; for instance, segmenting the pulmonary vein relies heavily on the heart and lungs.
- Anomaly Detection: The researchers found a statistically significant correlation ($p \approx 0.0024$) between the "anomaly score" of the model's explanation and its actual segmentation accuracy (Dice score). This allows AGG²EXP to help predict when a model is likely to fail by identifying unusual internal reasoning.
Conclusion
AGG²EXP makes 3D XAI more manageable by condensing billions of attributions into interpretable graphs. While it provides a clearer view of model logic, it remains an approximation. Future work will focus on user studies with radiologists to determine if these explanation graphs effectively assist in clinical error detection and trust-building.
Summary updated