Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

A systematic study of the class imbalance problem in convolutional neural networks

Oversampling was the most reliable remedy for class imbalance in tested CNNs

  • Problem Class imbalance is well studied for classical classifiers but rarely for CNNs. Practitioners borrow remedies from classical machine learning without knowing which one works for deep networks.
  • Method The authors compare oversampling, undersampling, two-phase training and thresholding. They train CNNs on controlled imbalanced subsets of MNIST, CIFAR-10 and ImageNet, keeping the network and schedule fixed.
  • Results Oversampling was the best method in almost all scenarios. Imbalance lowered the multi-class ROC on ILSVRC-2012 from about 99 to about 90 at the largest tested imbalance.

Why imbalance needs a CNN-specific study

Real datasets often have some classes with far more training examples than others. In medical diagnosis or fraud detection, one class can be about 1000 times rarer than another. Classical classifiers are known to suffer from this, both during training and on the test set. Deep learning has no comparable systematic study, even though the same problem very likely affects CNNs.

Practitioners therefore borrow remedies from classical machine learning or rely on intuition. Oversampling is the most common choice in deep learning, based on the authors' literature review. That leaves open which remedy actually works for CNNs and under which kind of imbalance.

Seven remedies on the same footing

The study keeps the network and its training schedule fixed and changes only how the data or the decision rule is handled. Random minority oversampling replicates randomly chosen examples from the minority classes until the classes are closer in size. Random majority undersampling does the opposite and removes random examples from the majority classes, so the training set shrinks.

Two-phase training first pre-trains on a balanced set and then fine-tunes the output layers on the original imbalanced data.

Thresholding leaves training alone and adjusts the network outputs at test time. Each output is divided by the estimated prior of its class, \\(p(i) = |i| / \\sum_k |k|\\), where \\(|i|\\) is the number of examples in class i. The authors also combine thresholding with oversampling and with undersampling.

Building imbalanced versions of the benchmarks

Step imbalance is set by two numbers, the fraction of minority classes \\(\\mu\\) and the imbalance ratio \\(\\rho = \\max_i |C_i| / \\min_i |C_i|\\). Among 10 classes, five with 500 examples and five with 5 000 examples give \\(\\rho = 10\\) and \\(\\mu = 0.5\\). Linear imbalance uses only \\(\\rho\\), and the classes in between are spaced so that neighbouring classes differ by a constant amount.

MNIST uses LeNet-5 trained for 10 000 iterations, with each class capped at 5 000 examples. CIFAR-10 uses All-CNN trained for 70 000 iterations, and its imbalance grid is narrower than MNIST's. ILSVRC-2012 uses ResNet-10 trained for 320 000 iterations, with only a few imbalance settings. The MNIST study alone trained 22 500 networks, and the CIFAR-10 study trained 640.

Why multi-class ROC AUC is the main metric

Overall accuracy is the usual score, but it can look high for a classifier that always predicts the majority class. Moving the decision threshold to match training priors can also lower accuracy on a balanced test set, even when the classifier's discrimination is unchanged. ROC AUC avoids these problems, and the multi-class version averages the AUC of each class against all the other classes.

The test sets stay balanced, so each class keeps its full test count.

Oversampling leads on MNIST and CIFAR-10

Imbalance hurts performance substantially, and the harm grows with the imbalance ratio and the number of minority classes. Harder tasks suffer more, since a similar drop on MNIST needed an imbalance about 100 times stronger than on CIFAR-10.

Oversampling was the best method in almost all scenarios and never fell considerably below the baseline on these two datasets.

Undersampling was generally weak and dropped below the baseline in many scenarios. With many minority classes it sometimes beat the baseline, but it never clearly beat oversampling. The gap between the two is largest with few minority classes and shrinks as more classes become minority, since the two methods then coincide.

Two-phase training usually lands between the baseline and the sampling method it builds on. Because oversampling was almost always above the baseline, fine-tuning gave lower scores in those cases. For CIFAR-10 the step experiment was repeated three times on reshuffled stratified splits to check the results.

Linear imbalance on MNIST and CIFAR-10

The most extreme linear case on MNIST has \\(\\rho = 5\\,000\\), leaving one example in the rarest class. Even there, the baseline's multi-class ROC AUC drops only a little, so the baseline itself is not strongly hurt. Oversampling improves the score on both datasets for every tested ratio, while undersampling's score falls roughly linearly as the ratio grows.

ILSVRC-2012 results and their caution

The ResNet-10 trained on the original ILSVRC-2012 data reached a top-1 test error of 62.56%. Imbalance cut the baseline's multi-class ROC from about 99 to about 90 at the largest tested imbalance. Oversampling beat undersampling in every scenario, though it dipped slightly below the baseline at the extreme imbalances.

The authors caution that this is not strong evidence that oversampling is inferior on highly complex tasks. Undersampling runs differed by more than 4 in absolute multi-class ROC, so gaps of 1 to 2 may just reflect run-to-run variation. The largest imbalanced subset was only about 10% of the original dataset, which may call for different hyperparameters.

Lost data or imbalance?

It still falls short of a classifier trained on the original dataset, which suggests the imbalance itself matters.

Undersampling uses less data, yet on some MNIST cases it beats the baseline. In some cases even undersampling performs on a par with oversampling, so fewer examples can still be enough. For the same \\(\\rho\\), linear and step imbalance with \\(\\mu = 0.5\\) have equal example counts, yet step imbalance drops much more.

Thresholding and overall accuracy

The authors also report overall accuracy for step imbalance, since it is still a common score. Thresholding improved overall accuracy, and it worked particularly well when combined with oversampling.

Thresholding doesn't change discrimination, because multiplying the decision variable by a positive number leaves ROC AUC unchanged. It moves the operating point instead, which matters when the count of correctly classified cases is what counts.

Milder sampling on MNIST

On MNIST with \\(\\rho = 1\\,000\\), the authors reduced the imbalance gradually with both methods. The default full oversampling was always best, and any reduction of imbalance improved the score.

For undersampling with a moderate number of minority classes, intermediate levels beat both full undersampling and the baseline. For each oversampling level there is an undersampling level that performs equally well, but that level isn't known in advance.

Does oversampling overfit CNNs?

Classical studies found that oversampling can overfit minority examples, which would favour undersampling. On CIFAR-10 with 5 minority classes and imbalance ratio 50, the gap between training and test accuracy didn't grow with iterations for oversampling. Both sampling methods also made training more stable, and the authors saw no overfitting in the other scenarios they checked, including MNIST and ImageNet.

Limitations

ILSVRC-2012 was run with a single small ResNet-10, and only the baseline, oversampling and undersampling were tested there. The ILSVRC-2012 comparison also has the run-to-run variability noted above, which limits how firmly small gaps can be read. For CIFAR-10 the reported model was the best on the test set over eight runs, so the reported scores are selected on the test data.

The accuracy analysis covers step imbalance only.

Paper info

Authors
Mateusz Buda, Atsuto Maki, Maciej A. Mazurowski
Venue
arXiv · Preprint
First published
2017-10-15
Added
2026-11-12
Updated
2018-10-13
Version
v2
arXiv
1710.05381
DOI
10.1016/j.neunet.2018.07.011
Category
cs.CV · cs.AI · cs.LG · cs.NE · stat.ML
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Mateusz Buda, Atsuto Maki, Maciej A. Mazurowski (2017). A systematic study of the class imbalance problem in convolutional neural networks. arXiv:1710.05381v2. https://doi.org/10.1016/j.neunet.2018.07.011

BibTeX
@article{buda2017systematic,
  title = {{A systematic study of the class imbalance problem in convolutional neural networks}},
  author = {Mateusz Buda and Atsuto Maki and Maciej A. Mazurowski},
  year = {2017},
  eprint = {1710.05381},
  archivePrefix = {arXiv},
  doi = {10.1016/j.neunet.2018.07.011},
  url = {https://arxiv.org/abs/1710.05381v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up