An image classifier needs to correctly identify a cat whether it appears in the top-left corner of a photo or the bottom-right. Which architecture is inherently best suited to handle this kind of variation in feature location?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let's think about what actually changes when a cat moves from one corner of the image to another — the pixel values shift, but the pattern (ears, whiskers, fur texture) stays the same. A CNN handles this because its convolutional filters slide across the whole image using the same shared weights everywhere, so it detects the same feature no matter where it shows up. That's translation invariance, baked right into the architecture. A plain fully connected network treats every pixel position as its own separate input, so it has to relearn the cat pattern separately for every possible location — wasteful and fragile. RNNs are built for sequences, not 2D spatial data. And restricted Boltzmann machines are generative, unsupervised building blocks, not the go-to for this kind of spatial pattern recognition.
Full explanation below image
Full Explanation
Robustness to a feature's location within an image is a property known as translation invariance (or approximate translation invariance combined with local translation equivariance), and it is a defining characteristic of convolutional neural networks. A CNN applies the same learned filter (kernel) across every spatial location in the input via the convolution operation, meaning the weights used to detect an edge, a texture, or a shape are shared across the entire image rather than learned independently per pixel position. This parameter sharing means that once a filter learns to detect, say, a cat's ear pattern, it can recognize that same pattern regardless of where it appears in the frame. Pooling layers (max or average) further reinforce this by summarizing local regions, making the representation even less sensitive to small shifts in exact position. A fully connected feedforward network, by contrast, assigns a unique weight to every pixel-to-neuron connection, so a pattern learned in one location provides no direct benefit for recognizing the same pattern elsewhere — the network would need vastly more parameters and training examples to generalize across positions, and would remain fragile to spatial shifts. A vanilla RNN is designed to model sequential/temporal dependencies (like text or time series) and has no inherent mechanism for 2D spatial locality or translation invariance, making it a poor fit for general image classification. A restricted Boltzmann machine is an energy-based, undirected generative model historically used for unsupervised feature learning or as a building block in deep belief networks; it does not have the convolutional weight-sharing structure that grants location robustness. For image tasks where the object of interest can appear anywhere in the frame, the CNN's shared-filter, hierarchical feature-extraction design is the standard and most effective choice.