[Paper Review] Understanding CNN Fragility When Learning With Imbalanced Data
This paper investigates why CNNs struggle to generalize on minority classes in imbalanced datasets by analyzing latent feature and classification embeddings (FE and CE). It reveals that models rely on a narrow set of high-magnitude, low-diversity features for minority classes, leading to brittleness when test features differ in magnitude from training data—highlighting that feature diversity, not just class balance, is critical for robust generalization.
Convolutional neural networks (CNNs) have achieved impressive results on imbalanced image data, but they still have difficulty generalizing to minority classes and their decisions are difficult to interpret. These problems are related because the method by which CNNs generalize to minority classes, which requires improvement, is wrapped in a blackbox. To demystify CNN decisions on imbalanced data, we focus on their latent features. Although CNNs embed the pattern knowledge learned from a training set in model parameters, the effect of this knowledge is contained in feature and classification embeddings (FE and CE). These embeddings can be extracted from a trained model and their global, class properties (e.g., frequency, magnitude and identity) can be analyzed. We find that important information regarding the ability of a neural network to generalize to minority classes resides in the class top-K CE and FE. We show that a CNN learns a limited number of class top-K CE per category, and that their number and magnitudes vary based on whether the same class is balanced or imbalanced. This calls into question whether a CNN has learned intrinsic class features, or merely frequently occurring ones that happen to exist in the sampled class distribution. We also hypothesize that latent class diversity is as important as the number of class examples, which has important implications for re-sampling and cost-sensitive methods. These methods generally focus on rebalancing model weights, class numbers and margins; instead of diversifying class latent features through augmentation. We also demonstrate that a CNN has difficulty generalizing to test data if the magnitude of its top-K latent features do not match the training set. We use three popular image datasets and two cost-sensitive algorithms commonly employed in imbalanced learning for our experiments.
Motivation & Objective
- To understand why CNNs fail to generalize to minority classes in imbalanced datasets.
- To investigate how latent feature and classification embeddings (FE and CE) influence model decisions.
- To examine whether CNNs learn intrinsic class features or merely frequent patterns from imbalanced training data.
- To evaluate the role of feature magnitude and diversity in model generalization performance.
- To challenge the assumption that re-balancing class frequencies alone ensures robustness, proposing instead that latent feature diversity is equally important.
Proposed method
- The authors decompose trained CNNs into feature extraction and classification heads to isolate and analyze latent representations.
- They extract and analyze feature embeddings (FE) and classification embeddings (CE) from the final layers of the network.
- They define and compute top-K FE and CE for each class, focusing on identity, magnitude, frequency, and density.
- They compare training and test set embeddings to assess consistency in feature response ranges and identities.
- They use FB norm to quantify the magnitude and diversity of top-K features, linking it to generalization performance.
- Experiments are conducted on three datasets (SVHN, CelebA, CIFAR-10) with two cost-sensitive loss functions (focal loss, LDAM), evaluating generalization via TP/FP analysis.
Experimental results
Research questions
- RQ1How do the identities and magnitudes of top-K feature and classification embeddings differ between majority and minority classes in imbalanced settings?
- RQ2To what extent does the model's generalization performance depend on the consistency of feature magnitude ranges between training and test sets?
- RQ3Does the model learn intrinsic class features or merely high-frequency patterns from the training distribution?
- RQ4How does feature diversity (number and magnitude spread of top-K FE/CE) correlate with generalization on minority classes?
- RQ5Can re-sampling or cost-sensitive methods alone ensure robustness if latent feature diversity is not addressed?
Key findings
- CNNs learn only a limited number of top-K classification embeddings per class, with fewer and lower-magnitude features for minority classes compared to balanced settings.
- Minority class predictions rely on a narrow set of high-magnitude features, making models brittle when test features fall outside the training response range.
- The FB norm for true positives (TPs) is significantly lower (1.73–4.67) than for false positives (FPs) (9.00–21.16), indicating that correct predictions are based on more consistent, high-magnitude feature responses.
- Even with 70% overlap in top-K feature identity, models fail to generalize when feature magnitude ranges differ between training and test sets.
- Models trained with cross-entropy or cost-sensitive loss fail to generalize if test set feature magnitudes do not match training set magnitudes, indicating memorization of specific response ranges.
- The study concludes that latent feature diversity—measured by number and magnitude spread of top-K embeddings—is as critical as class balance for robust generalization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.