In a convolutional neural network (CNN), what is a filter (also called a kernel)?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let me show you how this works in the real world. A CNN filter is a tiny grid of numbers—say 3×3—that slides across your image. Everywhere it lands, it multiplies and adds, lighting up where a pattern matches. That's your feature map: edges here, corners there. Think of it like a cookie cutter scanning dough—same shape, many positions. Exam trap: people call the filter "just one neuron," or mix it up with batch norm or ReLU. Nope. The kernel holds shared weights; activation comes after the convolution; normalization is a different tool. Boss wants to know why the first layer learned edge detectors? Because those kernels trained to fire on intensity changes. Remember: filter = sliding weight matrix → feature map.
Full explanation below image
Full Explanation
Convolutional layers exploit local structure in images (and other grid-like data) by applying filters, also known as kernels. Each filter is a multidimensional array of learnable weights—commonly small spatial sizes such as 3×3 or 5×5, with depth matching the number of input channels. As the filter strides across the input, it computes local weighted sums (plus bias), producing one output channel known as a feature map. Multiple filters in a layer yield multiple feature maps, allowing the network to detect diverse patterns in parallel.
Weight sharing is the key efficiency idea: the same kernel parameters are reused at every spatial location, which reduces parameter count relative to a fully connected layer and encodes translation-sensitive pattern detectors. Early layers often learn edges and color transitions; deeper layers compose those responses into textures, parts, and object-level cues. After convolution, nonlinear activations and optional pooling or normalization refine the representation for the next stage.
Distractors collapse neighboring ideas. Calling a filter "a single neuron" oversimplifies: the convolution operation applies shared weights across many positions, and the resulting feature map positions correspond to local detections under that shared template. Data normalization techniques standardize distributions; they are not the convolutional weight matrix. Activation functions map pre-activations to nonlinear outputs and do not implement spatial filtering themselves.
For exams, link the vocabulary tightly: kernel/filter → convolution → feature map → stack of channels. Know related hyperparameters—kernel size, stride, padding, dilation, and number of filters—because they control output spatial size and capacity. A compact mental model is "template matching with learned templates." That model explains both why CNNs dominate classical computer vision baselines and why mislabeling a filter as normalization or activation is a common multiple-choice trap.