[Paper Review] Boundary Difference Over Union Loss For Medical Image Segmentation
This paper proposes Boundary Difference over Union Loss (Boundary DoU Loss), a novel differentiable loss function that enhances medical image segmentation by focusing on boundary regions through region-based computation. It improves segmentation accuracy on boundaries by minimizing the ratio of mismatched boundary regions to a partial union set, achieving state-of-the-art performance on ACDC and Synapse datasets without requiring additional losses or hyperparameter tuning beyond α, with gains of up to 2.30% in Dice Score and significant improvements in Boundary IoU.
Medical image segmentation is crucial for clinical diagnosis. However, current losses for medical image segmentation mainly focus on overall segmentation results, with fewer losses proposed to guide boundary segmentation. Those that do exist often need to be used in combination with other losses and produce ineffective results. To address this issue, we have developed a simple and effective loss called the Boundary Difference over Union Loss (Boundary DoU Loss) to guide boundary region segmentation. It is obtained by calculating the ratio of the difference set of prediction and ground truth to the union of the difference set and the partial intersection set. Our loss only relies on region calculation, making it easy to implement and training stable without needing any additional losses. Additionally, we use the target size to adaptively adjust attention applied to the boundary regions. Experimental results using UNet, TransUNet, and Swin-UNet on two datasets (ACDC and Synapse) demonstrate the effectiveness of our proposed loss function. Code is available at https://github.com/sunfan-bvb/BoundaryDoULoss.
Motivation & Objective
- Address the lack of effective, standalone loss functions that specifically optimize boundary segmentation in medical image segmentation.
- Develop a differentiable loss function that directly targets boundary regions without relying on auxiliary losses or complex architectures.
- Improve segmentation performance on challenging boundary regions, especially for small or irregularly shaped organs, by adapting attention based on target size.
- Ensure training stability and ease of implementation through region-based computation rather than distance-based or non-differentiable operations.
- Demonstrate consistent performance gains across diverse models (UNet, TransUNet, Swin-UNet) and datasets (ACDC, Synapse) using only the proposed loss function.
Proposed method
- Define the boundary region using a fixed-width erosion operation (determined by 0.5% of image diagonal), approximating the inner boundary of ground truth and prediction masks.
- Formulate the Boundary DoU Loss as the ratio of the symmetric difference set (G ∪ P − G ∩ P) to a partial union set (G ∪ P − α·G ∩ P), where α < 1 controls the influence of the intersection region.
- Use α as a learnable hyperparameter that adapts based on target size, increasing attention to boundary regions in smaller targets via size-aware scaling.
- Ensure differentiability by avoiding non-differentiable operations like erosion in the loss computation, enabling end-to-end backpropagation.
- Integrate the loss directly into standard training pipelines without requiring additional loss components or complex scheduling.
- Implement the loss using standard tensor operations (union, intersection, subtraction), enabling easy deployment in PyTorch and other deep learning frameworks.
Experimental results
Research questions
- RQ1Can a differentiable, region-based loss function effectively improve boundary segmentation in medical image segmentation without relying on auxiliary losses?
- RQ2How does the proposed Boundary DoU Loss compare to standard losses (e.g., Dice, CE, Tversky) in terms of boundary alignment and overall segmentation quality?
- RQ3To what extent does adaptive attention based on target size enhance performance on small or complex-shaped anatomical structures?
- RQ4Does the Boundary DoU Loss improve performance on both large and small targets across diverse datasets and model architectures?
- RQ5Can the loss achieve consistent gains in Boundary IoU while maintaining or improving standard metrics like Dice Score and Hausdorff Distance?
Key findings
- On the Synapse dataset, the Boundary DoU Loss improved the Dice Score by 2.30%, 1.20%, and 1.89% over Dice Loss for UNet, TransUNet, and Swin-UNet, respectively.
- The Boundary DoU Loss achieved the highest Boundary IoU score on both ACDC and Synapse datasets, confirming its effectiveness in optimizing boundary alignment.
- On the ACDC dataset, the loss improved Dice Score by 0.62%, 0.60%, and 0.85% for UNet, TransUNet, and Swin-UNet, respectively, over the baseline Dice Loss.
- Qualitative results showed superior boundary localization on complex organs (e.g., pancreas, stomach) and reduced under- or mis-segmentation on small or annular structures like the right ventricle and myocardium.
- The loss demonstrated consistent performance gains across all target sizes, with significant improvements in both large and small targets as measured by C/S ratio.
- The method achieved stable training and did not require additional loss components or learning rate scheduling, unlike existing boundary losses such as the Boundary Loss (13), which requires annealing of a weighted combination.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.