Get the latest tech news

State-space models can learn in-context by gradient descent


Deep state-space models (Deep SSMs) have shown capabilities for in-context learning on autoregressive tasks, similar to transformers. However, the architectural requirements and mechanisms enabling this in recurrent networks remain unclear. This study demonstrates that state-space model architectures can perform gradient-based learning and use it for in-context learning. We prove that a single structured state-space model layer, augmented with local self-attention, can reproduce the outputs of an implicit linear model with least squares loss after one step of gradient descent. Our key insight is that the diagonal linear recurrent layer can act as a gradient accumulator, which can be `applied' to the parameters of the implicit regression model. We validate our construction by training randomly initialized augmented SSMs on simple linear regression tasks. The empirically optimized parameters match the theoretical ones, obtained analytically from the implicit model construction. Extensions to multi-step linear and non-linear regression yield consistent results. The constructed SSM encompasses features of modern deep state-space models, with the potential for scalable training and effectiveness even in general tasks. The theoretical construction elucidates the role of local self-attention and multiplicative interactions in recurrent architectures as the key ingredients for enabling the expressive power typical of foundation models.

View a PDF of the paper titled State-space models can learn in-context by gradient descent, by Neeraj Mohan Sushma and 5 other authors The constructed SSM encompasses features of modern deep state-space models, with the potential for scalable training and effectiveness even in general tasks. The theoretical construction elucidates the role of local self-attention and multiplicative interactions in recurrent architectures as the key ingredients for enabling the expressive power typical of foundation models.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Context

Context

Photo of Gradient Descent

Gradient Descent

Photo of space models

space models

Related news:

News photo

Dr Disrespect returns insisting conversations with "minor" were "inappropriate jokes taken out of context"

News photo

Tree Attention: Topology-Aware Decoding for Long-Context

News photo

Solving the out-of-context chunk problem for RAG