Accelerating Toeplitz Neural Network with Constant-time Inference Complexity
Zhen Qin, Yiran Zhong
摘要
Toeplitz Neural Networks (TNNs) have exhibited outstanding performance in various sequence modeling tasks. They outperform commonly used Transformer-based models while benefiting from log-linear space-time complexities. On the other hand, State Space Models (SSMs) achieve lower performance than TNNs in language modeling but offer the advantage of constant inference complexity. In this paper, we aim to combine the strengths of TNNs and SSMs by converting TNNs to SSMs during inference, thereby enabling TNNs to achieve the same constant inference complexities as SSMs. To accomplish this, we formulate the conversion process as an optimization problem and provide a closed-form solution. We demonstrate how to transform the target equation into a Vandermonde linear system problem, which can be efficiently solved using the Discrete Fourier Transform (DFT). Notably, our method requires no training and maintains numerical stability. It can be also applied to any LongConv-based model. To assess its effectiveness, we conduct extensive experiments on language modeling tasks across various settings. Additionally, we compare our method to other gradient-descent solutions, highlighting the superior numerical stability of our approach. The source code is available at https://github.com/OpenNLPLab/ETSC-Exact-Toeplitz-to-SSM-Conversion .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Log-Linear Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Log-Linear Attention 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Exploring Transformer Extrapolation 引用了 Hierarchically Gated Recurrent Neural Network for Sequence Modeling
- MetaFormer is Actually What You Need for Vision 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MetaFormer is Actually What You Need for Vision 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Hierarchically Gated Recurrent Neural Network for Sequence Modeling 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Hierarchically Gated Recurrent Neural Network for Sequence Modeling 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Hierarchically Gated Recurrent Neural Network for Sequence Modeling 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Hierarchically Gated Recurrent Neural Network for Sequence Modeling 引用了 MetaFormer is Actually What You Need for Vision
引用它的顶会 Paper3
它引用的 Paper8
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- MetaFormer is Actually What You Need for VisionWeihao Yu, Mi Luo, Pan Zhou, Chenyang Si 等CVPR 2022 · 1,114 次引用
相关 Paper
- How to Train Your Mamba for Time Series ForecastingJiaxi Hu, Disen Lan, Ziyu Zhou, Gefeng Luo 等KDD 2026
- Block-State TransformersJonathan Pilault, Mahan Fathi, Orhan Firat, Chris Pal 等NeurIPS 2023 · 33 次引用
- Toeplitz Neural Network for Sequence ModelingZhen Qin, Xiaodong Han, Weixuan Sun, Bowen He 等ICLR 2023 · 5 次引用
- Effectively Modeling Time Series with Simple Discrete State SpacesMichael Zhang, Khaled Kamal Saab, Michael Poli, Tri Dao 等ICLR 2023 · 14 次引用
- Hungry Hungry Hippos: Towards Language Modeling with State Space ModelsDaniel Y. Fu, Tri Dao, Khaled Kamal Saab, Armin W. Thomas 等ICLR 2023 · 117 次引用
