Sharing Weights Across Space Because Edges Look the Same Everywhere
I spent three years in academia watching brilliant students get lost in a sea of high-level abstractions, only to realize they couldn’t actually explain why a kernel worked when they looked at the raw math. Most tutorials treat convolutional networks basics like a magic trick—they show you the input, they show you the output, and they tell you to just trust the weights. It’s a frustrating way to learn, and frankly, it’s how we end up with models that work in a controlled lab but fall apart the second they encounter real-world noise. I’ve always preferred the mechanical certainty of a gear train over a “black box” explanation, and I suspect you do too.
In this post, I’m not going to feed you a diet of hand-wavy metaphors or oversimplified diagrams that ignore the actual computational cost. Instead, I want to walk through the mechanics of feature detection—the actual movement of the filters across the spatial dimensions of an image. My promise to you is simple: we will look at the architecture through the lens of what is actually happening to the data, including the trade-offs between receptive fields and parameter counts. We’re going to build an intuition for the math, not just memorize the names of the layers.
Table of Contents
How Feature Maps in Cnns Capture Spatial Hierarchies

To understand how a network “sees,” you have to look at how feature maps in CNNs evolve as they move through the stack. In the earliest convolutional neural network layers, the filters are essentially looking for the smallest possible units of information—a single vertical line, a specific shade of blue, or a sharp corner. These maps are high-resolution but semantically shallow; they tell you where an edge is, but they have no idea if that edge belongs to a cat or a car.
As we move deeper into the architecture, the network begins to assemble these primitives into more complex structures. This is where the spatial hierarchy becomes apparent. By stacking layers, the network combines those early edge detections into shapes, and eventually, those shapes into recognizable objects. However, this process relies heavily on how we manage the dimensions of our data. This is why stride and padding in convolution are so critical; if we don’t manage the spatial footprint correctly, we lose the very geometric relationships we are trying to build. We aren’t just looking for features; we are learning how those features relate to one another in space.
The Mathematical Nuance of Stride and Padding in Convolution

When we talk about stride and padding, it is easy to treat them as mere hyperparameters you tweak to make the math work, but they are actually the primary levers controlling the information density of your feature maps. If you increase the stride, you are essentially telling the kernel to skip over pixels, which acts as a form of aggressive downsampling. While this reduces the computational load, you have to be careful; a stride that is too large can cause you to miss fine-grained spatial details that the network needs to distinguish between, say, a textured fabric and a smooth surface.
Padding is the necessary counterweight to this loss. Without it, the pixels at the very edge of your input are only “touched” by the kernel once, whereas the central pixels are processed repeatedly. This creates a structural bias where the edges of your image are effectively under-represented. By adding a border of zeros—what we call “same” padding—we ensure that the kernel can center itself on those edge pixels. It is a bit of a mathematical sleight of hand to maintain spatial dimensions, but it is vital for building a stable deep learning architecture where the signal doesn’t simply vanish as you move deeper into the layers.
Five Practical Realities for Building Better Convolutions
- Don’t mistake kernel size for “more intelligence.” While a $5 times 5$ filter sees more context than a $3 times 3$ one, it also introduces more parameters and a higher risk of overfitting; I usually find that stacking multiple $3 times 3$ layers is more efficient because it achieves the same receptive field with fewer weights and more non-linearity.
- Respect the edge effects. When you use padding to keep your feature maps from shrinking into nothingness, remember that you are essentially feeding the network “fake” data—usually zeros—at the borders. If your dataset relies heavily on peripheral information, those zero-padded edges can actually introduce a subtle bias that the network has to learn to ignore.
- Monitor your receptive field like a hawk. It is easy to design a deep network and assume it “sees” the whole image, but if your strides are too small or your pooling layers are too sparse, the neurons in your deeper layers might still only be looking at tiny, disconnected patches of the input.
- Channel depth is not just a number; it’s a dimension of abstraction. As you go deeper, you aren’t just looking at more pixels, you are looking at more concepts. A single channel might detect a vertical line, but a hundred channels at a deeper layer are looking for a hundred different combinations of textures and shapes.
- Watch out for the “vanishing” information problem in aggressive downsampling. While max-pooling is great for achieving translation invariance—meaning the network recognizes a cat whether it’s in the top left or bottom right—it is a destructive process. Once you discard those spatial values to save computation, you can’t get that precision back in later layers.
The Core Mechanics to Carry With You
Convolution isn’t magic; it is a systematic way of enforcing local connectivity, ensuring the network learns patterns based on how pixels relate to their immediate neighbors rather than treating every pixel as an isolated data point.
The hierarchy of a CNN is built on the assumption that complexity is additive—low-level filters find the edges, and those edges are mathematically composed into the shapes that eventually become recognizable objects.
Every architectural choice, from the width of your stride to the thickness of your padding, is a direct trade-off between how much spatial information you preserve and how much computational overhead you are willing to tolerate.
Beyond the Filter Kernels
We have looked under the hood at how these networks actually operate, moving past the idea that they are just magic boxes that “see.” We’ve seen how spatial hierarchies are built layer by layer, how padding prevents us from losing information at the edges, and how stride dictates the resolution of our feature maps. It is important to remember, however, that none of this is a silver bullet; a CNN is only as good as the repetition and invariance present in your training data. If your patterns don’t repeat or your stride is too aggressive, you aren’t extracting features—you are simply discarding signal. Understanding these mechanics means knowing exactly where the information is lost just as much as knowing where it is captured.
As you move from reading about these architectures to actually implementing them in your own code, I encourage you to resist the urge to treat them as black boxes. When a model fails to converge or a feature map looks like static, don’t just throw more layers at the problem. Go back to the math. Trace the dimensions, check your padding, and visualize the kernels. There is a profound, quiet satisfaction in realizing that these complex systems are just a series of carefully orchestrated local operations. Once you stop memorizing the architectures and start understanding the movement of data, you stop being a user and start becoming an engineer.