Deep neural networks often perform drastically worse on certain classes than others, even when trained on perfectly balanced datasets. This paper introduces MR² (Margin Regularization for Performance Disparity Reduction), a theoretically grounded method that dynamically adjusts training margins based on how "spread out" a class's features are. By enforcing larger margins and tighter clustering for high-variance, "hard" classes, MR² significantly boosts their accuracy without hurting "easy" classes, leading to fairer and more accurate models overall.
The Problem: Disparity in Balanced Data
When a model performs poorly on specific categories, we usually blame imbalanced training data—the classic "long-tail" problem. However, recent studies show that even when trained on perfectly balanced datasets like ImageNet, deep neural networks exhibit severe class-wise performance disparities. For example, a standard ResNet-50 might achieve 100% accuracy on the easiest class, but a dismal 16% on the hardest.
This unpredictability threatens the safe and reliable deployment of AI. While previous works have tried to fix this using reweighting techniques or distributionally robust optimization, these empirical fixes often play a zero-sum game: they degrade the performance of "easy" classes to lift up the "hard" ones. Furthermore, a rigorous theoretical understanding of why this disparity happens on balanced data has been missing.
The Solution: Margin Regularization (MR²)
The authors trace the root of the problem to feature geometry: "hard" classes naturally exhibit much greater feature variability (spread) than "easy" classes. To combat this, they introduce MR², which operates on two levels:
- Logit Margin ($\ell_{\gamma, ce}$): Instead of using standard cross-entropy, which treats all classes equally, MR² dynamically adjusts the margin for each class during training. The size of the margin is proportional to the class's feature spread. Because hard classes have higher variance, they are assigned larger margins, forcing the model to learn more robust decision boundaries for them.
- Representation Margin ($\ell_{\bar{s}}$): To prevent feature spread from growing out of control, the authors introduce a regularization loss that explicitly penalizes excessive variance. This acts similarly to a contrastive loss, encouraging features of the same class to cluster tightly together (intra-class compactness).
Crucially, these mechanisms aren't just intuitive heuristics. The authors derive a novel class-sensitive generalization bound proving that classes with larger feature variability contribute more to generalization error, mathematically justifying their variance-proportional margin design.
Key Insights
- Feature spread dictates difficulty: The disparity in class accuracy doesn't stem from a biased classifier head, but from the representations themselves. Hard classes are simply more "spread out" and entangled in the feature space.
- No zero-sum game: By targeting the root geometric cause of the disparity, MR² avoids the typical trade-offs seen in fairness literature. It improves the bottom performers without dragging down the top performers.
- "Neural Collapse" doesn't fully happen in the wild: Theoretical models often assume that at the end of training, intra-class variance drops to zero (Neural Collapse). The authors observe that on complex, large-scale datasets like ImageNet, this collapse doesn't actually materialize. Residual, class-dependent feature spreads remain, making variance-aware regularization necessary.
Key Results
MR² was tested across diverse architectures (CNNs, Vision Transformers) and training paradigms, including training from scratch, linear probing, and fine-tuning foundation models like MAE, MoCov2, and CLIP. The method was evaluated on standard large-scale datasets (CIFAR-100, ImageNet) as well as fine-grained datasets (StanfordCars, OxfordPets, etc.).
- CIFAR-100 (ResNet-32): MR² improved overall accuracy by +3.0%. More importantly, it boosted "hard" class accuracy by a massive +5.2%, while still slightly improving "easy" classes (+1.4%).
- ImageNet (CLIP ResNet-50): Overall accuracy improved by +1.7%. Hard classes jumped by +3.2%, and easy classes improved by +0.4%.
- Visualizing the fix: t-SNE projections of the feature space show that under standard cross-entropy, hard classes are highly entangled with wide spreads. Under MR², these same hard classes become tightly clustered and cleanly separated.
Limitations and Future Work
While MR² successfully addresses disparities arising from feature geometry, it does not account for unfairness caused by data-quality issues. For instance, if a class suffers from severe label noise, or if it is heavily affected by spurious correlations (e.g., a specific animal only ever appearing on a specific background), MR² alone will not resolve those underlying data problems. Future work could explore integrating this geometric approach with methods designed to handle noisy labels or multi-label co-occurrences.
Summary updated