Inferensys

Glossary

SMOTETomek

A combined resampling technique that applies SMOTE to generate synthetic minority samples and then removes overlapping majority class instances using Tomek Links to create a cleaner class separation.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
HYBRID RESAMPLING

What is SMOTETomek?

SMOTETomek is a combined resampling strategy that first applies SMOTE to generate synthetic minority class samples and then cleans the resulting dataset by removing overlapping majority class instances using Tomek Links.

SMOTETomek is a two-stage hybrid resampling technique designed to address class imbalance while simultaneously clarifying the decision boundary. The first stage applies SMOTE (Synthetic Minority Over-sampling Technique) to create artificial minority class examples through interpolation, balancing the class distribution. The second stage identifies and removes Tomek Links—pairs of minimally distanced nearest neighbors from opposite classes—eliminating the majority class instance in each pair to reduce class overlap and noise.

This combined approach mitigates the primary weakness of using SMOTE alone, which can introduce noisy synthetic samples in regions where classes already overlap. By subsequently applying Tomek Links as a data cleaning step, SMOTETomek produces a dataset with better-defined class clusters and a cleaner separation boundary. This often leads to improved classifier performance on imbalanced problems like fraud detection, where distinguishing legitimate transactions from fraudulent ones requires a clear, unambiguous decision surface.

Hybrid Resampling

Key Characteristics of SMOTETomek

SMOTETomek combines synthetic minority over-sampling with data cleaning to create a balanced dataset with clearer class separation, addressing both class imbalance and class overlap simultaneously.

01

Two-Stage Pipeline Architecture

SMOTETomek operates as a sequential two-stage process. First, SMOTE generates synthetic minority class examples by interpolating between existing instances. Second, Tomek Links identifies pairs of minimally distanced nearest neighbors from opposite classes and removes the majority class instance. This ordering is critical—applying Tomek Links after SMOTE cleans the newly created decision boundary rather than the original noisy one.

02

Addressing Class Overlap

While SMOTE alone can exacerbate noise by synthesizing samples in overlapping regions, SMOTETomek explicitly targets class overlap. Tomek Links are defined as pairs (x_i, x_j) where x_i and x_j are from different classes, and no other instance exists closer to either point. Removing the majority instance in each pair creates a cleaner margin between classes, reducing ambiguity for downstream classifiers like decision trees or logistic regression.

03

Implementation in Imbalanced-Learn

The canonical implementation resides in the imbalanced-learn Python library (imblearn.combine.SMOTETomek). Key parameters include:

  • sampling_strategy: Controls the desired ratio of minority to majority class after resampling
  • smote: Configures the internal SMOTE object (e.g., k_neighbors)
  • tomek: Configures the Tomek Links remover

A typical instantiation: SMOTETomek(smote=SMOTE(k_neighbors=5), tomek=TomekLinks(sampling_strategy='majority'))

04

When to Prefer SMOTETomek

SMOTETomek is most effective when:

  • The dataset exhibits both severe imbalance and significant class overlap
  • The decision boundary is noisy or ambiguous due to majority class instances intruding into minority class regions
  • You are using a distance-based classifier (e.g., k-NN, SVM) that benefits from clear margins

It is less suitable when the minority class is already well-separated or when computational cost is a primary constraint, as the Tomek Links computation scales quadratically with dataset size.

05

Comparison with SMOTEENN

Both SMOTETomek and SMOTEENN are hybrid cleaning methods, but they differ in aggressiveness:

  • SMOTETomek removes only majority class instances that form Tomek Links—a conservative cleaning that preserves more data
  • SMOTEENN applies Edited Nearest Neighbors, which removes any instance misclassified by its k-nearest neighbors, potentially eliminating more samples from both classes

SMOTETomek typically retains more training data, while SMOTEENN produces a more aggressively cleaned dataset.

06

Impact on Classifier Performance

Empirical studies on benchmark imbalanced datasets (e.g., mammography, oil spill detection) show that SMOTETomek consistently improves F1-score and Precision-Recall AUC compared to SMOTE alone. The cleaning step reduces false positives by eliminating majority class instances that would otherwise be misclassified near the boundary. However, the improvement is classifier-dependent—ensemble methods like Random Forest often benefit less than linear classifiers, as they already handle noisy boundaries robustly.

SMOTETOMEK

Frequently Asked Questions

Clear, technical answers to the most common questions about the SMOTETomek hybrid resampling technique for imbalanced classification in fraud detection.

SMOTETomek is a hybrid resampling technique that combines over-sampling of the minority class using SMOTE with data cleaning via Tomek Links to create cleaner class separation. The algorithm operates in two sequential phases. First, it applies Synthetic Minority Over-sampling Technique (SMOTE) to generate synthetic minority class examples by interpolating between existing minority instances in feature space, balancing the class distribution. Second, it identifies all Tomek Links—pairs of minimally distanced nearest neighbors of opposite classes—and removes the majority class instance from each pair. This two-stage process not only addresses class imbalance but also eliminates overlapping and ambiguous majority class samples that sit deep within minority class regions, effectively clarifying the decision boundary for downstream classifiers.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.