What is a key advantage of shared weights (weight sharing) within a convolutional layer of a CNN?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Weight sharing is the trick that makes CNNs so efficient for images. A single filter's weights are reused, or shared, at every spatial position as it slides across the input, instead of learning a totally separate set of weights for every location. That means once a filter learns to detect, say, a vertical edge, it can recognize that same edge no matter where it shows up in the image, that's translation invariance. It also means far fewer parameters to learn compared to a fully connected layer touching every pixel with unique weights, which is a huge efficiency win. That's exactly why shared weights are correct here. Weight sharing has nothing to do with needing or not needing bias terms, those are separate parameters that can still exist per filter. It also doesn't mean every filter in a layer learns the same thing, quite the opposite, a layer typically has many different filters, each specializing in a different feature, and it's the weights within a single filter that get shared across positions, not shared identically across different filters. And convolution still needs an activation function afterward to introduce non-linearity, weight sharing doesn't remove that requirement at all.
Full explanation below image
Full Explanation
Weight sharing in a convolutional layer refers to the practice of using the same set of filter weights at every spatial position as that filter slides (convolves) across the input, rather than learning an entirely separate set of weights for each location. This design choice yields two major advantages. First, it provides a degree of translation invariance: because the exact same filter weights are applied everywhere in the input, a feature detector that has learned to recognize a particular pattern, such as a vertical edge or a specific texture, can detect that same pattern regardless of where it appears in the image, without needing to relearn it separately for each position. Second, weight sharing dramatically reduces the number of trainable parameters compared to a fully connected layer operating on the same input size, since a single small filter (for example, a 3x3 filter with a given number of input and output channels) is reused across the entire spatial extent of the input, rather than requiring a unique weight for every input-output pixel pairing. This parameter efficiency both reduces memory and computational requirements and helps limit overfitting, since there are far fewer parameters to fit relative to the amount of training data, especially important for high-resolution image inputs.
The first distractor, guaranteeing no bias terms are needed, is incorrect because weight sharing and bias terms are independent concepts; convolutional layers commonly still include a learnable bias term (often one per filter) added to the weighted sum computed by that filter, and weight sharing does not eliminate this requirement.
The second distractor, forcing every filter to learn the exact same feature as every other filter, misunderstands weight sharing; sharing occurs within a single filter's weights across different spatial positions, not across different filters within the same layer. In fact, CNN layers typically include many distinct filters, each free to learn a different feature (one filter for edges, another for a certain texture, and so on), providing a diverse set of feature detectors.
The third distractor, removing the need for an activation function after convolution, is incorrect because weight sharing is purely about how filter weights are applied spatially; it has no bearing on whether an activation function (such as ReLU) is still needed afterward to introduce non-linearity, which remains essential for the network to model complex, non-linear patterns.
Memory aid: think of a shared-weight filter as a single 'stencil' that gets stamped at every position across the image using the exact same shape, letting it recognize its pattern wherever it appears, while keeping the total number of learnable parameters small compared to connecting every pixel individually.