Inferensys

Glossary

SMOTEENN

SMOTEENN is a hybrid resampling method that first applies SMOTE to over-sample the minority class, then uses Edited Nearest Neighbors to clean noisy and overlapping examples from the resulting dataset.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
HYBRID RESAMPLING

What is SMOTEENN?

SMOTEENN is a two-step hybrid resampling method that combines over-sampling of the minority class via SMOTE with data cleaning via Edited Nearest Neighbors to produce a balanced, less noisy training dataset.

SMOTEENN is a combined resampling strategy that first applies the Synthetic Minority Over-sampling Technique (SMOTE) to generate artificial minority class examples, then immediately applies Edited Nearest Neighbors (ENN) to remove any example—from either class—whose class label differs from the majority of its k-nearest neighbors. This sequential pipeline over-samples the rare class and then aggressively cleans the resulting dataset by eliminating overlapping, ambiguous, and noisy instances near the decision boundary.

The primary advantage of SMOTEENN over SMOTE alone is its ability to remove the noisy synthetic samples and majority class outliers that SMOTE can inadvertently introduce. By applying ENN as a post-processing filter, the technique creates a cleaner class separation than SMOTETomek, which only removes majority class instances. However, ENN's willingness to remove examples from both classes can lead to more aggressive data reduction, making SMOTEENN particularly effective for datasets with severe class overlap and noise.

HYBRID RESAMPLING

Key Characteristics of SMOTEENN

SMOTEENN combines over-sampling and data cleaning to create a balanced, high-quality training set. It first generates synthetic minority examples via SMOTE, then applies Edited Nearest Neighbors to remove noisy or ambiguous instances from both classes.

01

Two-Stage Pipeline Architecture

SMOTEENN operates in a sequential, two-phase process:

  • Stage 1 (SMOTE): Over-samples the minority class by creating synthetic examples through interpolation between a randomly selected minority instance and its k-nearest minority neighbors.
  • Stage 2 (ENN): Applies Edited Nearest Neighbors to the entire augmented dataset. ENN removes any example whose class label differs from the majority class of its k-nearest neighbors (typically k=3). This pipeline ensures the final dataset has both increased minority representation and cleaner class boundaries.
02

Noise and Overlap Elimination

The primary advantage of SMOTEENN over standalone SMOTE is its ability to remove overlapping and noisy instances introduced during synthetic generation.

  • SMOTE can inadvertently create synthetic minority examples deep inside majority class clusters, introducing noise.
  • The ENN cleaning step identifies and deletes these ambiguous examples, along with majority class instances that intrude on minority space.
  • The result is a dataset with wider, more well-defined class separation margins, which is critical for algorithms like k-NN and SVM that are sensitive to boundary noise.
03

Dual-Class Cleaning Behavior

Unlike Tomek Links or One-Sided Selection, which primarily remove majority class examples, ENN cleans both classes:

  • Majority class removal: Majority instances surrounded by minority neighbors are deleted, clarifying the minority boundary.
  • Minority class removal: Synthetic or original minority instances that fall within dense majority regions are also removed, preventing the model from learning misleading patterns. This dual cleaning is particularly valuable in fraud detection, where legitimate transactions can exhibit anomalous patterns and fraudulent transactions can mimic normal behavior.
04

Computational Complexity Considerations

SMOTEENN is computationally more expensive than either SMOTE or ENN alone:

  • SMOTE complexity: O(n_minority * k * d), where d is the feature dimensionality.
  • ENN complexity: O(N * k * d), where N is the total number of examples in the augmented dataset.
  • The ENN step must compute nearest neighbors for every instance in the expanded dataset, which can be substantial after SMOTE over-sampling. For large-scale financial transaction datasets with millions of records, consider using approximate nearest neighbor algorithms or applying SMOTEENN on a representative stratified sample.
05

Parameter Sensitivity and Tuning

SMOTEENN inherits hyperparameters from both constituent algorithms:

  • SMOTE k-neighbors: Controls the number of nearest minority neighbors used for interpolation. Typical values range from 3 to 5.
  • ENN k-neighbors: Determines how many neighbors vote on whether an instance should be removed. The default is 3; increasing this value makes the cleaning more aggressive.
  • Sampling strategy: Dictates the desired minority-to-majority ratio after SMOTE (e.g., 0.5 for 1:2, 1.0 for perfect balance). Cross-validation should be performed on the full pipeline, not on individual components, as the interaction effects between SMOTE and ENN parameters significantly impact final model performance.
06

Integration with Fraud Detection Workflows

SMOTEENN is particularly effective in financial fraud anomaly detection pipelines:

  • Preprocessing step: Applied before training classifiers like XGBoost, LightGBM, or Random Forest on imbalanced transaction data.
  • Imbalanced-learn implementation: Available via SMOTEENN in the imblearn.combine module, with a scikit-learn-compatible fit_resample API.
  • Pipeline integration: Can be embedded directly into scikit-learn Pipeline objects using imblearn.pipeline.Pipeline to prevent data leakage during cross-validation.
  • Typical fraud ratios: Effective when fraud-to-legitimate ratios range from 1:100 to 1:1000, where standalone SMOTE may create excessive noise without the ENN cleaning step.
SMOTEENN EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the SMOTEENN hybrid resampling algorithm for imbalanced classification in financial fraud detection.

SMOTEENN is a hybrid resampling method that combines over-sampling of the minority class using SMOTE (Synthetic Minority Over-sampling Technique) with data cleaning via Edited Nearest Neighbors (ENN). The algorithm operates in two sequential phases: first, SMOTE generates synthetic minority class examples by interpolating between existing minority instances in feature space, balancing the class distribution. Second, ENN applies a k-nearest neighbors classifier (typically k=3) to every example in the augmented dataset and removes any instance whose predicted class label contradicts its actual label. This cleaning step eliminates both noisy majority class examples that intrude into minority class regions and synthetic minority examples that were generated in ambiguous or overlapping areas. The result is a dataset with a more balanced class ratio and a cleaner, more well-defined decision boundary, which is particularly valuable in financial fraud detection where fraudulent transaction patterns often overlap with legitimate ones.

HYBRID RESAMPLING COMPARISON

SMOTEENN vs. Other Hybrid Resampling Methods

A feature-level comparison of SMOTEENN against other combined over-sampling and under-sampling strategies for imbalanced classification.

FeatureSMOTEENNSMOTETomekOSS

Over-sampling Method

SMOTE

SMOTE

None

Cleaning Method

Edited Nearest Neighbors (ENN)

Tomek Links

Tomek Links + CNN

Removes Majority Class Noise

Removes Minority Class Noise

Cleans Both Classes

Aggressiveness of Under-sampling

Moderate

Conservative

Aggressive

Risk of Information Loss

Moderate

Low

High

Computational Complexity

High

Moderate

Moderate

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.