Concept · Chapter 5: Vision, Speech & Reinforcement Learning
Convolutional Neural Networks
A CNN stacks convolution, nonlinearity and pooling layers so that early layers detect edges and later layers combine them into parts and objects.
The problem
One layer of filters only sees small patches; recognising an object needs patterns built from patterns across a large region.
The solution
Stack many convolutional layers with nonlinear activations and occasional downsampling, then finish with a classifier, and train all filters by backpropagation.
The consequence
With enough labelled data and compute, CNNs learned visual features that beat hand-designed pipelines, beginning with ImageNet in 2012.
You should understand first
- Vectors
- Tensors and Shapes
- Images as Tensors
- Dot Product
- Convolution
- The Turing Test
- Symbolic AI
- Logic and Rules
- Expert Systems
- Knowledge Representation
- The Knowledge-Acquisition Bottleneck
- From Rules to Learning
- Supervised, Unsupervised and Self-Supervised Learning
- Features, Labels and Tasks
- Loss Functions
- Derivatives and Gradients
- Gradient Descent
- Linear Regression
- Probability and Distributions
- Entropy
- Softmax
- Cross-Entropy Loss
- Logistic Regression
- The Perceptron
- Activation Functions
- The Artificial Neuron
- Matrix Multiplication
- Multilayer Perceptron (MLP)
- The Chain Rule
- The Forward Pass
- Computational Graphs and Autodiff
- Backpropagation
- Convolutional Neural Networks
Intuition: patterns of patterns
One convolutional layer answers local questions: is there a vertical edge here? A curve? A patch of red? The next layer convolves over those answers, not over raw pixels, so it can ask: are there two edges meeting at a corner? A third layer can look for arrangements of corners. Each layer sees a wider region of the original image than the last.
The standard recipe
Convolve
A layer applies F filters, producing F feature maps (channels). Each filter spans all channels of its input.Nonlinearity
Apply ReLU. Without it, stacked convolutions collapse into one big linear filter (the same argument as for MLPs).Downsample
Every few layers, pool or use a stride of 2 to halve the height and width, usually while increasing the number of channels.Classify
Flatten or average the final feature maps and pass them through a small fully connected head with softmax.
Receptive field: tiny numeric example
A 3×3 filter sees a 3×3 patch. Stack a second 3×3 layer: each of its outputs combines a 3×3 block of first-layer outputs, each of which saw 3×3 pixels, so it sees 5×5 pixels. A third layer sees 7×7. In general, stacked 3×3 layers with stride 1 see pixels, and every downsampling step makes later growth faster. Two 3×3 layers use weights per channel pair versus 25 for one 5×5 layer, with an extra nonlinearity in between: the design logic behind the VGG networks of 2014.
Training
Nothing new is needed: the loss is cross-entropy, the gradients come from backpropagation, and each filter weight's gradient is summed over every position where it was used. LeCun and colleagues trained such a network end to end on handwritten zip codes in 1989 Established, and descendants read cheques in deployed systems by the late 1990s.
Visualisations of trained CNNs show early filters resembling oriented edges and colour blobs, and deeper units responding to textures and object parts Established. Calling this a hierarchy of concepts is a useful summary, though individual units rarely map cleanly onto human-nameable ideas Interpretation.
Why should I care?
As a researcher
CNNs are the clearest case of representation learning and of how inductive bias interacts with data scale, the comparison the Vision Transformer later made explicit.
As an engineer
A pretrained CNN backbone (ResNet, EfficientNet and relatives) is still a strong, cheap default for image tasks and transfer learning.
Modern systems that depend on it
- ResNet
- object detectors
- U-Net
- the image encoders of many multimodal systems
Historical context
Before
Hand-crafted features such as SIFT or HOG, followed by a separate classifier such as an SVM.
After
End-to-end learned feature hierarchies: pixels in, labels out, every filter trained from data.
Used today
Widely used in production vision, especially on devices; Transformers dominate the largest vision models, often with convolutional ideas mixed back in.
What to remember
- Pattern: [conv → ReLU] × a few → pool, repeated; then a small fully connected head.
- Each layer outputs many channels, one feature map per filter.
- Stacking widens the receptive field: two 3×3 layers see 5×5, three see 7×7.
- Early layers learn edge- and colour-like filters; deeper layers respond to larger, more object-like patterns.
- LeNet (1989–1998) read digits; AlexNet (2012) won ImageNet; ResNet (2015) went to 152 layers.
Key papers
ImageNet Classification with Deep Convolutional Neural Networks
Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton · 2012 · NeurIPS 2012
AlexNet won ImageNet 2012 by a wide margin and triggered the deep-learning era: big data plus GPUs plus deep networks.
Gradient-based learning applied to document recognition
Yann LeCun, Léon Bottou et al. · 1998 · Proceedings of the IEEE
The LeNet paper: convolutional networks trained end-to-end with gradient descent for handwriting recognition, deployed commercially for reading cheques.
How to read it: Long (46 pages). Sections I–II explain why learned features beat hand-designed ones — the heart of Chapter 4.
Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position
Kunihiko Fukushima · 1980 · Biological Cybernetics
An early layered network with local feature detectors and pooling-like stages, built to recognise a pattern wherever it appears: the architectural ancestor of the CNN.
Backpropagation Applied to Handwritten Zip Code Recognition
Y. LeCun, B. Boser et al. · 1989 · Neural Computation
Trained a network with shared local weights end to end by backpropagation on real handwritten digits: the convolutional network as we know it.
Watch
StatQuest with Josh Starmer
Neural Networks Part 8: Image Classification with Convolutional Neural Networks (CNNs)
Walks a tiny CNN through a complete example, filter to pooling to fully connected layer, with every number shown.