CNNConvolutional Neural Network
A neural network built to spot patterns in a photo, layer by layer
- CNN (Convolutional Neural Network) is a neural network architecture built for photos. It never judges the whole picture in one go.
- A scanning stage that sweeps a small tile across the photo hunting for patterns alternates with a shrinking stage that condenses the results.
- Early stages pick up fine patterns like lines and edges; later stages recognize bigger parts like wheels and window frames.
- The same tile is reused everywhere in the photo, so an object is recognized no matter where on screen it sits.
- The same structure handles more than photos — sound turned into a picture, and short video clips, too.
Contents
1The analogy
Hand a sack of rice to a rice cake mill, and no single machine turns it into rice cakes on its own. A grinder, a steamer, an extruder, and a slicer stand in a row, and each one works only on what the machine before it produced. Nobody looks at the sack and guesses the finished shape, but stage by stage the rice becomes flour, then dough, then a long stick, then a finished rice cake.
A CNN is the same kind of line. Instead of looking at a photo once and blurting out a name, it passes through several rounds of a stage that hunts for fine patterns and a stage that condenses the results. Each stage only works with what the one before it handed over, and the label only appears at the very end. Pull one machine out of the mill and no rice cake comes out; pull one layer out of a CNN and it's hard to say what that layer was even doing.
2In detail
Early stages look for fine patterns first
The stage that first receives the photo does something surprisingly simple. It lays a very small tile over the photo and checks, right there, whether brightness suddenly breaks or a line leans at an angle. Because the tile is small, the area it inspects at once is about the size of a fingernail. At this stage there's no car and no dog yet — just short lines and smudges.
These fine patterns become the raw material for the next stage. Rather than the original photo, the second stage looks at the layout of fine patterns the first stage found, grouping two short lines that meet at a right angle into a corner, and a short line that curves around into an edge. A third stage groups those corners and edges again into parts like a wheel, a window frame, a handle.
Climb the stages and the area a single tile actually covers on the original photo grows right along with it. Early on it takes in a fingernail-sized spot; later it takes in roughly half the photo at once. Only once the parts have all come together is a judgment like "this is a car" even possible.
The same tile is used everywhere in the photo
This is exactly why CNNs fit photos so well. The tile hunting for a vertical line in the top left and the tile hunting for a vertical line in the bottom right are the same tile. There's no separate tile kept for each spot.
That brings two gains. First, an object gets caught by the same pattern whether it sits on the left of the screen or the right — this is where the ability to recognize a slightly shifted photo comes from. Second, the amount to remember drops sharply. Keeping a separate tile for every spot in a photo would balloon out of control; reusing one tile over and over avoids that entirely.
Scanning and shrinking alternate
Scanning alone never shrinks the picture that needs handling. So after a scan, the results get condensed once. Grouping neighboring spots down to one representative value shrinks the picture to half its size, and the stage that follows can take in a wider range at a glance.
Scan, shrink, scan, shrink. Repeating this two-beat rhythm anywhere from a few times to dozens of times is the backbone of a CNN. With each repeat the picture gets smaller while the meaning packed into it gets thicker. What starts out wide, tall, and thin ends up as a small, dense bundle of values.
A label comes out at the very end
By the last stage, what's left is a short bundle of values recording roughly "how much of each part showed up in this photo." Position information has nearly vanished here — only character remains. This bundle gets compared against a list of labels, each name on the list gets a score, and the highest one is handed back as the answer.
The same backbone gets put to other jobs just by swapping the ending. Have the end produce the position and size of a box instead of a score, and it becomes finding objects and boxing them. Have it produce a label for every single spot, and it becomes cutting things out pixel by pixel. Keeping the pattern-extracting front end untouched and swapping only the tail is a common trick.
3More precisely
A CNN is a neural network made of convolution layers, pooling layers, and a fully connected layer at the end. A convolution layer slides a small value tile across the photo, multiplying and adding up the values at every overlapping spot, then laying the results out in place to build a new picture. The numbers written on the tile aren't set by a person — they're set through training.
The mill analogy breaks down in one important place. A mill's machines do a fixed job in an order a person laid out ahead of time, but each stage of a CNN starts out as a blank slate about what to look for. Watching enough labeled photos and nudging the tile's values a little with every mistake produces a division of labor on its own — early stages end up handling fine patterns, later stages end up handling parts — without anyone ever telling stage one to look for vertical lines.
One more thing: architectures that cut a photo into pieces and compare them against each other have become widely used too. CNNs aren't the only answer for handling photos anymore, but they're still the most common backbone for anything that has to run small — on a device or in a browser.
4Try it yourself
5Common misconceptions
It's easy to think a CNN takes in the whole photo at a glance the way a person does, but actually it scans starting from fingernail-sized spots and works its way up to wider views bit by bit.
It's easy to assume deeper is always better, but actually with too little data a deep structure tends to just memorize the training photos and stumble on anything new.
It's easy to think CNNs are only for photos, but actually they work on anything where neighboring spots are related — sound turned into a picture, short video clips, and more.
7One-line summary
In shortA CNN stacks a stage that scans with small tiles to find patterns and a stage that condenses the results, climbing from fine patterns to parts to a label in a structure built for photos.
Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02