Saved in:
Bibliographic Details
Main Authors: Rathjens, Jan, Schiewer, Robin, Wiskott, Laurenz, Subramoney, Anand
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2603.12499
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911511675404288
author Rathjens, Jan
Schiewer, Robin
Wiskott, Laurenz
Subramoney, Anand
author_facet Rathjens, Jan
Schiewer, Robin
Wiskott, Laurenz
Subramoney, Anand
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_12499
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Probing Length Generalization in Mamba via Image Reconstruction
Rathjens, Jan
Schiewer, Robin
Wiskott, Laurenz
Subramoney, Anand
Machine Learning
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.
title Probing Length Generalization in Mamba via Image Reconstruction
topic Machine Learning
url https://arxiv.org/abs/2603.12499