State Space Models for Language › S4 and Structured State Matrices

Michael BrenndoerferNovember 17, 20262 min read
Language AI HandbookAll chapters
Part 19 of 67Alternative Sequence and Generative Architectures
Chapter 133State Space Models for Language › S4 and Structured State Matrices
Reading section 6 of 13 · S4 and Structured State Matrices · 2 minSection 6 of 13 · 2 min

Section 6 of 13 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The Structured State Space model (S4) makes long convolution kernels practical to compute from a recurrent state space representation. The revised paper reports 86.09% average accuracy for the updated S4 model across its Long Range Arena suite, including 96.35% on Path-X. Those are sequence benchmark results from the evaluated model and tasks. Gu, Goel, and Ré, Table 2 and Appendix D.2 Table 4.

  • HiPPO initialization. S4 initializes the state dynamics from HiPPO matrices. At each time, HiPPO projects the signal history onto a finite span of polynomials. The measure for that time assigns weights to different parts of the history. The orthogonal projection minimizes the weighted squared approximation error within the span. The construction supplies an initialization for S4. HiPPO, section 2.2 and S4, sections 2.2 and 4.4.
  • Normal plus low rank. S4 exploits a decomposition of the state matrix into a normal part VΛV∗V\Lambda V^* and a low-rank correction −PQ⊤-PQ^\top. The columns of the unitary matrix VV provide a stable change of basis that makes the normal part diagonal. In that basis the full state matrix is diagonal plus low rank. The Woodbury identity reduces the inverse of a diagonal matrix with a low-rank correction to diagonal inverses and a small inner solve, when the relevant inverses exist. The resulting kernel evaluations reduce to structured Cauchy matrix products. Gu, Goel, and Ré, section 3.2 and Appendix C.3.
  • Bilinear discretization. The original S4 paper computes its discrete transition and write matrices using the bilinear transform. This choice supports an efficient structured recurrent update. Gu, Goel, and Ré, section 2.3 and Appendix C.2.

In the bilinear formula, Δ\Delta is the step size and AA and BB are the continuous-time matrices. The formulas require I−(Δ/2)AI-(\Delta/2)A to be invertible. This holds for Δ>0\Delta>0 when every eigenvalue of AA has negative real part.

Aˉ=(I−Δ2A)−1(I+Δ2A),Bˉ=(I−Δ2A)−1ΔB.\bar A = \left(I-\frac{\Delta}{2}A\right)^{-1} \left(I+\frac{\Delta}{2}A\right),\qquad \bar B = \left(I-\frac{\Delta}{2}A\right)^{-1}\Delta B .

For a negative scalar rate aa and a positive step, the discrete pole is (1+Δa/2)/(1−Δa/2)(1+\Delta a/2)/(1-\Delta a/2). Its magnitude is less than one because the magnitude of the numerator is strictly less than the denominator. The ZOH pole eΔae^{\Delta a} is also stable under these conditions. Both transitions are 1+Δa+O(Δ2)1+\Delta a+O(\Delta^2) near Δ=0\Delta=0, so they agree through the linear term in the step size. The worked example in this chapter uses the exact hold formulas for a diagonal system.

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