SP-Mamba: Structure-Preserving State-Space Modeling for Hyperspectral Image Classification
Abstract
Mamba has recently shown great potential for hyperspectral image (HSI) classification. However, existing Mamba-based methods often disrupt the intrinsic 3-D spectral–spatial structure during sequence construction by either embedding spectral information into channels or modeling spectral and spatial sequences separately. Such structural misalignment hinders the modeling of joint spectral–spatial dependencies and limits classification performance. To address this issue, we propose a structure-preserving Mamba (SP-Mamba) framework for HSI classification. At the core of SP-Mamba is a structure-preserving spectral–spatial sequence modeling (SP-SSM) mechanism that enables state-space models to operate on structure-consistent spectral–spatial sequences. Specifically, SP-SSM first organizes spectral information into a unified 3-D spectral–spatial representation through spectral tokenization. A structure-preserving 3-D spectral–spatial serialization strategy is then applied to transform the resulting 3-D representation into sequences while maintaining spectral continuity and spatial neighborhood relationships. State-space modeling is subsequently performed along these structure-consistent sequences to capture long-range spectral–spatial dependencies. Furthermore, we introduce a 3-D spectral–spatial positional encoding module to explicitly encode spectral–spatial positional information, which provides complementary positional cues to further enhance serialized spectral–spatial sequence modeling. Extensive experiments on three benchmark datasets demonstrate that SP-Mamba achieves strong and consistent performance against state-of-the-art methods, notably reaching 92.16% overall accuracy on the challenging HanChuan dataset and showing at least a 2.87% improvement. These results highlight the importance of explicitly preserving the 3-D spectral–spatial organization for effectively exploiting the potential of state-space models in HSI classification.