# Detecting Overfitting via Adversarial Examples

arXiv: https://arxiv.org/abs/1903.02380 · HTML: https://mlsanity.com/paper/1903.02380/

## Key facts

- Cited by 15 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Mar 2019.

## Built on by (most cited first, 15 of 15)

- [RDA: Robust Domain Adaptation via Fourier Adversarial Attacking](https://mlsanity.com/paper/2106.02874/) (2021)
- [Beyond Preserved Accuracy: Evaluating Loyalty and Robustness of BERT Compression](https://mlsanity.com/paper/2109.03228/) (2021)
- [Is the Performance of My Deep Network Too Good to Be True? A Direct Approach to Estimating the Bayes Error in Binary Classification](https://mlsanity.com/paper/2202.00395/) (2022)
- [Now You See It, Now You Dont: Adversarial Vulnerabilities in Computational Pathology](https://mlsanity.com/paper/2106.08153/) (2021)
- [DSRM: Boost Textual Adversarial Training with Distribution Shift Risk Minimization](https://mlsanity.com/paper/2306.15164/) (2023)
- [Keeping Deep Learning Models in Check: A History-Based Approach to Mitigate Overfitting](https://mlsanity.com/paper/2401.10359/) (2024)
- [Limitations of Data-Driven Spectral Reconstruction -- An Optics-Aware Analysis](https://mlsanity.com/paper/2401.03835/) (2024)
- [Quantifying Overfitting: Evaluating Neural Network Performance through Analysis of Null Space](https://mlsanity.com/paper/2305.19424/) (2023)
- [On Synthetic Data for Back Translation](https://mlsanity.com/paper/2310.13675/) (2023)
- [The Impact of Activation Sparsity on Overfitting in Convolutional Neural Networks](https://mlsanity.com/paper/2104.06153/) (2021)
- [Scalable Safety-Critical Policy Evaluation with Accelerated Rare Event Sampling](https://mlsanity.com/paper/2106.10566/) (2021)
- [ML4ML: Automated Invariance Testing for Machine Learning Models](https://mlsanity.com/paper/2109.12926/) (2021)
- [Measuring Overfitting in Convolutional Neural Networks using Adversarial Perturbations and Label Noise](https://mlsanity.com/paper/2209.13382/) (2022)
- [Time to Retrain? Detecting Concept Drifts in Machine Learning Systems](https://mlsanity.com/paper/2410.09190/) (2024)
- [Open-source framework for detecting bias and overfitting for large pathology images](https://mlsanity.com/paper/2503.01827/) (2025)

## Abstract (arXiv)

The repeated community-wide reuse of test sets in popular benchmark problems raises doubts about the credibility of reported test-error rates. Verifying whether a learned model is overfitted to a test set is challenging as independent test sets drawn from the same data distribution are usually unavailable, while other test sets may introduce a distribution shift. We propose a new hypothesis test that uses only the original test data to detect overfitting. It utilizes a new unbiased error estimate that is based on adversarial examples generated from the test data and importance weighting. Overfitting is detected if this error estimate is sufficiently different from the original test error rate. We develop a specialized variant of our test for multiclass image classification, and apply it to testing overfitting of recent models to the popular ImageNet benchmark. Our method correctly indicates overfitting of the trained model to the training set, but is not able to detect any overfitting to the test set, in line with other recent work on this topic.
