arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.00396cs.LG
收藏

基于结构化状态空间的长序列建模

Efficiently Modeling Long Sequences with Structured State Spaces

Stanford University(斯坦福大学)

Albert Gu, Karan Goel, Christopher Ré

摘要:

序列建模的一个中心目标是设计一个单一的原则模型,可以解决序列数据的形式和任务的范围内,特别是在长期的依赖关系。尽管包括RNN、CNN和Transformers在内的传统模型具有用于捕获长依赖关系的专用变体,但它们仍然难以扩展到非常长的$10000$序列或更多步骤。最近一种很有前途的方法提出了通过模拟基本状态空间模型(SSM)\( x'(t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t) \)来建模序列,并表明对于状态矩阵\( A \)的适当选择,该系统可以在数学上和经验上处理长程依赖关系。然而,这种方法具有令人望而却步的计算和内存需求,使其不可行的一般序列建模解决方案。我们提出了结构化状态空间序列模型(S4)的基础上,一个新的参数化的SSM,并表明,它可以更有效地计算比以前的方法,同时保持其理论优势。我们的技术涉及条件\( A \)与低秩校正,允许它被对角化稳定和减少SSM的柯西内核的充分研究的计算。S4在各种已建立的基准测试中取得了强有力的经验结果,包括(i)在连续CIFAR-10上的91\%准确率,没有数据增强或辅助损失,与更大的2-D ResNet相当,(ii)在图像和语言建模任务上基本上缩小了与Transformers的差距,同时更快地生成$60\times$(iii)在来自长距离竞技场基准测试的每个任务上都有SoTA,包括解决具有挑战性的Path-X任务,长度为16 k,所有先前的工作都失败了,同时与所有竞争对手一样高效。

英文摘要:

A central goal of sequence modeling is designing a single principled model that can address sequence data across a range of modalities and tasks, particularly on long-range dependencies. Although conventional models including RNNs, CNNs, and Transformers have specialized variants for capturing long dependencies, they still struggle to scale to very long sequences of $10000$ or more steps. A promising recent approach proposed modeling sequences by simulating the fundamental state space model (SSM) \( x'(t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t) \), and showed that for appropriate choices of the state matrix \( A \), this system could handle long-range dependencies mathematically and empirically. However, this method has prohibitive computation and memory requirements, rendering it infeasible as a general sequence modeling solution. We propose the Structured State Space sequence model (S4) based on a new parameterization for the SSM, and show that it can be computed much more efficiently than prior approaches while preserving their theoretical strengths. Our technique involves conditioning \( A \) with a low-rank correction, allowing it to be diagonalized stably and reducing the SSM to the well-studied computation of a Cauchy kernel. S4 achieves strong empirical results across a diverse range of established benchmarks, including (i) 91\% accuracy on sequential CIFAR-10 with no data augmentation or auxiliary losses, on par with a larger 2-D ResNet, (ii) substantially closing the gap to Transformers on image and language modeling tasks, while performing generation $60\times$ faster (iii) SoTA on every task from the Long Range Arena benchmark, including solving the challenging Path-X task of length 16k that all prior work fails on, while being as efficient as all competitors.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑