Introduction
Real-world datasets frequently exhibit a "long-tailed" distribution where a small number of "head" classes contain the majority of samples, while a large number of "tail" classes are sparsely represented. Standard neural networks trained via Empirical Risk Minimization (ERM) tend to over-fit to these dominant classes, leading to poor generalization on rare ones. To address this, researchers typically aim to minimize the balanced error—the average error rate across all classes, regardless of their frequency.
The Limitations of Current Heuristics
Existing approaches to long-tail learning generally fall into two categories: post-hoc weight normalization and loss modification.
Post-hoc weight normalization assumes that classifier weights for rare classes naturally have smaller norms, and thus scaling them up after training can rebalance predictions. However, this assumption is highly dependent on the choice of optimizer. As shown in the figure below, while weight norms correlate with class frequency when using SGD with momentum, this relationship breaks down or even reverses when using adaptive optimizers like Adam. This makes weight normalization a brittle solution.
Furthermore, many existing loss modifications lack "Fisher consistency." This means they are not mathematically guaranteed to converge to the optimal solution for balanced error, even in the limit of infinite data.
Logit Adjustment: A Statistically Grounded Approach
The authors propose logit adjustment, a technique that introduces a label-dependent additive offset to the model's pre-softmax outputs (logits). This shift is based on the training class frequencies $\pi_y$. Specifically, the adjustment involves subtracting $\tau \cdot \log(\pi_y)$ from each logit, where $\tau$ is a tunable scaling parameter.
This adjustment can be applied in two ways:
- Post-hoc Logit Adjustment: Applied to a model already trained via standard ERM.
- Logit-adjusted Softmax Cross-Entropy: Integrated directly into the training loss, forcing the model to learn a larger relative margin for rare classes.
Unlike previous heuristics, logit adjustment is rigorously proven to be Fisher consistent for minimizing balanced error.
Key Insights: Additive vs. Multiplicative
A critical distinction of logit adjustment is its additive nature. Weight normalization applies a multiplicative scale. If a rare class logit is negative, multiplication cannot change its sign to overtake a dominant class with a positive logit. In contrast, an additive shift can effectively re-rank classes regardless of their initial logit values, providing a more robust mechanism for error balancing.
Experimental Performance
The effectiveness of logit adjustment was validated across several benchmarks:
- CIFAR-10-LT & CIFAR-100-LT: Artificially imbalanced versions of standard datasets.
- ImageNet-LT & iNaturalist 2018: Large-scale and naturally imbalanced datasets.
On ImageNet-LT, logit-adjusted loss achieved a balanced error of 48.89%, significantly outperforming standard ERM (53.11%) and state-of-the-art weight normalization (49.37%). On the challenging iNaturalist dataset, it reduced error from 38.66% to 33.64%. The authors also demonstrated that logit adjustment is complementary to other techniques; combining it with adaptive margins (LDAM) and longer training schedules further reduced iNaturalist error to 28.02%.
Conclusion
Logit adjustment provides a simple, effective, and theoretically sound framework for long-tail learning. By shifting the focus from heuristic weight scaling to statistically grounded logit offsets, it achieves superior performance across diverse datasets. Future work may extend this framework to more general cost-sensitive learning scenarios where misclassification costs vary beyond simple class balancing.
Summary updated