Balancing the Scales: A Theoretical and Algorithmic Framework for Learning from Imbalanced Data

Corinna Cortes, Anqi Mao, Mehryar Mohri, Yutao Zhong

TL;DR

This paper provides a rigorous theoretical foundation for learning from imbalanced datasets by introducing a novel class-imbalanced margin loss function and proving its $\mathcal{H}$-consistency. Based on this theory, the authors develop IMMAX (Imbalanced Margin Maximization), an algorithm that naturally aligns margin parameters with logit differences and consistently outperforms popular heuristics on standard misclassification tasks.

What Problem Does This Paper Address?

Real-world datasets are frequently plagued by class imbalance, often exhibiting a "long-tailed" distribution where a few majority classes dominate. Standard machine learning models trained on such data tend to perform poorly on minority classes, sometimes reverting to a naive baseline that simply predicts the majority class.

While practitioners widely use heuristics like data resampling, cost-sensitive loss weighting, or logit adjustments to combat this, these methods lack solid theoretical foundations. In fact, the authors demonstrate that popular cost-sensitive methods are fundamentally Bayes-inconsistent—meaning that even with infinite data, they can fail to converge to the optimal classifier. This paper bridges the gap between theory and practice by establishing a rigorous framework for analyzing generalization under class imbalance, specifically targeting the standard zero-one misclassification loss.

Methods

The authors introduce a new class-imbalanced margin loss function ($\rho_+, \rho_-$) that enforces distinct confidence margins for different classes based on their frequencies. They prove that this loss function satisfies $\mathcal{H}$-consistency bounds, which provide strong, non-asymptotic generalization guarantees tailored to specific hypothesis sets (like linear models or neural networks). To derive these guarantees, they introduce a new complexity metric called class-sensitive Rademacher complexity.

Leveraging these theoretical bounds, they propose IMMAX (Imbalanced Margin Maximization). Unlike previous approaches that additively modify logits, IMMAX applies its margin parameters multiplicatively to the differences of logits. This formulation naturally aligns with the geometric concept of margins and can be easily integrated as a regularization term into standard optimization workflows for SVMs, linear models, and deep neural networks.

Datasets

The authors evaluate their framework on three standard image classification datasets artificially modified to induce class imbalance:

  • CIFAR-10
  • CIFAR-100
  • Tiny ImageNet

They test two distinct types of imbalance: long-tailed imbalance (where class sizes decrease exponentially) and step imbalance (where minority classes share one small size and majority classes share a larger one). The algorithms are rigorously evaluated across three imbalance ratios: 200, 100, and 10.

Key Insights and Ideas

  • The Inconsistency of Cost-Weighting: The paper mathematically proves that if the penalization costs for classes are unequal ($c_+ \neq c_-$), cost-sensitive loss minimization is not Bayes-consistent with respect to the standard zero-one loss.
  • Flipping Prior Margin Logic: A striking "aha moment" comes from comparing IMMAX to prior margin-based work like LDAM (Cao et al., 2019). While LDAM argues that minority classes should have larger margins, the authors show that when optimizing for standard zero-one misclassification loss (rather than balanced loss), the majority class actually requires a larger margin. This prevents the high-density majority distribution from encroaching on the minority class space, as illustrated in Figure 1.
Figure 1. Solutions in the separable case. Left: Empirical data with negative (blue) and positive (orange) points. The black line is the SVM solution, the red dashed line is Cao et al. (2019)’s solution, and the blue dashed line is ours. Right: Full data distribution showing our solution achieves the lowest generalization error.

Key Results

IMMAX consistently achieves top-tier performance, outperforming a wide array of popular baselines—including Cross-Entropy (CE), Re-Weighting (RW), Balanced Softmax (BS), Logit Adjustment (LA), Focal Loss, and LDAM—across all datasets and imbalance types.

  • Absolute Improvement: In every single evaluated scenario, IMMAX delivers an absolute accuracy improvement of at least 0.6% over the runner-up algorithm.
  • Extreme Imbalance Performance: On long-tailed CIFAR-10 with an extreme imbalance ratio of 200, IMMAX achieves 96.11% accuracy, compared to LDAM's 95.45% and Cross-Entropy's 94.81%.
  • Scalability: The benefits of IMMAX become more pronounced as the dataset becomes more severely imbalanced.

Limitations and Future Work

  • Class-Scale Dependency: The multi-class generalization bounds exhibit an inherent dependency on the total number of classes ($c$). For datasets with an extremely large number of categories, this could weaken the theoretical guarantees, though the authors suggest mitigating this practically by forcing rare classes to share identical margin parameters.
  • Objective Specificity: The framework is explicitly optimized for standard zero-one misclassification loss. While it can be adapted to other objectives like balanced loss, it is not inherently optimized for alternative metrics like F1-score or AUC.
  • Isolation from Orthogonal Heuristics: To ensure a clean theoretical comparison, the authors deliberately excluded data augmentation and deferred re-balancing schedules from their experiments, though they note that combining IMMAX with these techniques in production would likely yield even higher performance.

Summary updated

BibTeX
@inproceedings{cortes2025balancing,
  author = {Corinna Cortes and Anqi Mao and Mehryar Mohri and Yutao Zhong},
  title = {{Balancing the Scales: A Theoretical and Algorithmic Framework for Learning from Imbalanced Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=gscscNNiPN},
}
Figure