Skip to main content
QUICK REVIEW

[论文解读] Positional Encoding as Spatial Inductive Bias in GANs

Rui Xu, Xintao Wang|arXiv (Cornell University)|Dec 9, 2020
Generative Adversarial Networks and Image Synthesis参考文献 46被引用 7
一句话总结

本文揭示了卷积神经网络生成器中的零填充会无意间引入一种隐式的、不平衡的位置编码,从而在保持平移不变性的同时实现高质量的图像生成。为改善空间归纳偏置,作者提出了显式的位置编码——笛卡尔空间网格与二维正弦编码——并提出一种新型多尺度训练策略(MS-PIE),使单一的256×256 StyleGAN2模型能够生成高达1024×1024分辨率的高质量图像,同时显著提升了SinGAN在图像操作任务中的泛化能力。

ABSTRACT

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.

研究动机与目标

  • 探究为何在SinGAN和StyleGAN2等GAN中,尽管输入的空间数据为独立同分布(i.i.d.),但平移不变的卷积生成器仍能生成结构清晰、保真度高的图像。
  • 分析零填充引入的非预期空间偏差及其在特征图中分布不均的问题。
  • 提出显式位置编码——笛卡尔空间网格与二维正弦编码——作为对隐式零填充偏差的更优替代方案。
  • 开发一种多尺度训练策略(MS-PIE),使单一生成器能够合成多种分辨率的图像。
  • 通过显式空间归纳偏置提升SinGAN在高分辨率图像外推与操作任务中的鲁棒性与泛化能力。

提出的方法

  • 作者发现,由于边界效应的非对称性,零填充会在特征图中引入隐式位置编码,且该效应从图像边缘逐渐向中心区域扩散。
  • 评估了两种显式位置编码:归一化的笛卡尔空间网格与二维正弦位置编码,二者均旨在提供更均衡的空间归纳偏置。
  • 提出一种新型多尺度训练策略——带位置编码的多尺度训练(MS-PIE),在训练过程中根据不同的输入尺度动态调整位置编码。
  • 将显式位置编码集成到生成器的输入中,以替代或增强来自零填充的隐式偏差。
  • 在StyleGAN2与SinGAN上验证了该方法,包括无填充设置的消融实验及不同尺度变换的分析。
  • 测试了一种轻量化生成器变体,表明在使用显式位置编码时,即使参数容量减半,性能仍能保持稳定。
Figure 1: Images sampled from the internal patch distribution learned by SinGAN. Above the dotted line, we present sampled balloons with standard SinGAN and padding-free SinGAN. A more challenging case of generating a school of fish is shown below the dotted line. (c)-(f) show the effects of differe
Figure 1: Images sampled from the internal patch distribution learned by SinGAN. Above the dotted line, we present sampled balloons with standard SinGAN and padding-free SinGAN. A more challenging case of generating a school of fish is shown below the dotted line. (c)-(f) show the effects of differe

实验结果

研究问题

  • RQ1为何在空间输入为独立同分布噪声的情况下,平移不变的卷积生成器仍能生成结构清晰、保真度高的图像?
  • RQ2零填充如何引入隐式且分布不均的位置编码,进而影响GAN生成器中特征图的分布?
  • RQ3显式位置编码(如笛卡尔空间网格与二维正弦编码)是否能提供比隐式零填充偏差更均衡、更有效的空间归纳偏置?
  • RQ4能否通过显式位置编码将单一预训练的256×256 StyleGAN2生成器适配为多尺度高质量图像合成?
  • RQ5显式位置编码如何提升SinGAN在高分辨率图像外推与操作任务中的鲁棒性与泛化能力?

主要发现

  • 零填充在GAN生成器中无意间引入了隐式位置编码,这是尽管存在平移不变性却仍能实现结构清晰、保真度高图像生成的关键原因。
  • 零填充带来的隐式偏差分布不均,对图像边缘与角落区域影响更强,导致中心区域性能下降,如SinGAN生成金鱼时的示例所示。
  • 显式位置编码(包括笛卡尔空间网格与二维正弦编码)在图像各区域产生更一致、更稳定的结构,提升了图像块的重复性与全局一致性。
  • 所提出的MS-PIE策略使单一256×256的StyleGAN2生成器能够生成512×512、896×256与1024×1024分辨率的高质量图像,FID与P&R指标显著优于基线方法。
  • 采用显式位置编码的SinGAN在图像操作任务中表现更优,包括更忠实的全局结构保持与更少的放大失真,优于零填充基线。
  • MS-PIE生成器的轻量化版本在通道数减半的情况下仍保持优异性能,证明了显式位置编码在效率与鲁棒性方面的优势。
Figure 2 : Illustration for the convolutional procedure with zero padding. We move the padding in each layer to the input feature and regard the whole convolutional network as a convolutional layer with a large kernel.
Figure 2 : Illustration for the convolutional procedure with zero padding. We move the padding in each layer to the input feature and regard the whole convolutional network as a convolutional layer with a large kernel.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。