Learning Inception Attention for Image Synthesis and Image Recognition

Jianghao Shen, Tianfu Wu

Introduction

In computer vision, the design of neural architectures often involves a fundamental trade-off between computational efficiency and model expressiveness. Convolutional Neural Networks (CNNs) are prized for their efficiency and strong inductive biases, such as translation invariance. However, their fixed weights can be "rigid." Conversely, Transformers leveraging Multi-Head Self-Attention (MHSA) offer high expressiveness through data-specific weighting, but at the cost of quadratic computational complexity relative to input resolution.

Researchers from North Carolina State University have proposed a middle ground: the Spatially-Adaptive Squeeze-Excitation (SASE) module. This approach aims to imbue CNNs with the dynamic, data-specific properties of Transformers while maintaining the linear complexity and efficiency of convolutional blocks.

The SASE Module: Bridging CNNs and Transformers

The SASE module re-imagines the popular Squeeze-Excitation (SE) block through the lens of the Query-Key-Value (QKV) framework. While standard SE blocks "squeeze" spatial information into a 1D vector to recalibrate channels, they lose spatial awareness. SASE restores this awareness by defining:

  1. Query (Q): A 1D vector capturing global context or "latent style."
  2. Key (K): A 2D spatial mask or heatmap identifying feature locations.
  3. Value (V): The input convolutional feature map.
Internal architecture of SASE showing the generation of Query (Q), Key (K), and Value (V) components.

As shown in the architecture diagram, the Query is generated via global pooling and fully connected layers, while the Key and Value are derived through 3x3 convolutions. By broadcasting the 1D Query across the 2D Key, the model produces a 3D attention matrix that modulates the Value.

Multi-Head Spatial Attention

To further enhance expressiveness, SASE adopts a multi-head approach. The input channels are split into $g$ groups, with each group learning distinct spatial attention patterns. This allows the model to attend to different regions of the image for different feature sets, mirroring the behavior of MHSA in Transformers.

The multi-head SASE architecture for image recognition, utilizing channel-wise softmax and concatenation.

In the recognition variant, a softmax operation is applied along the channel dimension of the attention map before multiplying with the Value. The results from all heads are then concatenated to form the final output $X'$.

Experimental Results

The SASE module was evaluated across image synthesis, image recognition, and downstream tasks.

Image Recognition (ImageNet-1K)

A SASE-augmented ResNet50 achieved a top-1 accuracy of 78.06%, surpassing the standard SE-ResNet50 (77.74%) while utilizing 9 million fewer parameters. With an optimized training recipe, SASE-ResNet50 reached 81.24%, slightly outperforming the Swin-Tiny Transformer (81.20%) despite its smaller footprint.

Image Synthesis (GANs)

In low-shot and one-shot image synthesis tasks (using FastGAN and SinGAN frameworks), SASE consistently improved image fidelity and diversity. Notably, in one-shot scenarios, SASE proved superior at preserving global structural integrity—such as the complex geometry of bridges or animal anatomy—compared to baseline models.

Conclusion and Future Work

SASE demonstrates that data-specificity, rather than just long-range modeling, is a key driver of Transformer performance. By integrating this property into a lightweight convolutional module, SASE provides a powerful tool for high-resolution synthesis and efficient recognition.

However, limitations remain. SASE showed lower performance in dense prediction tasks like object detection on MS-COCO compared to state-of-the-art Transformers. This suggests that while SASE is highly effective for global and group-wise modulation, pixel-to-pixel relationships captured by full MHSA may still be necessary for fine-grained spatial tasks. Future research will focus on bridging this gap for downstream applications.

Summary updated

BibTeX
@inproceedings{shen2022learning,
  author = {Jianghao Shen and Tianfu Wu},
  title = {{Learning Inception Attention for Image Synthesis and Image Recognition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=x0LCDsbJ5JF},
}
Figure