Imbalanced Classification via Explicit Gradient Learning From Augmented Data

Bronislav Yasinnik, Moshe Salhov, Ofir Lindenbaum, Amir AverbucharXiv 2022

TL;DR

This paper introduces a novel deep meta-learning framework that tackles class imbalance in tabular datasets by dynamically generating and optimizing synthetic minority samples. Instead of relying on static geometric heuristics like SMOTE, the method uses a bi-level optimization routine where the positions of synthetic data points are explicitly updated via gradients to maximize the classifier's performance on a validation set. This approach significantly outperforms traditional re-sampling and cost-sensitive loss functions across a wide range of real-world datasets.

What Problem Does This Paper Address?

Machine learning models frequently stumble when trained on highly imbalanced datasets—scenarios common in real-world applications like credit card fraud detection, customer churn prediction, and rare disease identification. When one class severely outnumbers the other, standard neural networks develop an implicit bias toward the majority class, leading to poor generalization on the minority class.

Existing solutions generally fall into two buckets:

  1. Data-level methods (e.g., over-sampling or SMOTE): These either duplicate minority samples (leading to overfitting) or interpolate between them based on local geometric assumptions. However, if the minority class is sparse or irregularly structured, these geometric assumptions fall apart.
  2. Algorithm-level methods (e.g., Focal Loss or class-weighted losses): These modify the loss function to penalize minority class errors more heavily, but they still struggle to prevent the network from overfitting to noisy outliers.

The authors bridge this gap by proposing a meta-learning framework that treats the synthetic data points themselves as continuous, optimizable parameters, adjusting their positions in the feature space to actively guide the classifier toward a better decision boundary.

Methods

The proposed method, Augmentation by Explicit Gradient Meta-Learning, uses a bi-level optimization loop to simultaneously train the classifier and refine the synthetic data:

  1. Initialization: The training set is split into a training subset ($D^{train}$) and a validation subset ($D^{valid}$). An initial classifier is trained on $D^{train}$. The synthetic dataset ($D^{synth}$) is initialized by duplicating minority samples, focusing particularly on regions of high uncertainty where the initial classifier is least confident.
  2. Step 1 (Inner Loop - Classifier Update): The classifier's weights ($\theta$) are updated by taking a gradient step on a batch that includes the synthetic data ($X^{synth}$). This creates a temporary, "adapted" classifier: $$\theta'(X^{synth}) = \theta - \eta_1 \nabla_\theta \mathcal{L}(X^{train} \cup X^{synth} \mid \theta)$$
  3. Step 2 (Outer Loop - Meta-Update): The adapted classifier is evaluated on a clean validation batch from $D^{valid}$. Crucially, because the adapted weights $\theta'$ are a function of $X^{synth}$, the authors can backpropagate the validation loss through the network weights all the way back to the input features of the synthetic samples: $$X^{synth} \leftarrow X^{synth} - \eta_2 \nabla_{X^{synth}} \mathcal{L}(X^{valid} \mid \theta'(X^{synth}))$$

This two-step process ensures that the synthetic data points are continuously shifted into positions that maximize the model's validation performance.

Datasets

The authors evaluated their approach using three distinct setups:

  • Synthetic Sine Wave Dataset: A toy regression problem designed to visually demonstrate how the meta-learning algorithm shifts auxiliary points to fit an underlying function.
  • Adult Dataset (UCI Census Income): A standard benchmark where the authors artificially induced extreme imbalance ratios of 50:1, 100:1, and 200:1 to evaluate performance under controlled degradation.
  • 27 Real-World Tabular Datasets: Sourced from the imbalanced-learn package, spanning various domains with sample sizes ranging from 336 (ecoli) to 145,751 (protein_homo), and imbalance ratios from 8.6:1 up to 130:1 (abalone_19).

Key Insights and Ideas

  • Data as Learnable Parameters: Instead of treating synthetic data generation as a preprocessing step, this method treats data features as continuous variables that can be optimized via gradient descent.
  • Implicit Regularization: By optimizing synthetic data positions against a validation set, the framework acts as a regularizer. If $\eta_2 = 0$, the method reverts to standard up-sampling; when $\eta_2 > 0$, the synthetic points move dynamically to prevent the model from overfitting to minority-class noise.
  • Freedom from Geometric Constraints: Unlike SMOTE or ADASYN, which are constrained to lines or convex clusters between existing points, this explicit gradient method can move synthetic points anywhere in the feature space to carve out an optimal decision boundary. This is clearly illustrated in the toy regression task:
Illustration of imbalanced regression showing how meta-learning shifts synthetic points (red) to perfectly align with the true sine wave function.

Key Results

The explicit gradient method demonstrated substantial performance gains over classical re-sampling (SMOTE, Borderline-SMOTE, ADASYN) and modern deep-learning approaches (cWGAN, MESA, Focal Loss).

  • Adult Dataset: Under extreme 200:1 imbalance, the proposed method achieved an Area Under the Precision-Recall Curve (AUC-PR) of 0.214, outperforming SMOTE (0.208) and standard Cross-Entropy (0.204), while maintaining a much tighter gap to the theoretical "potential" upper bound.
Precision-Recall curves on the Adult dataset under 50:1, 100:1, and 200:1 imbalance ratios, demonstrating that the meta-learning approach dominates across a wide range of recall values.
  • Benchmark Datasets: Across the 27 imbalanced-learn datasets, the proposed method achieved a dominant mean rank of 2.54, significantly lower than the next best classical baseline (CE at 4.37) and deep learning baseline (Focal Loss at 4.87).
  • Large-Scale Performance: On the massive protein_homo dataset (111:1 imbalance), the method boosted AUC-PR to 0.91, a 5% absolute improvement over the competitive meta-learning baseline MESA.

Limitations and Future Work

While highly effective, the authors note a few key limitations:

  • Architecture Constraints: The framework was only validated using shallow Multi-Layer Perceptrons (MLPs). Incorporating more complex layers like Batch Normalization or Dropout within the bi-level optimization loop requires further investigation.
  • No Support for Tree-Based Models: Because the method relies entirely on end-to-end gradient propagation to update the data points, it cannot be directly integrated with popular tree-based ensembles like XGBoost or LightGBM, which are dominant in tabular data applications.
  • Binary Focus: The current implementation is strictly tailored to binary classification; extending the explicit gradient updates to multi-class and long-tailed distributions remains an open avenue for future research.

Summary updated

BibTeX
@misc{yasinnik2022imbalanced,
  author = {Bronislav Yasinnik and Moshe Salhov and Ofir Lindenbaum and Amir Averbuch},
  title = {{Imbalanced Classification via Explicit Gradient Learning From Augmented Data}},
  year = {2022},
  eprint = {2202.10550},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.10550},
}
Figure