CAT: Circular-Convolutional Attention for Sub-Quadratic Transformers
Yoshihiro Yamada
TL;DR
CAT introduces a sub-quadratic, softmax-preserving attention mechanism for Transformers by formulating a circulant attention kernel and computing it in the frequency domain with FFT/IFFT. Framed within Engineering-Isomorphic Transformers (EITs), CAT reduces attention-map materialization and memory while maintaining global context, achieving $O(N\log N)$ complexity without sequence-length-dependent hyperparameters. Empirically, CAT matches or surpasses standard attention on ImageNet-1k and WikiText-103, with a notable strength in masked language modeling and in scenarios with simple token mixing; a hybrid CAT-Alter variant often outperforms vanilla attention or CAT alone. Ablation studies show merging query and key projections (qv) balances accuracy and parameter count, and that partial substitution can yield practical efficiency gains. The work suggests a practical path toward scalable Transformers and informs future design of high-performance attention architectures.
Abstract
Transformers have driven remarkable breakthroughs in natural language processing and computer vision, yet their standard attention mechanism still imposes O(N^2) complexity, hindering scalability to longer sequences. We introduce Circular-convolutional ATtention (CAT), a Fourier-based approach that efficiently applies circular convolutions to reduce complexity without sacrificing representational power. CAT achieves O(NlogN) computations, requires fewer learnable parameters by streamlining fully connected layers, and introduces no additional heavy operations, resulting in consistent accuracy improvements and about a 10% speedup in naive PyTorch implementations. Based on the Engineering-Isomorphic Transformers (EITs) framework, CAT's design not only offers practical efficiency and ease of implementation, but also provides insights to guide the development of future high-performance Transformer architectures. Finally, our ablation studies highlight the key conditions underlying CAT's success, shedding light on broader principles for scalable attention mechanisms.
