Concept · Machine learning
Class imbalance
Machine learning data problem
Class imbalance is the condition in a classification dataset where the classes are not represented in equal numbers: one class supplies far more examples than another.
The term describes the shape of the training data, not the difficulty of the underlying problem. A dataset can be perfectly balanced and still hard, and a badly skewed one can be easy if the classes separate cleanly. What imbalance does is change what a learner is rewarded for doing, and that is where the trouble starts.
Overview
Class imbalance
Concrete cases make the shape clear. In a disease-screening dataset with 90 healthy records and 10 diseased ones, a model that simply answers "healthy" every time is right nine times in ten, yet it has learned nothing about disease and would miss every sick patient.[4] Network traffic shows the same pattern in the other direction. In a distributed denial-of-service attack, the volume of malicious traffic usually dwarfs the benign traffic produced by legitimate devices, so the normal class becomes the scarce one, and a detector trained on such data tends to favour the attack class and raise false alarms on ordinary traffic.[1]
Why the skew matters
Most classifiers are trained to minimise overall error, and overall error counts every example equally. When one class holds the overwhelming share of the examples, a model can lower its error most cheaply by getting that class right and treating the other as noise. The result is a decision rule that drifts toward the majority, and the minority class, which is usually the class someone cares about, is precisely the one that suffers. The drift is not a bug in any one algorithm; it follows from the objective the algorithm is given.
The same arithmetic explains why plain accuracy misleads. Accuracy is the proportion of all predictions that are correct, so it weights each class in proportion to its size. A model that systematically votes for the majority class will post a high accuracy that reflects the class ratio rather than any genuine ability to tell the classes apart.[5] This is why a reported accuracy figure means little unless the class distribution behind it is known, and why a number that looks excellent can hide a model that never detects the thing it was built to detect.
The families of remedy
Responses fall into a few broad families, each attacking a different part of the problem. Data-level methods change the training set itself, either by removing examples from the majority class (undersampling) or by adding examples to the minority class (oversampling), including the synthetic generation of new minority points.[4] Algorithm-level methods leave the data alone and change the learner, for instance by assigning different costs to different kinds of mistake. A third family sits between the two, combining sampling with ensembles of models. Evaluation is a fourth lever: swapping accuracy for a metric that pays attention to the minority class changes what the training process is pushed to optimise.
None of these is a settled cure. The choice of method interacts with the data, and results that hold in one setting do not automatically transfer. A large simulation study of logistic regression models found that correcting imbalance by undersampling, oversampling or synthetic generation produced poorly calibrated models that strongly overestimated the probability of belonging to the minority class, and did not improve the models' ability to discriminate between the classes; although imbalance correction improved the balance between sensitivity and specificity, similar results were obtained by shifting the probability threshold instead.[6] That finding concerns one model family and one kind of outcome, so it is a caution rather than a verdict on correction in general. The dispute over when correction helps, and which correction suits which data, runs through the rest of the subject and is taken up in later sections.
Class imbalance changes what a learner is rewarded for, so the fix is often to change the reward, the data, or the yardstick, not the algorithm alone.
History
Where the idea came from
The problem entered machine learning as a practical nuisance rather than a named theory. Early work on classification assumed, often without saying so, that the classes in a training set were roughly comparable in size, and algorithms were tuned and compared on that assumption. When researchers began applying the same tools to domains where one class was rare, the tools behaved badly, and the question of what to do about it became a subject in its own right. The literature that grew up around it treated imbalance as a property of the data that had to be managed before a learner could be trusted.
The turning point came with a change in how the minority class was enlarged. Simple oversampling, which copies existing minority examples, had an obvious weakness: it adds no new information and invites a model to memorise the same points repeatedly. The Synthetic Minority Oversampling Technique, published in 2002, took a different route, creating new minority examples by interpolating between an existing minority point and its nearest minority neighbours rather than duplicating it. The design was simple and it travelled well, and over the following fifteen years it became the default preprocessing step for imbalanced learning, adopted across domains and built into software packages from open source to commercial.[7] That default status is itself part of the history: a great deal of later work consists of variants, corrections and challenges to this one procedure.
As the method spread, so did the settings that needed it. Imbalance is not an occasional defect of tidy benchmark data but a routine feature of real applications, among them fraud detection and cancer detection, where the event of interest is by nature uncommon. A survey of deep learning under imbalance noted that the topic had been studied thoroughly for two decades with traditional models, yet empirical work on deep neural networks remained very limited, with most of what existed concentrated on computer vision tasks using convolutional networks.[8] The arrival of deep learning therefore did not settle the old questions; it reopened them on larger data and more complex models, where the same bias toward the majority class reappeared.
The scale of modern data added a further twist. A survey of high-class imbalance in big data, covering class ratios from 100:1 up to 10,000:1, found data sampling to be the popular response, with random over-sampling generally showing better overall results than under-sampling, and found capable performers among the algorithm-level methods as well. The same survey reported inconsistent and conflicting results across published studies, with a limited range of techniques actually evaluated, and called for more comprehensive comparative work.[9] That call is a fair summary of where the subject stands: a standard tool, a wide and growing family of alternatives, and no settled account of which one belongs where. The sections that follow take up the vocabulary, the mechanism, and the evidence in turn.
Main ideas
Majority, minority and the imbalance ratio
The vocabulary of class imbalance is small, and most of it describes the same asymmetry from a different angle. The majority class is the class with more examples in the dataset; the minority class is the one with fewer. Which class is which depends entirely on the data at hand, not on what the classes mean. In a screening programme for a rare disease the sick patients form the minority, but in a dataset of network traffic during a flooding attack the ordinary, legitimate traffic can be the scarce class, because the malicious packets vastly outnumber it.[1] The labels carry no inherent rank; only the counts do.

Binary problems add a second pair of names. The minority class is conventionally called the positive class and the majority the negative class, so that positive samples are the rare ones and negative samples the common ones.[4] This convention can be confusing, because "positive" here means "the class of interest" rather than "good" or "present in a desirable sense".
The size of the asymmetry is summarised by the imbalance ratio, the number of majority-class examples divided by the number of minority-class examples. A ratio near 1 describes a roughly balanced dataset; larger values describe progressively more skewed ones. There is no universal cut-off, but the literature uses working thresholds. Network traffic data are described as highly imbalanced when the ratio of the number of majority-class samples to minority-class samples is more than 10:1, and a survey of big-data applications defines high-class imbalance as a majority-to-minority ratio between 100:1 and 10,000:1.[9][1] The gap between those two figures shows how loosely the term is applied: "highly imbalanced" in one paper may be mild by another's standard, so a ratio is always more informative than the adjective.
Two cautions follow from the vocabulary. First, the ratio is a property of the sample in hand, not of the world. A dataset assembled from hospital records may contain a different proportion of cases than the population it came from, and a model trained on it inherits that proportion. Second, the ratio alone does not determine how hard a classification problem is. Two datasets with identical ratios can differ greatly in how much the classes overlap, and the overlap, not the count, is often what defeats a learner. That complication is taken up later, along with the question of why a skewed ratio pushes a classifier toward the majority in the first place.
Majority and minority name the counts, positive and negative name the roles, and the imbalance ratio puts a number on the gap between them.
Why a classifier drifts toward the majority
It follows from what most learners are asked to do. When one class supplies most of the examples, most of the loss comes from that class.

The arithmetic is easiest to see in a small example. Suppose a dataset holds 90 normal samples and 10 diseased ones. A model that labels every case normal is wrong on only 10 of the 100, so its overall accuracy is 90 percent, but its sensitivity is zero: it has learned nothing about disease and would miss every sick patient.[4] The same logic operates in reverse when the rare class is the ordinary one. During a distributed denial-of-service attack, malicious traffic can far outnumber the benign traffic from legitimate devices, so the normal class becomes scarce, and a detector trained on such data tends to favour the attack class and raise false alarms on ordinary traffic.[1] In both cases the model has settled on the side with more examples, because that is where the error is smallest.
The consequence for the decision boundary is a shift. A classifier that separates two classes draws a line, or in higher dimensions a surface, between them, and the position of that line is set by the training objective. When the majority dominates the loss, the boundary shifts toward the majority class, so that ambiguous cases fall on the majority side.
When the skew is not the whole story
Imbalance rarely arrives alone. Real datasets carry other difficulties at the same time, and separating their effects from the effect of the class ratio is not straightforward. One of these is class overlap, the region where examples of the two classes sit close together and no clean boundary exists. Another is small disjuncts, the situation in which a class is not one cluster but several small, scattered ones, each with too few examples for a learner to generalise from. A review of resampling approaches describes imbalance as a condition that amplifies these existing difficulty factors rather than acting in isolation, biasing the model toward the majority while overlap, small disjuncts and noise do their own damage.[10]
The small-disjunct explanation has been tested directly. One study asked whether class imbalance is truly responsible for the loss of performance usually blamed on it, or whether the loss can be explained another way. Its experiments suggested that the problem is not caused directly by the imbalance itself, but that imbalance tends to produce small disjuncts, and the small disjuncts in turn cause the degradation; a method designed with the small-disjunct problem in mind performed better than standard or advanced remedies aimed at the imbalance.[11] That result reframes the mechanism. The ratio matters, but partly because a rare class is often a fragmented one, and a learner cannot build a reliable rule from a handful of scattered examples no matter how the counts are adjusted.
A related point concerns what the learner is measuring. Most standard algorithms work well on balanced training data and struggle when the classes are uneven, and a large part of the reason is that they seek to maximise a performance measure such as accuracy, which is no longer a proper measure once the classes are skewed. Accuracy treats correctly and incorrectly classified examples of different data classes equally, so a model can score well while never identifying the minority.[3] Changing the measure, or the loss that stands in for it, changes what the model is pushed to learn. The metrics that do this, and the corrections that alter the training data or the learner instead, are taken up in the sections that follow.
The drift is built into the objective: when most examples belong to one class, minimising overall error means pleasing that class first.
Accuracy and the metrics that replace it
The simplest way to score a classifier is to count how many of its predictions were right. That figure, accuracy, is the proportion of all predictions that match the true label. It is intuitive and easy to report, and it is the wrong yardstick for a skewed dataset. Because accuracy weights each class in proportion to its size, a model that systematically votes for the majority class earns a score that reflects the class ratio rather than any ability to tell the classes apart.[5] The number is not false; it is answering a question nobody asked.

The failure is easy to see in the arithmetic. With 90 normal samples and 10 diseased ones, a model that answers "normal" every time is right on 90 of 100 cases, for an accuracy of 90 percent, while its sensitivity and specificity are both zero.[4] Nothing about that model is useful, yet its headline figure looks respectable. As the skew grows, the figure looks better and better while the model does less and less. This is why a reported accuracy means little unless the class distribution behind it is known.
The metrics that replace it are built from the four possible outcomes of a binary prediction. A true positive is a seizure case correctly detected as a seizure; a true negative is a normal case correctly detected as non-seizure; a false positive is a normal patient wrongly detected as a seizure case; and a false negative is a person with seizure(s) detected as normal.[12] Every metric below is some arrangement of those four counts, and each arrangement encodes a different view of what matters.
Precision is the share of flagged cases that were genuinely positive, computed as true positives divided by true positives plus false positives. It answers the question of how much to trust an alarm. Recall, also called sensitivity, is the share of actual positives that were caught, computed as true positives divided by true positives plus false negatives.[12]
It answers the question of how much is being missed. The two pull against each other: flagging more cases raises recall and usually lowers precision, and the reverse. A single number that balances them is the F-measure, the harmonic mean of precision and recall, which is pulled down when either one is poor and so cannot be gamed by excelling at one while neglecting the other.[12] The harmonic mean matters here because a plain average would let a model with perfect precision and near-zero recall look half-decent.
Other metrics take different routes to the same goal. The geometric mean, or G-mean, evaluates the degree of inductive bias in terms of correctly classified positive and negative attributes.[13] The area under the receiver operating characteristic curve, usually shortened to AUC, measures how well a model ranks cases across every possible decision threshold rather than at one fixed cut-off. Balanced accuracy is the arithmetic mean of sensitivity and specificity, so each class contributes equally regardless of its size. A didactic study that manipulated imbalance ratios in simulated data and in brain recordings from electroencephalography, magnetoencephalography and functional magnetic resonance imaging found that accuracy yielded misleadingly high scores as imbalance increased, while AUC and balanced accuracy gave more reliable evaluations; balanced accuracy has the further convenience that on balanced data it equals ordinary accuracy and extends to more than two classes.[5]
The Matthews correlation coefficient, or MCC, is a performance metric widely used in bioinformatics that is suited to imbalanced data.[3] Its appeal is that it uses all four counts at once and cannot be inflated by a lopsided class distribution. One group derived a classifier that optimises MCC directly, showing it has the theoretical property of consistency, and found on 64 datasets spanning a wide range of imbalance that its performance came close to a class-weighted support vector machine while being simpler and more efficient.[3]
Metric choice is not bookkeeping. Because training aims at whatever the loss measures, and the loss is usually a stand-in for the reported metric, changing the metric changes what the model is pushed to learn. A model tuned on accuracy is pushed toward the majority; one tuned on recall, F-measure or MCC is pushed toward the minority. The same lesson appears outside the laboratory. In side-channel analysis of cryptographic hardware, a study of machine learning under imbalanced data found that machine learning metrics, and accuracy above all, can be extremely deceptive, which raised the need to revisit earlier published results and reassess them properly.[14] A metric is a statement of what the modeller wants, and choosing it is a decision about consequences, not a formatting detail.
Accuracy counts votes; the alternatives count what was missed, what was falsely flagged, and whether the model beats chance.
Resampling the training data
The most direct response to a skewed dataset is to change the dataset. Resampling alters the training set so that the classes are closer to equal before a learner ever sees them, and it comes in two directions. Undersampling removes examples from the majority class until the counts are closer; oversampling adds examples to the minority class until they are. Both leave the learner untouched, which is their appeal: any classifier that accepts a table of examples can be trained on a resampled table, and the correction is a preprocessing step that sits outside the model.[13]

Undersampling is cheap and fast, because a smaller training set takes less time and memory to learn from. Its weakness is equally plain. Discarding majority examples throws away information, and if the discarded cases were the varied or borderline ones, the remaining sample can misrepresent the class it is meant to stand for.[13] Random undersampling, which simply deletes majority examples at random, is the bluntest version. Oversampling by simple duplication avoids the loss but introduces a different fault: copied minority points add no new information, and a model trained on many near-identical examples can memorise them rather than learn the boundary they sit near.[13]
The Synthetic Minority Oversampling Technique, or SMOTE, was designed to escape that trap. Rather than copying an existing minority example, SMOTE picks a minority point, finds its nearest minority neighbours, and creates a new synthetic point on the line between them, placing it in the feature space rather than duplicating a real record.[13] The new examples are plausible but not real, and because they are interpolated between existing minority points they tend to fall inside the region the minority class already occupies rather than scattered far outside it. SMOTE is considered the de facto standard preprocessing step for imbalanced learning, valued for the simplicity of its design and its robustness across different kinds of problem.[7]
SMOTE has its own failure modes, and they follow from how it draws its points. Interpolation between a minority point and its neighbours can push synthetic examples toward the edge of the minority region, a tendency described as marginalisation, so that the added data blur the border with the majority class instead of strengthening the minority's centre.[4] The number of neighbours, k, must also be chosen by hand, and the result depends on that choice. Later variants try to correct these tendencies, for instance by drawing the new points from a normal distribution centred on the minority class so that they cluster nearer its middle and avoid the margins.[4] The original procedure remains the reference point against which the variants are measured.
A different tactic cleans rather than enlarges. A Tomek link is a pair of examples, one from each class, that are each other's nearest neighbour, so that no other point of either class lies closer; such a pair sits right on the boundary and is ambiguous by construction.[13] Removing the majority member of each such pair thins the majority class exactly where it crowds the minority, sharpening the separation. Tomek links are an undersampling method when used this way, and they can also serve as a cleaning pass after oversampling, deleting synthetic minority points that have landed among the majority. Combining the two, SMOTE to add minority examples and Tomek links to clear the overlap, is one approach; in a study of fault classification for a wound-rotor induction generator, the combination gave the best performance across the classifiers tested, and k-nearest neighbours paired with it produced the most accurate results.[13]
The choice among these methods is not settled by principle. Each trades one problem for another: undersampling loses information, duplication invites memorisation, synthetic generation risks unrealistic points, and cleaning removes data that might have mattered. Which trade is acceptable depends on the dataset, the classifier and what the model will be used for, and the evidence on how these methods fare in practice is taken up later. What can be said here is that resampling changes the data a model learns from, and any change to the training data changes the model, for better or worse, in ways that must be checked rather than assumed.
Resampling rebalances the examples a learner sees; each method buys balance by giving something up, and the choice is a trade, not a cure.
Cost, threshold and loss-function approaches
Resampling changes the data. The approaches in this section leave the data alone and change the learner instead, or change the point at which its output is turned into a decision. The motivation is the same in every case: if the training objective rewards getting the majority right, then alter the objective, or alter the rule that reads the model's output, so that the minority carries more weight.

Cost-sensitive learning makes that alteration explicit. Each kind of mistake is assigned a price, and the learner is trained to minimise total cost rather than total error. Missing a sick patient and raising a false alarm are given different weights, so a model can no longer lower its score by ignoring the rare class. The prices are not discovered from the data; someone has to decide them, and that decision encodes what the application can tolerate. An empirical study of cost-sensitive neural networks tested sampling and threshold-moving across twenty-one datasets with three cost matrices and found that almost all the techniques helped on two-class tasks, while most were ineffective or even harmful on multiclass ones, and that threshold-moving and soft-ensemble were relatively good choices. The same study warned that some methods believed effective against imbalance may in fact only work on two-class data.[15]
Threshold moving is the simplest member of the family and needs no retraining. A probabilistic classifier outputs a score, and a threshold converts that score into a label; the usual cut-off of one half is a convention, not a law. Lowering the threshold flags more cases as positive, which raises recall and lowers precision. The appeal is that the same trained model can be swept across thresholds and the operating point chosen afterwards, once the relative costs are known. In the simulation study of logistic regression mentioned earlier, shifting the probability threshold produced a similar balance between sensitivity and specificity to that obtained by correcting the imbalance, without the distortion correction introduced.[6] That makes the threshold a cheap first thing to try before the training data are touched at all.
Loss functions are the third route, and they matter most where the output is not a single label but a map of them. In image segmentation, every pixel is classified, and a lesion or tumour typically occupies a small fraction of the image, so the background dominates by a wide margin. The standard cross entropy loss minimises pixel-wise error, and under skew that means the large regions dominate the loss and smaller objects are segmented poorly. The Dice loss is region-based instead, measuring overlap between the predicted region and the true one, and in its basic form it is somewhat adapted to imbalance already; its weakness is an unstable gradient, most evident with highly imbalanced data where the calculation involves small denominators. The Tversky loss generalises Dice by weighting false positives and false negatives separately, so that a greater weight on false negatives improves recall and yields a better balance between the two; the weights are commonly set to α = 0.3 for false positives and β = 0.7 for false negatives.[16]
These are not rival recipes so much as members of one family, and that observation produced the Unified Focal loss, a framework that generalises the Dice and cross entropy-based losses and recovers each of them at particular settings of its parameters. Evaluated on five publicly available, class-imbalanced medical imaging datasets across 2D binary, 3D binary and 3D multiclass tasks, it was reported to be robust to imbalance and to consistently outperform the six other Dice or cross entropy-based loss functions compared.[16] One evaluation on five datasets is one evaluation, and the claim is about those tasks.
Weights, thresholds and losses all share a property worth naming: each is a statement about what a mistake costs, written into the training procedure or the decision rule. That statement can be made deliberately, with the application in mind, or left implicit in a default. The methods that combine these corrections with many models at once are covered later, as is the accumulated evidence on whether any of this correction pays off in practice.
Changing the loss or the threshold changes what counts as a mistake; it does not add information the data did not contain.
Ensembles built for skewed data
Resampling and cost-sensitive training each make a single model less biased toward the majority. An ensemble takes a different route: it trains several models and combines their outputs, on the principle that a group of imperfect predictors can be more reliable than any one of them. On their own, neither ensembles nor sampling solve the imbalance problem; the two have to be designed together, with the sampling built into how the ensemble is constructed rather than applied once beforehand.[17] The reason is that a single balanced training set is still one sample, and whatever it discards or invents is fixed before learning begins. An ensemble can spread that risk across many subsets.

The clearest illustration comes from undersampling. The standard objection to deleting majority examples is that information is lost, and a single undersampled training set may throw away the very cases that define the boundary. EasyEnsemble answers this by drawing several independent subsets from the majority class, training a learner on each one together with all the minority examples, and combining the learners' outputs.[18] No majority example needs to be discarded permanently, because a different subset can carry it. BalanceCascade takes the same idea sequentially: it trains learners one after another, and at each step removes the majority examples that the learners so far already classify correctly, so that later learners concentrate on the cases still causing trouble. Both were reported to achieve higher area under the ROC curve, F-measure and G-mean than many existing class-imbalance methods, and to take roughly the same training time as plain undersampling when the same number of weak classifiers is used.[18]
Boosting offers a second way to combine. A boosting algorithm builds learners in sequence, each one giving more attention to the examples the previous ones got wrong, and the final prediction is a weighted vote. RUSBoost pairs this with random undersampling, giving each learner in the sequence its own undersampled training set.[19] SMOTEBoost pairs boosting with synthetic minority generation instead. In a comparison using fifteen datasets from various application domains, four base learners and four evaluation metrics, RUSBoost and SMOTEBoost both outperformed the other procedures tested (their individual components), and RUSBoost performed comparably to, and often better than, SMOTEBoost while being simpler and faster.[19]
A third route moves the correction out of the data and into the ensemble's structure. A biased random forest leaves the training set alone and instead grows more trees to represent the minority class, using a nearest-neighbour step to locate the regions where the classes crowd together and adding trees focused there.[20] The oversampling happens at the level of the model rather than the level of the examples, so no synthetic records are created and no real ones are deleted. The reported results describe the method as effective against the imbalance problem.[20]
What these approaches share is a division of labour. Sampling supplies each member of the ensemble with a view of the data in which the minority is not drowned out, and the combination averages over the differences between those views. A review of ensemble methods for imbalanced data compared the most significant published approaches and found good behaviour from the simplest ones, which combine random undersampling with bagging or boosting, and highlighted a positive synergy between sampling techniques and bagging. The same comparison found that ensemble-based algorithms outperform the mere use of preprocessing techniques before learning a classifier, which is the justification for accepting the extra complexity.[17] Whether that advantage holds across domains, and how it weighs against the costs of correction, is taken up in the sections that follow.
An ensemble does not remove the need to rebalance; it lets many differently balanced views of the data vote, so no single discarded or invented example decides the outcome.
Research
What the comparisons show
The case for correcting imbalance rests on a simple expectation: rebalance the training data and the model will stop ignoring the minority class. The evidence is more mixed than that expectation suggests, and the pattern in it is instructive. Correction tends to help in some settings, fail in others, and occasionally make things worse, and the differences track features of the data and the model rather than the popularity of the method.

The clearest caution comes from high-dimensional data, where the number of variables greatly exceeds the number of samples. The mechanism is worth following, because it explains why a method can work in one regime and not another. That is a narrow exception with a condition attached, not a general endorsement.
A second caution concerns not whether a model separates the classes but whether its probabilities mean anything. The practical consequence is that a model can rank patients sensibly and still hand a clinician a risk figure that is far too high, which matters wherever the number itself drives a decision. The study's scope was logistic regression, standard and penalised, and its authors framed the finding as a warning about correction rather than a proof that correction never helps.[6]
Against these cautions sit results from applied settings where correction did improve matters. The comparison is between two versions of one architecture on one dataset, so it shows what correction did there, not what it does everywhere.
Medical prediction studies report similar gains.
How should these results be held together? One reading is that correction helps when the minority class is genuinely learnable and the data are not overwhelmingly wide. The high-dimensional failure and the calibration harm both arise where the minority signal is thin relative to the noise or the model's assumptions, and the applied successes arise where the minority class has real structure to find. That reading is a hypothesis, not a finding, and no single study in this literature establishes it.
A different line of evidence suggests the question may be misdirected. If that account is right, then rebalancing the counts addresses a symptom. The underlying difficulty is that a rare class often arrives as several small, scattered clusters, each with too few examples for a learner to generalise from, and adding synthetic points inside those clusters does not make them less scattered. This would explain why correction sometimes helps and sometimes does not: it helps where the minority class is one coherent region that the counts were obscuring, and fails where the minority is fragmented, because the fragmentation, not the ratio, is doing the damage.
The comparisons therefore support a modest conclusion. Correction is not a default that can be applied to any skewed dataset with the expectation of improvement, and the same procedure that lifts performance in one study can leave it unchanged or distort the model's probabilities in another. What the evidence does support is checking: measuring performance with metrics that attend to the minority class, examining whether the model's probability estimates remain trustworthy, and testing whether the correction earns its place rather than assuming it. The settings in which these checks matter most, and the disputes that remain open, are taken up in the sections that follow.
Correction helps in some settings and harms in others; the deciding factors appear to be the structure of the minority class and the model, not the imbalance ratio alone.
In practice
Where it shows up
Class imbalance is not a niche defect of benchmark datasets. It is the ordinary condition of data collected from the world, because the events that matter most are usually the ones that happen least. The settings below are worth walking through not as a catalogue of domains but because each one forces a particular practical choice: which class is scarce, what a mistake costs, and therefore which correction is even worth attempting.

Seizure detection from brain signals shows how the scarcity can sit on either side of the problem. Electroencephalogram and electrocorticogram recordings are complex, noisy, non-linear, non-stationary and produce a high volume of data, and the workflow labels each segment seizure or non-seizure and trains a classifier on it. The standard workflow turns the raw signal into a table of features, labels each segment seizure or non-seizure, and trains a classifier on it. The evaluation has to be built from the four outcomes of a prediction rather than from overall accuracy, and the F-measure is described as generally more useful than accuracy precisely when the dataset is imbalanced.[12]
Medical image segmentation pushes the same asymmetry down to the pixel. In semantic segmentation, every pixel of a scan is assigned to a class, and a lesion or tumour typically occupies a small fraction of the image while background fills the rest, so the background dominates by a wide margin. The skew is worse in oncology, where a tumour is often much smaller than the organ it sits in. Here the correction cannot be a change to the class counts in any simple sense, because the classes are regions of an image; the practical lever is the loss function, which determines whether the large background region or the small object of interest dominates what the model is trained to get right.[16] The choice of loss is therefore a decision about which errors the model will be pushed to avoid, made before any training begins.
Machine condition monitoring inverts the usual intuition about which data are plentiful. A generator or motor spends most of its life healthy and produces fault data only when something goes wrong, so healthy examples accumulate in abundance while faulty ones are scarce and hard to obtain.[13] The scarcity is not an accident of sampling but a fact about the equipment: faults are rare because machines are meant to run. That makes the minority class both the class of interest and the class that cannot easily be enlarged with real records, which is why synthetic generation and cleaning methods are applied to simulated and experimental fault data rather than to a large archive of failures.[13]
A study of fraud detection on a real-world imbalanced dataset generated from European credit cardholders resampled the data with SMOTE and coupled the classifiers with AdaBoost to increase their quality of classification.[21] Network intrusion detection adds a second layer of skew: the CSE-CIC-IDS2018 dataset is imbalanced, and SMOTE was used to generate data for minor classes and increase their numbers to the average data size.[22] Software defect prediction carries the same structure into code: the data are imbalanced, and a study investigated resampling, threshold moving and ensemble algorithms for that task.[23]
Predictive models built on educational data inherit whatever imbalance the student population contains, and a comparison of sampling techniques on the High School Longitudinal Study of 2009 dataset found that random oversampling for moderately imbalanced data and hybrid resampling for extremely imbalanced data seem to work best.[24] In agriculture, a cassava disease detection task built on 10,000 labelled leaf images was heavily biased toward the CMD and CBB disease classes, and the work applied class weighting, SMOTE and focal loss with deep convolutional networks to counter the imbalance.[25]
What these domains share is that the correction is never free and never automatic. Each forces a decision about which class is scarce, what a false negative costs relative to a false positive, and whether the minority class has enough structure to learn from at all. Those decisions, and the evidence on when the corrections built around them fail, are covered later.
Criticism
Limits, failures and open disputes
Every correction described so far buys balance by giving something up, and the last section of the subject is the reckoning: what the corrections cost, when they fail, and what remains genuinely unsettled. The disputes are not marginal. They concern whether the most widely used remedy should be used at all.

The sharpest challenge is aimed at oversampling as a class of methods. The concern is not that synthetic points are imperfect but that they may be wrong in a specific and damaging way. If synthetic minority points land in territory that really belongs to the majority class, then a model trained on them is being taught a false boundary, and the review argues that oversampling in its current forms is unreliable for learning from imbalanced data and should be avoided in real-world applications.[26] That is a strong claim from one line of work, and it is contested, but it names the mechanism by which oversampling can fail rather than merely underperform.
The second failure is quieter and easier to miss, because it does not show up in discrimination at all. Correcting imbalance can leave a model's ability to rank cases unchanged while wrecking the meaning of its probability estimates. In the logistic regression simulations described earlier, correction produced strongly miscalibrated models that overestimated the minority-class probability, and the distortion grew as the event fraction fell.[6] The harm is clinical rather than statistical. A model that overestimates the risk of malignancy in a detected ovarian tumour may push the decision to refer a patient for specialised surgery too quickly, and more generally a probability that is clearly too high invites overtreatment.[6] A model can therefore pass a discrimination check and still be unsafe to act on, which is why calibration has to be examined separately from the area under the curve.
Synthetic generation has a further limit that follows from its arithmetic. SMOTE builds new points by interpolating between a minority example and its neighbours, and the resulting patterns do not necessarily conform to the original minority distribution; a theoretical analysis derived the probability distribution of the generated samples precisely so that their density could be compared with the true class-conditional density and the representativeness of the synthetic points assessed.[27] The practical point is that a generated sample is a guess about where minority data might have fallen, and the guess is only as good as the local geometry it was drawn from.
Loss-function corrections carry their own instability. The Dice loss is region-based and in its basic form somewhat adapted to imbalance, but its gradient is inherently unstable, most evident with highly imbalanced data where the gradient calculation involves small denominators.[16] A correction that stabilises the class balance can therefore destabilise training itself, which is one reason the loss functions are combined and generalised rather than used raw.
Beneath these specific failures sits a broader and unresolved question: which method suits which data. A review of resampling approaches found a clear shift toward methods that adapt to the data, identifying problematic regions and applying customised sampling protocols there, with some oversampling methods targeting regions of high classification complexity and others deliberately working in low-complexity areas, while undersampling methods either strip redundant majority regions or focus on class boundaries to reduce overlap. Yet despite that increased adaptability, no resampling method consistently demonstrated superior performance across all the documented experiments. The review points toward recommendation systems for resampling as a promising way forward, which is an admission that the choice is currently made by judgement rather than by rule.[10]
Two disputes remain open and are worth stating plainly. The first is whether imbalance is the right thing to correct at all, given the evidence that the damage may be done by the small, scattered clusters a rare class tends to form rather than by the ratio itself. The second is whether the gains reported in applied studies survive the scrutiny that calibration and representativeness demand. Neither has a settled answer. What the literature does support is a habit rather than a recipe: measure with metrics that attend to the minority, check whether the probabilities remain trustworthy, and test whether a correction earns its place instead of assuming that balance is always better.
A correction that improves the headline number can still distort the probabilities, invent points in the wrong region, or destabilise training; the check is part of the method, not an afterthought.
Key studies
| Year | Study | Sample | Design | Finding |
|---|---|---|---|---|
| 2004 | Jo & Japkowicz[11] | controlled experiments on the cause of performance loss | The loss was not directly caused by class imbalance but by small disjuncts that imbalance may produce, and a method addressing small disjuncts performed better than standard imbalance solutions. | |
| 2009 | Xu-Ying Liu et al.[18] | algorithm proposal and comparative experiments | EasyEnsemble and BalanceCascade scored higher than many existing class-imbalance methods on three measures: the area under the ROC curve, the F-measure and the G-mean. With the same number of weak classifiers, their training time was about the same as that of plain undersampling, and much shorter than that of other methods. | |
| 2010 | Seiffert et al.[19] | 15 data sets from various application domains, four base learners and four evaluation metrics | comparative experiments on a hybrid sampling and boosting algorithm | RUSBoost and SMOTEBoost both outperformed the other procedures, and RUSBoost performed comparably to SMOTEBoost while being simpler and faster. |
| 2012 | Galar et al.[17] | the most significant published ensemble approaches for two-class imbalanced problems | review with empirical comparison | The simplest approaches combining random undersampling with bagging or boosting behaved well, and ensembles outperformed preprocessing alone. |
| 2017 | Boughorbel et al.[3] | 64 publicly available datasets with a wide range of imbalance | classifier development with simulated and real-world evaluation | The MCC-classifier performed close to an imbalanced support vector machine while being simpler and more efficient. |
| 2019 | Johnson & Khoshgoftaar[8] | plankton images in the WHOI-Plankton dataset, with the largest five classes and remaining minority classes | survey of deep learning studies with class imbalance, including a two-phase training experiment | Two-phase learning reached an F1-score of 0.7791 on the largest five classes and 0.3262 on the minority classes, against 0.7773 and 0.1548 for the full-data baseline. |
| 2021 | Popoola et al.[1] | the Bot-IoT dataset of network traffic | Deep recurrent neural network trained on the Bot-IoT data set, with and without additional minority samples generated by SMOTE | The SMOTE-DRNN model reached 99.50% precision, 99.75% recall and 99.62% F1 score, better than the DRNN model without SMOTE. |
| 2022 | Tarawneh et al.[26] | more than 70 oversampling methods on nine imbalanced real-world datasets | review with a new evaluation system that hides majority examples | All oversampling methods generated minority samples that were most likely to be majority, and the authors argue oversampling should be avoided in real-world applications. |
| 2022 | van den Goorbergh et al.[6] | Monte Carlo simulations and a case study on ovarian cancer diagnosis | Monte Carlo simulations plus a case study on ovarian cancer diagnosis, with logistic regression models developed under no correction, random undersampling, random oversampling and SMOTE | Random undersampling, random oversampling and SMOTE yielded poorly calibrated models with overestimated minority probabilities and no higher area under the ROC curve. |
| 2022 | Yeung et al.[16] | five publicly available, class imbalanced medical imaging datasets | Comparison of the Unified Focal loss against six Dice or cross entropy-based loss functions on five publicly available, class imbalanced medical imaging data sets | The asymmetric Unified Focal loss reached a Dice score of 0.909 on CVC-ClinicDB, 0.803 on DRIVE and 0.824 on BUS2017, the best across the three datasets. |
| 2023 | Thölke et al.[5] | simulated data and brain data recorded with electroencephalography, magnetoencephalography and functional magnetic resonance imaging | didactic assessment with systematic manipulation of imbalance ratios | Accuracy reached 90% for imbalance ratios of 9:1 and 1:9 while AUC and balanced accuracy stayed at a chance level of 0.5. |
| 2023 | Wongvorachan et al.[24] | the High School Longitudinal Study of 2009 dataset | Comparison of random oversampling, random undersampling, and a hybrid of SMOTE for nominal and continuous data with random undersampling, using the High School Longitudinal Study of 2009 data set | Random oversampling worked best for moderately imbalanced data and hybrid resampling worked best for extremely imbalanced data. |
See also
References
- Popoola, S. I., Adebisi, B., Ande, R., Hammoudeh, M., Anoh, K., & Atayero, A. A. (2021). SMOTE-DRNN: A Deep Learning Algorithm for Botnet Detection in the Internet-of-Things Networks. Sensors, 21(9), 2985. doi:10.3390/s21092985
- Alghamdi, M., Al-Mallah, M., Keteyian, S., Brawner, C., Ehrman, J., & Sakr, S. (2017). Predicting diabetes mellitus using SMOTE and ensemble machine learning approach: The Henry Ford ExercIse Testing (FIT) project. PLOS ONE, 12(7), e0179805. doi:10.1371/journal.pone.0179805
- Boughorbel, S., Jarray, F., & El-Anbari, M. (2017). Optimal classifier for imbalanced data using Matthews Correlation Coefficient metric. PLOS ONE, 12(6), e0177678. doi:10.1371/journal.pone.0177678
- Wang, S., Dai, Y., Shen, J., & Xuan, J. (2021). Research on expansion and classification of imbalanced data based on SMOTE algorithm. Scientific Reports, 11(1). doi:10.1038/s41598-021-03430-5
- Thölke, P., Mantilla-Ramos, Y. J., Abdelhedi, H., Maschke, C., Dehgan, A., Harel, Y., Kemtur, A., Mekki Berrada, L., Sahraoui, M., Young, T., Bellemare Pépin, A., El Khantour, C., Landry, M., Pascarella, A., Hadid, V., Combrisson, E., O’Byrne, J., & Jerbi, K. (2023). Class imbalance should not throw you off balance: Choosing the right classifiers and performance metrics for brain decoding with imbalanced data. NeuroImage, 277, 120253. doi:10.1016/j.neuroimage.2023.120253
- van den Goorbergh, R., van Smeden, M., Timmerman, D., & Van Calster, B. (2022). The harm of class imbalance corrections for risk prediction models: illustration and simulation using logistic regression. Journal of the American Medical Informatics Association, 29(9), 1525-1534. doi:10.1093/jamia/ocac093
- Fernandez, A., Garcia, S., Herrera, F., & Chawla, N. V. (2018). SMOTE for Learning from Imbalanced Data: Progress and Challenges, Marking the 15-year Anniversary. Journal of Artificial Intelligence Research, 61, 863-905. doi:10.1613/jair.1.11192
- Johnson, J. M., & Khoshgoftaar, T. M. (2019). Survey on deep learning with class imbalance. Journal of Big Data, 6(1). doi:10.1186/s40537-019-0192-5
- Leevy, J. L., Khoshgoftaar, T. M., Bauder, R. A., & Seliya, N. (2018). A survey on addressing high-class imbalance in big data. Journal of Big Data, 5(1). doi:10.1186/s40537-018-0151-6
- Carvalho, M., Pinho, A. J., & Brás, S. (2025). Resampling approaches to handle class imbalance: a review from a data perspective. Journal of Big Data, 12(1). doi:10.1186/s40537-025-01119-4
- Jo, T., & Japkowicz, N. (2004). Class imbalances versus small disjuncts. ACM SIGKDD Explorations Newsletter, 6(1), 40-49. doi:10.1145/1007730.1007737
- Siddiqui, M. K., Morales-Menendez, R., Huang, X., & Hussain, N. (2020). A review of epileptic seizure detection using machine learning classifiers. Brain Informatics, 7(1). doi:10.1186/s40708-020-00105-1
- Swana, E. F., Doorsamy, W., & Bokoro, P. (2022). Tomek Link and SMOTE Approaches for Machine Fault Classification with an Imbalanced Dataset. Sensors, 22(9), 3246. doi:10.3390/s22093246
- Picek, S., Heuser, A., Jovic, A., Bhasin, S., & Regazzoni, F. (2018). The Curse of Class Imbalance and Conflicting Metrics with Machine Learning for Side-channel Evaluations. IACR Transactions on Cryptographic Hardware and Embedded Systems, 209-237. doi:10.46586/tches.v2019.i1.209-237
- Zhi-Hua Zhou, & Xu-Ying Liu (2006). Training cost-sensitive neural networks with methods addressing the class imbalance problem. IEEE Transactions on Knowledge and Data Engineering, 18(1), 63-77. doi:10.1109/tkde.2006.17
- Yeung, M., Sala, E., Schönlieb, C. B., & Rundo, L. (2022). Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medical image segmentation. Computerized Medical Imaging and Graphics, 95, 102026. doi:10.1016/j.compmedimag.2021.102026
- Galar, M., Fernandez, A., Barrenechea, E., Bustince, H., & Herrera, F. (2012). A Review on Ensembles for the Class Imbalance Problem: Bagging-, Boosting-, and Hybrid-Based Approaches. IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), 42(4), 463-484. doi:10.1109/tsmcc.2011.2161285
- Xu-Ying Liu, Jianxin Wu, & Zhi-Hua Zhou (2009). Exploratory Undersampling for Class-Imbalance Learning. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 39(2), 539-550. doi:10.1109/tsmcb.2008.2007853
- Seiffert, C., Khoshgoftaar, T. M., Van Hulse, J., & Napolitano, A. (2010). RUSBoost: A Hybrid Approach to Alleviating Class Imbalance. IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans, 40(1), 185-197. doi:10.1109/tsmca.2009.2029559
- Bader-El-Den, M., Teitei, E., & Perry, T. (2019). Biased Random Forest For Dealing With the Class Imbalance Problem. IEEE Transactions on Neural Networks and Learning Systems, 30(7), 2163-2172. doi:10.1109/tnnls.2018.2878400
- Ileberi, E., Sun, Y., & Wang, Z. (2021). Performance Evaluation of Machine Learning Methods for Credit Card Fraud Detection Using SMOTE and AdaBoost. IEEE Access, 9, 165286-165294. doi:10.1109/access.2021.3134330
- Karatas, G., Demir, O., & Sahingoz, O. K. (2020). Increasing the Performance of Machine Learning-Based IDSs on an Imbalanced and Up-to-Date Dataset. IEEE Access, 8, 32150-32162. doi:10.1109/access.2020.2973219
- Shuo Wang, & Xin Yao (2013). Using Class Imbalance Learning for Software Defect Prediction. IEEE Transactions on Reliability, 62(2), 434-443. doi:10.1109/tr.2013.2259203
- Wongvorachan, T., He, S., & Bulut, O. (2023). A Comparison of Undersampling, Oversampling, and SMOTE Methods for Dealing with Imbalanced Classification in Educational Data Mining. Information, 14(1), 54. doi:10.3390/info14010054
- Sambasivam, G., & Opiyo, G. D. (2021). A predictive machine learning application in agriculture: Cassava disease detection and classification with imbalanced dataset using convolutional neural networks. Egyptian Informatics Journal, 22(1), 27-34. doi:10.1016/j.eij.2020.02.007
- Tarawneh, A. S., Hassanat, A. B., Altarawneh, G. A., & Almuhaimeed, A. (2022). Stop Oversampling for Class Imbalance Learning: A Review. IEEE Access, 10, 47643-47660. doi:10.1109/access.2022.3169512
- Elreedy, D., Atiya, A. F., & Kamalov, F. (2024). A theoretical distribution analysis of synthetic minority oversampling technique (SMOTE) for imbalanced learning. Machine Learning, 113(7), 4903-4923. doi:10.1007/s10994-022-06296-4
Cite this page: Atlas Nova editors. (2026). Class imbalance. Atlas Nova. https://velocer.io/atlas/imbalanced-data/