Table of Contents
Fetching ...

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.

A replica analysis of under-bagging

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 -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.
Paper Structure (26 sections, 42 equations, 14 figures, 2 tables)

This paper contains 26 sections, 42 equations, 14 figures, 2 tables.

Figures (14)

  • Figure 1: Comparison between the empirical distribution of $\hat{s}_K^\pm$ (histogram), which is obtained by a single realization of the training data $D$ of finite size with $N=2^{13}$, and the theoretical prediction in Claim \ref{['claim: dist of prediction']} (dashed). Different colors represent resampling averages with different numbers of realizations of reweighting coefficient $\bm{c}$.
  • Figure 2: Comparison of the comparison of $(q,m,v,B)$, obtained as the solution of the self-consistent equation (lines), and $(N^{-1}\sum_i\mathbb{E}_{\bm{c}}[\hat{w}_i(\bm{c}, D)]^2, N^{-1}\sum_i\mathbb{E}_{\bm{c}}[\hat{w}_i(\bm{c}, D)], N^{-1}\sum_i{\mathbb{V}}_{\bm{c}}[\hat{w}_i(\bm{c}, D)], \hat{B}(\bm{c},D))$ (markers with error bars). Reported experimental results are averaged over several realization of $D$ depending on the size $N$. The error bars represent standard deviations. Each panel corresponds to different values of $(\Delta, \lambda)$. Different colors of the lines represent the result for different input dimensions $N$.
  • Figure 3: Comparison of the dependence of the $F$-measure ${\mathcal{F}}$ on $\alpha^- - \alpha^+$, which is the difference in the size between the majority (negative) and the minority (positive) classes, between US (dashed) and UB (solid). Each panel corresponds to different values of $(\Delta, \lambda)$. Different colors of the lines represent the result for different sizes of the minority classes $\alpha^+$.
  • Figure 4: Heatmap plot for the relative $F$-measure ${\mathcal{F}}_{\rm UB}/{\mathcal{F}}_{\rm US}$, where ${\mathcal{F}}_{\rm UB}$ and ${\mathcal{F}}_{\rm US}$ are the $F$-measure for UB and US, respectively. Each panel corresponds to different values of $(\Delta, \lambda)$.
  • Figure 5: Relative variance $v/(q+v)$. Upper panels: the relative variance shown as a function of $\alpha^+$ for some selected values of $\alpha^--\alpha^+$. The legend is common across all panels. Red dashed lines represent the interpolation threshold. Lower panels: the relative variance shown as a 2d-heatmap.
  • ...and 9 more figures

Theorems & Definitions (6)

  • Definition 1: Self-consistent equations
  • Claim 1: Interpretation of the parameters $\Theta$
  • Claim 2: $l$-th moments of the predictor
  • Claim 3: Distribution of the averaged prediction
  • Claim 4: $F$-measure
  • Claim 5: Modified self-consistent equations for US