H-Transformer-1D: Fast One-Dimensional Hierarchical Attention for Sequences
摘要
We describe an efficient hierarchical method to compute attention in the Transformer architecture. The proposed attention mechanism exploits a matrix structure similar to the Hierarchical Matrix (H-Matrix) developed by the numerical analysis community, and has linear run time and memory complexity. We perform extensive experiments to show that the inductive bias embodied by our hierarchical attention is effective in capturing the hierarchical structure in the sequences typical for natural language and vision tasks. Our method is superior to alternative sub-quadratic proposals by over +6 points on average on the Long Range Arena benchmark. It also sets a new SOTA test perplexity on One-Billion Word dataset with 5x fewer model parameters than that of the previous-best Transformer-based models. Computing the similarity matrix S in Eq. ( 4 ) and the attention matrix A in Eq. ( 3 ) takes O(L 2 d) time and O(L 2 ) memory. Similarly, computing AV in Eq. (2) takes O(L 2 d) time, and computing A • 1 L in Eq. (5) takes O(L 2 ) time. The O(L 2 d) and O(L 2 ) complexities are the bottlenecks for applying the attention mechanism over very long sequences.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 24 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Diagonal State Spaces are as Effective as Structured State Spaces 引用了 Reformer: The Efficient Transformer
- Diagonal State Spaces are as Effective as Structured State Spaces 引用了 Language Models are Few-Shot Learners
- Generative Pretraining From Pixels 引用了 Attention Augmented Convolutional Networks
- Generative Pretraining From Pixels 引用了 Reformer: The Efficient Transformer
- Block-Recurrent Transformers 引用了 Reformer: The Efficient Transformer
- Block-Recurrent Transformers 引用了 Memorizing Transformers
- Block-Recurrent Transformers 引用了 Language Models are Few-Shot Learners
- Simple linear attention language models balance the recall-throughput tradeoff 引用了 Reformer: The Efficient Transformer
- Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting 引用了 Reformer: The Efficient Transformer
- Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformers 引用了 Reformer: The Efficient Transformer
- Memorizing Transformers 引用了 Reformer: The Efficient Transformer
- Memorizing Transformers 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper24
- Diagonal State Spaces are as Effective as Structured State SpacesAnkit Gupta, Albert Gu, Jonathan BerantNeurIPS 2022 · 546 次引用
- Memorizing TransformersYuhuai Wu, Markus Norman Rabe, DeLesley Hutchins, Christian SzegedyICLR 2022 · 231 次引用
- Block-Recurrent TransformersDeLesley Hutchins, Imanol Schlag, Yuhuai Wu, Ethan Dyer 等NeurIPS 2022 · 163 次引用
- Simple linear attention language models balance the recall-throughput tradeoffSimran Arora, Sabri Eyuboglu, Michael Zhang, Aman Timalsina 等ICML 2024 · 154 次引用
- Dynamic Context Pruning for Efficient and Interpretable Autoregressive TransformersSotiris Anagnostidis, Dario Pavllo, Luca Biggio, Lorenzo Noci 等NeurIPS 2023 · 95 次引用
它引用的 Paper8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang 等AAAI 2021 · 7,289 次引用
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
- Generative Pretraining From PixelsMark Chen, Alec Radford, Rewon Child, Jeffrey Wu 等ICML 2020 · 1,773 次引用
- Attention Augmented Convolutional NetworksIrwan Bello, Barret Zoph, Quoc Le, Ashish Vaswani 等ICCV 2019 · 1,149 次引用
相关 Paper
- Long-range Sequence Modeling with Predictable Sparse AttentionYimeng Zhuang, Jing Zhang, Mei TuACL 2022 · 11 次引用
- Long-Short Transformer: Efficient Transformers for Language and VisionChen Zhu, Wei Ping, Chaowei Xiao, Mohammad Shoeybi 等NeurIPS 2021 · 180 次引用
- SEA: Sparse Linear Attention with Estimated Attention MaskHeejun Lee, Jina Kim, Jeffrey Willette, Sung Ju HwangICLR 2024 · 12 次引用
- Customizing the Inductive Biases of Softmax Attention using Structured MatricesYilun Kuang, Noah Amsel, Sanae Lotfi, Shikai Qiu 等ICML 2025
- Composite Slice Transformer: An Efficient Transformer with Composition of Multi-Scale Multi-Range AttentionsMingu Lee, Saurabh Pitre, Tianyu Jiang, Pierre-David Letourneau 等ICLR 2023
