Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layers

Albert Gu, Isys Johnson, Karan Goel, Khaled Saab, Tri Dao +2 more
10/26/2021
1,326 citations
cs.LGcs.AI
state-space-mamba

Official code: state-spaces/s4 (2,932 stars, Jupyter Notebook, Apache-2.0, PyTorch, last commit 2024-07-17).

Abstract

Recurrent neural networks (RNNs), temporal convolutions, and neural differential equations (NDEs) are popular families of deep learning models for time-series data, each with unique strengths and tradeoffs in modeling power and computational efficiency. We introduce a simple sequence model inspired by control systems that generalizes these approaches while addressing their shortcomings.

Show full abstract

The Linear State-Space Layer (LSSL) maps a sequence $u \mapsto y$ by simply simulating a linear continuous-time state-space representation $\dot{x} = Ax + Bu, y = Cx + Du$. Theoretically, we show that LSSL models are closely related to the three aforementioned families of models and inherit their strengths. For example, they generalize convolutions to continuous-time, explain common RNN heuristics, and share features of NDEs such as time-scale adaptation. We then incorporate and generalize recent theory on continuous-time memorization to introduce a trainable subset of structured matrices $A$ that endow LSSLs with long-range memory. Empirically, stacking LSSL layers into a simple deep neural network obtains state-of-the-art results across time series benchmarks for long dependencies in sequential image classification, real-world healthcare regression tasks, and speech. On a difficult speech classification task with length-16000 sequences, LSSL outperforms prior approaches by 24 accuracy points, and even outperforms baselines that use hand-crafted features on 100x shorter sequences.

View on arXivView PDF

Code Implementations(1)

state-spaces/s4Official100%
PyTorchApache-2.0

Structured state space sequence models

2,932371Jupyter Notebook, PythonNov 3, 20212 years agoApache-2.0
pytorchsequence-modelsstate-space-models

Similar Papers

Cite this paper

@article{gu2021combining,
  title  = {Combining Recurrent, Convolutional, and Continuous-time Models with Linear State-Space Layers},
  author = {Albert Gu and Isys Johnson and Karan Goel and Khaled Saab and Tri Dao and Atri Rudra and Christopher Ré},
  year   = {2021},
  eprint = {2110.13985},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.13985}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2110.13985.svg)](https://codeofpaper.com/paper/2110.13985)

Discussion