Transformers meet Stochastic Block Models: Attention with Data-Adaptive Sparsity and Cost
Not on the map. Why?
Abstract (arXiv)
To overcome the quadratic cost of self-attention, recent works have proposed various sparse attention modules, most of which fall under one of two groups: 1) sparse attention under a hand-crafted patterns and 2) full attention followed by a sparse variant of softmax such as α-entmax. Unfortunately, the first group lacks adaptability to data while the second still requires quadratic cost in training. In this work, we propose SBM-Transformer, a model that resolves both problems by endowing each attention head with a mixed-membership Stochastic Block Model (SBM). Then, each attention head data-adaptively samples a bipartite graph, the adjacency of which is used as an attention mask for each input. During backpropagation, a straight-through estimator is used to flow gradients beyond the discrete sampling step and adjust the probabilities of sampled edges based on the predictive loss. The forward and backward cost are thus linear to the number of edges, which each attention head can also choose flexibly based on the input. By assessing the distribution of graphs, we theoretically show that SBM-Transformer is a universal approximator for arbitrary sequence-to-sequence functions in expectation. Empirical evaluations under the LRA and GLUE benchmarks demonstrate that our model outperforms previous efficient variants as well as the original Transformer with full attention. Our implementation can be found in https://github.com/sc782/SBM-Transformer .
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 39 of its 56 references that are in the map. First posted on arXiv 27 Oct 2022.
Builds on
39 of 56 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2017Graph Attention Networkscited by 8,854
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,590
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
27 more
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2020Efficient Transformers: A Surveycited by 784
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2019Defending Against Neural Fake Newscited by 553
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2021Efficient Attentions for Long Document Summarizationcited by 342
- 2017Community Detection and Stochastic Block Modelscited by 317
- 2021Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encodingcited by 207
- 2018Scaling Neural Machine Translationcited by 204
- 2019Adaptively Sparse Transformerscited by 154
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 128
- 2018Learning long-range spatial dependencies with horizontal gated-recurrent unitscited by 98
- 2020Low-Rank Bottleneck in Multi-head Attention Modelscited by 88
- 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 82
- 2021SparseBERT: Rethinking the Importance Analysis in Self-attentioncited by 46
- 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
- 2013Hierarchical Block Structures and High-resolution Model Selection in Large Networkscited by 37
- 2020Sparse and Continuous Attention Mechanismscited by 37
- 2020SparseRT: Accelerating Unstructured Sparsity on GPUs for Deep Learning Inferencecited by 30
Built on by
Citing papers per year: 2023: 2; 2024: 1; 2025: 1.
4 papers.
- 2023Curve Your Attention: Mixed-Curvature Transformers for Graph Representation Learningcited by 15
- 2023Neural-prior stochastic block modelcited by 4
- 2024CSA-Trans: Code Structure Aware Transformer for ASTcited by 3
- 2025DCMM-Transformer: Degree-Corrected Mixed-Membership Attention for Medical Imagingcited by 0
- 2025DCMM-Transformer: Degree-Corrected Mixed-Membership Attention for Medical Imaging15 Nov 2025
- 2024CSA-Trans: Code Structure Aware Transformer for AST7 Apr 2024
- 2023Curve Your Attention: Mixed-Curvature Transformers for Graph Representation Learning8 Sep 2023
- 2023Neural-prior stochastic block model17 Mar 2023