mlsanityData to 7 Oct 2026

Dynamic N:M Fine-grained Structured Sparse Attention Mechanism

arXiv 2203.00091 ↗First posted 28 Feb 2022cs.LGcited by 14

Not on the map. Why?

Abstract (arXiv)

Transformers are becoming the mainstream solutions for various tasks like NLP and Computer vision. Despite their success, the high complexity of the attention mechanism hinders them from being applied to latency-sensitive tasks. Tremendous efforts have been made to alleviate this problem, and many of them successfully reduce the asymptotic complexity to linear. Nevertheless, most of them fail to achieve practical speedup over the original full attention under moderate sequence lengths and are unfriendly to finetuning. In this paper, we present DFSS, an attention mechanism that dynamically prunes the full attention weight matrix to N:M fine-grained structured sparse pattern. We provide both theoretical and empirical evidence that demonstrates DFSS is a good approximation of the full attention mechanism. We propose a dedicated CUDA kernel design that completely eliminates the dynamic pruning overhead and achieves speedups under arbitrary sequence length. We evaluate the 1:2 and 2:4 sparsity under different configurations and achieve 1.27~ 1.89x speedups over the full-attention mechanism. It only takes a couple of finetuning epochs from the pretrained model to achieve on par accuracy with full attention mechanism on tasks from various domains under different sequence lengths from 384 to 4096.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 28 of its 38 references that are in the map. First posted on arXiv 28 Feb 2022.

Builds on

28 of 38 references.

References · 28

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2020Longformer: The Long-Document Transformercited by 3,362
  4. 2018The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networkscited by 2,250
  5. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  6. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  7. 2020Reformer: The Efficient Transformercited by 1,658
  8. 2020Rethinking Attention with Performerscited by 1,584
  9. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  10. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  11. 2020Efficient Transformers: A Surveycited by 784
  12. 2018Image Transformercited by 770
16 more
  1. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
  2. 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
  3. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
  4. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
  5. 2019Q8BERT: Quantized 8Bit BERTcited by 296
  6. 2020Sparse Sinkhorn Attentioncited by 250
  7. 2020SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruningcited by 228
  8. 2021Accelerating Sparse Deep Neural Networkscited by 213
  9. 2018Scaling Neural Machine Translationcited by 204
  10. 2021Learning N:M Fine-grained Structured Sparse Neural Networks From Scratchcited by 177
  11. 2021Block Pruning For Faster Transformerscited by 176
  12. 2021SOFT: Softmax-free Transformer with Linear Complexitycited by 128
  13. 2021A Unified Lottery Ticket Hypothesis for Graph Neural Networkscited by 118
  14. 2019Explicit Sparse Transformer: Concentrated Attention Through Explicit Selectioncited by 61
  15. 2019DropAttention: A Regularization Method for Fully-Connected Self-Attention Networkscited by 20
  16. 2020Systolic Tensor Array: An Efficient Structured-Sparse GEMM Accelerator for Mobile CNN Inferencecited by 17

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 4; 2024: 4; 2025: 4; 2026: 2.

14 papers.

Sort:

By area: