NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

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

Albert Gu, Isys Johnson, Karan Goel, Khaled Kamal Saab, Tri Dao, Atri Rudra, Christopher Re

Sequence modeling in deep learning has traditionally forced researchers to choose between competing paradigms, each with distinct trade-offs. This paper introduces the Linear State-Space Layer (LSSL), a unified sequence modeling architecture that bridges the gap between Recurrent Neural Networks (RNNs), Convolutional Neural Networks (CNNs), and Neural Differential Equations (NDEs).

By leveraging structured state-space matrices, LSSL combines the parallelizable training of CNNs, the efficient inference of RNNs, and the continuous-time flexibility of NDEs. The result is a model capable of achieving state-of-the-art results on extremely long sequences—up to 38,000 steps—where traditional models typically fail.

The Sequence Modeling Trilemma

In the world of sequence modeling, researchers usually have to pick their poison when dealing with long-range dependencies:

  • RNNs are excellent for step-by-step inference and unbounded context but suffer from "vanishing gradients" and are slow to train because their sequential nature prevents parallelization.
  • CNNs train rapidly in parallel but possess a "fixed window" of memory, making them computationally expensive during inference for long sequences.
  • NDEs are mathematically elegant for continuous and irregularly sampled data but are notoriously slow and difficult to scale.

The authors tackle the "long-range dependency" problem: the difficulty of remembering information across thousands of time steps. The LSSL was designed as a single model family that inherits the strengths of all three paradigms without their individual weaknesses.

Methods: The Three Views of LSSL

The core of the paper is the Linear State-Space Layer. It maps an input sequence $u$ to an output $y$ through a latent state $x$ using a linear differential equation:

  1. $\dot{x}(t) = Ax(t) + Bu(t)$
  2. $y(t) = Cx(t) + Du(t)$
The three representations of the Linear State-Space Layer.

The "magic" of LSSL lies in its ability to be computed through three distinct views:

  • Continuous View: As a differential equation, it handles irregularly sampled data and adapts to different timescales by simply changing the step size ($\Delta t$).
  • Recurrent View: By discretizing the equation, it becomes a linear recurrence ($x_t = \bar{A}x_{t-1} + \bar{B}u_t$). This allows for "stateful" inference with constant memory usage per step, much like an RNN.
  • Convolutional View: For a fixed step size, the entire operation can be unrolled and written as a single convolution. This allows the model to be trained in parallel using Fast Fourier Transforms (FFTs), making it significantly faster than an RNN.

To solve the memory problem inherent in long sequences, the authors use HiPPO (High-Order Polynomial Projection Operator) theory to initialize the matrix $A$. Instead of random values, $A$ is structured to mathematically "memorize" the history of the input by projecting it onto orthogonal polynomials.

Key Insights

  • Gating is Timescale: The authors theoretically prove that the "gating" mechanism in popular RNNs (like LSTMs and GRUs) is actually a discrete approximation of learning a timescale ($\Delta t$). This provides a theoretical bridge between RNN heuristics and ODEs.
  • Structure is Mandatory: Randomly initialized state-space models perform poorly. The use of structured matrices (like HiPPO) is the critical component that allows these linear systems to remember long-term information.
  • Efficiency via Quasiseparability: The paper introduces algorithms for "quasiseparable" matrices, showing that the complex state-space math can be computed in quasi-linear time $O(N+L)$, making it theoretically competitive with standard layers.

Key Results and Benchmarks

The authors evaluated LSSL on a diverse range of challenging benchmarks, proving its capability on sequences ranging from thousands to tens of thousands of steps.

LSSL performance on sequential image classification benchmarks.
  • Breaking sCIFAR: LSSL achieved 84.65% accuracy on sequential CIFAR-10 (sCIFAR), outperforming the previous state-of-the-art (74.4%) by over 10 points while using 5x fewer parameters.
  • Raw Speech Mastery: On the Speech Commands dataset—processed as raw audio signals with a massive length of 16,000 steps—LSSL outperformed previous methods by 24 accuracy points. Remarkably, it performed better on raw, long signals than other models did on "hand-crafted" features that were 100x shorter.
  • Healthcare Accuracy: On the BDIMC dataset for vital sign prediction (respiratory rate, heart rate, oxygen) with sequences of length 4,000, LSSL reduced the Root Mean Square Error (RMSE) by up to 80% compared to existing NDE and RNN baselines.
  • Training Speed: LSSL-fixed models reached target accuracies in a fraction of the time (e.g., 0.14x to 0.19x the wall-clock time) of competing models like CKConv.

Limitations and Future Work

While LSSL represents a massive leap in sequence modeling, the authors note a few limitations. The current implementation has a high space complexity ($O(NL)$), making it memory-intensive for very large models. Additionally, the sophisticated "fast algorithm" for quasiseparable matrices was introduced as a proof-of-concept and is not yet fully numerically stable for standard hardware.

Despite these hurdles, this work lays the critical foundation for the highly influential Structured State Space (S4) models, which further refine these ideas for even better efficiency, stability, and widespread adoption.

Summary updated

BibTeX
@inproceedings{gu2021combining,
  author = {Albert Gu and Isys Johnson and Karan Goel and Khaled Kamal Saab and Tri Dao and Atri Rudra and Christopher Re},
  title = {{Combining Recurrent, Convolutional, and Continuous-time Models with Linear State Space Layers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=yWd42CWN3c},
}
Figure