# Topology-Aware Focal Loss for 3D Image Segmentation

arXiv: https://arxiv.org/abs/2304.12223 · HTML: https://mlsanity.com/paper/2304.12223/

## Key facts

- Cited by 12 papers in the map (data through 14 Oct 2026).
- Builds on 21 of its 51 references that are in the map.
- First posted on arXiv 24 Apr 2023.

## Builds on (most cited first, 21 of 21)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://mlsanity.com/paper/1505.04597/) (2015)
- [Mask R-CNN](https://mlsanity.com/paper/1703.06870/) (2017)
- [SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation](https://mlsanity.com/paper/1511.00561/) (2015)
- [Attention U-Net: Learning Where to Look for the Pancreas](https://mlsanity.com/paper/1804.03999/) (2018)
- [UNETR: Transformers for 3D Medical Image Segmentation](https://mlsanity.com/paper/2103.10504/) (2021)
- [Identifying the Best Machine Learning Algorithms for Brain Tumor Segmentation, Progression Assessment, and Overall Survival Prediction in the BRATS Challenge](https://mlsanity.com/paper/1811.02629/) (2018)
- [3D MRI brain tumor segmentation using autoencoder regularization](https://mlsanity.com/paper/1810.11654/) (2018)
- [Topology-Preserving Deep Image Segmentation](https://mlsanity.com/paper/1906.05404/) (2019)
- [U-Net and its variants for medical image segmentation: theory and applications](https://mlsanity.com/paper/2011.01118/) (2020)
- [A roadmap for the computation of persistent homology](https://mlsanity.com/paper/1506.08903/) (2015)
- [Deep Learning with Topological Signatures](https://mlsanity.com/paper/1707.04041/) (2017)
- [Beyond the Pixel-Wise Loss for Topology-Aware Delineation](https://mlsanity.com/paper/1712.02190/) (2017)
- [Optimized U-Net for Brain Tumor Segmentation](https://mlsanity.com/paper/2110.03352/) (2021)
- [Fast and Accurate Tumor Segmentation of Histology Images using Persistent Homology and Deep Convolutional Features](https://mlsanity.com/paper/1805.03699/) (2018)
- [Uncovering the Topology of Time-Varying fMRI Data using Cubical Persistence](https://mlsanity.com/paper/2006.07882/) (2020)
- [Cubical Ripser: Software for computing persistent homology of image and volume data](https://mlsanity.com/paper/2005.12692/) (2020)
- [Functional Summaries of Persistence Diagrams](https://mlsanity.com/paper/1804.01618/) (2018)
- [Persistent homology machine learning for fingerprint classification](https://mlsanity.com/paper/1711.09158/) (2017)
- [Topological Data Analysis of Task-Based fMRI Data from Experiments on Schizophrenia](https://mlsanity.com/paper/1809.08504/) (2018)
- [Topological Deep Learning](https://mlsanity.com/paper/2101.05778/) (2021)

## Built on by (most cited first, 12 of 12)

- [Loss Functions in the Era of Semantic Segmentation: A Survey and Outlook](https://mlsanity.com/paper/2312.05391/) (2023)
- [Harmonic Loss Trains Interpretable AI Models](https://mlsanity.com/paper/2502.01628/) (2025)
- [Topology-Aware Loss for Aorta and Great Vessel Segmentation in Computed Tomography Images](https://mlsanity.com/paper/2307.03137/) (2023)
- [Topological Parallax: A Geometric Specification for Deep Perception Models](https://mlsanity.com/paper/2306.11835/) (2023)
- [Train-Free Segmentation in MRI with Cubical Persistent Homology](https://mlsanity.com/paper/2401.01160/) (2024)
- [Tumor-Centered Patching for Enhanced Medical Image Segmentation](https://mlsanity.com/paper/2308.12168/) (2023)
- [PI-Att: Topology Attention for Segmentation Networks through Adaptive Persistence Image Representation](https://mlsanity.com/paper/2408.08038/) (2024)
- [SHAPE: Structure-aware Hierarchical Unsupervised Domain Adaptation with Plausibility Evaluation for Medical Image Segmentation](https://mlsanity.com/paper/2603.21904/) (2026)
- [TopoMamba: Topology-Aware Scanning and Fusion for Segmenting Heterogeneous Medical Visual Media](https://mlsanity.com/paper/2604.25545/) (2026)
- [Topology-Constrained Quantized nnUNet for Efficient and Anatomically Accurate 3D Tooth Segmentation](https://mlsanity.com/paper/2605.04201/) (2026)
- [Widest-Path Reachability Fields for Connectivity-Preserving Slender Structure Segmentation](https://mlsanity.com/paper/2607.07123/) (2026)
- [Optimal Transport Metric Learning for Feature Alignment in Partially Supervised Segmentation](https://mlsanity.com/paper/2609.19176/) (2026)

## Abstract (arXiv)

The efficacy of segmentation algorithms is frequently compromised by topological errors like overlapping regions, disrupted connections, and voids. To tackle this problem, we introduce a novel loss function, namely Topology-Aware Focal Loss (TAFL), that incorporates the conventional Focal Loss with a topological constraint term based on the Wasserstein distance between the ground truth and predicted segmentation masks' persistence diagrams. By enforcing identical topology as the ground truth, the topological constraint can effectively resolve topological errors, while Focal Loss tackles class imbalance. We begin by constructing persistence diagrams from filtered cubical complexes of the ground truth and predicted segmentation masks. We subsequently utilize the Sinkhorn-Knopp algorithm to determine the optimal transport plan between the two persistence diagrams. The resultant transport plan minimizes the cost of transporting mass from one distribution to the other and provides a mapping between the points in the two persistence diagrams. We then compute the Wasserstein distance based on this travel plan to measure the topological dissimilarity between the ground truth and predicted masks. We evaluate our approach by training a 3D U-Net with the MICCAI Brain Tumor Segmentation (BraTS) challenge validation dataset, which requires accurate segmentation of 3D MRI scans that integrate various modalities for the precise identification and tracking of malignant brain tumors. Then, we demonstrate that the quality of segmentation performance is enhanced by regularizing the focal loss through the addition of a topological constraint as a penalty term.
