Introduction
Generative Adversarial Networks (GANs) have set new standards in image synthesis, yet they often struggle to balance fine-grained details with global structural coherence. Traditional convolutional layers are limited by their local receptive fields, making it difficult for models to capture multi-scale context effectively. While techniques like Atrous Spatial Pyramid Pooling (ASPP) have addressed similar issues in semantic segmentation, their direct application to generative tasks remains suboptimal. This paper introduces Spatial Pyramid Attentive Pooling (SPAP), a plug-and-play architectural unit designed to enhance GAN generators by integrating multi-scale feature extraction with a novel cascade attention mechanism.
The SPAP Architecture
The core innovation of this work is the SPAP module, which replaces standard pooling or concatenation layers to better manage multi-scale information. The module consists of three primary components:
- Atrous (Dilated) Convolutions: By employing parallel layers with varying dilation rates, the network expands its receptive field without increasing parameter count or sacrificing spatial resolution. This allows the model to simultaneously process local features (e.g., facial landmarks) and global structures (e.g., head shape).
- Cascade Attention Mechanism: Unlike standard ASPP, which simply concatenates multi-scale features, SPAP utilizes an "Attentive Fuse" block. This block processes features in a sequence—typically coarse-to-fine—using learned spatial attention maps to dynamically weight the importance of information from different scales.
- Residual Connections: A learnable residual connection blends the attentive features back into the original input, ensuring training stability and preserving essential low-level information.
Experimental Evaluation
The effectiveness of SPAP was evaluated across diverse generative tasks, including unconditional image synthesis on CelebA-HQ and image-to-image translation on datasets such as Cityscapes, Maps, and Horse ↔ Zebra.
Quantitative results demonstrate significant improvements:
- CelebA-HQ: Integrating SPAP into a standard DCGAN architecture reduced the Frechet Inception Distance (FID) from 25.42 to 18.47, indicating a substantial gain in image realism.
- Cityscapes (Labels → Photo): SPAP achieved a pixel accuracy of 0.73, significantly outperforming the CycleGAN baseline (0.52) and the SCAN model (0.64).
Key Insights: Visualizing Attention
A critical finding of this research is the importance of the attention cascade order. The authors found that a coarse-to-fine processing order—starting with large dilation rates and moving to smaller ones—yields the best results for image synthesis. This suggests that the model benefits from establishing a global "skeleton" before refining local details.
Visualizing the learned attention maps provides intuitive evidence of this process. At coarse levels (high dilation), the model's attention is distributed across the background and general boundaries. As the cascade progresses to finer levels (low dilation), the attention focuses sharply on high-contrast features like eyes, mouth, and facial contours.
Conclusion
Spatial Pyramid Attentive Pooling (SPAP) offers a powerful, lightweight architectural enhancement for GANs. By enabling generators to learn "where" and "at what scale" to focus, SPAP achieves state-of-the-art performance in both synthesis and translation tasks. Future work may involve integrating SPAP into high-resolution architectures like StyleGAN or extending its multi-scale context capabilities to video synthesis.
Summary updated