Abstract
Mamba has attracted widespread interest as a general-purpose sequence model due to its low computational complexity and competitive performance relative to transformers. However, its performance can degrade when inference sequence lengths exceed those seen during training. We study this phenomenon using a controlled vision task in which Mamba reconstructs images from sequences of image patches. By analyzing reconstructions at different stages of sequence processing, we reveal that Mamba qualitatively adapts its behavior to the distribution of sequence lengths encountered during training, resulting in strategies that fail to generalize beyond this range. To support our analysis, we introduce a length-adaptive variant of Mamba that improves performance across training sequence lengths. Our results provide an intuitive perspective on length generalization in Mamba and suggest directions for improving the architecture.
| Original language | English |
|---|---|
| Publication status | Accepted/In press - 29 May 2026 |
| Event | International Conference on Artificial Neural Networks - Padua, Italy Duration: 14 Sept 2026 → 17 Sept 2026 https://e-nns.org/icann2026/ |
Conference
| Conference | International Conference on Artificial Neural Networks |
|---|---|
| Country/Territory | Italy |
| City | Padua |
| Period | 14/09/26 → 17/09/26 |
| Internet address |
Keywords
- cs.LG
Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver