TL;DR
This paper introduces Logit Normalization (LogN), a simple, plug-and-play method to improve object detection performance on long-tail datasets. LogN calibrates the final classification scores (logits) using statistics from the training data, effectively addressing the class imbalance problem without requiring additional training or complex modifications.
What Problem Does This Paper Address?
Real-world datasets often exhibit a "long-tail" distribution, meaning a few classes have many samples (head classes), while most classes have very few (tail classes). This severe class imbalance poses a significant challenge for object detectors. Existing methods struggle with this due to:
- Sampler-induced label shifts: Object detectors use samplers to select training data, which can alter the perceived class frequencies, deviating from the true prior distribution. External samplers can further shift this distribution, especially for tail classes.
- Foreground-background imbalance: The sheer volume of background proposals compared to foreground instances makes it difficult for detectors to accurately classify foreground objects.
These issues lead to detectors performing poorly on rare classes, a critical limitation for real-world applications.
Methods
The core of the proposed method is Logit Normalization (LogN), a post-hoc calibration technique applied during the testing phase. LogN leverages two key observations:
- Logit Statistics Reflect Long-Tail Tendency: The mean and variance of the classification logits (scores) from the training data correlate with the long-tail distribution. This suggests that these statistics can be used to self-calibrate the detector's predictions.
- Background Calibration is Crucial: Improving the classifier's ability to distinguish background from foreground proposals indirectly benefits foreground classification.
LogN works by:
- Calculating Global Statistics: It first computes the mean ($\mu$) and standard deviation ($\sigma$) of the logits across all training samples. This is done offline.
- Background Calibration: A scalar value ($\beta$) is introduced to adjust the foreground logits relative to the background logit. This is an adaptive process, where $\beta$ is set to the minimum of the foreground logits, aiming to create a margin between foreground and background scores.
- Normalization: The final logits are then normalized using the calculated global statistics and the background calibration scalar.
LogN is designed to be:
- Training-free and tuning-free: Applied only during inference.
- Model-agnostic and label distribution-agnostic: Works with various detectors and datasets.
- Plug-and-play: Easily integrated with minimal code changes.
Datasets
- LVIS (Large Vocabulary Instance Segmentation): Used for training and evaluation of object detection and instance segmentation models. This dataset is known for its long-tail distribution with 1,203 categories.
- ImageNet-LT: Used for evaluating the method's performance on long-tail image classification.
Key Insights and Ideas
- Logits as a Self-Calibration Signal: The paper demonstrates that the statistics of the final classification logits themselves contain enough information to correct for long-tail biases, without needing explicit prior knowledge of class frequencies.
- The Importance of Background Calibration: LogN's success is partly attributed to its explicit handling of the background class, which is often overlooked by methods focusing solely on foreground class imbalance.
- Post-hoc is Better for Object Detection: Unlike batch normalization which operates during training, applying LogN only during testing is found to be more effective for object detection. This is because normalizing during training can exacerbate the shift between the learned posterior distribution and the training label distribution.
Key Results
- LVIS Dataset: LogN consistently outperforms state-of-the-art methods on LVIS, achieving higher AP (Average Precision) across various detectors and backbones. For example, with Cascade Mask R-CNN and RFS, LogN achieves 28.1% AP, outperforming Seesaw Loss by 1.0%.
- ImageNet-LT: On image classification, LogN achieves 51.6% top-1 overall accuracy, competitive with prior-based methods and outperforming other long-tail learning approaches.
- Error Analysis: LogN significantly reduces classification errors and missed ground truth detections, with a slight increase in false positives.
Limitations and Future Work
- Inconsistent performance on head/tail classes in classification: While LogN improves tail classes in classification on ImageNet-LT, it slightly degrades performance on head classes, a behavior opposite to its object detection performance. The authors speculate this is due to the behavioral differences of variance across tasks and datasets.
- Potential for further improvement on tail classes in detection: While LogN shows strong results, there's still room for improvement, particularly for the rarest classes. The authors suggest exploring techniques like squaring the standard deviation for rare classes, which showed promise but led to a slight overall mAP drop.
- Future work could explore: Adapting LogN for other tasks or investigating its interaction with different types of samplers and network architectures.
Summary updated