Treeformer: Dense Gradient Trees for Efficient Attention Computation
Not on the map. Why?
Abstract (arXiv)
Standard inference and training with transformer based architectures scale quadratically with input sequence length. This is prohibitively large for a variety of applications especially in web-page translation, query-answering etc. Consequently, several approaches have been developed recently to speedup attention computation by enforcing different attention structures such as sparsity, low-rank, approximating attention using kernels. In this work, we view attention computation as that of nearest neighbor retrieval, and use decision tree based hierarchical navigation to reduce the retrieval cost per query token from linear in sequence length to nearly logarithmic. Based on such hierarchical navigation, we design Treeformer which can use one of two efficient attention layers -- TF-Attention and TC-Attention. TF-Attention computes the attention in a fine-grained style, while TC-Attention is a coarse attention layer which also ensures that the gradients are "dense". To optimize such challenging discrete layers, we propose a two-level bootstrapped training method. Using extensive experiments on standard NLP benchmarks, especially for long-sequences, we demonstrate that our Treeformer architecture can be almost as accurate as baseline Transformer while using 30x lesser FLOPs in the attention layer. Compared to Linformer, the accuracy can be as much as 12% higher while using similar FLOPs in the attention layer.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 27 of its 36 references that are in the map. First posted on arXiv 18 Aug 2022.
Builds on
27 of 36 references.
References · 27
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,120
- 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
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
15 more
- 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
- 2020Multilingual Denoising Pre-training for Neural Machine Translationcited by 1,028
- 2020Efficient Transformers: A Surveycited by 784
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2018A Simple Method for Commonsense Reasoningcited by 223
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 128
- 2020O(n) Connections are Expressive Enough: Universal Approximability of Sparse Transformerscited by 82
- 2021Memory-efficient Transformers via Top-k Attentioncited by 59
- 2021SparseBERT: Rethinking the Importance Analysis in Self-attentioncited by 46
- 2021Learning Accurate Decision Trees with Bandit Feedback via Quantized Gradient Descentcited by 14
Built on by
Citing papers per year: 2023: 4; 2024: 2; 2025: 2.
8 papers.
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesiscited by 55
- 2025Log-Linear Attentioncited by 39
- 2023Efficient Attention via Control Variatescited by 23
- 2024HiRE: High Recall Approximate Top-k Estimation for Efficient LLM Inferencecited by 7
- 2023Tree Cross Attentioncited by 2
- 2024Transparent Networks for Multivariate Time Seriescited by 2
- 2023Multiple Instance Learning with Trainable Decision Tree Ensemblescited by 0
- 2025A Faster Generalized Two-Stage Approximate Top-Kcited by 0
- 2025Log-Linear Attention5 Jun 2025
- 2025A Faster Generalized Two-Stage Approximate Top-K4 Jun 2025
- 2024Transparent Networks for Multivariate Time Series14 Oct 2024
- 2024HiRE: High Recall Approximate Top-k Estimation for Efficient LLM Inference14 Feb 2024
- 2023Tree Cross Attention29 Sep 2023
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesis14 Jun 2023
- 2023Multiple Instance Learning with Trainable Decision Tree Ensembles13 Feb 2023
- 2023Efficient Attention via Control Variates9 Feb 2023