Why does AI need good data
In the last lesson we saw that a model must catch patterns rather than memorize its training data. But what if the data itself is junk? Even the same model gives completely different results depending on what data it learns from. In fact, the secret to building good AI is often better data rather than a smarter model. In cooking terms, the ingredients come before the skill.
Garbage in, garbage out
A machine learns only from the examples we give it, so if the examples are wrong, it learns the mistakes right along with everything else. Label a cat photo as a dog, and the machine will end up answering that cats are dogs.
Give it only examples that lean to one side, and it believes the world leans that way. In short: garbage in, garbage out. From data that even a person can see is junk, however good the model, it learns only junk.
Add wrong examples one at a time. As the examples with swapped labels pile up, the machine's judgment clouds and its accuracy drops.
As wrong examples piled up, the machine's answers fell apart. A machine does not know on its own what is right; it simply trusts the data we give it. So data with wrong labels or a lopsided mix turns straight into bad habits.
Put the other way around, just fixing the data can make the same model much better.
Good ingredients make for proper learning
So what makes good ingredients? First, the labels must be accurate: a cat is a cat, and a dog is a dog. Second, the data must not lean to one side. Give heaps of cat photos and only a few dog photos, and the machine will hardly ever recognize a dog.
Third, the data should resemble the situations where the model will actually be used. A model trained only on bright daytime photos gets lost in front of dark night photos. Blurry or oddly mixed-up data is best left out.
Tap the button to swap the junk ingredients for clean, balanced ones. As soon as the ingredients improve, the machine's accuracy goes up.
Accuracy jumped without anyone touching the model. Only the ingredients changed: with the labels fixed and both sides filled evenly, the same model learned properly.
That is why, in practice, people spend a great deal of time examining and cleaning the data before tweaking the model. If the data is biased, the model makes biased judgments too, a problem we will come back to when we look at AI ethics later.
Choosing features that fit the problem
Even with clean data, one more thing remains to decide: what the model should look at to make its judgment. The values chosen as clues for the judgment are called features. Think about predicting house prices.
A house's floor area, location, and number of rooms are closely tied to its price. A large house in a neighborhood with good transport costs more. But what about the color of the front door, or the day of the week it was built? These have almost nothing to do with price. Irrelevant features like these actually cloud the judgment.
Choose the features to use for predicting house prices. Related features such as area and location raise the accuracy, while irrelevant ones such as door color lower it.
Every time a fitting feature was chosen, accuracy rose, and adding an irrelevant one made it fall. More features are not automatically better: with many irrelevant features, a model easily memorizes even the chance patterns in them and overfits.
You need to pick the clues that are truly related to the problem. Choosing and refining features like this is called feature engineering, and for a long time it was the most labor-intensive part of machine learning.
Good data: the more, the better
Once the ingredients are clean and the features fit, quantity becomes important. With only a few examples, the machine is easily swayed by one or two unusual cases that happened to slip in.
With many examples, such flukes are drowned out and weakened, and the real patterns that appear often stand out clearly. That is why clean data is more reliable the more of it there is.
Tap gather more data. The more examples there are, the more the chance wobbles settle, the steadier the boundary becomes, and the higher the accuracy.
The more data there was, the steadier the boundary and the higher the accuracy. With few points, a single point could throw it off; with many, the wobbling died down.
Of course, adding more is not the whole answer. However much garbage you collect, it is still garbage. Only when the data is clean and unbiased does "the more, the better" hold true. Quality comes first, and quantity second.
Summary
To sum up: a machine learns only as well as the data we give it. Put junk in and junk comes out; give it clean, balanced ingredients and it learns properly. You need to choose features that fit the problem, since irrelevant clues only get in the way.
Good data is more reliable the more of it there is, but quality comes first. Good ingredients make good AI.
Tap the key points in order to review. (garbage in, garbage out → clean ingredients learn properly → choose fitting features → good data, the more the better)
Now you know why data matters so much. People often picture a smarter model, but in practice it is often the ingredients that decide the outcome.
Some data, though, such as photos, makes it hard for a person to decide which features to pick. Among millions of pixels, which ones are the clues that say "cat"? The next lesson, on CNNs, covers how a neural network finds features on its own.