What it is
Supervised learning is the most common way to train an AI model: you show it a large number of examples, and each example comes with the right answer attached. A photo with the tag "cat". An email marked "spam" or "not spam". A house with the price it sold for. An X-ray with a doctor's verdict. The model studies thousands or millions of these pairs, works out what connects the input to the answer, and then uses that to predict the answer for new inputs it has never seen.
The right answer attached to each example is called a label, and a collection of labelled examples is a labelled dataset. The word "supervised" comes from that label. It's as if a teacher stands over the model during training, marking each guess right or wrong. The teacher isn't a person watching live, though. The teacher is the pile of answers someone prepared in advance.
Here's how the learning works, without the maths. The model starts out guessing more or less at random. It looks at an example, makes a guess, and compares its guess with the label. If it was wrong, it adjusts its internal settings slightly so that next time it would be a little less wrong on that example. Then it does the same with the next example, and the next, millions of times. Gradually the adjustments add up to a model that gets most of the examples right. In a neural network, those internal settings are the connection strengths between its artificial neurons, and the adjusting is what training means.
Supervised learning comes in two main flavours, and it helps to know which one you're looking at:
- Classification means the answer is a category. Spam or not spam. Cat, dog or rabbit. Fraud or genuine. Which of 20 departments should handle this support ticket. The model picks from a fixed list of labels that people chose in advance.
- Regression means the answer is a number. Tomorrow's sales. The price a house will fetch. How many minutes a delivery will take. Despite the old-fashioned name, it just means predicting an amount rather than a category.
The key test for whether something is supervised learning is simple: did somebody provide the right answers for the training examples? If yes, it's supervised. That separates it from its two siblings on this table. In unsupervised learning, there are no answers at all; the model is handed raw data and finds groups and patterns on its own, such as sorting customers into clusters nobody named in advance. In reinforcement learning, there are no answers either, only rewards; the model tries actions, sees whether things went well or badly, and learns by trial and error, the way a game-playing program improves by playing millions of games.
A useful way to hold the three in your head: supervised learning is studying with an answer key, unsupervised learning is sorting a box of mixed buttons with no instructions, and reinforcement learning is learning to ride a bike by falling off.
One more piece of vocabulary matters, because it's where the honesty of supervised learning lives. Before training, people split the labelled data into two parts. The training set is what the model learns from. The test set is held back, kept hidden from the model, and used afterwards like an exam to see how well it copes with examples it hasn't seen. A model that scores brilliantly on its training set and poorly on its test set has memorised rather than learned, a problem called overfitting. The classic example is MNIST, a collection of handwritten digits put together in the 1990s by Yann LeCun, Corinna Cortes and Christopher Burges, with 60,000 labelled training images and 10,000 test images. Generations of students have trained their first model on it.
Why it matters
It's behind most of the AI you already use. When your phone sorts photos by who's in them, when your bank flags a strange card payment, when a translation app turns a menu into English, or when a shop predicts what you'll buy next, the model behind it was almost always trained on labelled examples. Supervised learning is the workhorse of machine learning. It's less glamorous than chatbots, and far more common.
It's also part of how chatbots are made. A modern chatbot starts with pretraining, where a model reads a vast amount of text and learns to predict the next word. That stage doesn't need human labels, because the next word in the text serves as the answer. But a raw pretrained model is not yet a helpful assistant. In March 2022, OpenAI published its InstructGPT paper, describing how it turned GPT-3 into a model that follows instructions. The first step was supervised: people wrote example conversations showing the ideal answer to a range of requests, and the model was trained on them. The researchers reported that people preferred the answers of the resulting 1.3 billion parameter model to those of the original 175 billion parameter GPT-3, a model more than 100 times larger. That supervised step is a form of fine-tuning, and it's followed by RLHF, where people rank answers rather than write them.
The labels decide what the model learns. This is the single most important idea in this article. A supervised model can only be as good as its answer key. If the labels are wrong, it learns the wrong answers. If the labels reflect a biased judgment, it learns the bias. If the labels were made by rushed, underpaid people working from vague instructions, the model inherits the vagueness. When people talk about a model "learning" something, what it has actually learned is to reproduce the judgments of whoever labelled its data.
It needs human work, and a lot of it. Labels don't appear by magic. Someone has to look at each photo, read each message, or check each scan and write down the answer. For medical models, that someone is often a highly paid specialist. For many other tasks, it's a large, mostly invisible workforce of data labellers around the world, often paid by the task. Every capable supervised model has a small army of people behind it, even when nobody mentions them.
It's the easiest kind of AI to check. Because you have correct answers, you can measure a supervised model directly: it got 94 out of 100 test cases right. That makes it far easier to evaluate than a chatbot writing a poem. It's one reason businesses trust supervised models for jobs like fraud detection, where you can count the frauds caught and missed.
Understanding it makes you a sharper user. Once you know that a model is a reflection of its labelled examples, you start asking better questions of any AI product. Who labelled the data? What did the examples look like? Were people like me in them? Does the test set look like the real world I'll use it in? Those four questions will tell you more about whether to trust a tool than any marketing page.
Real-world examples
Google's eye-scan model: brilliant in the lab, tested in the clinic
Diabetic retinopathy is damage to the back of the eye caused by diabetes, and it's a leading cause of blindness that can often be prevented if caught early. Catching it means photographing the retina and having a trained specialist grade the image, and in many countries there aren't enough specialists.
In December 2016, a team at Google led by Varun Gulshan and Lily Peng published a study in the medical journal JAMA showing that a supervised model could do the grading. The training data was 128,175 retinal photos, and the labels came from a panel of 54 US-licensed ophthalmologists (eye doctors) and senior ophthalmology residents, with each image graded between three and seven times so that one doctor's mistake wouldn't become the model's lesson. Tested on two separate sets of images it had never seen, 9,963 in one and 1,748 in the other, the model matched the specialists closely. At the setting chosen to miss as few cases as possible, it caught 97.5 percent of the eyes that needed referral in the larger test set while correctly clearing 93.4 percent of the healthy ones.
That's a textbook supervised learning success, and the care taken over the labels is a big part of why. But the story's second chapter is just as instructive. Google then worked with Thailand's Ministry of Public Health to try the system in real clinics, and in April 2020 a team led by Google researcher Emma Beede published what happened when nurses used it in 11 clinics in the provinces of Pathum Thani and Chiang Mai. The model had learned from good-quality photos, and real clinics produced a lot of poor ones, often because of dim lighting in the rooms. MIT Technology Review reported that the system rejected more than a fifth of the images as too poor to grade, and slow internet connections held up the uploads. Patients who had been promised a result in minutes, rather than the weeks a specialist's verdict had previously taken, were sometimes told to come back to another clinic.
The lesson isn't that the model was bad. It's that a supervised model knows only the kind of examples it was trained and tested on. When the real world sends it something different, its excellent test score no longer describes what will happen. The researchers' conclusion was that tools like this have to be studied in the places they'll actually be used, with the people who'll use them.
The workers who labelled the worst of the internet
On 18 January 2023, TIME published an investigation by reporter Billy Perrigo into how OpenAI made ChatGPT less toxic. The approach was pure supervised learning. As TIME put it, if you feed an AI labelled examples of violence, hate speech and sexual abuse, it can learn to detect those things in the wild, and that detector could be built into ChatGPT to filter what it said. Someone had to produce the labelled examples.
That job went to workers in Kenya employed by Sama, a San Francisco outsourcing company that marketed itself as an "ethical AI" firm. They spent their shifts reading passages of text, much of it describing graphic violence and abuse, and marking which categories each one fell into. TIME reported take-home pay of roughly $1.32 to $2 an hour, depending on seniority and performance. Workers who spoke to TIME described lasting distress from the material. Sama ended the contract in February 2022, eight months earlier than planned. OpenAI told TIME it took the mental health of its contractors seriously and understood that wellness programmes had been offered.
This story matters for anyone trying to understand supervised learning, not only for its ethics. It shows the hidden cost of the "answer key". The safety features in the chatbots you use were learned from examples that real people had to read and judge, one at a time. The same is true of content moderation, self-driving cars (someone outlines every pedestrian in millions of video frames), and voice assistants (someone transcribes recordings). Whenever a product claims its AI "learned" to do something, it's fair to ask whose labels it learned from, and under what conditions they were made.
When the answer key itself has mistakes
In 2021, researchers Curtis Northcutt, Anish Athalye and Jonas Mueller published a paper with a blunt title: "Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks". They went looking for wrong labels in the test sets of ten of the most widely used datasets in AI, covering images, text and audio, including MNIST and ImageNet. They used software to flag suspicious labels, then had people check each one.
They estimated that on average at least 3.3 percent of the test labels across the ten datasets were wrong, and at least 6 percent of the ImageNet validation set, the part used to score models. These were the exams the whole field used to rank models against each other, and some of the "correct" answers were not correct. The researchers found that once the labels were fixed, the rankings could change: in some cases a smaller, simpler model looked better than a bigger one that had seemed to win. Northcutt and colleagues put the errors online at labelerrors.com, and scrolling through them is an education. You'll see photos that are clearly one thing labelled as another, and product reviews that are obviously positive marked as negative.
The practical lesson: a supervised model's score is only as trustworthy as the labels it's scored against. If a small percentage of your answer key is wrong, a small improvement in score might mean nothing at all. The earlier MNIST story makes a related point. The creators noted that the digits in the US government data they started from had been written by Census Bureau employees for one part and by high-school students for another, and the employees' handwriting was much cleaner. Training on one group and testing on the other gave a misleading picture, so they mixed both groups into the training and test sets. Where your examples come from shapes what your score means.
An everyday case: the bookkeeper's receipt sorter
Imagine Maya, a freelance bookkeeper with thirty small-business clients. Every month she sorts hundreds of receipts and bank lines into expense categories: travel, software, meals, office supplies, and so on. Her accounting software offers to suggest the category for each new line. That suggestion feature is a supervised model, and the labelled examples are her own past choices.
For the first few weeks the suggestions are mediocre. Then she notices why. For one client she'd been putting coffee-shop receipts under "meals", and for another under "client entertainment", depending on context the software couldn't see. The model was learning from contradictory labels, so it guessed. Maya writes a one-paragraph rule for herself about which category coffee goes in, applies it consistently, and goes back to fix the old entries. A month later the suggestions are right most of the time, and the few mistakes are ones she'd have had to think about herself. She didn't change the software at all. She changed the labels.
Try it yourself
You don't need any special software to understand supervised learning from the inside. The most valuable skill is being able to create good labels, and this exercise shows why. It takes about an hour. You need a spreadsheet, a friend or colleague willing to spend fifteen minutes, and any AI chatbot.
- Pick a small sorting job from your own life. Good choices: sorting your emails into "needs reply", "read later" and "ignore"; sorting customer messages into "question", "complaint" and "praise"; or sorting your own photos into "keep" and "delete". Three labels or fewer is best for a first try.
- Write down what each label means. One or two sentences per label, before you start. "Complaint: the customer is unhappy with something we did or sold." Keep this; it's called a labelling guideline, and professional labelling teams live by them.
- Collect 40 real examples. Copy them into the first column of a spreadsheet, one per row. Remove anything private, such as names, addresses and account numbers.
- Label them yourself. Put your label in the second column. Go quickly, the way a paid labeller would.
- Ask someone else to label the same 40. Give them your guideline but not your answers, and have them fill in a third column.
- Count how often you agree. Add a fourth column that says "same" or "different". If you agree on 36 of 40, that's 90 percent. Most people are surprised by how often they disagree, even on a simple task. Every disagreement is a spot where a model would be learning from a muddled answer key.
- Fix the guideline. Look at every disagreement together. Usually a pattern appears: a message that's both a question and a complaint, say. Add a rule to the guideline that settles it ("If it contains any complaint, label it complaint"), then agree the final label for each row.
- Split into training and test. Keep 30 rows as your training set and hide the other 10. This is the exam.
- Teach a chatbot with your training set. Paste the 30 labelled examples and your guideline into a chatbot using the prompt below, then give it the 10 hidden examples. Compare its labels with yours and count the matches. Remove private details before pasting anything, and check the tool's current privacy terms, because some services may use what you type to improve their models depending on your settings.
- Break it on purpose. Start a new chat, and this time deliberately swap the labels on eight of your 30 training examples. Run the same 10 test examples. If the score drops, you've just watched bad labels make a worse model.
A prompt you can copy:
I'm going to teach you a sorting task using labelled examples.
Here is my guideline for each label:
[paste your guideline]
Here are 30 labelled examples, one per line, in the form
TEXT => LABEL:
[paste your 30 examples]
Now label each of the following 10 items using only the
guideline and the patterns in my examples. Reply with one
line per item: the item number, the label, and a reason of
no more than ten words.
[paste your 10 test items]
Strictly speaking, the chatbot isn't being trained here; it's following examples in its prompt, a technique called few-shot prompting. But the lesson carries over exactly: clear, consistent labels give better answers, and a hidden test set tells you the truth. If you want to see real training happen in the browser, Google's free Teachable Machine lets you label webcam images into classes and train a small model in minutes. Features and terms change, so check the current details on its site.
Common mistakes and misunderstandings
"Supervised" means a human watches the AI. It doesn't. The supervision is the labels, prepared before training. Once training starts, nobody is watching. A supervised model can still run with no human checking its output, which is a separate question covered under human in the loop.
Treating labels as facts. A label is a human judgment, written down. Sometimes it's objective (this receipt was for a train ticket). Often it's an opinion (is this comment offensive, is this résumé strong, is this X-ray worrying). The model learns the opinion and then presents it with the confidence of a machine. That's how bias gets baked in without anyone intending it.
Assuming more data always helps. More examples help only if they're good examples. Ten thousand carelessly labelled photos can teach less than two thousand carefully labelled ones, and a huge dataset that leaves out a group of people or a type of situation will still fail on them. Quality and coverage come first; quantity helps after that.
Testing on the training data. If you check a model using the same examples it learned from, it will look far better than it is, like a student who has seen the exam paper. The test set must be kept separate and never used for training. The same goes for near-duplicates: if the same customer's messages appear in both sets, the test is quietly easier than real life.
Believing the test score will hold in the real world. The eye-scan example shows this clearly. A score describes how the model does on examples like its test set. If real inputs are darker, blurrier, newer, from a different country, or written by different people, performance can drop. Always check the model on examples from the setting where it will actually be used.
Forgetting that the world moves. A fraud model trained on last year's scams won't recognise this year's. A spam filter needs a steady supply of fresh labels. Supervised models don't update themselves; they need new labelled data and retraining to keep up.
Thinking you need millions of examples to start. Big models trained from scratch do. But much everyday supervised learning builds on a model that has already learned general patterns, then trains it briefly on a few hundred of your own labelled examples. That's transfer learning, and it's why small businesses can build useful classifiers without a research lab.
Confusing supervised learning with the whole of AI. It's one of three main approaches. Chatbots, for example, use all three: learning from raw text without labels, supervised fine-tuning on written examples, and reinforcement learning from human ratings. Knowing which stage you're talking about avoids a lot of confusion.
Ignoring who made the labels. Labelling is skilled, sometimes distressing work, and it's often done out of sight by people paid very little. The quality of that work, and the conditions it's done in, are part of how a model is made. It's a fair question to ask of any AI company.
Related elements
- Machine Learning: the wider field, where supervised learning is the most common approach.
- Unsupervised Learning: learning from data with no answers attached, by finding groups and patterns.
- Reinforcement Learning: learning from rewards and trial and error instead of an answer key.
- Datasets: the collections of examples, labelled or not, that every model learns from.
- Neural Network: the kind of model most often trained with labelled examples today.
- Deep Learning: large neural networks whose success depended on big labelled datasets.
- Fine-tuning: further supervised training on a smaller set of examples to adapt a model to a job.
- RLHF: the step after supervised fine-tuning in making a chatbot, where people rank answers instead of writing them.
- Transfer Learning: reusing what a trained model already knows so you need far fewer labels.
- Bias: what a model inherits when its labels or examples are skewed.
- Benchmarks: the public test sets used to score models, whose own labels can be wrong.
- Synthetic Data: computer-generated examples, sometimes used when real labelled data is scarce.