Skip to content
AI.info

How machines learn

Generalization and Inductive Bias

Understand generalization as transfer beyond observed examples and examine the assumptions, invariances, and deployment boundaries that make it possible.

By the end you can

Key idea

100.0 per cent training accuracy on real labels, and on pure noise

A few points can be connected by a straight line, a curve, or an infinitely complicated function that agrees only at those points. Data alone cannot choose among all possible explanations.

Five researchers made that measurable in 2017. They took a small Inception network of 1,649,402 parameters and trained it on CIFAR-10 with no augmentation and no weight decay. On the true labels it reached 100.0 per cent training accuracy and 85.75 per cent test accuracy. Then they threw the labels away and replaced them with uniform random ones, so the training set contained no rule to find. The same network again reached 100.0 per cent training accuracy. Test accuracy was 9.78 per cent, which is chance for ten classes. The Inception variant without batch normalisation gave 100.0 / 10.12 on random labels. Their abstract states it plainly: “our experiments establish that state-of-the-art convolutional networks for image classification trained with stochastic gradient methods easily fit a random labeling of the training data”. An independent group reproduced the phenomenon the same year: deep networks are capable of memorising noise data, while on real data they learn simple patterns first.

So a perfect fit certifies nothing about what comes next. The fit was identical in both runs and the test results were not close. A learning algorithm generalizes because its architecture, objective, representation, regularization, and training procedure prefer some solutions over others. Those preferences are inductive biases.

The same network reached 100.0 per cent training accuracy on real labels and on noise; only what it prefers, not how well it fits, separates 85.75 per cent from 9.78.

Case

Mitchell 1980: a learner with no preferences can only look things up

Consider a learner with no preference at all. It keeps every generalisation consistent with the training data. It calls a new instance positive only if all of them match it. Such a system can classify a new instance only when that instance is identical to one it has already seen. Tom Mitchell showed this in 1980. The reason is that “any instance that has not yet appeared as a training instance will match exactly half the generalizations in the version space”. His verdict was blunt. “An unbiased learning system’s ability to classify new instances is no better than if it simply stored all the training instances and performed a lookup when asked to classify a subsequent instance.” Whatever a learner can do beyond lookup, it does because of what it refuses to consider.

Rebuild the same test set and 11–14 per cent of ImageNet accuracy goes

A model generalizes when performance on new cases remains useful under a specified population and set of conditions. “Unseen data” is too vague. New transactions from known stores, new stores in known regions, and a future economic regime are different challenges.

How tight that boundary is has been measured on the most-used benchmark there is. In 2019 four researchers rebuilt the ImageNet and CIFAR-10 test sets by re-running the original collection process, then scored models that had never seen the new images. Their finding: “We evaluate a broad range of models and find accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet.” Nothing had changed but a second pass through the same recipe — same task, same classes, same instructions. The leaderboard numbers did not survive it.

The second half of the story matters as much as the first. A different group re-analysed that replication in 2020 and showed that the replication procedure itself introduces statistical bias. After correction, only an estimated 3.6 % ± 1.5 % of the original 11.7 % ± 1.0 % ImageNet drop remained unaccounted for. Most of the gap was an artefact of how the new test set was assembled. But a real gap survived a hostile correction. Both facts belong in the claim: the effect is smaller than first reported, and it is not zero.

Every performance claim should name the unit, time period, geography, users, devices, policies, and interventions it is intended to cover.

Case

One pixel down, and up to 30% of the answers change

“Unseen” can be one pixel away. Aharon Azulay and Yair Weiss took 1,000 randomly chosen images from the ImageNet validation set. They shifted or rescaled each by a single pixel. Then they measured how often InceptionResNetV2, ResNet-50 and VGG-16 changed their top-1 answer. Their 2019 paper sets out the result. “The chance that a CNN output on a randomly chosen image will change after translating downward by a single pixel can be as high as 30%”. InceptionResNetV2 is the network in their opening figure. Of it the paper adds that this happens “despite the fact that the network is fully convolutional and was trained using data augmentation for scalings and translations”. Neither the architecture nor the augmentation supplied the invariance both were assumed to supply.

Visual

Where inductive bias enters

Bias here does not mean social prejudice. It means preference among possible functions or explanations.

FigureHierarchy · 5 levels
  • Representation bias

    Inputs emphasize selected measurements, order, locality, or relationships.

    • Architecture bias

      The model family favors structures such as linearity, trees, locality, sequence, or permutation invariance.

      • Objective bias

        The loss and weighting make some mistakes or outputs more important.

        • Regularization bias

          Penalties and constraints favor simpler, smoother, sparse, or smaller solutions.

          • Data bias

            Sampling and augmentation emphasize some conditions and suppress others.

Case

Shape or texture: 1,280 images that split people from networks

One of these preferences has been measured rather than assumed. For a 2019 paper, Geirhos and colleagues generated 1,280 cue-conflict images by style transfer, eighty per category. Each is the outline of one object rendered in the texture of another. They asked both people and networks to name the object. Human observers answered by shape in 95.9 % of their correct decisions. The networks reversed it. ResNet-50 answered by shape 22.1 % of the time against texture 77.9 %, and VGG-16 17.2 % against 82.8 %. Nothing in the ImageNet task says “classify by texture”. The combination of data, objective and architecture made texture the cheapest way to win. That preference is what shipped.

Figure

Nothing in the ImageNet task says “classify by texture”; the combination of data, objective and architecture made texture the cheapest way to win, and that preference is what shipped.

Example

Some changes should not alter the answer

Generalization often depends on encoding the right invariances or equivariances.

  • Image classification: small translations may not change the object category — but Azulay and Weiss measured a one-pixel downward shift changing a CNN's answer as often as 30% of the time, so the invariance has to be verified, not assumed.
  • Fraud detection: changing an internal transaction identifier should not change risk.
  • Text intent: paraphrases can express the same request with different words.
  • Demand forecasting: units should transform consistently when quantity scales change.
  • Graph tasks: renumbering node IDs should not change structural predictions.
  • Medical imaging: scanner differences may be irrelevant or clinically meaningful depending on the task.

Comparison

A strong assumption can help or hurt

The value of an inductive bias depends on how closely it matches deployment structure.

The shortcut column is the one with a documented case attached. In 2018 Zech and colleagues assembled 158,323 chest radiographs from three institutions: 112,120 from NIH, 42,396 from Mount Sinai and 3,807 from Indiana University. A pneumonia model trained jointly on the Mount Sinai and NIH images scored an internal test AUC of 0.931 (95% CI 0.927–0.936). At Indiana the external test AUC was 0.815 (95% CI 0.745–0.885, P = 0.001). A second experiment explains the drop. A CNN trained only to name the hospital system that produced a radiograph got it right for 22,050 of 22,062 (99.95%) NIH, 8,386 of 8,388 (99.98%) Mount Sinai and 737 of 771 (95.59%) Indiana test images. The site is that legible in the pixels. And the site carries its own disease rate, so predicting the site is a way of scoring well without reading the lungs.

The same failure mode was documented independently in a different disease. COVID-19 chest-radiograph classifiers lost about half their predictive performance when tested on a second dataset, and saliency maps landed on laterality markers and other regions outside the lung fields. Three researchers reported that in Nature Machine Intelligence, and their abstract does not hedge: “Using state-of-the-art techniques in explainable AI, we demonstrate that recent deep learning systems to detect COVID-19 from chest radiographs rely on confounding factors rather than medical pathology, creating an alarming situation in which the systems appear accurate, but fail when tested in new hospitals.”

Neither team’s model was badly built. Each had found the cheapest stable regularity in its training data, which is exactly what a learner’s preferences are for. The regularity simply did not survive the trip to another hospital.

FigureComparison · 3 columns

Helpful bias

Reduces the set of plausible solutions toward stable structure.

  • Needs less data
  • Improves sample efficiency
  • Can increase robustness
  • Example: local patterns in images

Mismatched bias

Excludes relationships the task actually needs.

  • Creates systematic error
  • May look like underfitting
  • Can fail on important slices
  • Example: linearity for a threshold interaction

Shortcut bias

Encourages an easy correlation that does not represent the intended concept.

  • Can score highly offline
  • Breaks under environment change
  • Often hides in metadata
  • Example: source template predicts label

Analogy

An analogy: learning a game from a few matches

You watch ten chess games and try to predict the moves that come next. To do it at all you must assume that legal rules remain stable and that players pursue recognizable objectives. Otherwise the observations support countless arbitrary predictions.

Machine learning also relies on stability and structure beyond the sample. Chess keeps its rules. Deployment environments change rules, incentives, populations, and measurements after the data was collected.

Missed high in 100 of 108 weeks, with correlations still above 0.90

Textbooks often reason as if examples are independent and identically distributed from one stable population. Real systems are different. They contain repeated users, seasonality, network effects, interventions, and feedback loops.

Google Flu Trends is what that looks like when someone measures it. In February 2013 the model was predicting more than double the proportion of doctor visits for influenza-like illness that the CDC recorded. Four researchers reported in Science in 2014 that it had “missed high for 100 out of 108 weeks starting with August 2011”. The errors were temporally autocorrelated and seasonal rather than random — the signature of an assumption that has expired, not of noise. Part of the cause was that the measuring instrument was being edited underneath the model. They named the mechanism: “Algorithm dynamics are the changes made by engineers to improve the commercial service and by consumers in using that service.” The search behaviour the model was fitted to was not a fixed natural phenomenon. It was a product, with a roadmap.

An independent epidemiological reassessment, published in 2013, found the model had missed the first wave of the 2009 A/H1N1 pandemic, with incidence estimates 30–40 fold lower than ILI surveillance. In 2012/13 it exceeded ILI surveillance at the national (268%), regional (208%) and local (296%) levels. Through all of that, correlations above 0.90 persisted. The reassuring summary statistic and the failure coexisted for years.

The i.i.d. assumption is useful as a reference. It is not a description to accept blindly. Grouped splits, time backtests, site holdouts, stress tests, and monitoring examine which parts of stability are plausible.

Steps

Make the claim no broader than the evidence

A generalization statement should progress from observed evidence to bounded deployment. Four of the six steps below are not house style. Three national regulators have written them down and published them jointly.

On 27 October 2021 the US Food and Drug Administration, Health Canada and the UK Medicines and Healthcare products Regulatory Agency jointly issued ten “Good Machine Learning Practice for Medical Device Development: Guiding Principles”. Principle 3 is steps 1 and 2 of the ladder, and it uses the lesson’s own verb: “Clinical Study Participants and Data Sets Are Representative of the Intended Patient Population: Data collection protocols should ensure that the relevant characteristics of the intended patient population (for example, in terms of age, sex, race, and ethnicity), use, and measurement inputs are sufficiently represented in a sample of adequate size in the clinical study and training and test datasets, so that results can be reasonably generalized to the population of interest.” Generalized — to the population of interest, which someone has to name.

Principle 4 is step 4: training and test sets must be independent, with “all potential sources of dependence, including patient, data acquisition, and site factors” addressed. That is the Zech result turned into a requirement. Principle 8 requires testing “during clinically relevant conditions”. Principle 10 requires deployed models to be monitored in real-world use, which is step 6. The ladder is what a regulated launch already has to survive.

FigureProcess · 6 steps
  1. 1. Define the target domain

    Name future units, conditions, and decision context.

  2. 2. Describe the evidence domain

    Summarize sampling, time, sites, devices, and labels in the dataset.

  3. 3. Identify the bridge

    State which properties are assumed stable between evidence and use.

  4. 4. Test the bridge

    Use realistic holdouts, stress tests, and slice analysis.

  5. 5. Bound the launch

    Exclude conditions without evidence and provide fallback behavior.

  6. 6. Monitor the assumptions

    Track changes that could invalidate the bridge.

A model can generalize while the product fails

Offline metrics can hold steady while the workflow changes, users adapt, thresholds are misconfigured, or feedback arrives too late. Generalization of the model mapping is necessary for system value. It is not sufficient.

The Epic Sepsis Model is that sentence with numbers on it. By 2021 it was deployed at hundreds of US hospitals, and an external validation at Michigan Medicine covered 27,697 patients and 38,455 hospitalizations, of which 2,552 (7%) involved sepsis. The model achieved an area under the curve of 0.63 (95% CI, 0.62–0.64). At the vendor’s recommended threshold it fired an alert in 18% of hospitalizations, 6,971 of 38,455, and still failed to identify 1,709 patients with sepsis, 67% of them. The conclusion, in JAMA Internal Medicine: “This external validation cohort study suggests that the ESM has poor discrimination and calibration in predicting the onset of sepsis. The widespread adoption of the ESM despite its poor performance raises fundamental concerns about sepsis management on a national level.”

A second external validation, published in 2024, tested the model at two county emergency departments across 145,885 encounters. Sensitivity was 14.7%, specificity 95.3%, positive predictive value 7.6% within a six-hour window. The alert load falls on clinicians who must act on each one. That is where the cost of a miscalibrated threshold is actually paid.

The broader product claim includes data collection, feature computation, decision policy, user behavior, and operational response — none of which appear in an offline score.

Key takeaways