State Space Models
摘要
This chapter explores State Space ModelsStatestate space model (SSM) (SSMs) as a compelling alternative to traditional sequence modeling methods, particularly when compared to attentionAttention-based architecturesArchitecture such as TransformersTransformer. SSMsStatestate space model (SSM) demonstrate strong capabilities in modeling long-range dependencies across various modalities, including time series, audio, and image data. Although early SSMsStatestate space model (SSM) underperformed in natural language tasksTask compared to TransformersTransformer, recent models such as the Structured State SpaceStructured state space (S4) ModelStatestate space model (SSM) (S4) have significantly reduced this gap by enabling efficient long-range reasoning. Follow-ups such as DiagonalDiagonal State Space ModelsStatestate space model (SSM) (DSS), H3 (Hungry Hungry Hippos) hybrids, and especially MambaMamba show that SSMsStatestate space model (SSM) are now competitive alternatives in language modeling as well as other modalities. Newer architecturesArchitecture such as MambaMamba dynamically parameterize state matrices based on input, further enhancing adaptability and performance. As the field evolves, SSMsStatestate space model (SSM) are increasingly recognized for their ability to process extremely long sequences—such as entire books—more effectively than traditional attentionAttention-based models. This chapter begins by outlining the advantages of SSMsStatestate space model (SSM) and introducing their continuousContinuous and discreteDiscrete formulations. It then discusses key architecturesArchitecture, including S4Structured state space (S4), MambaMamba, and TTT (Test Time Training)Test time training (TTT) layersLayer, and concludes by formally relating the attentionAttention mechanism to SSMsStatestate space model (SSM). PriorPrior familiarity with recurrent neural networksRecurrent neural network (RNN) and attentionAttention-based models is recommended for optimal comprehension of this chapter.