Skip to content

Convolutional Neural Network

A neural network that slides small learned filters across an image, so a pattern learned in one place is recognized anywhere. The backbone of computer vision for a decade.

Also CNN · ConvNet · convolution

Fig. / How it works
IMAGEFEATURE MAPA 3×3 FILTER SLIDES OVER THE IMAGE
Role · kind
Models and algorithmsFamily
Level
Intermediate

LeCun et al., 1989 (LeNet-5, 1998)

You scan a big picture with a small magnifying glass that is trained to light up when it sees, say, an edge. Many magnifying glasses look for many patterns, and later layers combine edges into eyes, wheels and faces.

Where it fits

Not shown: 7 more that build on it. See the full list below.

+All relationships as a list

See it on the full map

How it works

A photo has millions of pixels. Connecting every pixel to every neuron, as a multilayer perceptron would, wastes parameters and ignores the obvious: nearby pixels belong together, and a cat is a cat wherever it appears.

A convolution fixes both. A small grid of weights (a filter or kernel, often 3×3) slides across the image. At each position it multiplies the pixels under it by its weights and sums them. The result is a feature map that lights up wherever the filter’s pattern appears. One filter, used everywhere, learns one pattern.

A CNN stacks such layers:

  1. Convolution layers with many filters, each followed by an activation function.
  2. Pooling layers that shrink the feature maps, keeping the strongest responses, so later layers see a wider area.
  3. At the end, a small classifier that turns the final features into a prediction.

Early layers learn edges and color blobs, middle layers learn textures and parts, deep layers respond to whole objects. Nobody programs those filters; they are learned with backpropagation.

CNNs read handwritten zip codes in the 1990s and took over computer vision in 2012 with AlexNet.

Everyday use cases

  • Case 01

    Face recognition in your photo library

    CNNs find and group faces so you can search for a person.

  • Case 02

    Medical imaging

    Spotting tumors in scans or diabetic retinopathy in eye photos.

  • Case 03

    Driver assistance

    Detecting lanes, pedestrians and traffic signs from car cameras.

Famous examples

Strengths, weaknesses and when to use it

Strengths

  • Very parameter-efficient for images thanks to weight sharing.
  • Builds a natural hierarchy from edges to textures to objects.

Weaknesses

  • Sees mostly local context; long-range relationships need many layers.
  • Increasingly matched or beaten by Vision Transformers at large scale.

When to use itFor images and other grid-like data, especially with modest data and compute budgets.

Compare with

Check yourself

  1. Q01

    Why does a CNN need far fewer parameters than a fully connected network on images?

    Show answer

    A: The same small filter is reused at every position (weight sharing)

  2. Q02

    What do the early layers of an image CNN typically detect?

    Show answer

    B: Simple edges and color blobs

Go deeper

Next topics