[Paper Review] Margin Calibration for Long-Tailed Visual Recognition
This paper proposes MARC (Margin Calibration), a simple yet effective method to address long-tailed visual recognition by calibrating classification margins to balance logits across head and tail classes. By introducing a learnable, class-specific margin calibration function with only 2K parameters, MARC achieves state-of-the-art performance on CIFAR-LT, ImageNet-LT, Places-LT, and iNaturalist-LT with minimal computational overhead and just three lines of code.
The long-tailed class distribution in visual recognition tasks poses great challenges for neural networks on how to handle the biased predictions between head and tail classes, i.e., the model tends to classify tail classes as head classes. While existing research focused on data resampling and loss function engineering, in this paper, we take a different perspective: the classification margins. We study the relationship between the margins and logits (classification scores) and empirically observe the biased margins and the biased logits are positively correlated. We propose MARC, a simple yet effective MARgin Calibration function to dynamically calibrate the biased margins for unbiased logits. We validate MARC through extensive experiments on common long-tailed benchmarks including CIFAR-LT, ImageNet-LT, Places-LT, and iNaturalist-LT. Experimental results demonstrate that our MARC achieves favorable results on these benchmarks. In addition, MARC is extremely easy to implement with just three lines of code. We hope this simple method will motivate people to rethink the biased margins and biased logits in long-tailed visual recognition.
Motivation & Objective
- To address the imbalance in model predictions between head (common) and tail (rare) classes in long-tailed visual recognition.
- To investigate the uncalibrated relationship between margins and logits, which are critical for classification performance.
- To propose a simple, effective method that calibrates margins without altering model representations or requiring complex reweighting schemes.
- To reduce the performance gap between head and tail classes by balancing logits through margin calibration.
- To motivate rethinking the role of uncalibrated margins in long-tailed learning.
Proposed method
- Proposes a class-specific margin calibration function with 2K learnable parameters to adjust initially learned margins after standard training.
- Calibrates margins by learning a scaling factor per class to balance logits, using a learnable function that depends on class cardinality.
- Applies the calibration function to the logits during inference, ensuring that tail classes receive higher confidence scores relative to head classes.
- Employs a simple optimization scheme in a two-stage training process: standard training followed by margin calibration with minimal hyperparameter tuning.
- Uses a temperature-like scaling parameter γ, empirically set to 1.2 for optimal performance across datasets.
- The method is plug-and-play, requiring only three lines of code to implement, and is compatible with any backbone and loss function.
Experimental results
Research questions
- RQ1How do uncalibrated margins and logits correlate with class frequency in long-tailed datasets?
- RQ2Can margin calibration alone improve performance on long-tailed visual recognition benchmarks without modifying model representations?
- RQ3Does a simple, learnable margin calibration function outperform existing methods that rely on data resampling or loss reweighting?
- RQ4How does MARC affect the balance of logits and margins across head and tail classes?
- RQ5Can margin calibration reduce the misclassification of tail classes as head classes?
Key findings
- MARC significantly improves class-wise accuracy on tail classes while maintaining strong performance on head classes across CIFAR-LT, ImageNet-LT, Places-LT, and iNaturalist-LT.
- After calibration, logits and margins become more balanced across classes, reducing the bias toward head classes.
- On CIFAR-100-LT(200), MARC achieves a top-1 accuracy of 45.2% even when γ = 0, demonstrating effectiveness without loss reweighting.
- The optimal γ value is 1.2, as higher values degrade performance due to excessive suppression of head-class weights.
- MARC outperforms DisAlign in margin and gradient stability, showing more consistent calibration across classes.
- Visualization confirms that MARC reduces the disparity in diagonal elements of confusion matrices, indicating fewer tail-class misclassifications.
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.