Convolution and Feature Maps Playground

see which visual patterns survive each kernel choice

Loading interactive simulation...

Linear Algebra of Convolutional Kernels 🖖

Convolutional feature maps are generated through localized matrix dot products traversing a multidimensional input tensor. The operation extracts spatial hierarchies by applying discrete translation-invariant filters. Adjusting stride and padding modifies the resulting tensor dimensions deterministically, following strict algebraic formulas. This mathematically efficient extraction of structural data minimizes parameter space, establishing the computational foundation for sophisticated pattern recognition within deep neural architectures.

A tiny window that slides 🖖

A convolution slides a small grid of numbers, the kernel, across the image. At each stop it multiplies the overlapping values and adds them into one output pixel. The result is a feature map that brightens wherever the kernel's pattern appears. Try the edge-detect kernel here: flat regions go dark while boundaries light up, because the kernel responds to change, not to brightness itself.

It isn't really convolution 🖖

The operation nearly every CNN calls "convolution" is actually cross-correlation. True mathematical convolution first flips the kernel top-to-bottom and left-to-right before sliding it; deep-learning libraries skip that flip. Since the network learns the weights anyway, a flipped kernel would simply be learned in reverse and give an identical result, which is why the misnomer stuck. With a symmetric kernel like blur, the two are indistinguishable.

Example problems

  • digit sobel-x - Sobel-x highlights vertical strokes in handwritten-like digits.
  • shape edges - Edge kernel suppresses flat regions and emphasizes object boundaries.
  • blur + stride 2 - Larger stride downsamples features and can drop fine detail.
  • sharpen valid - Valid padding shrinks output while sharpen boosts local contrast.