Adjusting Decision Boundary for Class Imbalanced Learning

Byungju Kim, Junmo Kim

Introduction

Deep neural networks (DNNs) frequently encounter challenges when trained on imbalanced datasets, where certain classes significantly outnumber others. In these "long-tailed" distributions, models naturally develop a bias, pushing decision boundaries toward majority classes and effectively "squeezing" minority classes into smaller regions of the feature space. While traditional approaches often focus on complex loss functions or data resampling, this research demonstrates that the primary issue lies in the geometry of the decision boundary itself.

The Problem: Geometric Bias in Feature Space

In real-world scenarios, such as identifying rare species or medical anomalies, data is inherently skewed. When a DNN is trained on such data, it becomes a "bully," performing exceptionally well on frequent classes while failing on infrequent ones. The authors argue that the problem isn't necessarily the features being learned, but how the final classification layer interprets them.

A critical observation made by the researchers is the correlation between class frequency and the norm of the weight vectors in the final fully connected layer.

Correlation between class frequency and weight vector norms over training epochs. Frequent classes (e.g., $w_1$) develop significantly larger norms than infrequent ones (e.g., $w_9$).

As shown in the figure above, classes with more samples naturally acquire weight vectors with larger magnitudes ($\|w\|$). This creates a "multiplicative bias" that favors majority classes during the softmax operation, leading to a skewed decision boundary that penalizes minority classes even if their features are well-separated.

Proposed Methodology: WVN and RS

To address this geometric imbalance, the authors propose two simple yet effective modifications:

  1. Weight Vector Normalization (WVN): This technique ensures that the norms of all weight vectors in the final layer are kept equal during training. By removing the magnitude difference, the network is forced to rely on the angular distance between features and weights, preventing majority classes from dominating based on norm size alone.
  2. Weight Re-scaling (RS): This post-hoc adjustment scales weight vectors based on class frequency using the formula: $$w_i \leftarrow \left(\frac{n_1}{n_i}\right)^\gamma w_i$$ where $n_1$ is the count of the most frequent class and $n_i$ is the count for class $i$. This expansion of the weight vector "inflates" the territory allocated to minority classes in the feature space.

A significant advantage of the Baseline+RS approach is that it can be applied to pre-trained models without further backpropagation, offering a computationally efficient performance boost.

Experimental Evaluation and Datasets

The method was rigorously tested across various imbalanced benchmarks, including Long-Tailed CIFAR-10/100, Tiny ImageNet, and large-scale real-world datasets like iNaturalist 2018 and ImageNet-LT.

Visualization of different imbalance distributions: Long-tailed (exponential decay) and Step imbalance (abrupt drop).

The researchers explored both "long-tailed" distributions (where frequency decays exponentially) and "step" imbalance (where classes are split into a frequent group and a rare group), as illustrated in the figure above.

Key Results and Insights

The proposed WVN+RS method achieved state-of-the-art results, notably reducing validation error on Long-Tailed CIFAR-10 (imbalance ratio 100) to 27.23%, outperforming established methods like Focal Loss (34.71%) and LDAM (28.09%).

The study yields several profound insights:

  • Boundary over Features: The features learned by standard biased models are often sufficient; the failure occurs because the decision boundary is poorly placed. Adjusting the boundary (via RS) can yield dramatic improvements without retraining the entire feature extractor.
  • Robustness: WVN models are less sensitive to hyperparameter tuning (specifically the scaling factor $\gamma$) compared to standard baselines, simplifying deployment in production environments.

Conclusion and Future Directions

By focusing on the geometry of the final classification layer, this work provides a simple, "cheap," and highly effective solution to class imbalance. While the method relies on a hyperparameter $\gamma$ that currently requires a validation set to optimize, its performance across diverse datasets underscores the importance of decision boundary management. Future research may extend these geometric principles to more complex tasks like object detection and semantic segmentation.

Summary updated

BibTeX
@article{kim2020adjusting,
  author = {Byungju Kim and Junmo Kim},
  title = {{Adjusting Decision Boundary for Class Imbalanced Learning}},
  journal = {IEEE Access},
  year = {2020},
  doi = {10.1109/access.2020.2991231},
}
Figure