Sin-SMFL: An Ablation Study of Modulation, Class Balancing, and Gain Calibration in Detection Losses
Abstract
Modulated classification losses (e.g., Focal Loss) and class-frequency reweighting schemes have each been studied for object detection, but their composition and the practical hyperparameter interactions it introduces remain underexplored. We conducted a study of sine-modulated classification loss combined with effective-number class balancing (Sin-MFL) on YOLOv8 using the COCO 2017 object detection dataset, comprising 27.6 GB of data with 118K training images, 5K validation images. We compared the six configurations across different class using three random seeds with 15-epoch training to understand the effect of each design choice. We find that, first, combining sine modulation with class balancing under-performs the detector's own unmodified default loss. This gap occurs because sine modulation reduces the magnitude of the classification loss compared with binary cross-entropy (BCE). As a result, a gain tuned for BCE gives too little weight to the modulated loss. Second, once this gain is corrected, sine modulation is a robust improvement over classical power-law (Focal Loss) modulation, improving 77 of 80 COCO classes when balancing or the gain are well fixed. Third, a learned loss balancer automatically fixes most of the loss-weighting problem without hyperparameter search, but manual tuning still performs better for some individual classes. Fourth, effective-number class balancing mainly improves performance for the 10–15 rarest classes, but it does not reduce the overall performance gap between different class frequencies. We report these findings, including the negative and mixed results, as a case study showing that loss-function modifications do not always combine effectively under realistic, limited training settings.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.