Topology-Aware Focal Loss for 3D Image Segmentation

Andac Demir, Elie Massaad, Bulent KiziltanWorkshops @ CVPR 2023 · DOI

TL;DR

This paper introduces a novel loss function, Topology-Aware Focal Loss (TAFL), for 3D medical image segmentation. TAFL combines the benefits of Focal Loss for class imbalance with a topological constraint that ensures the predicted segmentation has the same structural properties as the ground truth, leading to more accurate and robust segmentation of complex structures like brain tumors.

What Problem Does This Paper Address?

Accurate segmentation of 3D medical images, particularly for tasks like brain tumor identification, is crucial for diagnosis, treatment planning, and monitoring. While deep learning models like U-Net have achieved impressive results, they often struggle with topological errors such as disconnected regions, holes, or spurious connections within the segmented output. These errors can arise from the inherent complexity of biological structures and the limitations of standard segmentation loss functions, which primarily focus on pixel-wise accuracy. Existing methods often fail to capture the global structural integrity of the segmented object, leading to clinically significant inaccuracies.

Methods

The core innovation of this paper is the Topology-Aware Focal Loss (TAFL). TAFL is designed to penalize both pixel-wise inaccuracies and topological inconsistencies. It achieves this by:

  • Leveraging Persistent Homology (PH): PH is a technique from Topological Data Analysis (TDA) that studies the "shape" of data by tracking topological features (like connected components, holes, and voids) across different scales. The paper constructs persistence diagrams from the ground truth and predicted segmentation masks. These diagrams are essentially point clouds where each point represents a topological feature and its coordinates indicate its "birth" and "death" times during the filtration process.
  • Using Wasserstein Distance: To quantify the topological dissimilarity between the persistence diagrams of the ground truth and prediction, the authors employ the Wasserstein distance. This distance measures the minimum "cost" to transform one distribution (persistence diagram) into another.
  • Employing the Sinkhorn-Knopp Algorithm: Calculating the exact Wasserstein distance can be computationally expensive. The paper uses the Sinkhorn-Knopp algorithm as an efficient approximation to compute the optimal transport plan between the two persistence diagrams. This plan, along with a cost matrix derived from the birth and death times of topological features, allows for the calculation of the topological loss term.
  • Combining with Focal Loss: The topological loss is integrated as a penalty term into the standard Focal Loss. Focal Loss itself is a modification of cross-entropy that down-weights easy-to-classify examples and focuses training on hard-to-classify ones, which is beneficial for imbalanced datasets common in medical imaging. TAFL thus combines the strengths of both approaches.

Datasets

The primary dataset used for evaluation is the BraTS 2019 dataset. This dataset comprises 335 3D brain MRI scans with manual segmentations performed by multiple neuroradiologists. The segmentations include four classes: necrotic/non-enhancing tumor core, peritumoral edema, background, and enhancing tumor. Each MRI scan includes four modalities: native T1, post-contrast T1-weighted (T1Gd), T2-weighted (T2), and T2 Fluid Attenuated Inversion Recovery (T2-FLAIR). The data was skull-stripped and interpolated to a resolution of 1 mm³. No new benchmark datasets were introduced.

Key Insights and Ideas

  • Topology Matters for Segmentation: The paper strongly advocates for the importance of topological consistency in medical image segmentation, arguing that pixel-wise accuracy alone is insufficient for clinically meaningful results.
  • Persistence Diagrams as Topological Signatures: Using persistence diagrams derived from 3D cubical complexes provides a robust way to capture the intrinsic topological structure of segmented objects.
  • Wasserstein Distance for Topological Comparison: The Wasserstein distance, computed via the Sinkhorn-Knopp algorithm, offers an effective metric for quantifying the difference in topological features between predicted and ground truth segmentations.
  • Synergy of Focal Loss and Topological Loss: Combining the class-balancing properties of Focal Loss with the structural integrity enforcement of the topological loss creates a powerful and effective segmentation objective.

Key Results

The paper demonstrates that training a 3D U-Net with the proposed Topology-Aware Focal Loss (TAFL) leads to improved segmentation performance compared to using standard cross-entropy or focal loss alone. Specifically, the results presented in Table 1 show an increase in the average Dice scores for the Enhancing Tumor (ET), Whole Tumor (WT), and Tumor Core (TC) classes. For instance, TAFL achieved an ET Dice score of 0.7383, compared to 0.7255 for cross-entropy and 0.7244 for focal loss. The authors note that a Dice score of 0.8 or higher is generally considered good for brain tumor segmentation. Figure 4 provides qualitative visualizations showcasing improved segmentation outcomes with TAFL, particularly in preserving the connectivity and shape of tumor regions.

Limitations and Future Work

The authors acknowledge that their approach involves increased computational complexity due to the calculation of persistence diagrams and Wasserstein distances. While they use the Sinkhorn-Knopp algorithm for efficiency, it's still a more involved process than standard loss functions.

Future work suggested by the authors includes:

  • Investigating the generalization of TAFL to other medical imaging segmentation tasks beyond brain tumors.
  • Extending the applicability of TAFL to a wider range of medical imaging modalities.
  • Further exploring the theoretical underpinnings of why long skip connections in U-Net architectures improve reconstruction performance.

Summary updated

BibTeX
@inproceedings{demir2023topology,
  author = {Andac Demir and Elie Massaad and Bulent Kiziltan},
  title = {{Topology-Aware Focal Loss for 3D Image Segmentation}},
  booktitle = {Workshops @ CVPR},
  year = {2023},
  doi = {10.1109/cvprw59228.2023.00065},
}
Figure