NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Overly optimistic prediction results on imbalanced data: a case study of flaws and benefits when applying over-sampling

Gilles Vandewiele, Isabelle Dehaene, György Kovács, Lucas Sterckx, Olivier Janssens, Femke Ongenae, Femke De Backere, Filip De Turck, Kristien Roelens, Johan Decruyenaere, Sofie Van Hoecke, Thomas DemeesterArtif. Intell. Medicine 2021

TL;DR

This paper reveals a common methodological flaw in preterm birth prediction studies: applying over-sampling before splitting data into training and testing sets. This "data leakage" leads to unrealistically optimistic results. The authors demonstrate this flaw, reproduce previous studies, and show how correct over-sampling can still improve performance without inflating metrics.

What Problem Does This Paper Address?

Predicting preterm birth is crucial due to its significant impact on infant mortality. Electrohysterography (EHG) signals offer a promising, non-invasive way to monitor uterine activity for this prediction. However, many studies using the publicly available Term/Preterm ElectroHysteroGram DataBase (TPEHGDB) report near-perfect prediction results. The authors argue these results are overly optimistic due to a specific methodological flaw: applying over-sampling techniques to address the inherent class imbalance (more term than preterm births) before partitioning the data into training and testing sets. This practice leads to information leakage, where the model effectively "sees" data it shouldn't during training, resulting in inflated performance metrics that don't reflect real-world generalization.

Methods

The core of this paper involves:

  • Reproducing Studies: The authors meticulously re-implemented the methodologies of 11 previously published studies that reported near-perfect results on the TPEHGDB dataset and used over-sampling. They specifically focused on studies suspected of applying over-sampling before data partitioning.
  • Artificial Dataset Experiment: To clearly illustrate the impact of data leakage, they generated an artificial dataset. They then compared the performance of a classifier when over-sampling was applied before partitioning versus after partitioning.
  • Feature Analysis: They evaluated the discriminative power of individual features proposed in the literature, using Area Under the Curve (AUC) as a metric.
  • Corrected Over-sampling Evaluation: They assessed the true impact of over-sampling when applied correctly (after data partitioning). This included evaluating the effect of tuning over-sampling algorithm hyperparameters and even exploring different over-sampling algorithms.
  • Reproducibility: All code used for feature extraction and experiments is made publicly available under an open license.

Datasets

  • Term/Preterm ElectroHysteroGram DataBase (TPEHGDB): This is the primary dataset used. It contains 300 EHG recordings from patients, with a significant imbalance between term (262) and preterm (38) deliveries.
  • Artificial Dataset: A synthetic dataset of 10,000 five-dimensional points was generated for illustrative purposes to demonstrate the effect of over-sampling before partitioning.

Key Insights and Ideas

  • The "Overly Optimistic" Trap: The most significant insight is how a seemingly minor methodological choice (over-sampling before splitting) can drastically inflate performance metrics, making results appear near-perfect when they are not. This highlights the critical importance of rigorous data splitting and validation.
  • Data Leakage is Subtle but Powerful: The paper clearly demonstrates that even when over-sampling is applied to generate synthetic data, if this happens before the train/test split, information from the test set can "leak" into the training data, leading the model to learn patterns it shouldn't.
  • Correct Over-sampling Still Helps: While incorrect application is detrimental, the study shows that applying over-sampling after data partitioning can still lead to meaningful improvements in AUC scores, suggesting it's a valuable technique when used properly.
  • Hyperparameter Tuning Matters: Tuning the parameters of over-sampling algorithms, and even selecting the right algorithm, can further boost performance when applied correctly, though the gains might be marginal compared to the impact of the flawed methodology.
  • Individual Features Have Limited Power: The analysis of individual features revealed that even the best ones have limited discriminative power, with maximal AUCs around 0.60-0.65. This suggests that combining features or using more advanced modeling techniques might be necessary for robust prediction.

Key Results

  • Artificial Data: Applying SMOTE before data partitioning on an artificial dataset yielded an AUC of 0.95. In contrast, applying SMOTE after partitioning or not at all resulted in AUCs close to random guessing (0.49-0.48).
  • Reproduced Studies: The authors were able to closely approximate the reported near-perfect results of 11 studies only when they replicated the flawed methodology of over-sampling before partitioning.
  • Corrected Over-sampling: When over-sampling was applied correctly (after partitioning), AUC scores increased by roughly 3-10% compared to using no over-sampling. Tuning hyperparameters further improved AUC by up to 6%.
  • Feature Performance: The most informative features, often derived from EMD and WPD, showed a maximal AUC of around 0.60-0.65, with significant standard deviations, indicating limited individual predictive power.

Limitations and Future Work

  • Limitations:
    • The study acknowledges that reproducing studies might involve minor differences in feature extraction or parameter choices, but argues these are unlikely to account for the vast discrepancy in results caused by the over-sampling flaw.
  • The univariate analysis of features does not assess the discriminative capability of feature combinations.
  • Future Work:
    • Larger, More Balanced Datasets: The authors emphasize the need for larger datasets with more uniform recording times and a higher proportion of preterm cases to build clinically useful models.
  • Survival Analysis: Predicting entire curves of probability for preterm birth using survival analysis, rather than single-point predictions, could enhance clinical utility.
  • Deep Learning: Exploring deep learning approaches is suggested as a promising direction, as these models can automatically learn representations from EHG signals, reducing reliance on manual feature engineering.
  • Further Research on Over-sampling: The authors suggest that more research is needed on tuning over-sampling algorithms and their hyperparameters for optimal performance in this domain.

Summary updated

BibTeX
@inproceedings{vandewiele2021overly,
  author = {Gilles Vandewiele and Isabelle Dehaene and György Kovács and Lucas Sterckx and Olivier Janssens and Femke Ongenae and Femke De Backere and Filip De Turck and Kristien Roelens and Johan Decruyenaere and Sofie Van Hoecke and Thomas Demeester},
  title = {{Overly optimistic prediction results on imbalanced data: a case study of flaws and benefits when applying over-sampling}},
  booktitle = {Artif. Intell. Medicine},
  year = {2021},
  url = {https://openreview.net/forum?id=BQsS2QMEeF},
}
Figure