#065Questo video e il suo testo sono in inglese.
Data augmentation: turning one example into many lessons for AI
Too few examples make an AI memorize instead of learn. See how data augmentation makes new examples from old ones, and the one rule that keeps it honest.
Nel dettaglio
What data augmentation is
Data augmentation means creating extra training examples from the ones you already have. Training examples are the samples an AI studies to learn a task, such as photos labelled with what they show. Instead of going out to collect more, you take each photo and make slightly changed copies of it: flipped, cropped, tilted. To the AI, every copy is a new example with the same correct answer.
What the video shows
The video tackles a familiar problem: when an AI has only a few examples, it tends to memorize them instead of learning what they have in common. Its answer is to turn one photo into many lessons, by making new versions of it that are flipped, cropped or tilted. The picture changes; the answer does not. With all those variations to study, the AI can no longer get by on remembering exact pictures. It has to learn the idea.
An everyday example
Imagine studying for a driving theory test with a booklet of 20 questions that always come in the same order. After a few rounds you pass it every time, but what you have really learned is "B, then C, then A". Now shuffle the questions, reword them a little and swap the pictures. The shortcut stops working, and the only way to keep passing is to understand the rules of the road.
Data augmentation does the same thing to an AI. It varies the surface of each example so that the only thing left worth learning is what actually matters.
How to use it well
The trick is to use changes that leave the right answer untouched:
- Flipping a photo of a dog left to right still shows a dog.
- Cropping it a little, as if the camera were closer, still shows a dog.
- Tilting it slightly, as if the camera were held at an angle, still shows a dog.
That points to the one rule you must respect: a change is only useful if it would not change the answer. Imagine a model that reads handwritten digits. Turn a 6 upside down and it looks like a 9, so that "new example" would teach the model something false. A safe guide is to copy the kind of variation the model will meet in real life.
Why it matters
Memorizing is the classic way an AI fails: it gets its practice examples right and stumbles on anything new. This failure is called overfitting. Most of the usual fixes work by holding the model back, for example by keeping its internal numbers small, switching random parts of it off during training, or stopping training early.
Data augmentation takes a different route. The course makes the point that overfitting comes from having too little data just as much as from having a model with too much room to memorize. Augmentation goes after that first cause directly, by giving the model more varied material to learn from. It also saves work: instead of collecting and labelling new data, you reuse what you already have.
Learn it step by step in Chapter 6 of our free course AI From Scratch: Getting It to Train, and Getting It to Generalise.
Anche su
Altri da questo capitolo
#065
#066Weight initialization: the starting numbers that decide if AI learns
#067Batch normalization: the AI layer that grades on a curve
#068Layer normalization: why chatbots steady each input on its own
#069Ablation: change one thing at a time to find what really works
#070Loss curves: what the shape of a training line tells you
Testo scritto con assistenza AI dal capitolo 6 del nostro corso gratuito.