Generalization Error Analysis for Selective State-Space Models Through the Lens of Attention

Arya Honarpisheh, Mustafa Bozdag, Octavia Camps, Mario Sznaier
2/3/2025
cs.LG

No official code found. Best implementation: Arya-Honarpisheh/gen_err_sel_ssm (3 stars, GPL-3.0, last commit 2025-11-04).

Abstract

State-space models (SSMs) have recently emerged as a compelling alternative to Transformers for sequence modeling tasks. This paper presents a theoretical generalization analysis of selective SSMs, the core architectural component behind the Mamba model. We derive a novel covering number-based generalization bound for selective SSMs, building upon recent theoretical advances in the analysis of Transformer models. Using this result, we analyze how the spectral abscissa of the continuous-time state matrix influences the model's stability during training and its ability to generalize across sequence lengths. We empirically validate our findings on a synthetic majority task, the IMDb sentiment classification benchmark, and the ListOps task, demonstrating how our theoretical insights translate into practical model behavior.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Official Implementation of "Generalization Error Analysis for Selective State-Space Models Through the Lens of Attention"

30Shell, PythonMay 14, 202511 months agoGPL-3.0
generalization-boundsgeneralization-errormamba-modelmamba-state-space-modelsstate-space-models+1 more

Similar Papers

Cite this paper

@article{honarpisheh2025generalization,
  title  = {Generalization Error Analysis for Selective State-Space Models Through the Lens of Attention},
  author = {Arya Honarpisheh and Mustafa Bozdag and Octavia Camps and Mario Sznaier},
  year   = {2025},
  eprint = {2502.01473},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.01473v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.01473.svg)](https://codeofpaper.com/paper/2502.01473)

Discussion