NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Gaussian Context Transformer

Dongsheng Ruan, Daiyin Wang, Yuan Zheng, Nenggan Zheng, Min ZhengCVPR 2021

Introduction

Deep convolutional neural networks (CNNs) have traditionally excelled at capturing local spatial patterns but often struggle to model global context. Channel attention mechanisms, such as Squeeze-and-Excitation (SE) blocks, were introduced to address this by recalibrating channel-wise feature responses. However, these methods typically rely on complex, parameter-heavy layers to "learn" the relationship between global context and channel importance. The Gaussian Context Transformer (GCT) challenges this paradigm by demonstrating that a simple, predetermined Gaussian function can achieve superior performance with zero to negligible additional parameters.

The Limitations of Learned Attention

Existing channel attention blocks usually follow a "squeeze-and-excitation" pipeline. They aggregate global information into a vector and use fully-connected (FC) layers to predict attention weights. This approach has two primary drawbacks:

  1. Computational Overhead: The FC layers introduce significant parameter counts and FLOPs, especially as the number of channels increases.
  2. Instability: Empirical evidence suggests that these learned layers often fail to establish a stable relationship between context and importance, leading to noisy and inconsistent activations across different image classes.

The authors of GCT hypothesized that the relationship between a channel's deviation from the global mean and its importance is predictable and follows a bell-curve distribution, which can be modeled more efficiently using a Gaussian prior.

The GCT Framework

The Gaussian Context Transformer (GCT) replaces complex learning layers with a three-step transformation process:

  1. Global Context Aggregation (GCA): Similar to SE blocks, GCT uses Global Average Pooling to summarize the spatial information of each channel into a single scalar.
  2. Normalization: The aggregated summaries are normalized to a distribution with a mean of 0 and a variance of 1. This step stabilizes the input for the excitation function.
  3. Gaussian Context Excitation (GCE): This is the core innovation. Instead of a neural network, GCT uses a Gaussian function—$e^{-\hat{z}^2 / 2c^2}$—to determine channel importance. Channels close to the mean (representing core information) are emphasized, while outliers are suppressed.
The GCT architecture illustrates the transition from input X to output Y via Global Average Pooling, Normalization, and Gaussian Excitation.

The paper introduces two variants: GCT-B0, which is entirely parameter-free with a fixed standard deviation ($c$), and GCT-B1, which utilizes a single learnable parameter per block to adapt the Gaussian curve.

Experimental Evaluation

GCT was evaluated on ImageNet-1K for classification and MS COCO 2017 for object detection. The results demonstrate that "less is more" when it comes to attention modeling.

ImageNet Performance

On a ResNet-50 backbone, GCT-B0 achieved a 77.51% Top-1 accuracy while adding zero parameters. This outperforms the standard SE block (77.18%), which requires approximately 2.5 million additional parameters. GCT-B1 further improves accuracy to 77.55% with only one parameter per block.

Comparative analysis of GCT against other state-of-the-art attention modules on ImageNet-1K.

Object Detection and Segmentation

When integrated into Faster R-CNN (ResNet-50), GCT improved the box Average Precision (AP) from 37.4% to 38.8%. This performance exceeds other efficient attention mechanisms like ECA, proving that the Gaussian prior is robust across different computer vision tasks.

Conclusion

The Gaussian Context Transformer represents a shift toward more efficient, prior-driven neural network design. By replacing learnable layers with a Gaussian function, GCT achieves state-of-the-art results with unprecedented efficiency. This work suggests that many current attention mechanisms may be over-parameterized and that hard-coding sensible mathematical priors can lead to more stable and performant deep learning models.

Summary updated

BibTeX
@inproceedings{ruan2021gaussian,
  author = {Dongsheng Ruan and Daiyin Wang and Yuan Zheng and Nenggan Zheng and Min Zheng},
  title = {{Gaussian Context Transformer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01488},
}
Figure