State Space Models for Language › The Continuous-Time State Space Model

Michael BrenndoerferNovember 17, 20263 min read
Language AI HandbookAll chapters
Part 19 of 67Alternative Sequence and Generative Architectures
Chapter 133State Space Models for Language › The Continuous-Time State Space Model
Reading section 3 of 13 · The Continuous-Time State Space Model · 3 minSection 3 of 13 · 3 min

Section 3 of 13 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Consider a system driven by a scalar signal u(t)u(t). At continuous time tt, the state x(t)x(t) is a vector of NN coordinates. A differential equation describes the change of that vector, and a readout produces a scalar output y(t)y(t).

ddtx(t)=Ax(t)+Bu(t),y(t)=Cx(t)+Du(t).\begin{aligned} \frac{d}{dt}x(t) &= Ax(t) + Bu(t), \\ y(t) &= Cx(t) + Du(t). \end{aligned}
  • A∈RN×NA \in \mathbb{R}^{N\times N} describes the dynamics of the state in the absence of input.
  • B∈RN×1B \in \mathbb{R}^{N\times1} distributes the scalar input over the state coordinates.
  • C∈R1×NC \in \mathbb{R}^{1\times N} takes a weighted sum of the state.
  • D∈RD \in \mathbb{R} scales the direct path from input to output.

With a diagonal AA, each coordinate moves independently in response to the same scalar input. If a coordinate has rate a<0a<0, its value in the absence of input changes by a factor of eate^{at} after time tt. Rates closer to zero decay more slowly. The write and readout vectors determine how strongly each mode participates in the input and output. More general state matrices can also mix state coordinates. Many deep sequence models build a vector-valued layer by applying scalar-input state space computations along several channels and using learned projections to mix channels around them. This development starts from the continuous state equation used by Gu, Goel, and Ré, sections 2 and 3.4.

Why Linearity Matters

The state equation is linear jointly in xx and uu. If the initial state is zero, the output due to a sum of input signals is the sum of the outputs due to the individual signals. You can therefore study how the system responds to individual impulses and add those responses together. When the coefficients stay fixed, an impulse at a later time produces a shifted copy of the same response. Together, those two properties give the convolution representation.

A standard recurrent neural network can apply a nonlinearity inside its update from the previous state. That generally invalidates superposition. State space networks can retain a linear state operator and introduce nonlinear operations around it, such as a gate computed from the layer input. We will use that distinction to understand what Mamba can parallelize.

What "Linear Time Invariant" Means

A linear time-invariant (LTI) state space layer uses the same matrices at every position, and its zero-state response is linear in the input. The contribution from an impulse then depends on the lag since it arrived. For a fixed input coordinate and output coordinate, the layer applies that same lag-dependent rule to each signal value it sees.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy