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

AFIDAF: Alternating Fourier and Image Domain Adaptive Filters as an Efficient Alternative to Attention in ViTs

Yunling Zheng, Zeyi Xu, Fanghui Xue, Biao Yang, Jiancheng Lyu, Shuai Zhang, Yingyong Qi, Jack Xin

Abstract

AFIDAF introduces a dual-domain filtering approach that replaces the heavy self-attention mechanism in Vision Transformers (ViTs) with an alternating sequence of image-domain large kernel convolutions and Fourier-domain channel masking. This "attention-free" backbone achieves state-of-the-art performance for lightweight models, reaching 80.9% Top-1 accuracy on ImageNet-1K with only 6.5 million parameters.

Introduction: The Efficiency-Context Trade-off

In the development of computer vision backbones, researchers have long faced a fundamental trade-off between efficiency and global context. Convolutional Neural Networks (CNNs) are highly efficient and excel at capturing local textures, yet they often struggle with long-range dependencies. Conversely, Vision Transformers (ViTs) provide superior global "token mixing" through self-attention mechanisms, but at the cost of quadratic computational complexity and significant model size.

While lightweight ViTs exist, many rely on simplified attention mechanisms that fail to capture spatial information effectively. The authors of AFIDAF observe that previous Fourier-based models, such as AFFNet, lacked sufficient spatial mixing because their frequency-domain filters operated solely on channels, effectively ignoring spatial relationships within the frequency plane. AFIDAF addresses this by integrating explicit image-domain filtering with frequency-domain processing.

Methodology: The AFIDAF Block

The core innovation of this work is the Alternating Fourier and Image Domain Adaptive Filtering (AFIDAF) block. This block processes features in two distinct, complementary stages to ensure both local precision and global reach.

The AFIDAF architecture overview, illustrating the hierarchical stage structure and the dual-domain adaptive filter components.

Image Domain: Large Kernel Approximation

To capture local and medium-range spatial features like edges and textures, the model utilizes a decomposed Large Kernel Approximation (LKA). Rather than employing a single, computationally expensive large convolution, the LKA breaks the operation down into a depth-wise convolution, a depth-wise dilated convolution (for broader reach), and a 1x1 convolution. This structure is further optimized with channel-wise group shuffling, ensuring robust feature mixing across groups without increasing the parameter count.

Fourier Domain: Global Channel Masking

To achieve global context without the overhead of self-attention, the model employs a Fast Fourier Transform (FFT) to shift features into the frequency domain. In this domain, a subnetwork applies a "channel mask." Because a single point in the Fourier domain contains information aggregated from the entire spatial image, this operation acts as a computationally efficient global token mixer. An inverse FFT (iFFT) then returns the data to the spatial domain.

Detailed view of the Adaptive Frequency Filter Token Mixer subnetwork, showing the use of group linear layers and ReLU for channel masking.

Key Insights and Ideas

  • The Uncertainty Principle in Vision: AFIDAF exploits a core principle of signal processing: a localized filter in one domain is spread out in the other. Local convolutions in the image domain handle high-frequency details, while the Fourier domain handles the low-frequency, non-local structures that fall outside a standard convolution's reach.
  • Solving the Spatial Mixing Problem: By adding an explicit image-domain filter before the Fourier stage, the authors fixed the "lack of action" in spatial mixing found in earlier frequency-based models, which were effectively acting as identity maps on the frequency plane.
  • Attention-Free Efficiency: By utilizing the FFT for global reach, the model avoids the $O(N^2)$ complexity of standard self-attention, making it highly suitable for mobile and edge devices.

Experimental Results

The AFIDAF architecture was evaluated across several standard benchmarks, demonstrating superior efficiency and performance:

  • ImageNet-1K Classification: The AFIDAF model achieved 80.9% Top-1 accuracy with only 6.5M parameters. This outperforms similar-sized models like AFFNet (79.8%) and RepViT-M1.0 (80.3%).
  • Model Compression: The hierarchical HAFIDAF variant successfully compressed a Swin-Transformer model, reducing the parameter count by 47% (from 28M to 14.8M) while incurring only a minor 1.4% drop in accuracy.
  • Downstream Tasks: In object detection on MS-COCO, the tiny AFIDAF-T version outperformed AFFNet-T by 1.8% mAP, proving that the dual-domain approach generalizes well to complex spatial tasks beyond classification.

Conclusion

AFIDAF represents a significant step toward efficient, attention-free vision backbones. By alternating between image and Fourier domains, it captures the best of both worlds: the local efficiency of convolutions and the global context of transformers. Future work may explore further localization of the Fourier mask and hardware-specific optimizations for FFT operations on mobile AI accelerators.

Summary updated

BibTeX
@inproceedings{zheng2024afidaf,
  author = {Yunling Zheng and Zeyi Xu and Fanghui Xue and Biao Yang and Jiancheng Lyu and Shuai Zhang and Yingyong Qi and Jack Xin},
  title = {{AFIDAF: Alternating Fourier and Image Domain Adaptive Filters as an Efficient Alternative to Attention in ViTs}},
  booktitle = {ISVC},
  year = {2024},
  url = {https://openreview.net/forum?id=bFFRTjLYnB},
}
Figure