What Is a Convolutional Neural Network (CNN)?
The architecture that made modern image recognition possible, by scanning an image for small local patterns before building up to whole-object understanding.
Learning local patterns first
A convolutional neural network (CNN) scans an input — typically an image — with small filters that slide across it, each one learning to detect a simple local pattern like an edge or a color transition. Stacking many such layers lets the network build up from simple local patterns to increasingly complex shapes, and eventually whole objects.
Why this fits images so well
Images have a property text doesn't: a pattern useful in one corner (an edge, a texture) is usually just as useful anywhere else in the image. CNNs exploit that by reusing the same small filter across the whole image instead of learning a separate pattern detector for every position, which makes them dramatically more efficient than a generic fully-connected network for visual data.
CNNs vs. transformers for vision
Transformer-based architectures (vision transformers) have increasingly matched or exceeded CNNs on many image tasks, especially at large scale, but CNNs remain widely used — particularly where compute is limited — because of their strong built-in assumptions about how images are structured.
Frequently Asked Questions
What is a convolutional neural network used for?
Primarily image and visual data processing — it scans an input with small filters to detect local patterns, then builds those up into recognition of more complex shapes and objects.
Are CNNs still used now that transformers exist?
Yes — CNNs remain common, especially in compute-constrained settings, though transformer-based vision models have matched or surpassed them on many benchmarks at large scale.