Skip to main content
ExplainerImbalanced DataMethodology Explainer· 5 min read· in Data & Analysis

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

Data-Level Resamplers 35%Algorithm-Level Penalizers 35%Post-Training Calibrators 30%
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

What we don’t know

  • Which technique performs best on datasets with extreme imbalance ratios exceeding 10,000-to-1.
  • How synthetic data generation interacts with deep neural networks in highly unstructured domains like text and audio.
  • Whether hybrid approaches combining class weights and threshold calibration consistently outperform either method in isolation.

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]

SMOTE alters the dataset by generating synthetic examples, while class weights alter the algorithm's loss function.

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]

Modern gradient boosting frameworks handle class weights natively through parameters that scale the gradient of the positive class.

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]

A 2024 benchmark of 9,000 experiments found that while both SMOTE and class weights improve performance, tuning the decision threshold often beats both.

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 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]

9,000
Experiments conducted in the 2024 benchmark study
15
Distinct machine learning models evaluated
30
Imbalanced datasets tested across domains
0.5
Default probability threshold (often misaligned with imbalanced data)

Sources

Source coverage

6 outlets

3 viewpoints surfaced

Data-Level Resamplers 35%Algorithm-Level Penalizers 35%Post-Training Calibrators 30%
  1. [1]arXivPost-Training Calibrators

    Balancing the Scales: A Comprehensive Study on Tackling Class Imbalance in Binary Classification

    Read on arXiv
  2. [2]scikit-learnAlgorithm-Level Penalizers

    sklearn.utils.class_weight.compute_class_weight

    Read on scikit-learn
  3. [3]imbalanced-learnData-Level Resamplers

    imblearn.over_sampling.SMOTE

    Read on imbalanced-learn
  4. [4]WikipediaData-Level Resamplers

    Oversampling and undersampling in data analysis

    Read on Wikipedia
  5. [5]Factlen Editorial TeamPost-Training Calibrators

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team
  6. [6]XGBoost DocumentationAlgorithm-Level Penalizers

    Notes on Parameter Tuning: Handle Imbalanced Dataset

    Read on XGBoost Documentation

Comments

Stay informed

Every angle. Every day.

Get Data & Analysis stories with full source coverage and perspective breakdowns delivered to your inbox.