Towards Better Multi-head Attention via Channel-wise Sample Permutation
Not on the map. Why?
Abstract (arXiv)
Transformer plays a central role in many fundamental deep learning models, e.g., the ViT in computer vision and the BERT and GPT in natural language processing, whose effectiveness is mainly attributed to its multi-head attention (MHA) mechanism. In this study, we propose a simple and novel channel-wise sample permutation (CSP) operator, achieving a new structured MHA with fewer parameters and lower complexity. Given an input matrix, CSP circularly shifts the samples of different channels with various steps and then sorts grouped samples of each channel. This operator is equivalent to implicitly implementing cross-channel attention maps as permutation matrices, which achieves linear complexity and suppresses the risk of rank collapse when representing data. We replace the MHA of some representative models with CSP and test the CSP-based models in several discriminative tasks, including image classification and long sequence analysis. Experiments show that the CSP-based models achieve comparable or better performance with fewer parameters and lower computational costs than the classic Transformer and its state-of-the-art variants. The code is available at https://github.com/DaShenZi721/CSP.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 46 of its 57 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
46 of 57 references.
References · 46
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,316
- 2020Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecastingcited by 2,169
34 more
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020Rethinking Attention with Performerscited by 1,601
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2020Point Transformercited by 1,470
- 2017ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devicescited by 1,200
- 2018ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Designcited by 1,136
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2022Simplified State Space Layers for Sequence Modelingcited by 788
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 419
- 2021Mesh Graphormercited by 265
- 2020Sparse Sinkhorn Attentioncited by 251
- 2020Transformer Hawkes Processcited by 235
- 2018Sorting out Lipschitz function approximationcited by 213
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 213
- 2022cosFormer: Rethinking Softmax in Attentioncited by 213
- 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 205
- 2022Mega: Moving Average Equipped Gated Attentioncited by 179
- 2023EfficientViT: Memory Efficient Vision Transformer with Cascaded Group Attentioncited by 172
- 2021Sinkformers: Transformers with Doubly Stochastic Attentioncited by 138
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
- 2021AS-MLP: An Axial Shifted MLP Architecture for Visioncited by 101
- 2018Learning long-range spatial dependencies with horizontal gated-recurrent unitscited by 98
- 2021Luna: Linear Unified Nested Attentioncited by 96
- 2021S2-MLP: Spatial-Shift MLP Architecture for Visioncited by 83
- 2021Hire-MLP: Vision MLP via Hierarchical Rearrangementcited by 66
- 2024SHViT: Single-Head Vision Transformer with Memory Efficient Macro Designcited by 56
- 2020Approximating Lipschitz continuous functions with GroupSort neural networkscited by 27
- 2022Towards a General Purpose CNN for Long Range Dependencies in NDcited by 16
- 2024Incorporating Exponential Smoothing into MLP: A Simple but Effective Sequence Modelcited by 2
- 2024S3Attention: Improving Long Sequence Attention with Smoothed Skeleton Sketchingcited by 2
Built on by
Citing papers per year: 2025: 2.
2 papers.