What is machine learning in AI?
Machine learning is the branch of AI where the system writes its own rules. Instead of a programmer coding "if this, then that," you supply examples and answers, and the algorithm finds the pattern connecting them. It's the method behind nearly every AI product sold today, including chatbots and image generators.
Why — the first-principles explanation
Ordinary software is a set of instructions a human wrote down. That works beautifully whenever you can actually state the rules — payroll, tax brackets, a thermostat. It collapses the moment you can't. Try writing the rules for "is this photo a cat." You recognize a cat in about 40 milliseconds and you cannot explain how. Fur? Bald cats exist. Four legs? So do tables. Every rule you write has exceptions, and the exceptions have exceptions. That gap — tasks humans do effortlessly but cannot describe — is the entire reason machine learning exists.
So machine learning inverts the arrangement. Classical programming takes rules plus data and produces answers. Machine learning takes data plus answers and produces the rules. You show the algorithm 50,000 photos already labeled "cat" or "not cat," and it searches for a rule that fits them all. What it hands back is called a model — and that model can then judge photos nobody has ever labeled. You never wrote the definition of a cat. You outsourced it to the examples.
There are three main ways to arrange this. Supervised learning uses examples with correct answers attached — the cat photos. Unsupervised learning gets no answers and hunts for structure on its own, like sorting customers into groups nobody defined. Reinforcement learning learns from reward and penalty, the way you'd train a dog. Large language models use a blend: mostly self-supervised pretraining, where the labels come free because the task is predicting the next word in text that already exists, followed by reinforcement learning from human feedback.
The trade is real and it is permanent. You gain abilities nobody could hand-code — and you give up the ability to read the rules. The model genuinely contains rules, but they're smeared across billions of numbers no human can inspect. This is why NIST's AI Risk Management Framework devotes an entire trustworthiness characteristic to systems being "Explainable and Interpretable." It isn't a bug someone forgot to fix. It's the price of the inversion: you asked the machine to find rules you couldn't articulate, so you shouldn't be shocked that it can't articulate them either.
An example that makes it click
Think about how a four-year-old learns what a dog is. You never sit her down and define one. You don't specify a snout length or an ear shape or a legal minimum tail. You just point. "Dog." A big fluffy one at the park — "dog." A wiener dog — "dog." A dog on TV — "dog." After maybe thirty examples, something clicks, and she can spot a breed she has never seen in her life, from behind, in the rain.
Now ask her the rule. She'll shrug. She knows dogs perfectly and can't tell you a single reliable rule for one. That shrug is machine learning. Examples in, ability out, explanation nowhere. The only difference is that the machine needs a few hundred thousand dogs instead of thirty.
Key facts
- NIST AI 100-1 (January 2023) defines an AI system as "an engineered or machine-based system that can, for a given set of objectives, generate outputs such as predictions, recommendations, or decisions influencing real or virtual environments" operating "with varying levels of autonomy" — machine learning is one method of building such a system, not the definition of one.
- The NIST framework identifies "Explainable and Interpretable" as one of its core characteristics of trustworthy AI (Section 3.5), reflecting that machine-learned rules are distributed across model parameters rather than readable as code.
- The core inversion: classical programming combines rules and data to produce answers, while machine learning combines data and answers to produce rules — the output being a trained model.
- The main categories are supervised learning (labeled examples), unsupervised learning (structure without labels), and reinforcement learning (reward and penalty); large language models combine self-supervised pretraining with reinforcement learning from human feedback.
- The 2024 Nobel Prize in Physics went to John J. Hopfield and Geoffrey Hinton "for foundational discoveries and inventions that enable machine learning with artificial neural networks."
- NIST's definition is adapted from the OECD Recommendation on AI (2019) and ISO/IEC 22989:2022, both of which likewise define AI by function rather than by whether the system learns.
▶ The 60-second explainer (script)
What is machine learning in AI? It's the branch where the system writes its own rules. Normal software is instructions a human typed. That works great when you can state the rules — payroll, tax brackets, a thermostat. It falls apart when you can't. Try writing the rules for 'is this photo a cat.' You recognize a cat instantly and you cannot explain how. Fur? Bald cats exist. Four legs? So do tables. Every rule has exceptions, and the exceptions have exceptions. That gap — things humans do easily but can't describe — is the entire reason machine learning exists. So it flips the arrangement around. Classical programming takes rules plus data and gives you answers. Machine learning takes data plus answers and gives you the rules. Show it fifty thousand photos already labeled cat or not-cat, and it searches for a rule that fits. What comes back is called a model, and it can judge photos nobody ever labeled. You never defined a cat. You outsourced it to examples. There are three flavors: supervised, with labeled answers. Unsupervised, finding structure with no answers at all. And reinforcement, learning from reward and penalty. Chatbots use a blend. But here's the trade, and it's permanent. You gain abilities nobody could hand-code, and you lose the ability to read the rules. They're real — they're just smeared across billions of numbers. You asked the machine to find rules you couldn't put into words. It can't put them into words either.
What authoritative sources say
People also ask
What's the difference between machine learning and AI?
AI is the goal — machines producing predictions, recommendations, or decisions. Machine learning is one method for reaching it. All machine learning is AI; not all AI is machine learning, since rule-based systems qualify too.
What are the three types of machine learning?
Supervised learning uses labeled examples. Unsupervised learning finds structure with no labels. Reinforcement learning learns from rewards and penalties. Modern language models mix self-supervised pretraining with reinforcement learning from human feedback.
Is machine learning just statistics?
It's built on statistics but aimed differently. Statistics usually tries to explain a relationship; machine learning mostly tries to predict well on new data, and will happily accept a model nobody can interpret if it predicts better.
Why can't anyone explain what a model learned?
Because the rules aren't written anywhere — they're distributed across billions of numeric weights. That's the direct cost of asking a machine to find rules humans couldn't state, and it's why explainability is a named requirement in NIST's framework.
Does machine learning need huge amounts of data?
Usually yes, and vastly more than a person does. A child learns 'dog' from a few dozen examples; a model may need hundreds of thousands, because it's fitting a pattern rather than forming a concept.