
s4d
25 ops2.7K params
Structured state space layer for long sequences, built on an efficiently computed state space model.
Time series · 25 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
menagerie.classics.ssm_s4:build_s4_layer: build({}) S4, the Structured State Space sequence model, is a sequence layer built on the state space model (SSM), a system whose matrices A, B, C and D map an input signal to an output through a latent state. Its target is long-range dependencies: the paper notes that RNNs, CNNs and Transformers still struggle to scale to very long sequences of 10000 or more steps.
An earlier SSM approach showed that the right choice of state matrix A could handle long-range dependencies, but it had prohibitive computation and memory requirements. S4 conditions A with a low-rank correction, which allows it to be diagonalized stably and reduces the SSM to the computation of a Cauchy kernel. An S4 layer starts from an SSM with A set to the HiPPO matrix. Compared to the earlier Linear State Space Layer (LSSL), the paper reports S4 as up to 30× faster with 400× less memory usage.
Among the paper's results is 91% accuracy on sequential CIFAR-10 with no data augmentation or auxiliary losses. The core S4 module is a linear transformation, and the authors describe the overall deep S4 model as closely related to a depthwise-separable CNN but with global convolution kernels.
Key idea. The paper proposes S4, a new parameterization of the state space model that can be computed much more efficiently than prior approaches while preserving their theoretical strengths.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{gu2022efficientlymodelinglongsequences,
title={Efficiently Modeling Long Sequences with Structured State Spaces},
author={Albert Gu and Karan Goel and Christopher Ré},
year={2022},
eprint={2111.00396},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2111.00396},
}