[Paper Review] Positional Encoding as Spatial Inductive Bias in GANs
This paper reveals that zero padding in convolutional GAN generators unintentionally creates an implicit, unbalanced positional encoding that enables high-fidelity image generation despite translation-invariance. To improve spatial inductive bias, the authors propose explicit positional encodings—Cartesian spatial grid and 2D sinusoidal encoding—enabling a new multi-scale training strategy (MS-PIE) that allows a single 256×256 StyleGAN2 to generate high-quality images up to 1024×1024, while significantly enhancing SinGAN’s versatility in image manipulation.
SinGAN shows impressive capability in learning internal patch distribution despite its limited effective receptive field. We are interested in knowing how such a translation-invariant convolutional generator could capture the global structure with just a spatially i.i.d. input. In this work, taking SinGAN and StyleGAN2 as examples, we show that such capability, to a large extent, is brought by the implicit positional encoding when using zero padding in the generators. Such positional encoding is indispensable for generating images with high fidelity. The same phenomenon is observed in other generative architectures such as DCGAN and PGGAN. We further show that zero padding leads to an unbalanced spatial bias with a vague relation between locations. To offer a better spatial inductive bias, we investigate alternative positional encodings and analyze their effects. Based on a more flexible positional encoding explicitly, we propose a new multi-scale training strategy and demonstrate its effectiveness in the state-of-the-art unconditional generator StyleGAN2. Besides, the explicit spatial inductive bias substantially improve SinGAN for more versatile image manipulation.
Motivation & Objective
- To investigate why translation-invariant convolutional generators in GANs like SinGAN and StyleGAN2 can still produce structured, high-fidelity images despite i.i.d. spatial inputs.
- To analyze the unintended spatial bias introduced by zero padding and its unbalanced distribution across feature maps.
- To propose explicit positional encodings—Cartesian spatial grid and 2D sinusoidal encoding—as superior alternatives to implicit zero-padding bias.
- To develop a multi-scale training strategy (MS-PIE) enabling a single generator to synthesize images at multiple resolutions.
- To enhance the robustness and versatility of SinGAN for high-resolution image manipulation using explicit spatial inductive bias.
Proposed method
- The authors identify that zero padding introduces an implicit positional encoding due to asymmetric boundary effects, which gradually spreads from borders to the center of feature maps.
- They evaluate two explicit positional encodings: the normalized Cartesian spatial grid and 2D sinusoidal positional encoding, both designed to provide balanced spatial inductive bias.
- A new multi-scale training strategy, Multi-Scale training with PositIon Encodings (MS-PIE), is proposed, where positional encodings are adapted across different input scales during training.
- The method integrates explicit positional encodings into the generator’s input, replacing or augmenting the implicit bias from zero padding.
- The approach is validated on StyleGAN2 and SinGAN, with ablation studies on padding-free settings and varying scale transformations.
- A lightweight variant of the generator is tested to show that performance is maintained even with reduced capacity when using explicit positional encodings.

Experimental results
Research questions
- RQ1Why do translation-invariant convolutional generators in GANs still produce structured, high-fidelity images despite spatial i.i.d. noise inputs?
- RQ2How does zero padding introduce an implicit, unbalanced positional encoding that affects feature map distributions in GAN generators?
- RQ3Can explicit positional encodings such as the Cartesian spatial grid and 2D sinusoidal encoding provide a more balanced and effective spatial inductive bias than implicit zero-padding bias?
- RQ4Can a single pre-trained 256×256 StyleGAN2 generator be adapted for high-quality multi-scale image synthesis using explicit positional encodings?
- RQ5How does explicit positional encoding improve the robustness and versatility of SinGAN in high-resolution image extrapolation and manipulation tasks?
Key findings
- Zero padding unintentionally introduces an implicit positional encoding in GAN generators, which is responsible for enabling structured, high-fidelity image generation despite translation invariance.
- The implicit bias from zero padding is unbalanced, with stronger effects at image borders and corners, leading to inferior performance in the center region, as observed in SinGAN’s fish generation example.
- Explicit positional encodings—Cartesian spatial grid and 2D sinusoidal encoding—produce more consistent and stable spatial structures across the image, improving patch recurrence and global coherence.
- The proposed MS-PIE strategy enables a single 256×256 StyleGAN2 generator to generate high-quality images at 512×512, 896×256, and 1024×1024 resolutions, with FID and P&R scores showing significant improvement over baseline methods.
- SinGAN with explicit positional encoding achieves superior image manipulation results, including faithful global structure preservation and reduced distortion during scale-up, outperforming the zero-padding baseline.
- A lightweight version of the MS-PIE generator maintains competitive performance even with half the channel width, demonstrating the efficiency and robustness of explicit positional encoding.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.