Abstract
Imbalanced classification poses a significant challenge in machine learning, where standard accuracy often fails to reflect performance on minority classes. While class-weighting is a common remedy, selecting optimal weights is often heuristic and prone to error. This paper introduces a robust risk framework using Label Conditional Value at Risk (LCVaR) and its heterogeneous variant (LHCVaR). These methods minimize the risk of the worst-performing classes without requiring precise weight specifications. We analyze the fundamental trade-offs in class-weighted classification and demonstrate that our robust approaches provide stable, high-performance results across synthetic and real-world imbalanced datasets.
Introduction
In domains such as fraud detection, medical diagnosis, and product taxonomy, class distributions are frequently skewed. Standard empirical risk minimization (ERM) tends to favor majority classes, leading to poor performance on critical minority labels. Practitioners typically address this by assigning higher costs to minority class errors. However, this "class-weighting" approach introduces two major difficulties: the inherent trade-off between performance on different classes and the uncertainty in choosing the "correct" weights for a given application.
The Fundamental Trade-off and Irreducible Error
A core contribution of this work is the quantification of the "cost of being wrong" about evaluation weights. When a model is trained using one set of weights but evaluated on another, it suffers from an irreducible error.
As illustrated in the figure above, the total error can be decomposed into Irreducible Error (IE) and Estimation Error (EE). The IE arises from the mismatch between the optimal decision thresholds ($t_q$ and $t_{q'}$) for the training and evaluation weightings. This error represents a performance floor that cannot be eliminated by increasing data size if the training and evaluation priorities are misaligned.
Robust Risk Framework: LCVaR and LHCVaR
To mitigate the risks associated with weight uncertainty, we propose a minimax robust objective. Instead of optimizing for a single weight vector, we minimize the maximum risk over a predefined uncertainty set of weights.
We draw a novel connection to Conditional Value at Risk (CVaR), a risk measure from finance.
- Label Conditional Value at Risk (LCVaR): This objective focuses on the classes with the highest risks. It effectively "water-fills" the weights to protect the worst-performing labels, ensuring no single class is neglected to boost overall accuracy.
- Label Heterogeneous CVaR (LHCVaR): A generalization that allows for varying levels of robustness across different classes. This is particularly useful when certain minority classes are known to be more critical than others.
We derive dual formulations for these risks, transforming complex minimax problems into standard, unconstrained convex optimization problems solvable via gradient descent.
Experimental Results
The proposed methods were evaluated on synthetic datasets and the UCI Covertype dataset, which features 7 classes with extreme imbalance (majority class at 98%, minority at 2%).
Worst-Case Risk Reduction
On the Covertype dataset, LHCVaR significantly outperformed standard methods in protecting the most vulnerable classes. It achieved a worst-case class risk of 0.4907, compared to 0.5111 for a standard classifier and 0.5333 for a balanced weighting scheme.
Stability and Hyperparameters
A key advantage of LCVaR and LHCVaR is their relative insensitivity to hyperparameters ($\alpha$ and $\kappa$). Unlike traditional weighting schemes that require exhaustive grid searches to find the "perfect" balance, these robust objectives act as a safety net, "squashing" the distribution of class risks and pulling the worst-performing classes toward the mean.
Conclusion
This work provides a principled framework for addressing class imbalance through robust optimization. By accounting for the irreducible error inherent in weight mismatch and utilizing LCVaR/LHCVaR objectives, we can develop classifiers that are both theoretically grounded and practically robust. Future work will explore the application of these techniques to domain shift scenarios, where training and test class distributions differ significantly.
Summary updated