The Spatial Inductive Bias of Zero Padding

This direction is split into other directions: padding-induced spatial bias. Its last version stays readable and citable here.

Version 1 of 165 papers97 conceptsfrozen 2026-10-04

In the standard narrative of deep learning, Convolutional Neural Networks (CNNs) are celebrated for their translation invariance. Because a convolutional kernel slides across an image, it should theoretically process a feature the same way whether it appears in the top-left corner or the dead center.

However, a growing body of research reveals that this invariance is an illusion. In practice, CNNs possess a sophisticated internal sense of absolute spatial location. The primary source of this "spatial awareness" is not a specialized architectural module, but a ubiquitous implementation detail: zero padding.

How Zeros Become Landmarks

When a convolutional kernel reaches the edge of a feature map, it typically requires "padding"—extra pixels added around the border—to maintain the image dimensions. Usually, these pixels are set to zero.

While intended to be a neutral boundary filler, researchers like Md. Amirul Islam and Neil D. B. Bruce have shown in How much Position Information Do Convolutional Neural Networks Encode? that these zeros act as a "smoking gun" for the network. As the kernel slides over the boundary, the sudden change in the distribution of values (from image data to a wall of zeros) provides a clear signal of the kernel's proximity to the edge.

By stacking multiple layers, the network can "triangulate" its exact coordinates. A neuron in a deep layer has a receptive field that eventually touches these boundaries, allowing it to learn that its activation is relative to a fixed global grid. Chieh Hubert Lin and Hung-Yu Tseng formalized this as the Position-information Pattern from Padding (PPP), demonstrating that networks actively "learn" these patterns to navigate the image frame, even when researchers attempt to hide them with randomized padding.

The Generative Secret Sauce

In generative modeling, this accidental coordinate system is both a blessing and a curse. Rui Xu and colleagues discovered in Positional Encoding as Spatial Inductive Bias in GANs that zero padding is actually the "secret sauce" that allows GANs to generate coherent global structures, like a face with eyes always above the mouth. Without the spatial anchors provided by padding, a purely translation-invariant generator would struggle to know where the "top" of the image is.

However, this reliance leads to "spatial bias." Jooyoung Choi notes that models like StyleGAN2 struggle to generate content at scales or locations not seen during training because their features are "glued" to the absolute pixel grid. This manifests as the "texture sticking" artifact described by Tero Karras in Alias-Free Generative Adversarial Networks, where fine details seem to stay fixed to the screen while the object moves, because the network is anchoring those details to absolute coordinates rather than the moving object.

The Cost of Spatial Awareness

In discriminative tasks, this spatial bias often creates "shortcuts" that undermine robustness. Dario Garcia-Gasulla identified Padding Aware Neurons (PANs)—filters that specialize in detecting the boundary. These neurons allow a model to classify an object based on its distance from the frame edge rather than its visual features.

This is particularly destructive in object tracking. Bo Li and Wei Wu found that deep Siamese trackers often fail because they develop a "center bias." Because the padding signals where the image center is, the network learns to expect the target to be centrally located. When the target moves toward the edges, the "positional shortcut" breaks, and the tracker loses the object. This explains why simply swapping a shallow backbone for a deeper one (which has more padding-induced spatial information) often decreases tracking performance.

Beyond the Boundary

The research suggests that the "blind spots" and "center biases" identified by Narine Kokhlikyan and Bilal Alsallakh are not just bugs, but fundamental properties of how convolutions interact with finite boundaries.

To fix this, the field is moving toward two extremes:

  1. Strict Equivariance: Redesigning layers to be truly "alias-free" or using "Cylinder-Style Convolutions" to eliminate boundaries entirely.
  2. Explicit Encoding: Replacing the "accidental" bias of zero padding with intentional, multi-scale positional encodings (MS-PE) or conditional positional encodings (CPE), as suggested by Xiangxiang Chu.

By making the coordinate system explicit rather than implicit, researchers can finally decouple what an object is from where it sits in the frame.

Papers in this version

Showing 60 of 65 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_the_spatial_inductive_bias_of_zero_paddi_83b8e216,
  title = {The Spatial Inductive Bias of Zero Padding},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/the-spatial-inductive-bias-of-zero-padding/rdr_83b8e216fefc4a9abe34ca76d335bdda},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 1, frozen text):

@misc{lacuna_the_spatial_inductive_bias_of_zero_paddi_83b8e216_v1,
  title = {The Spatial Inductive Bias of Zero Padding},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/the-spatial-inductive-bias-of-zero-padding/rdr_83b8e216fefc4a9abe34ca76d335bdda/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-25},
}