What We Mean by a Pattern
Spotting patterns is the heart of everything AI does. What a pattern really is, in plain words.
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. Last time we saw that a hand-written recipe works for tidy jobs but falls apart for messy ones, like recognizing a face. To get further, a machine has to notice things for itself. That begins with one simple idea: a pattern.
A pattern is something that repeats or holds together in a way you can notice and expect. Once you can spot a pattern, you can guess what is coming, or sort a new thing into the right pile. Nearly everything a thinking machine does rests on this one skill.
Knowing without a rulebook
Think about the sound of a friend walking down the hallway toward your door. You do not see them. Nobody told you the exact recipe for their footsteps. But you have heard those steps so many times that your brain picked up on something. Maybe it is the rhythm, the weight, the little pause before the last step. Whatever it is, you just know. Your brain found a pattern.
Or imagine you step outside and the air smells a certain way. It is heavy and cool and smells faintly of wet dust. You look up at a clear sky and still think, "It is going to rain." Nobody handed you a weather chart. You have just lived through enough afternoons where that smell showed up and then rain came tumbling down. Your brain connected the two things, all on its own. That connection is a pattern.
We swim in patterns all day long without ever naming them. The way a cat curls up when it is sleepy. The shape of letters on a page, so that a scribble you have never seen before still reads as the letter A. The tune of a song that gets stuck in your head. These are all patterns, and we soak them up just by being in the world.
The dog you have never met
Here is a small wonder. You were never taught a strict rule for what a dog looks like. Nobody gave you a list that says "four legs, fur, a tail, a wet nose, two floppy ears." And yet you know a dog the instant you see one. Even a breed you have never met in your life. A tiny fluffy one with ears that stand straight up. A giant shaggy one that looks more like a rug. Something about them all still says "dog" to you.
How did that happen? You saw many different dogs while you were growing up. You saw pictures in books, you met a neighbor’s pup, you watched cartoons. Each time, you heard someone say the word "dog." Your brain, quietly and without anyone telling it to, began to stitch together the things these creatures share. Not a rigid checklist. More like a gathering of family resemblances. A way of being in the world that all dogs seem to have. That gathering is a pattern living in your head, built from nothing more than seeing many examples.
And you can use it. When you meet a completely new animal, your brain places it somewhere. It is closer to the dog pattern than the cat pattern, so you know what to call it. It is far from the fish pattern, so you do not expect it to swim. This sorting is so fast and so natural that you do not even notice you are doing it.
A guess about what comes next
A pattern does more than help you sort things into piles. It lets you peer ahead. When you hear the first few notes of a familiar song, you hum the next note before it even plays. When you see dark clouds pile up, you grab an umbrella. The pattern holds a tiny piece of the future inside it, because the future tends to follow the same shape as the past.
Think of a well worn path across a field of grass. The path is not a rule. Nobody put up a sign that says "walk here." But enough people walked the same route that the grass bent down and a bare strip of earth appeared. When you arrive at that field for the first time, you look down and you instantly know where to put your feet. The path is a pattern left behind by everyone who came before. Following it is simply the natural thing to do, and it usually leads somewhere good.
This is exactly what we want a machine to learn. We want it to look at enough examples that it starts to feel the shape of the path, even when the path is hidden in a jumble of words or pictures or sounds.
Patterns are the beating heart
Everything we will build together from now on begins with this. A thinking machine is a pattern finder. It does not understand the world the way you do. It has no childhood, no smell of rain, no friend walking down the hall. But we can show it a huge pile of examples and let it do the same quiet work your brain did with all those dogs. It will begin to notice what repeats. It will begin to sort. It will begin to guess what comes next. A spam filter is a simple example: shown enough junk mail, it notices that certain phrases keep turning up there, and it starts sorting new mail by them.
People who build these machines use the word "pattern" constantly, because it really is the center of the whole thing. You will hear it everywhere from here on out. Now when you hear it, you will know it is not a fancy technical idea. It is the same simple, familiar thing you have done since you were small.
When the pattern is the wrong one
A machine only knows what is in its examples, and that can trip it up. Suppose every wolf photo it learned from had snow in the background, and every husky photo did not. It may decide that snow means wolf, and call a husky standing in snow a wolf. The pattern was real in the examples, but it was the wrong pattern. Researchers once built a picture sorter with exactly this flaw, on purpose, to see whether people would notice what it was really looking at, and wrote it up in a paper called Why Should I Trust You?. That is why the choice of examples matters as much as the machine.
Where this is heading
A pattern is something that repeats or holds together in a way you can notice and expect, enough that you can sort a new thing or guess what is coming. That is the idea we just settled into.
But to find patterns in things, a machine needs a way to place them. It needs a kind of map where similar things sit close together and different things sit far apart. That surprisingly simple idea is where we go next. It is a quiet trick underneath much of what follows.
Test yourself
A machine is learning to tell ripe bananas from unripe ones. In its examples, every ripe banana sits in a yellow bowl and every unripe one sits on a green plate. What pattern might it pick up, and how would you fix it?
Answer: It might learn that a yellow bowl means ripe, instead of looking at the banana itself. That pattern is real in its examples, but it is the wrong one. Show it an unripe green banana in a yellow bowl and it may call it ripe. To fix it, change the examples, not the machine: put ripe and unripe bananas in all kinds of bowls and on all kinds of plates, so the only thing that reliably goes with ripe is the banana's own color and spots. The machine can only find the patterns its examples hold.
Next: Turning Meaning Into Places. It shows how a machine gives each thing a place on a map of meaning, so that similar things sit close together.