On the Power of Convolution Augmented Transformer
Mingchen Li, Xuechen Zhang, Yixiao Huang, Samet Oymak
TL;DR
This work investigates Convolution-Augmented Attention (CAT), a hybrid transformer that injects convolutional filters into the K/Q/V embeddings to blend local and global information. The authors prove that a single CAT layer can solve N-gram associative recall (NAR) and selective copying (SC), and that such CAT solutions exhibit length generalization to arbitrary context lengths. They further show that long convolutions enable efficient sparse-attention regimes like Landmark CAT (LCAT), by summarizing the context into landmarks and attending to them, with concrete computational tradeoffs analyzed under random-context models. Empirically, CAT improves language modeling performance and length generalization on real data, while maintaining strong performance on mechanistic tasks in synthetic setups. Overall, CAT provides design principles for robust, hybrid architectures that leverage both local filtering and global attention.
Abstract
The transformer architecture has catalyzed revolutionary advances in language modeling. However, recent architectural recipes, such as state-space models, have bridged the performance gap. Motivated by this, we examine the benefits of Convolution-Augmented Transformer (CAT) for recall, copying, and length generalization tasks. CAT incorporates convolutional filters in the K/Q/V embeddings of an attention layer. Through CAT, we show that the locality of the convolution synergizes with the global view of the attention. Unlike comparable architectures, such as Mamba or transformer, CAT can provably solve the associative recall (AR) and copying tasks using a single layer while also enjoying guaranteed length generalization. We also establish computational tradeoffs between convolution and attention by characterizing how convolution can mitigate the need for full attention by summarizing the context window and creating salient summary tokens to attend. Evaluations on real datasets corroborate our findings and demonstrate that CAT and its variations indeed enhance the language modeling performance.
