Table of Contents
Fetching ...

SpectralMamba: Efficient Mamba for Hyperspectral Image Classification

Jing Yao, Danfeng Hong, Chenyu Li, Jocelyn Chanussot

TL;DR

SpectralMamba addresses the efficiency gap in hyperspectral image classification by combining a deep state-space model with two novel components: Piece-wise Sequential Scanning (PSS) to reduce spectral sequence length and Gated Spatial-Spectral Merging (GSSM) to adaptively encode local spatial-spectral context. The framework leverages a Mamba (S6) backbone that parameterizes dynamics with input-dependent Δ, B, and C, enabling selective, computation-friendly learning. Across four diverse HS datasets, SpectralMamba delivers superior or competitive accuracy metrics (OA/AA/Kappa) while achieving lower MACs and parameter counts relative to CNN/RNN/Transformer baselines, demonstrating practical gains in remote sensing contexts. The work highlights the potential of tailored state-space models for high-dimensional HS data, with promising implications for efficient large-scale HS analysis and deployment on constrained hardware.

Abstract

Recurrent neural networks and Transformers have recently dominated most applications in hyperspectral (HS) imaging, owing to their capability to capture long-range dependencies from spectrum sequences. However, despite the success of these sequential architectures, the non-ignorable inefficiency caused by either difficulty in parallelization or computationally prohibitive attention still hinders their practicality, especially for large-scale observation in remote sensing scenarios. To address this issue, we herein propose SpectralMamba -- a novel state space model incorporated efficient deep learning framework for HS image classification. SpectralMamba features the simplified but adequate modeling of HS data dynamics at two levels. First, in spatial-spectral space, a dynamical mask is learned by efficient convolutions to simultaneously encode spatial regularity and spectral peculiarity, thus attenuating the spectral variability and confusion in discriminative representation learning. Second, the merged spectrum can then be efficiently operated in the hidden state space with all parameters learned input-dependent, yielding selectively focused responses without reliance on redundant attention or imparallelizable recurrence. To explore the room for further computational downsizing, a piece-wise scanning mechanism is employed in-between, transferring approximately continuous spectrum into sequences with squeezed length while maintaining short- and long-term contextual profiles among hundreds of bands. Through extensive experiments on four benchmark HS datasets acquired by satellite-, aircraft-, and UAV-borne imagers, SpectralMamba surprisingly creates promising win-wins from both performance and efficiency perspectives.

SpectralMamba: Efficient Mamba for Hyperspectral Image Classification

TL;DR

SpectralMamba addresses the efficiency gap in hyperspectral image classification by combining a deep state-space model with two novel components: Piece-wise Sequential Scanning (PSS) to reduce spectral sequence length and Gated Spatial-Spectral Merging (GSSM) to adaptively encode local spatial-spectral context. The framework leverages a Mamba (S6) backbone that parameterizes dynamics with input-dependent Δ, B, and C, enabling selective, computation-friendly learning. Across four diverse HS datasets, SpectralMamba delivers superior or competitive accuracy metrics (OA/AA/Kappa) while achieving lower MACs and parameter counts relative to CNN/RNN/Transformer baselines, demonstrating practical gains in remote sensing contexts. The work highlights the potential of tailored state-space models for high-dimensional HS data, with promising implications for efficient large-scale HS analysis and deployment on constrained hardware.

Abstract

Recurrent neural networks and Transformers have recently dominated most applications in hyperspectral (HS) imaging, owing to their capability to capture long-range dependencies from spectrum sequences. However, despite the success of these sequential architectures, the non-ignorable inefficiency caused by either difficulty in parallelization or computationally prohibitive attention still hinders their practicality, especially for large-scale observation in remote sensing scenarios. To address this issue, we herein propose SpectralMamba -- a novel state space model incorporated efficient deep learning framework for HS image classification. SpectralMamba features the simplified but adequate modeling of HS data dynamics at two levels. First, in spatial-spectral space, a dynamical mask is learned by efficient convolutions to simultaneously encode spatial regularity and spectral peculiarity, thus attenuating the spectral variability and confusion in discriminative representation learning. Second, the merged spectrum can then be efficiently operated in the hidden state space with all parameters learned input-dependent, yielding selectively focused responses without reliance on redundant attention or imparallelizable recurrence. To explore the room for further computational downsizing, a piece-wise scanning mechanism is employed in-between, transferring approximately continuous spectrum into sequences with squeezed length while maintaining short- and long-term contextual profiles among hundreds of bands. Through extensive experiments on four benchmark HS datasets acquired by satellite-, aircraft-, and UAV-borne imagers, SpectralMamba surprisingly creates promising win-wins from both performance and efficiency perspectives.
Paper Structure (27 sections, 6 equations, 8 figures, 6 tables)

This paper contains 27 sections, 6 equations, 8 figures, 6 tables.

Figures (8)

  • Figure 1: The radar chart of experimental results of SpectralMamba and classic network architectures in terms of both hyperspectral image classification performance metric (OA) and mean efficiency metrics (number of parameters and MACs) on four benchmark datasets. To better visualize their differences, we set the lowest values of parameter number and MACs as the base score of 100, and customize a base-10 logarithmic scale on the MACs-axis. According to the chart, our SpectralMamba significantly outperforms its competitors along most metrics, showcasing its great potential as a novel efficient, and effective deep learning framework for hyperspectral data analysis.
  • Figure 2: SpectralMamba mainly consists of three components, i.e., gated spatial-spectral merging (GSSM) module, piece-wise sequential scanning (PSS) strategy, and efficient selective state space (S6) modeling. Its pixelwise counterpart functions by directly operating the original spectrum from the middle stage. $A$, $B$, $C$, and $\Delta$ denote all learnable parameters in the hidden state space, where $H$ records the selectively embedded sequence for the final output.
  • Figure 3: Detailed architectural design and data processing pipeline of our proposed SpectralMamba, exemplified using a patchwise input under batch training for hyperspectral image classification, where PSS and S6 refer to the piece-wise sequential scanning and selective state space model, respectively.
  • Figure 4: An illustration of the false-color image, train and test labels, and classification maps obtained by compared methods on the Houston2013 HS dataset.
  • Figure 5: An illustration of the false-color image, train and test labels, and classification maps obtained by compared methods on the Augsburg HS dataset.
  • ...and 3 more figures