A replica analysis of under-bagging
Takashi Takahashi
TL;DR
The paper addresses learning from highly imbalanced data by analyzing under-bagging (UB), under-sampling (US), and simple weighting (SW) for linear classifiers. It derives sharp, replica-method–based self-consistent equations in the large-system limit for a two-component Gaussian mixture, enabling precise characterization of the logits distribution and the $F$-measure. The main findings show that UB improves generalization as the majority class grows (with fixed minority), US performance is largely unaffected by majority excess, and SW can match UB when weights are carefully optimized; UB is robust to interpolation-phase transitions. Practically, the work suggests that class-dependent resampling or reweighting can achieve similar gains to UB without the high computational cost, though careful tuning and consideration of model class are needed. The results are validated on synthetic Gaussian mixtures and real data (Fashion-MNIST binary task), offering guidance for handling class imbalance in linear and potentially broader settings.
Abstract
Under-bagging (UB), which combines under-sampling and bagging, is a popular ensemble learning method for training classifiers on an imbalanced data. Using bagging to reduce the increased variance caused by the reduction in sample size due to under-sampling is a natural approach. However, it has recently been pointed out that in generalized linear models, naive bagging, which does not consider the class imbalance structure, and ridge regularization can produce the same results. Therefore, it is not obvious whether it is better to use UB, which requires an increased computational cost proportional to the number of under-sampled data sets, when training linear models. Given such a situation, in this study, we heuristically derive a sharp asymptotics of UB and use it to compare with several other popular methods for learning from imbalanced data, in the scenario where a linear classifier is trained from a two-component mixture data. The methods compared include the under-sampling (US) method, which trains a model using a single realization of the under-sampled data, and the simple weighting (SW) method, which trains a model with a weighted loss on the entire data. It is shown that the performance of UB is improved by increasing the size of the majority class while keeping the size of the minority fixed, even though the class imbalance can be large, especially when the size of the minority class is small. This is in contrast to US, whose performance is almost independent of the majority class size. In this sense, bagging and simple regularization differ as methods to reduce the variance increased by under-sampling. On the other hand, the performance of SW with the optimal weighting coefficients is almost equal to UB, indicating that the combination of reweighting and regularization may be similar to UB.
