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.

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

Ahmad, Muhammad
;
Mazzara, Manuel
;
Distefano, Salvatore
;
2025-01-01

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.
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11570/3365418
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 35
  • ???jsp.display-item.citation.isi??? 34
social impact