Universal Loss Reweighting to Balance Lesion Size Inequality in 3D Medical Image Segmentation

Boris Shirokikh, Alexey Shevtsov, Anvar Kurmukov, Alexandra Dalechina, Egor Krivov, Valery Kostjuchenko, Andrey Golanov, Mikhail Belyaev

Introduction

In 3D medical image segmentation, deep learning models frequently struggle with a twofold imbalance problem. First, there is class imbalance, where background voxels vastly outnumber lesion voxels. Second, and more critically for clinical outcomes, there is size imbalance. Within the lesion class, a single large tumor can contain orders of magnitude more voxels than a tiny nodule.

Standard voxel-wise loss functions, such as Binary Cross-Entropy (BCE) or Dice Loss, treat every voxel as equally important. Consequently, the network often "ignores" small lesions because missing a few voxels in a tiny nodule has a negligible impact on the total loss compared to minor boundary errors in a large tumor. This paper introduces inverse weighting (iw), a universal loss reweighting strategy designed to ensure that every lesion, regardless of its volume, contributes equally to the training signal.

Methodology

The authors propose a reweighting scheme that can be integrated into almost any existing loss function. During training, ground-truth labels are partitioned into $K$ connected components (individual lesions) plus the background. For every voxel in a specific lesion $L_j$, a weight $w_j$ is calculated as follows:

$$w_j = \frac{\sum_{k=0}^{K} |L_k|}{(K + 1) \cdot |L_j|}$$

This formula ensures inverse proportionality: a tiny lesion receives a significantly higher weight than a large one. By normalizing the contribution, the model is forced to prioritize the detection of small, clinically critical targets without sacrificing the segmentation quality of larger structures.

Comparison of weighting strategies: BCE (no weighting), WCE (class weighting), and iwBCE (size-aware inverse weighting). Note how iwBCE assigns higher weights to smaller lesions.

Experimental Setup

The approach was validated across three diverse 3D imaging tasks characterized by significant size variance in targets:

  1. LUNA16: Lung nodule detection in CT scans.
  2. LiTS: Liver tumor segmentation in CT scans.
  3. Metastases: A private dataset of brain metastases in MRI scans.
Distribution of lesion diameters across the three datasets used in the study, highlighting the prevalence of small targets.

Key Insights and Results

Detection vs. Delineation

The researchers distinguish between detection (finding the lesion) and delineation (drawing its boundaries). Standard Dice scores often mask poor performance on small objects because they are dominated by voxel counts from large objects. To address this, the authors utilize an Object Dice Score, which averages performance across unique lesions rather than voxels.

Performance Gains

The "inverse weighting" (iw) modification yielded substantial improvements in detection quality:

  • Recall Boost: On the LUNA16 dataset, applying inverse weighting to standard BCE increased the average object-wise recall from 0.42 to 0.67.
  • Small Lesion Sensitivity: The most significant gains were observed in the smallest lesion categories, which are typically the most difficult to detect.
  • Stability: Dice-based losses proved particularly stable when modified with inverse weighting, maintaining high-quality delineation comparable to state-of-the-art methods while significantly improving recall.

Conclusion

Universal Loss Reweighting effectively addresses the neglected issue of size inequality in medical imaging. By ensuring that small lesions exert a proportional influence on the loss function, the method significantly enhances the detection of critical clinical targets. While a slight trade-off in delineation was noted in some complex scenarios (like LiTS), the overall gain in sensitivity makes this a powerful tool for improving the reliability of automated 3D segmentation pipelines.

Summary updated

BibTeX
@inproceedings{shirokikh2020universal,
  author = {Boris Shirokikh and Alexey Shevtsov and Anvar Kurmukov and Alexandra Dalechina and Egor Krivov and Valery Kostjuchenko and Andrey Golanov and Mikhail Belyaev},
  title = {{Universal Loss Reweighting to Balance Lesion Size Inequality in 3D Medical Image Segmentation}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2020},
  url = {https://openreview.net/forum?id=J4qr9IOovXQ},
}
Figure