Evidence Pack: The Accuracy and Trade-Offs of SMOTE Versus Class Weights in Imbalanced Data
When a dataset is highly imbalanced, data scientists must choose between generating synthetic examples or penalizing the algorithm's mistakes. A 9,000-experiment benchmark reveals which method actually preserves predictive accuracy.
By Mateo Ramos
Share this story
In short
- Imbalanced datasets cause standard accuracy metrics to fail, requiring intervention to detect rare events.
- SMOTE generates synthetic data points to help the algorithm learn, but risks introducing artificial noise in complex datasets.
- Class weights penalize the algorithm for missing the minority class, leaving the original dataset mathematically untouched.
Data scientists who favor algorithmic data generation argue that models need synthetic examples to learn complex decision boundaries in minority classes, while statistical purists argue that fabricating data distorts the true underlying probability distribution and prefer penalizing errors via class weights. When a dataset contains 99 percent normal transactions and 1 percent fraud, standard accuracy metrics fail entirely.
A model can achieve 99 percent accuracy simply by predicting that fraud does not exist. To force the algorithm to care about the rare event, practitioners must intervene. The debate over how to do so centers on two fundamentally different philosophies: changing the data before it reaches the model, or changing how the model learns from the data it already has.[4][5]
The Synthetic Minority Over-sampling Technique (SMOTE) takes the first approach. Rather than simply duplicating existing rare examples—which leads to severe overfitting—SMOTE fabricates entirely new data points. It identifies a minority class sample, finds its nearest neighbors in the feature space, and draws lines between them.
It then generates synthetic points along those lines. This provides the algorithm with a denser, more continuous region of the minority class to learn from. For weak learners or extremely small datasets, this synthetic scaffolding can be the difference between a model that finds a pattern and one that finds nothing.[3][4]
Class weighting takes the opposite approach: it leaves the dataset untouched and alters the algorithm's loss function. In a standard model, every misclassification carries the same penalty. Class weighting changes the math so that a mistake on the minority class costs significantly more. The scikit-learn documentation notes that the "balanced" heuristic automatically adjusts weights "inversely proportional to class frequencies in the input data."
If fraud represents 1 percent of the data, the algorithm is penalized 99 times more heavily for missing a fraudulent transaction than for misclassifying a normal one. The model is forced to pay attention to the rare class not because there are more examples of it, but because ignoring it destroys the model's overall score.[2]
Modern gradient boosting frameworks handle class weights natively through parameters that scale the gradient of the positive class. The XGBoost documentation explicitly advises users to "balance the positive and negative weights" using the scale_pos_weight parameter for imbalanced datasets. Because tree-based models partition the feature space using orthogonal splits, introducing synthetic SMOTE points can force the trees to create overly complex, fragmented branches to accommodate the artificial data. By using class weights instead, the trees maintain simpler, more generalized splits while still prioritizing the minority class errors during the boosting rounds.[6]
The tension between the two methods emerges most clearly in high-dimensional feature spaces. Because SMOTE interpolates blindly between points, it assumes that the space between two minority examples also belongs to the minority class. In complex datasets, this assumption frequently fails, generating synthetic noise that blurs the true decision boundary.
When evaluated on the Precision-Recall Area Under the Curve (PR-AUC)—the most rigorous metric for imbalanced data—SMOTE often degrades the model's underlying ranking ability. It artificially inflates recall at the cost of catastrophic precision, creating a model that flags too many false positives.[1][5]
A comprehensive 2024 study published on arXiv tested this dynamic at scale. Researchers ran 9,000 experiments across 15 different machine learning models and 30 imbalanced datasets, comparing SMOTE, class weights, and a baseline model. The results confirmed that both interventions substantially outperform doing nothing. However, the study revealed that class weights often match or exceed SMOTE's performance without the computational overhead of generating synthetic data or the risk of introducing artificial noise.[1]
The same benchmark highlighted a third, often-overlooked solution: decision threshold calibration. Both SMOTE and class weights attempt to fix the imbalance during training. Threshold calibration trains a standard model and then adjusts the probability cutoff required to predict the minority class.
Instead of requiring a 50 percent certainty to flag fraud, the model might flag it at 10 percent. The authors noted that while all three strategies beat the baseline, their results pointed to "Decision Threshold Calibration emerging as the most consistently effective technique." Across the 9,000 experiments, this post-training adjustment outperformed both data-level resampling and algorithm-level weighting.[1]
The consensus among modern practitioners is shifting toward a hierarchy of interventions. Because class weighting requires no data manipulation and adds zero computational cost, it is widely considered the safest first step. If class weights fail to capture the minority pattern, and the dataset is small enough that the model genuinely lacks examples to learn from, SMOTE becomes a viable escalation. But neither technique should be deployed without first testing a simple threshold adjustment on a baseline model.[5]
The consensus among modern practitioners is shifting toward a hierarchy of interventions.
The choice between SMOTE and class weights represents a choice between two different types of distortion. One distorts the dataset to fit the algorithm, while the other distorts the algorithm's objective to fit the dataset. As machine learning models grow more sophisticated and datasets expand in dimensionality, the mathematical preference is increasingly to leave the data exactly as it was recorded in the real world, shifting the burden of adaptation onto the algorithm itself.[5]
Key terms
- SMOTE
- Synthetic Minority Over-sampling Technique, a method that generates new, artificial examples of a rare class by interpolating between existing data points.
- Class Weights
- A technique that modifies an algorithm's loss function to penalize mistakes on the rare class more heavily than mistakes on the common class.
- PR-AUC
- Precision-Recall Area Under the Curve, a rigorous evaluation metric that measures a model's ability to identify rare events without triggering too many false alarms.
- Decision Threshold
- The probability cutoff a model uses to make a final prediction, which can be adjusted to favor the rare class.
Viewpoints in depth
Data-Level Resamplers
Advocates for generating synthetic data to provide models with enough examples to learn the minority class.
This camp argues that algorithms cannot learn what they do not see. By generating synthetic examples through SMOTE, they provide the model with a denser, more continuous region of the minority class to learn from. This is particularly crucial for weak learners or extremely small datasets, where class weights might simply force the model to overfit on a handful of existing rare examples.
Algorithm-Level Penalizers
Advocates for leaving the data untouched and penalizing the algorithm for missing the minority class.
Statistical purists argue that fabricating data distorts the true underlying probability distribution of the real world. They prefer class weights because the method mathematically forces the algorithm to care about the rare event without introducing synthetic noise. This approach is computationally cheaper and avoids the risk of generating unrealistic examples in high-dimensional feature spaces.
Post-Training Calibrators
Advocates for training a standard model and adjusting the decision threshold after the fact.
This perspective argues that both SMOTE and class weights unnecessarily complicate the training phase. Instead, they advocate for training a standard model to output well-calibrated probabilities, and then simply lowering the threshold required to predict the minority class. The 2024 benchmark study supports this view, showing that adjusting the cutoff from 50 percent to a lower threshold often yields the best balance of precision and recall.
- Data-Level Resamplers
- Advocates for generating synthetic data to provide models with enough examples to learn the minority class.
- Algorithm-Level Penalizers
- Advocates for leaving the data untouched and penalizing the algorithm for missing the minority class.
- Post-Training Calibrators
- Advocates for training a standard model and adjusting the decision threshold after the fact.
Perspectives this story doesn't cover
- Domain experts who manually label additional minority class data
- Engineers optimizing for inference latency rather than pure accuracy
Sources
[1]arXivPost-Training CalibratorsBalancing the Scales: A Comprehensive Study on Tackling Class Imbalance in Binary Classification
Read on arXiv →
[2]scikit-learnAlgorithm-Level Penalizerssklearn.utils.class_weight.compute_class_weight
Read on scikit-learn →
[3]imbalanced-learnData-Level Resamplersimblearn.over_sampling.SMOTE
Read on imbalanced-learn →
[4]WikipediaData-Level ResamplersOversampling and undersampling in data analysis
Read on Wikipedia →
[5]Factlen Editorial TeamPost-Training CalibratorsSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
[6]XGBoost DocumentationAlgorithm-Level PenalizersNotes on Parameter Tuning: Handle Imbalanced Dataset
Read on XGBoost Documentation →
More in Data & Analysis
See all →Causal Inference
How Local Randomization Near a Cutoff Isolates Causal Effects in Observational Data
9 sources
Global Health Policy
Lancet Commission Maps 17 Catastrophic Global Threats by 2100 and Outlines Mitigation Roadmap
4 sources
Statistical Methods
Restricted Mean Survival Time Quantifies Gained Lifespan When Crossing Curves Break Cox Proportional Hazards
7 sources
Climate Risk Data
UNICEF Data Shows 347 Million Children Exposed to Severe El Niño Weather Risks
8 sources
Comments
Every angle. Every day.
Get Data & Analysis stories with full source coverage and perspective breakdowns, free every day.




