Why Doesn't My Model Work?
This article addresses a common issue in machine learning where models that perform well in training fail in real-world applications. It acknowledges the prevalence of this problem and likely offers insights or solutions.
This article addresses a common issue in machine learning where models that perform well in training fail in real-world applications. It acknowledges the prevalence of this problem and likely offers insights or solutions.
SynthePulse Insight · AI deep reading
Version 1 · 1 source
A model that performs excellently on a test set can fail miserably when deployed in the real world. This article explores the root causes of data misdirection and information leakage, revealing common mechanisms by which models appear good but are actually useless, and discusses preventive measures.
Misleading data is the primary root cause of model failure. In the frenzy of COVID prediction models, a review by Roberts et al. found that multiple public datasets contained overlapping records, incorrect labels, and hidden variables, allowing models to accurately predict class labels without learning any useful knowledge. For example, in many COVID chest imaging datasets, body orientation became a hidden variable: sick patients were more likely to be scanned lying down, while healthy individuals were often standing. The model learned to predict posture rather than disease, rendering many COVID models ineffective in real-world scenarios.
Spurious correlations are more insidious. A classic example is the 'tank problem': the US military attempted to train a neural network to recognize tanks, but the model actually recognized the weather—all tank photos were taken at the same time. Similarly, many computer vision benchmark datasets contain background pixel groups spuriously correlated with class labels. Deep models, due to their powerful pattern-fitting abilities, tend to capture these spurious patterns, thereby reducing generalization.
Data labeling also harbors risks. Image classification benchmarks like MNIST and CIFAR typically have a mislabeling rate of about 2%. When models compete for thousandths of a percent in accuracy, this noise can mask real improvements. For subjective tasks like sentiment classification, the risk of overfitting to specific annotators is higher.
Data leakage is another common pitfall. The most typical error is performing data-dependent preprocessing operations (e.g., centering, scaling, feature selection, or data augmentation) on the entire dataset before splitting into training and test sets. These operations implicitly introduce test set information into the training pipeline, leading to overestimated test performance. Even simple centering and scaling, if done before splitting, give the model an undue information advantage.
Models that rely on spurious correlations are sensitive to adversarial attacks: small perturbations to background pixels can flip predictions. Adversarial training can mitigate this issue but is computationally expensive. A simpler approach is to use explainable AI techniques (e.g., saliency maps) to inspect the model's decision basis—if the model focuses on background regions, generalization is likely poor.
To systematically prevent such errors, tools like the REFORMS checklist have been introduced, aiming to help researchers avoid common pitfalls in machine learning-based scientific practice.
This article is based on a review by a researcher with 20 years of machine learning experience published on The Gradient. It cites several published studies (e.g., Roberts et al.'s review of COVID models, cases from the AIAAIC repository) as support, but some specific examples (e.g., the tank problem) are long-standing anecdotes whose original sources are not explicitly provided in this article.
High accuracy on a test set does not equate to real-world effectiveness. Hidden variables, spurious correlations, labeling bias, and data leakage are the four root causes of models that appear good but are actually useless. By inspecting the model's decision basis, strictly separating preprocessing from the test set, and adopting systematic checklists, these risks can be significantly reduced.
Primary report
Primary source