WELDE: a weighted ensemble loss with diversity enhancement for imbalanced object classification in medical imaging
摘要
Class imbalance in medical imaging datasets remains a key challenge for the classification stages of object detection pipelines, particularly when rare yet clinically significant pathologies coexist with prevalent findings. In spinal MRI, common conditions such as Normal Intervertebral Disc (IVD) may constitute over 45% of annotated objects, whereas findings like Spondylolisthesis account for fewer than 2% of instances. Conventional loss functions including Focal Loss, Class-Balanced Loss, and Label-Distribution-Aware Margin Loss, each address individual aspects of this imbalance but do not provide a unified, adaptive solution. Inspired by ensemble loss strategies developed in Deep Metric Learning (DML), we propose WELDE (Weighted Ensemble Loss with Diversity Enhancement), a framework that combines four complementary loss functions via per-head adapter projections, EMA-based normalization, and learnable adaptive weighting with a relaxed sum-to-one penalty. Each loss component receives a dedicated classification head with an independent adapter projection from a shared frozen backbone, enabling feature specialization without backbone fine-tuning. We provide theoretical analysis of WELDE’s properties, including gradient magnitude balancing across loss components and weight non-degeneracy. Applied to a lumbar mid-sagittal spinal MRI dataset with six classes and a 33.9:1 imbalance ratio, WELDE demonstrates consistent, though incremental, improvements in classification performance among the evaluated methods. It outperforms all single-loss baselines (mAP 0.702 vs. 0.689 for the best baseline CE, mAP