Filter / Kernel
A small value tile that carries what to look for
- A filter is the small value tile that scans across a photo. It's also called a kernel.
- Every square on the tile carries a number, and that arrangement of numbers decides what it looks for.
- The numbers on the tile aren't written by a person — they're values that fall into place through training.
- One layer doesn't hold just one tile — it holds dozens to hundreds, each hunting for a different pattern at once.
- A tile is usually tiny — three squares by three squares is the most common — and instead it gets reused across many layers.
Contents
1The analogy
Picture a stencil ruler from a stationery store — a thin strip with a circle, a triangle, and a long slot cut clean through it. Whatever shape is cut into that strip is exactly what the stencil can trace. A shape that isn't cut through, the stencil can do nothing with. The strip itself is a kind of declaration: "this is the shape I handle."
Now lay that stencil over a drawing. Lay down the one with the tall, narrow slot, and wherever a column stands in the drawing, the slot fills right up. Swap in the one with the wide, flat slot, and wherever a shelf sits, that slot fills up instead. The drawing never changes, but swap the stencil and a completely different set of spots lights up. Line up a whole set of stencils and try each one, and a single drawing reveals several different textures at once.
2In detail
Where the cutouts sit, there are really numbers
What look like open and blocked squares on a stencil are really numbers underneath. A spot that should be bright carries a large positive number; a spot that should be dark carries a negative one; a spot where it doesn't matter either way carries something close to zero.
Lay the tile over a photo, and overlapping squares get multiplied together and summed. When a bright point lands on the tile's positive squares and a dark point lands on its negative squares, the sum comes out large. Flip that arrangement and you get a large negative number; land on a pattern the tile has nothing to do with and the sum lands near zero. So the arrangement of numbers written on the tile is exactly "what it looks for."
It matters that the same tile gets reused across every corner of the photo. The tile hunting for a vertical line in the top left and the one hunting for a vertical line in the bottom right are the same tile, so remembering just the nine numbers on one tile is enough to handle a photo of any size.
Nobody decides what to look for by hand
The numbers on a tile start out meaningless. Watching a huge pile of labeled photos, and nudging the numbers a little every time the answer is wrong, gets repeated over and over until the tile settles into a genuinely useful shape on its own.
What's interesting is that, without anyone directing it, the tiles in the first layer almost always settle into shapes that hunt for lines, smudges, and color boundaries. That's simply because those turn out to be the most useful fine patterns in photo data. Go deeper and what a tile is looking for gets harder to put into words — something like "a pattern with two vertical stripes over a circle" — hard to pin a name on.
That's why reading meaning off a trained tile isn't easy. Early layers are recognizable by eye, but later layers often stay a mystery even when drawn out as a picture.
A layer holds more than one tile
If a layer had only one tile, it could only find one thing. So in practice a layer holds dozens to hundreds of tiles, each scanning separately. Sixty-four tiles produce sixty-four result pictures.
The next layer takes in that whole stack at once. So the next layer's tile isn't a flat sheet — it's a block as thick as the number of pictures the previous layer produced: still three squares wide and tall, but sixty-four layers deep. The very first layer, working on a color photo, is the same way — three layers deep, for red, green, and blue.
Small tiles get reused many times over
A bigger tile can take in a wider range at once. But make it bigger and the numbers to store climb fast — a three-square tile needs nine numbers, a seven-square tile needs forty-nine.
That's why a small tile scanned several times is the more common choice. Scan twice with a three-square tile and you end up covering a five-square range, needing only eighteen numbers. It's why today's deep architectures stick with small tiles.
3More precisely
A filter is the learnable weight bundle held by a convolution layer. One tile is a block of values with width, height, and depth, paired with one reference value. The number of filters in a layer decides how many result pictures that layer produces, and the filter count together with the tile size decides the layer's parameter count. Deeper layers tend to hold more filters even as the picture they scan keeps shrinking, so the parameter count of a network is rarely spread evenly across its layers.
The stencil analogy breaks down in one place. A stencil's cutout shape is plainly visible to the eye, but the numbers on a filter don't carry meaning that's easy for a person to read — especially in later layers, where a tile operates on the results the previous layer already produced, so what shape in the original photo it responds to isn't obvious at a glance.
And a stencil, once stamped out, keeps its cutout forever, but a filter keeps changing bit by bit while training runs; only once training finishes do the values lock in place. Taking a tile already trained elsewhere and only teaching the later layers something new is also a widely used trick.
4Try it yourself
5Common misconceptions
It's easy to think a filter is the same as a photo-editing app filter, but actually it's not a cosmetic effect at all — it's a value tile that scores patterns.
It's easy to assume a person writes the shape to look for into the filter, but actually the values settle into place on their own during training, and a person only decides the tile's size and how many there are.
It's easy to think a bigger filter finds things better, but actually stacking small tiles across several layers often costs fewer values and gives better results.
7One-line summary
In shortA filter is a small value tile with a number written in every square, where that arrangement of numbers decides what it looks for, and the values themselves are set through training.
Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02