DiffFormer: A Differential Spatial-Spectral Transformer for Hyperspectral Image Classification

Muhammad Ahmad*, Manuel Mazzara, Salvatore Distefano, Adil Mehmood Khan, Silvia Liberata Ullo

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

5 Scopus citations

Abstract

Hyperspectral image classification (HSIC) presents significant challenges due to spectral redundancy and spatial discontinuity, both of which can negatively impact classification performance. To mitigate these issues, this work proposes the differential spatial-spectral transformer (DiffFormer), a novel framework designed to enhance feature discrimination and improve classification accuracy. At its core, DiffFormer incorporates a differential multihead self-attention mechanism, which accentuates subtle spectral-spatial variations by applying differential attention across neighboring patches. The architecture integrates spectral-spatial tokenization, utilizing 3-D convolution-based patch embeddings, positional encoding, and a stack of transformer layers augmented with the SwiGLU activation function—a variant of the gated linear unit—to enable efficient and expressive feature extraction. In addition, a token-based classification head ensures robust representation learning, facilitating precise pixelwise labeling. Extensive experiments on benchmark hyperspectral datasets demonstrate that DiffFormer consistently outperforms state-of-the-art methods in classification accuracy, computational efficiency, and generalizability.

Original languageEnglish
Pages (from-to)10419-10428
Number of pages10
JournalIEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing
Volume18
DOIs
StatePublished - 2025

Bibliographical note

Publisher Copyright:
© 2008-2012 IEEE.

Keywords

  • Differential attention
  • hyperspectral image classification (HSIC)
  • spatial-spectral transformer (SST)

ASJC Scopus subject areas

  • Computers in Earth Sciences
  • Atmospheric Science

Fingerprint

Dive into the research topics of 'DiffFormer: A Differential Spatial-Spectral Transformer for Hyperspectral Image Classification'. Together they form a unique fingerprint.

Cite this