II · THE IDEA · ARTIFICIAL INTELLIGENCE
What Machine Learning Is, and Is Not
▶ Listen · narrated
The phrase 'machine learning' suggests something closer to human cognition than what actually happens. The gap between the metaphor and the mechanism explains most of the surprises.
At a glance
- What it is
- A program that adjusts internal parameters to fit a function to training examples
- What it produces
- A mathematical mapping from inputs to outputs, optimised to minimise error on the training set
- What it is not
- A system that understands, reasons, or generalises the way humans do
- Core requirement
- Enough examples to constrain the space of possible functions
Imagine you are teaching a friend to recognise oak trees by walking through a forest and pointing at examples. After seeing fifty oaks, your friend starts recognising new ones. They have learned a pattern: lobed leaves, rough bark, acorns in autumn. Machine learning works similarly, but with an important difference. Your friend is updating a mental model of what an oak is — its features, its role in the ecosystem, how it differs from a beech. A machine learning system is adjusting numbers in a mathematical function until its output matches the labels you gave. Show it fifty images labelled 'oak' and it learns a mapping from pixel patterns to the label 'oak'. It does not learn what an oak is. If you show it an oak in winter, bare of leaves, it may fail unless your original fifty included winter oaks. The system has no broader understanding to fall back on. It has a function, tuned to the examples it saw.
A machine learning system consists of a parameterised function — often a neural network, decision tree ensemble, or kernel method — a loss function that measures prediction error, and an optimisation algorithm that adjusts the parameters to minimise that loss on a training dataset. Training is numerical optimisation, typically via gradient descent or a variant. The model computes predictions, the loss function quantifies how far those predictions are from the ground truth labels, and the optimiser updates the parameters in the direction that reduces loss. After sufficient iterations over the training data, the parameters converge to a local minimum of the loss surface. The result is a fixed function mapping inputs to outputs. Generalisation — performance on unseen data — depends on the training set being representative of the test distribution, the model having appropriate capacity (enough to capture the pattern, not so much that it memorises noise), and regularisation techniques that penalise overfitting. The model does not learn concepts in any semantic sense. It learns correlations. If the training data contains spurious correlations — say, 'cow' images that always include grass — the model may learn to use grass as a feature, failing when shown a cow indoors. This is not a reasoning failure. The model has no semantics. It has parameters that were adjusted to minimise a loss function on a particular dataset. Deployment requires validating that the production distribution matches the training distribution, or building monitoring to detect drift. The function does not update itself in response to errors during inference unless explicitly retrained.
Look closer
The function has no semantics built in
A machine learning system does not arrive with concepts like 'cat' or 'grammar' or 'fairness' encoded in its structure. It has parameters — often billions of them — initialised to small random values. Training adjusts those parameters so that the function's output matches the labels in the training data. If the data pairs images of cats with the label 'cat', the system learns a mapping that produces 'cat' for similar images. It has not learned what a cat is in any broader sense. It has learned a correlation.
Generalisation is statistical, not logical
When a trained model encounters an input it has never seen, it does not reason about it. It interpolates — or, more boldly, extrapolates — from the patterns present in the training set. If those patterns are strong and the new input is similar enough to the training distribution, the model often produces a useful answer. If the input is out of distribution, the model still produces an answer, because the function is defined everywhere, but the answer may be confidently wrong. There is no mechanism that says 'I do not know.'
The child analogy breaks at correction
A child who calls a dog a cat can be told 'No, that is a dog' and will update a conceptual model that applies across contexts. A machine learning model trained on static data cannot do this during inference. It can be retrained with new examples, but that is a separate, computationally expensive process, not an on-the-fly correction. Some systems simulate correction by storing examples and retrieving them later, but the core function itself remains fixed after training ends.
The story
Machine learning is the practice of writing a program that writes itself. More precisely, you supply a mathematical structure with adjustable parameters, a dataset of input-output pairs, and an algorithm that tunes the parameters until the structure's predictions match the outputs closely. The result is a function: something that takes an input and produces an output according to a fixed, learned rule.
The structure is often called a model. The tuning process is training. The dataset is the training set. The algorithm that adjusts the parameters is the learning algorithm, and it typically works by calculating how far the model's current predictions are from the correct answers — a quantity called the loss — then nudging the parameters in whichever direction reduces that loss. Repeat this across thousands or millions of examples, and the parameters settle into a configuration that minimises error on the data you showed it.
This is not reasoning. The model does not form hypotheses, test them, or revise a theory. It searches a space of possible functions for one that fits the data. The search is guided by gradient descent or a related optimisation method, which is efficient but blind: it follows the slope of the loss surface downhill, without any understanding of what the data represents.
The function that results can be extremely complex. A neural network with a hundred million parameters is computing a function with a hundred million degrees of freedom, capable of fitting extraordinarily intricate patterns. But complexity is not comprehension. The model has learned to reproduce the statistical regularities present in the training set. If you train it on photographs labelled with object names, it learns correlations between pixel patterns and labels. It does not learn what the objects are for, how they behave, or what they are made of, unless those properties are somehow encoded in the pixel patterns themselves and the training set is large and varied enough to expose them.
This is why machine learning systems can be both impressive and brittle. They excel at tasks where the training data is abundant and the test cases resemble the training distribution. They fail, often silently, when the input is subtly different from anything they have seen. A model trained to recognise stop signs in clear daylight may not recognise one at dusk, or with a sticker on it, unless the training set included those variations. The model has not learned the concept of a stop sign. It has learned a pattern.
The popular metaphor — that these systems learn like children — is misleading in several specific ways. A child integrates information across sensory modes, updates beliefs in real time, asks questions, and generalises from a handful of examples by leveraging a rich prior model of the physical and social world. A machine learning system does none of these things unless each capability is explicitly engineered and trained. The learning is narrow, data-hungry, and frozen once training ends. Calling it learning is not wrong, but it is a different kind of learning, and mistaking one for the other leads to misplaced expectations about what the system can and cannot do.
Why it mattered then
The core idea — that you could specify a task by supplying examples rather than writing explicit rules — emerged in the mid-twentieth century, as computers became powerful enough to search large parameter spaces. Early systems learned simple functions: linear classifiers, decision trees, polynomial fits. The appeal was immediate. For tasks where the rules were hard to articulate — recognising handwritten digits, filtering spam, predicting equipment failure — machine learning offered a way to let the data specify the solution. By the 1980s and 1990s, methods like neural networks and support vector machines were demonstrating that with enough data and the right structure, learned functions could outperform hand-coded rules on a growing range of problems. The shift mattered because it moved the bottleneck from human ingenuity in rule design to the availability and quality of data.
Why it matters now
Machine learning is now the dominant approach to building systems that process language, images, and sensor data at scale. The functions being learned have grown vastly more complex — models with billions of parameters, trained on datasets scraped from the entire public internet — but the underlying principle remains function-fitting. Understanding this matters because the metaphors used to describe these systems often obscure their actual behaviour. When a model produces a plausible-sounding but false statement, it is not lying or confused. It is outputting the continuation that best fits the statistical patterns in its training data. When it fails on an edge case, it is not being stupid. It is extrapolating from a distribution that did not include that case. Recognising machine learning as function-fitting rather than cognition helps set accurate expectations, design better safeguards, and ask the right questions about where these systems should and should not be deployed.
The surprising detail
One of the more counterintuitive properties of machine learning is that a model can perform well on its training set and poorly on real-world data, not because it failed to learn, but because it succeeded too well. This is called overfitting: the model has learned the noise and idiosyncrasies of the training examples rather than the underlying pattern. A function with enough parameters can memorise the training set exactly, achieving zero error, while generalising badly to anything new. Preventing this requires techniques like regularisation, which penalise complexity, or early stopping, which halts training before memorisation sets in. The fact that perfect training performance is often a warning sign, not a success metric, runs counter to intuition from most other engineering disciplines.
Remember this
Machine learning fits a function to data. It does not reason, and it does not know when it is guessing.
Test yourself
A model is trained to predict whether a loan application will default, using historical data from 1990 to 2010. It performs well on a held-out test set from the same period. In 2025, its predictions are wildly miscalibrated. Explain why this is not a failure of machine learning as such, but a consequence of what machine learning is.
The model learned the statistical patterns present in 1990–2010 data: the correlations between applicant features and default rates in that economic environment, under those lending practices, for that population. It has no concept of an economy or a recession. It cannot detect that the 2025 distribution is different, because it has no model of what 'different' means — it simply evaluates the function it learned fifteen years ago. Machine learning produces a fixed mapping from inputs to outputs, optimised for the training distribution. When the world changes, the function does not update itself. This is not a bug. It is what function-fitting means. Keeping the model accurate requires retraining on recent data, or building in mechanisms that detect distribution shift and trigger human review. The model itself has no way to know it is now guessing wildly outside its training envelope.
Go deeper
- intro.html · deeplearningbook.org
- Machine Learning | Google for Developers · developers.google.com
Image: Original diagram, The Daily Triptych. Licence: Original work. Source.