Abstract
While Vision Transformers (ViTs) have set new standards in computer vision through the expressive power of self-attention, they are hindered by quadratic computational complexity. This paper introduces Attentive Convolution (ATConv), a novel operator that distills the advantages of self-attention—specifically adaptive routing and lateral inhibition—into a highly efficient convolutional framework. The resulting architecture, AttNet, achieves state-of-the-art performance across classification, detection, and diffusion tasks while significantly reducing memory and compute overhead.
Introduction: Beyond the Receptive Field
The recent dominance of Vision Transformers is often attributed to their global receptive field. In response, modern convolutional neural networks (CNNs) have attempted to close the performance gap by employing increasingly large kernels (e.g., $31\times31$). However, this paper argues that the receptive field size is not the primary driver of self-attention's success. Instead, the "secret sauce" lies in two properties: adaptive routing (content-aware dynamic processing) and lateral inhibition (competitive feature selection). Standard convolutions, which use static weights and lack internal competition, fail to replicate these dynamics regardless of kernel size.
The Attentive Convolution (ATConv) Operator
To bridge this gap, we propose Attentive Convolution (ATConv), which integrates these two principles into a $3\times3$ depth-wise convolutional structure.
1. Adaptive Routing via Context-to-Kernel Translation (C2K)
Unlike static convolutions, ATConv generates its kernel weights dynamically based on the global context. By pooling image features into a compact representation, the model translates context into specific $3\times3$ weights for each spatial location, allowing the network to "route" information differently depending on the input content.
2. Lateral Inhibition via Differential Kernel Modulation (DKM)
Self-attention utilizes the softmax function to create competition between features, a phenomenon known as lateral inhibition. However, applying softmax to convolutional kernels often leads to training instability. ATConv introduces Differential Kernel Modulation (DKM), a biologically inspired mechanism that subtracts the spatial mean of the kernel. This creates a "center-surround" antagonism, forcing features to compete and sharpening the resulting representations without the need for softmax.
As shown in the figure above, ATConv effectively mimics the global routing of attention mechanisms while maintaining the localized efficiency of convolutions, whereas standard convolutions remain static.
Experimental Results
AttNet was evaluated across a diverse range of benchmarks, demonstrating superior efficiency and accuracy.
- ImageNet-1K Classification: AttNet-T2 achieves 84.4% Top-1 accuracy, outperforming both traditional CNNs (ConvNeXt) and advanced ViTs (TransNeXt) with fewer parameters and FLOPs.
- Object Detection (MS-COCO): AttNet-T4 reached 51.6 AP, surpassing strong attention-based baselines like CSWin-B (50.8 AP).
- Diffusion Models: In image generation tasks, replacing attention blocks with ATConv in SiT-XL/2 improved the FID score from 1.97 to 1.82 on ImageNet-1K, while reducing latency by 19%.
- Hardware Efficiency: ATConv reduces per-layer memory consumption by up to 95% compared to vanilla self-attention at high resolutions. At 128px resolution, it runs over 2$\times$ faster than leading window attention mechanisms.
Conclusion
Attentive Convolution proves that the expressivity of self-attention can be captured within a convolutional framework. By focusing on adaptive routing and lateral inhibition rather than just receptive field size, ATConv offers a path toward vision models that are both highly expressive and hardware-efficient. Future work will explore the application of ATConv in autoregressive language modeling and further optimize its implementation for specialized hardware.
Summary updated