Adjusting Decision Boundary for Class Imbalanced Learning

Byungju Kim, Junmo Kim · DOI

Abstract

Training of deep neural networks heavily depends on the data distribution. In particular, the networks easily suffer from class imbalance, where frequent classes are recognized significantly better than infrequent ones. To resolve this problem, existing approaches typically propose novel loss functions to obtain better feature embedding. In this paper, we argue that drawing a better decision boundary is as important as learning better features. Inspired by observations, we investigate how class imbalance affects the decision boundary and deteriorates performance. We also investigate the feature distributional discrepancy between training and test time. As a result, we propose a novel, yet simple method for class imbalanced learning. Despite its simplicity, our method shows outstanding performance. In particular, the experimental results show that we can significantly improve the network by scaling the weight vectors, even without an additional training process.

Introduction

In real-world applications, datasets are rarely balanced. Standard deep learning models suffer from "class imbalance," where the network becomes biased toward frequent classes (majority) and performs poorly on infrequent classes (minority). While most research focuses on improving feature representation through complex loss functions, this paper identifies the decision boundary as a critical, often overlooked factor. Even with high-quality features, a biased decision boundary that allocates excessive feature space to frequent classes will inevitably lead to poor generalization on minority classes.

Methodology

The authors propose two straightforward techniques to rectify the decision boundary bias:

  1. Weight Vector Normalization (WVN): During training, the norms of the weight vectors in the final classification layer are normalized. This prevents frequent classes from developing disproportionately large weight norms, which otherwise pushes the decision boundary into the territory of minority classes.
  2. Weight Re-scaling (RS): This post-processing step adjusts the weight vector $w_i$ for each class $i$ based on its sample count $n_i$: $$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 $\gamma$ is a hyperparameter. This scaling provides minority classes with a larger "margin," compensating for the network's tendency to overfit them into sparse clusters.

Key Insights

The Norm-Frequency Correlation

A primary observation of this work is the strong correlation between class frequency and the norm of the corresponding weight vector. As shown in the figure below, as the imbalance ratio increases, the relative norm of weight vectors for infrequent classes (higher indices) drops sharply compared to frequent classes.

Correlation between class frequency and weight vector norms across different imbalance ratios.

The Size Reversal Phenomenon

In the learned feature space, a counter-intuitive "Size Reversal" occurs: frequent classes form small, dense clusters due to better generalization, while infrequent classes form large, sparse clusters due to overfitting. A standard classifier draws a boundary that favors the frequent class's high-norm weight vector, ignoring the actual spread of the features.

Conceptual illustration of biased (a) vs. adjusted (b) decision boundaries considering the size reversal phenomenon.

By adjusting the weight vectors, the decision boundary is shifted to respect the actual distribution of features, ensuring that minority classes are not "crowded out" by the majority.

Experimental Results

The proposed methods were evaluated on Long-Tailed CIFAR-10/100 and Tiny ImageNet. Key findings include:

  • Significant Error Reduction: On CIFAR-10 (Imbalance 100), the baseline error of 29.71% was reduced to 20.17% using WVN+RS.
  • Efficiency: The "Baseline+RS" approach—applying re-scaling to a pre-trained model without further training—outperformed several state-of-the-art specialized loss functions, proving that boundary adjustment is a highly efficient lever for performance.

Conclusion

This research demonstrates that class imbalance is not just a feature learning problem but a decision boundary problem. By normalizing and re-scaling weight vectors, models can achieve state-of-the-art performance on imbalanced data with minimal computational overhead. Future work will focus on automating the selection of the scaling hyperparameter $\gamma$ during the training process.

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