Table of Contents
Fetching ...

DSXFormer: Dual-Pooling Spectral Squeeze-Expansion and Dynamic Context Attention Transformer for Hyperspectral Image Classification

Farhan Ullah, Irfan Ullah, Khalil Khan, Giovanni Pau, JaKeoung Koo

TL;DR

DSXFormer tackles hyperspectral image classification by fusing a Dual-Pooling Spectral Squeeze-Expansion (DSX) block with Dynamic Context Attention (DCA) in a windowed transformer. The DSX block recalibrates spectral channels using dual pooling (global average and max) and a light gating mechanism to emphasize informative bands, while DCA captures local spectral–spatial dependencies with reduced computation via window-based self-attention and dynamic context scaling. The approach, combined with patch extraction/embedding/merging for multi-scale learning, achieves state-of-the-art results on SA, IP, PU, and KSC, including near-perfect performance on several classes and strong robustness under limited labeled data. This work advances HSIC by delivering high spectral discriminability and efficient contextual modeling, with potential for few-shot, semi-supervised, and temporal-spectral extensions in future research.

Abstract

Hyperspectral image classification (HSIC) is a challenging task due to high spectral dimensionality, complex spectral-spatial correlations, and limited labeled training samples. Although transformer-based models have shown strong potential for HSIC, existing approaches often struggle to achieve sufficient spectral discriminability while maintaining computational efficiency. To address these limitations, we propose a novel DSXFormer, a novel dual-pooling spectral squeeze-expansion transformer with Dynamic Context Attention for HSIC. The proposed DSXFormer introduces a Dual-Pooling Spectral Squeeze-Expansion (DSX) block, which exploits complementary global average and max pooling to adaptively recalibrate spectral feature channels, thereby enhancing spectral discriminability and inter-band dependency modeling. In addition, DSXFormer incorporates a Dynamic Context Attention (DCA) mechanism within a window-based transformer architecture to dynamically capture local spectral-spatial relationships while significantly reducing computational overhead. The joint integration of spectral dual-pooling squeeze-expansion and DCA enables DSXFormer to achieve an effective balance between spectral emphasis and spatial contextual representation. Furthermore, patch extraction, embedding, and patch merging strategies are employed to facilitate efficient multi-scale feature learning. Extensive experiments conducted on four widely used hyperspectral benchmark datasets, including Salinas (SA), Indian Pines (IP), Pavia University (PU), and Kennedy Space Center (KSC), demonstrate that DSXFormer consistently outperforms state-of-the-art methods, achieving classification accuracies of 99.95%, 98.91%, 99.85%, and 98.52%, respectively.

DSXFormer: Dual-Pooling Spectral Squeeze-Expansion and Dynamic Context Attention Transformer for Hyperspectral Image Classification

TL;DR

DSXFormer tackles hyperspectral image classification by fusing a Dual-Pooling Spectral Squeeze-Expansion (DSX) block with Dynamic Context Attention (DCA) in a windowed transformer. The DSX block recalibrates spectral channels using dual pooling (global average and max) and a light gating mechanism to emphasize informative bands, while DCA captures local spectral–spatial dependencies with reduced computation via window-based self-attention and dynamic context scaling. The approach, combined with patch extraction/embedding/merging for multi-scale learning, achieves state-of-the-art results on SA, IP, PU, and KSC, including near-perfect performance on several classes and strong robustness under limited labeled data. This work advances HSIC by delivering high spectral discriminability and efficient contextual modeling, with potential for few-shot, semi-supervised, and temporal-spectral extensions in future research.

Abstract

Hyperspectral image classification (HSIC) is a challenging task due to high spectral dimensionality, complex spectral-spatial correlations, and limited labeled training samples. Although transformer-based models have shown strong potential for HSIC, existing approaches often struggle to achieve sufficient spectral discriminability while maintaining computational efficiency. To address these limitations, we propose a novel DSXFormer, a novel dual-pooling spectral squeeze-expansion transformer with Dynamic Context Attention for HSIC. The proposed DSXFormer introduces a Dual-Pooling Spectral Squeeze-Expansion (DSX) block, which exploits complementary global average and max pooling to adaptively recalibrate spectral feature channels, thereby enhancing spectral discriminability and inter-band dependency modeling. In addition, DSXFormer incorporates a Dynamic Context Attention (DCA) mechanism within a window-based transformer architecture to dynamically capture local spectral-spatial relationships while significantly reducing computational overhead. The joint integration of spectral dual-pooling squeeze-expansion and DCA enables DSXFormer to achieve an effective balance between spectral emphasis and spatial contextual representation. Furthermore, patch extraction, embedding, and patch merging strategies are employed to facilitate efficient multi-scale feature learning. Extensive experiments conducted on four widely used hyperspectral benchmark datasets, including Salinas (SA), Indian Pines (IP), Pavia University (PU), and Kennedy Space Center (KSC), demonstrate that DSXFormer consistently outperforms state-of-the-art methods, achieving classification accuracies of 99.95%, 98.91%, 99.85%, and 98.52%, respectively.
Paper Structure (19 sections, 23 equations, 10 figures, 9 tables, 1 algorithm)

This paper contains 19 sections, 23 equations, 10 figures, 9 tables, 1 algorithm.

Figures (10)

  • Figure 1: Overall architecture of the proposed DSXFormer framework for HSIC. The network comprises patch extraction and embedding, hierarchical DSXFormer encoding blocks integrating DSX and DCA, followed by patch merging and a global pooling–based classification head as the output layer.
  • Figure 2: Architecture of the proposed DSX module.
  • Figure 3: Illustration of the SA dataset: (a) Original image, (b) Ground truth.
  • Figure 4: Illustration of the PU dataset: (a) Original image, (b) Ground truth.
  • Figure 5: Illustration of the IP dataset: (a) Original image, (b) Ground truth.
  • ...and 5 more figures