An Analysis of Loss Functions for Heavily Imbalanced Lesion Segmentation

Sensors (Basel). 2024 Mar 20;24(6):1981. doi: 10.3390/s24061981.

Abstract

Heavily imbalanced datasets are common in lesion segmentation. Specifically, the lesions usually comprise less than 5% of the whole image volume when dealing with brain MRI. A common solution when training with a limited dataset is the use of specific loss functions that rebalance the effect of background and foreground voxels. These approaches are usually evaluated running a single cross-validation split without taking into account other possible random aspects that might affect the true improvement of the final metric (i.e., random weight initialisation or random shuffling). Furthermore, the evolution of the effect of the loss on the heavily imbalanced class is usually not analysed during the training phase. In this work, we present an analysis of different common loss metrics during training on public datasets dealing with brain lesion segmentation in heavy imbalanced datasets. In order to limit the effect of hyperparameter tuning and architecture, we chose a 3D Unet architecture due to its ability to provide good performance on different segmentation applications. We evaluated this framework on two public datasets and we observed that weighted losses have a similar performance on average, even though heavily weighting the gradient of the foreground class gives better performance in terms of true positive segmentation.

Keywords: brain; imbalanced dataset; lesion segmentation; loss functions; magnetic resonance imaging; medical imaging sensors.

MeSH terms

  • Image Processing, Computer-Assisted / methods
  • Magnetic Resonance Imaging* / methods
  • Neural Networks, Computer*
  • Neuroimaging / methods

Grants and funding

This research received no external funding.