状态空间模型(SSM)最近被证明是非常有效的深度学习层,是RNN,CNN或Transformers等序列模型的有前途的替代品。第一个显示这种潜力的版本是S4模型,它通过使用称为HiPPO矩阵的规定状态矩阵,对涉及远程依赖关系的任务特别有效。虽然这有一个可解释的数学机制来建模长依赖关系,但它引入了一个难以实现的自定义表示和算法。另一方面,最近的一个称为DSS的S4变体表明,当使用基于近似S4矩阵的特定初始化时,将状态矩阵限制为全对角时,仍然可以保持原始模型的性能。这项工作旨在系统地了解如何参数化和初始化这样的对角状态空间模型。虽然它遵循经典的结果,几乎所有的SSM有一个等价的对角形式,我们表明,初始化是至关重要的性能。我们解释了为什么DSS在数学上工作,通过显示S4的矩阵的对角限制令人惊讶地恢复了相同的内核在无限状态维度的限制。我们还系统地描述了各种设计选择的参数化和计算对角SSM,并进行了控制的实证研究消融这些选择的影响。我们的最终模型S4D是S4的简单对角版本,其内核计算仅需2行代码,几乎在所有设置中都可以执行S4,图像,音频和医疗时间序列域的最新结果,在Long Range Arena基准测试中平均为85%。
英文摘要:
State space models (SSM) have recently been shown to be very effective as a deep learning layer as a promising alternative to sequence models such as RNNs, CNNs, or Transformers. The first version to show this potential was the S4 model, which is particularly effective on tasks involving long-range dependencies by using a prescribed state matrix called the HiPPO matrix. While this has an interpretable mathematical mechanism for modeling long dependencies, it introduces a custom representation and algorithm that can be difficult to implement. On the other hand, a recent variant of S4 called DSS showed that restricting the state matrix to be fully diagonal can still preserve the performance of the original model when using a specific initialization based on approximating S4's matrix. This work seeks to systematically understand how to parameterize and initialize such diagonal state space models. While it follows from classical results that almost all SSMs have an equivalent diagonal form, we show that the initialization is critical for performance. We explain why DSS works mathematically, by showing that the diagonal restriction of S4's matrix surprisingly recovers the same kernel in the limit of infinite state dimension. We also systematically describe various design choices in parameterizing and computing diagonal SSMs, and perform a controlled empirical study ablating the effects of these choices. Our final model S4D is a simple diagonal version of S4 whose kernel computation requires just 2 lines of code and performs comparably to S4 in almost all settings, with state-of-the-art results for image, audio, and medical time-series domains, and averaging 85\% on the Long Range Arena benchmark.
HOPE for a Robust Parameterization of Long-memory State Space Models
Lawrence Berkeley National Laboratory(劳伦斯伯克利国家实验室);International Computer Science Institute(国际计算机科学研究所);Center for Applied Mathematics, Cornell University(康奈尔大学应用数学中心);Department of Statistics, University of California at Berkeley(加州大学伯克利分校统计系)
Robustifying State-space Models for Long Sequences via Approximate Diagonalization
Lawrence Berkeley National Laboratory(劳伦斯伯克利国家实验室);International Computer Science Institute(国际计算机科学研究所);Cornell University(康奈尔大学);University of California at Berkeley(加州大学伯克利分校)
Fixed-Point RNNs: Interpolating from Diagonal to Dense
ELLIS Institute Tuebingen(图宾根ELLIS研究所);Max Planck Institute for Intelligent Systems(智能系统马克斯·普朗克研究所);Department of Mathematics, Imperial College London(伦敦帝国学院数学系)
Deep Linear Network Training Dynamics from Random Initialization: Data, Width, Depth, and Hyperparameter Transfer
John Paulson School of Engineering and Applied Sciences, Harvard University(哈佛大学约翰·保罗森工程与应用科学学校);Center for Brain Sciences(脑科学研究中心);Kempner Institute(凯普纳研究所)
An Analysis of Posterior Collapse, Parameterization and Initialization in Variational Deep Gaussian Processes
Department of Computer Science and Artificial Intelligence(计算机科学与人工智能系);Universidad de Granada(格拉纳达大学);Department of Quantitative Methods(定量方法系);CUNEF Universidad Madrid, Spain(CUNEF马德里大学, 西班牙);Department of Computer Science and Centro de Investigación Avanzada en Física Fundamental(计算机科学系和先进物理基础研究中心);Universidad Autónoma de Madrid(马德里自治大学)
DSSMs: State Space Models with Explicit Memory via Delay Differential Equations
College of Control Science and Engineering, Zhejiang University(浙江大学控制科学与工程学院);Department of Mathematics, National University of Singapore(新加坡国立大学数学系);School of Mathematical Sciences, Zhejiang University(浙江大学数学科学学院)
Simplified State Space Layers for Sequence Modeling
Institute for Computational and Mathematical Engineering, Stanford University(斯坦福大学计算与数学工程研究所);Wu Tsai Neurosciences Institute, Stanford University(斯坦福大学吴蔡神经科学研究所);Department of Statistics, Stanford University(斯坦福大学统计学系)
Compelling ReLU Networks to Exhibit Exponentially Many Linear Regions at Initialization and During Training
Department of Computer Science, Vanderbilt University, Nashville TN, USA(范德比尔特大学计算机科学系);National Renewable Energy Laboratory, Golden CO, USA(国家可再生能源实验室)
Optimization Insights into Deep Diagonal Linear Networks
MaLGa, DIBRIS, Università degli Studi di Genova(基因瓦大学MaLGa、DIBRIS分校);MaLGa, DIMA, Università degli Studi di Genova(基因瓦大学MaLGa、DIMA分校);Center for Brains, Minds and Machines, MIT(MIT大脑、心智与机器中心);Istituto Italiano di Tecnologia(意大利技术研究院);Instituto de Alta investigaciòn (IAI), Universidad de Tarapacà(塔拉帕卡大学高级研究机构)
Diagonal State Spaces are as Effective as Structured State Spaces
IBM Research(IBM研究院);Stanford University(斯坦福大学);Tel Aviv University(特拉维夫大学)
对序列数据中的长范围依赖关系进行建模是在文本、视觉、音频和视频等许多模态中实现人类水平性能的基本步骤。虽然基于注意力的模型是一个流行的和有效的选择,在建模短距离的相互作用,其性能要求长距离推理的任务在很大程度上是不够的。在一个令人兴奋的结果中,Gu等人(ICLR 2022)提出了$\textit{Structured State Space}$(S4)架构,该架构在各种模态的几个远程任务上提供了比最先进的模型更大的增益。S4的核心命题是通过对角加低秩结构对状态矩阵进行参数化,从而实现高效计算。在这项工作中,我们表明,即使没有低秩校正,也可以匹配S4的性能,从而假设状态矩阵是对角的。我们的$\textit{Diagonal State Space}$(DSS)模型与S4在长距离Arena任务、语音命令数据集上的语音分类上的性能相匹配,同时在概念上更简单,实现起来更直接。