In machine learning, we often encounter the "needle in a haystack" problem: a dataset where the class of interest is dwarfed by a massive majority. Whether it is identifying rare pediatric cataracts in medical imagery or detecting equipment failure in wind turbines, the skew in data distribution poses a fundamental challenge.
Standard learning algorithms are designed to minimize average error, which naturally leads them to ignore rare "tail" classes in favor of the "head." The traditional fix has been data-level resampling—either deleting majority samples (undersampling) or duplicating minority ones (oversampling). However, as noted by Kyle D. Feuz and Diane J. Cook in Modeling Skewed Class Distributions by Reshaping the Concept Space, these methods are often destructive. Undersampling discards valuable boundary information, while oversampling risks overfitting to noise.
Instead of distorting the data to fit the algorithm, a growing body of research focuses on reshaping the learning process to fit the data.
Decomposing the Majority Class
One of the most intuitive ways to handle imbalance is to stop treating the majority class as a monolithic block. In many datasets, the "negative" class is actually composed of several distinct sub-concepts. By using Intra-Class Clustering (ICC), Feuz and Cook demonstrate that decomposing a large majority class into smaller, coherent sub-classes can naturally balance the distribution.
This "reshaping" allows the classifier to find more nuanced decision boundaries. Similarly, Fei Wu and colleagues proposed Uncorrelated Cost-sensitive Multiset Learning (UCML) in Multiset Feature Learning for Highly Imbalanced Data Classification, which partitions the majority class into multiple balanced subsets to extract more discriminant features without losing information.
Embedding Local Structures
Deep learning models often struggle with imbalance because the feature space itself becomes biased. Chen Huang and Chen Change Loy addressed this in Learning Deep Representation for Imbalanced Classification by introducing Large Margin Local Embedding (LMLE).
The intuition here is to preserve the local cluster structure of the data. By using a "quintuplet" sampling strategy, the model learns embeddings where minority samples are not just separated from the majority, but are clustered in a way that respects their internal variance. This prevents the minority class from being collapsed into a single point in the feature space, which is a common failure mode in standard triplet losses.
Cost-Sensitive Loss Functions
If we cannot change the data, we can change the "penalty" for being wrong. Cost-sensitive learning assigns a higher weight to errors made on the minority class. In Automatic diagnosis of imbalanced ophthalmic images using a cost-sensitive deep convolutional neural network, Jiewei Jiang and colleagues integrated a cost factor directly into the loss function of a ResNet, achieving a significant boost in sensitivity for rare diseases without discarding any "normal" images.
A more dynamic version of this is Class Rectification Loss (CRL), proposed by Qi Dong and Shaogang Gong in Class Rectification Hard Mining for Imbalanced Deep Learning. Instead of global weights, CRL performs incremental "hard mining" within each training batch, forcing the model to focus on the most difficult minority examples that are currently being misclassified.
Information Preserving Sampling
When data volume is so massive that some form of reduction is necessary—such as in Cox regression for rare events—random undersampling is statistically inefficient. Alex Mak and colleagues argue in Statistical Undersampling with Mutual Information and Support Points that we should use information theory to decide which samples to keep.
By leveraging Mutual Information and Support Points, they ensure that the reduced majority class still represents the original statistical distribution and the critical boundaries of the feature space. This is echoed in Long-Tailed Recognition via Information-Preservable Two-Stage Learning, where an Information-Preservable Determinantal Point Process (IP-DPP) is used to select the most "informative" samples, ensuring that the mathematical health of the model is maintained even after the dataset is balanced.
Knowledge Transfer from Head to Tail
Finally, recent work suggests that the "head" (majority) classes contain general features that can be "donated" to the "tail" (minority) classes. Tianhao Li and Limin Wang developed SSD (Self Supervision to Distillation) in Self Supervision to Distillation for Long-Tailed Visual Recognition.
By first training the model with label-agnostic self-supervision, the network learns robust feature representations from the entire dataset. Then, through knowledge distillation, the model transfers this understanding to the specific task of classifying rare categories. This approach treats the majority class not as a nuisance to be sampled away, but as a rich source of structural information that helps the model understand the world well enough to recognize the rare exceptions within it.