Common Methodological Pitfalls in Medical AI Papers

Data leakage, overfitting to the test set, inappropriate comparisons, missing external validation, cherry-picked metrics, and other errors that weaken or invalidate published results.


Medical AI papers go wrong in a fairly small number of ways, and the same ones turn up again and again. That is good news for a reader, because it means you can learn to look for them. It is good news for an author as well, since a list of known mistakes is a list of things to check before submitting.

Other articles in this knowledge base explain the mechanisms. 1.6 What AI Cannot Do covers why models fail outside the lab, and 2.1 Why Data Quality Matters More Than Model Complexity covers what goes wrong in datasets. This article is organised differently: by what you can see in the paper. For each pitfall we give the question to ask and where in the manuscript the answer should be.

How common is this?

Common enough that reviews of the literature make uncomfortable reading. Michael Roberts and colleagues assessed 62 published machine learning models for COVID-19 imaging in 2021 and concluded that none was ready for clinical use, mostly because of the problems listed below. In 2023 Sayash Kapoor and Arvind Narayanan surveyed machine learning research across the sciences and collected reports of data leakage affecting nearly 300 papers in 17 fields, medicine among them. Gaël Varoquaux and Veronika Cheplygina wrote a 2022 review of medical imaging research specifically, and its title describes the situation: "Machine learning for medical imaging: methodological failures and recommendations for the future."

Very little of this is misconduct. These are honest mistakes, made easier by the fact that most of them improve the results, and nobody goes looking for a bug in a model that scores 0.97.

Leakage: the test set was not really unseen

Leakage means information about the test cases reached the model during development. The reported performance is then partly a measure of memory. 3.2 Training, Validation, and Test Sets explains it in detail. In a paper, look for these.

The split was by image, not by patient. If one patient contributes slices, views or repeat studies to both training and test sets, the model is tested on people it has met. Look in the methods for the words "split at the patient level" or similar. If the paper says only "the images were randomly divided," assume the worst until told otherwise. A clue is a dataset described as thousands of images with no patient count anywhere.

Something was done to the whole dataset before splitting. Normalization statistics, feature selection, oversampling of the rare class and augmentation should all be done after the split, using the training data only. Feature selection is the classic case in radiomics and genomics papers: choosing the twenty most predictive features out of a thousand using all the data, and then cross-validating a model on those twenty, produces good-looking results from pure noise.

Datasets overlap. Public datasets are sometimes built from each other, so training on one and testing on another may not be the independent test it appears to be.

The model was given the answer. An input variable can be a consequence of the outcome: a treatment that is only prescribed after the diagnosis, a note written after the event, an image taken on the machine reserved for known cases. In tabular models, check that every predictor would be available at the moment the prediction is meant to be made.

The test set was used more than once

A test set gives an unbiased estimate the first time it is used. If the authors looked at test performance, adjusted the model and looked again, the test set has become a tuning set, and the final number is optimistic.

This rarely appears in the methods in so many words. Signs of it: no separate tuning set is described, the threshold "maximized" some metric with no mention of which data it was chosen on, or many architectures are compared in a table of test set results and the best is carried forward as the proposed model. The questions to ask are how the final model was selected and whether any decision was made after seeing test results.

Cross-validation without a held-out set has the same weakness when it is used both to tune and to report (see 4.6 Cross-Validation Strategies for Medical Data).

No external validation

A model tested on data from the hospital, scanner and period it was trained on has shown that it works there and then. Whether it works anywhere else is a separate question, and the usual answer is "less well" (see 2.6 Multi-Site and Multi-Device Data).

Internal testing alone is fine for an early paper that describes itself accurately. The pitfall is in the claims. Look at whether the abstract and conclusion say "may assist clinicians" on the strength of a single-site retrospective test, and whether the limitations paragraph admits the absence of external data. A random split of pooled data from three hospitals is also internal, whatever the paper calls it, since all three are on both sides (see 5.4 Multi-Site External Validation).

The test population isn't the clinical population

Check where the test cases came from and what the prevalence was.

A test set of confirmed cancers and healthy volunteers leaves out the patients who make the task hard: the benign mimics, the early disease, the post-operative changes. Performance on such a set overstates performance in clinic. This is spectrum bias, and it applies to AI exactly as it does to any diagnostic test.

A test set that is half positives is common and acceptable for estimating sensitivity and specificity. Predictive values taken from it are not meaningful, and a paper that reports a PPV of 90% from a balanced test set for a disease with 2% prevalence has made an arithmetic mistake (see 4.1 Classification Metrics).

Look at exclusions too. If 15% of images were dropped for quality reasons before testing, the results describe the model on the easy 85%.

A weak or convenient reference standard

The model's score can be no more trustworthy than what it was scored against. Find the paragraph that describes the reference standard and ask who made it and what they knew.

Things to look for: labels extracted automatically from reports and used for testing; a single reader with no measure of agreement; a reference standard produced by readers who could see the model's output; and a reference standard that differs between positives (who had biopsy) and negatives (who were assumed negative because nobody looked further). That last one is verification bias, another old acquaintance from diagnostic test research.

A model reported to exceed expert performance, where the reference standard was itself expert opinion, deserves a careful second read (see 5.7 Reference Standards and Ground Truth in Medical AI).

Unfair comparisons

"The model outperformed radiologists" depends entirely on how the radiologists were tested. Were they given the clinical history and prior studies they would normally have? Were they reading in their own subspecialty? Was there a time limit? How many readers were there, and how were they chosen? Two residents reading without context are not a fair stand-in for clinical practice.

Comparisons between models have their own version. The proposed method is often tuned carefully while the baseline is run with default settings. And a difference of 0.01 in AUC between two models on a test set of 200 cases is well inside the noise. Look for a statistical test suited to paired data and for confidence intervals on the difference (see 4.7 Comparing Models).

The most informative comparison is frequently missing altogether: a simple baseline. If a logistic regression on age and two lab values gets an AUC of 0.84, the deep network's 0.86 looks different.

Selective metrics

Every metric hides something, and authors are free to pick. Some patterns to watch:

  • Accuracy reported for a rare condition, where predicting "normal" every time would score highly.
  • AUC alone, with no operating point, no sensitivity and specificity at a threshold anyone would use, and no calibration (see 4.2 The ROC Curve and AUC).
  • For segmentation, mean Dice alone, which can look fine while small lesions are missed entirely (see 4.3 Segmentation Metrics).
  • Different metrics emphasized in the abstract and in the results tables.
  • Per-image results where the clinical decision is per patient.

No confidence intervals at all is its own warning. A sensitivity of 92% from 25 positive cases has a 95% interval that reaches down into the mid-70s.

Averages that hide subgroups

A strong overall result can sit on top of a subgroup where the model fails. Luke Oakden-Rayner and colleagues called this hidden stratification and showed in 2020 that models with good average performance could do much worse on clinically important subsets, such as the pneumothorax without a chest drain described in 1.6.

Look for results broken down by sex, age, site, scanner and disease subtype or severity, and for the number of cases in each. Absence of any subgroup analysis is a gap. So is a subgroup table where every interval is too wide to mean anything.

Shortcuts nobody looked for

If positives and negatives came from different sources, the model may have learned the source (see 2.1). The paper can't prove a negative, but it can show that the authors checked: a table of site and scanner by label, performance within a single site, or an analysis of what the model's errors have in common. Saliency maps offered as the only evidence that the model "looks at the right place" are weak reassurance (see 7.4 Explainability and Interpretability in Clinical AI).

Conclusions that outrun the evidence

Finally, compare the last paragraph with the study that was done. A retrospective test of standalone accuracy shows that the model can classify archived images. It doesn't show that clinicians using it make better decisions, or that patients do better, and words like "improves diagnosis" or "ready for clinical deployment" need evidence of a different kind (see 5.1 Technical Validation vs. Clinical Validation).

A quick screen

When you have ten minutes with a paper, these questions catch most of the problems above:

  1. How many patients, and was the split by patient?
  2. Was there a tuning set separate from the test set, and where was the threshold chosen?
  3. Was any test data from a different site?
  4. Does the test population resemble the intended patients, in case mix and prevalence?
  5. What was the reference standard, and was it independent of the model?
  6. Are there confidence intervals, subgroup results and a simple baseline?
  7. Do the conclusions match the design?

If the paper answers all seven clearly, it is in better shape than most, whatever the answers are. When it is your own paper, run the same seven questions before a reviewer does, and consider one more check that costs almost nothing: if the result looks too good, treat that as a reason to hunt for leakage before celebrating.

Key takeaways

  • The same few errors account for most unreliable medical AI results, and nearly all of them inflate performance.
  • Leakage is the most damaging. Check for patient-level splitting, for any step applied before the split, and for inputs that encode the outcome.
  • A test set consulted repeatedly during development no longer gives an unbiased estimate.
  • Internal testing shows performance at the development site. Claims about clinical use need external data.
  • Check that the test population, the reference standard and any human comparison reflect real clinical conditions.
  • Look for confidence intervals, more than one metric, subgroup results and a simple baseline.
  • Compare the conclusions with the study design. Retrospective accuracy is not evidence of clinical benefit.

This article is part of the AI in Clinical Research Knowledge Base.