Learning From Examples
Guess, get corrected, repeat across a mountain of examples. How training actually works.
A quick note on how we teach here. You won't find equations or numbers in this series, and that is on purpose. The goal is understanding, not arithmetic, so every idea is explained in plain words and simple pictures. When you want the math later, the rest of Internals Decoded is ready for you.
Welcome back. By now you have a picture of how a machine can follow a pattern, how it can place meaning into a kind of coordinate space, and how it can guess what comes next based on how likely things are. You also saw that there are two broad ways to make a machine smart. One way is to write down rules for it. The other way is to let it figure out the rules by looking at examples. This piece is about that second way. It is about how a machine actually learns from a pile of examples.
The single idea is simple. A machine looks at an example, makes a guess, and is told the right answer. It uses that correction to adjust itself ever so slightly. Then it does it again, with a different example. After doing this across an enormous collection of examples, many times over, it becomes good at the kind of guess we want.
Flashcards for a machine
Imagine a stack of paper flashcards. You hold one up, see the front, and say your answer out loud. Then you flip it over to check. If you got it wrong, the correct answer sinks in a little. You might not remember it perfectly the next time, but the nudge is there. You work through the whole stack. Then you shuffle and do it again. The cards that you keep getting wrong show up more often, and slowly, the right answers start to feel automatic. Something that felt hard becomes natural after you have seen it enough times.
A machine can learn the same way. Instead of a paper card, you show it a picture. Or a little snippet of writing. The machine makes a guess. Maybe it guesses "dog" when it sees a photo of a furry animal. But the true answer, the one written on the back of the card, is "cat". The machine is told that the right answer was "cat". It does not feel embarrassed or surprised. It simply uses that information to make a tiny adjustment inside itself.
The guess and the nudge
The machine is not thinking the way you do. It does not picture a fluffy tail or hear a purr. It has a set of internal settings, little knobs and dials that connect what it sees to the answer it gives. When you show it a picture, the picture gets turned into a pattern of switches. That pattern flows through the machine's settings and out pops a guess. The guess might be a set of likelihoods. It might say "dog" with a lot of confidence and "cat" with very little.
When the machine is told the true answer was "cat", it does something clever. It works backward through its own settings and nudges each one just a little. It makes the ones that pointed toward "cat" a tiny bit stronger, and the ones that pointed toward "dog" a tiny bit weaker. The next time it sees a picture that looks even a little bit like that one, it is slightly more likely to say "cat". The nudge is tiny. One single card does not change the machine much. But the machine is very patient. It will see many cards.
A mountain of examples
The real power comes from doing this over and over, with a huge collection of different examples. The machine sees a picture of a sleeping cat, guesses wrong, and nudges. Then it sees a picture of a cat sitting on a windowsill, guesses wrong again, and nudges again. After a while it sees a picture of a dog and guesses right. It still nudges a little, to strengthen the pathway that was correct. Each example leaves a tiny fingerprint on the machine's settings.
The pile of examples is enormous. It is far more than you could ever look through yourself. It contains countless pictures, or countless sentences, or countless little bits of sound. The machine might go through the whole pile many times, each time getting a little better. The mistakes become less frequent. The guesses become sharper. It is like studying a set of flashcards so many times that you can answer in your sleep, only the machine's stack is astronomically larger. The machine does not get tired. It just keeps going, card after card, learning from every single one.
This same process works whether the machine is learning to tell a cat from a dog, or learning to guess the next word in a sentence. If you show it half a sentence and ask it to finish it, the machine guesses a word. You show it the real next word from a book. It nudges itself to make that real word a little more likely the next time it sees a similar beginning. Over an enormous collection of sentences, it slowly absorbs the patterns of how words follow each other. That is the foundation of the language machines you have heard about.
The names we give this
When you hear people talk about how an AI was made, you will often hear them say something like "it was trained on" a certain kind of data. That is exactly this. The whole process of showing examples, guessing, getting corrected, and adjusting is called training. The big collection of examples is called the dataset, or the training data. Every picture, every sentence, every sound clip in that collection is a little flashcard the machine learned from.
So when news about AI mentions what a model was trained on, it just means the stack of flashcards it practiced with. The training data shapes what the machine becomes good at. If the training data is full of pictures of cats and dogs, the machine gets good at telling them apart. If the training data is a huge collection of sentences from books and websites, the machine gets good at guessing the next word in a sentence. Training is how they learn.
Where this is heading
We just walked through the whole cycle: guess, correction, nudge, repeat. But we saved the most important moment for last. What exactly happens when the machine gets one wrong? How does it know which little knobs to turn, and by how much? Being wrong is not just a mistake to correct. It is the engine that makes all learning possible. In the next piece we will look at that moment closely. We will see how a wrong answer creates a ripple that flows backward through the machine and teaches it to be right the next time.