How convolution extracts spatial features
Convolution is the core operation of CNNs. A small learnable kernel (typically 3x3 or 5x5) slides across the input image, computing a dot product at each position. This sum becomes one value in the output feature map. The kernel learns to detect patterns: edges, textures, and shapes. By using the same kernel everywhere, convolution exploits locality (nearby pixels are related) and translation invariance (the same edge is an edge whether it appears at top or bottom). Early layers learn low-level features like oriented edges; deeper layers combine them into higher-level structures like faces or cars.
Why convolution beats fully connected layers
Fully connected layers treat images as flat vectors, losing spatial structure and requiring orders of magnitude more parameters. Convolution respects the 2D topology of images, uses far fewer parameters, and generalizes better across images of different content. The spatial inductive bias is so powerful that even untrained random kernels extract useful features (shown in prior work). Modern convolution also pairs with pooling to downsample, reducing computation and providing translation tolerance. This combination of parameter efficiency, spatial reasoning, and clear interpretability made CNNs the standard for image understanding for decades.