DiffFormer: A Differential Spatial-Spectral Transformer for Hyperspectral Image Classification
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 (<italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">DiffFormer</i>), a novel framework designed to enhance feature discrimination and improve classification accuracy. At its core, <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">DiffFormer</i> incorporates a differential multi-head self-attention (DMHSA) mechanism, which accentuates subtle spectral-spatial variations by applying differential attention across neighboring patches. The architecture integrates spectral-spatial tokenization, utilizing 3D 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 (GLU)—to enable efficient and expressive feature extraction. Additionally, a token-based classification head ensures robust representation learning, facilitating precise pixel-wise labeling. Extensive experiments on benchmark hyperspectral datasets demonstrate that <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">DiffFormer</i> consistently outperforms state-of-the-art (SOTA) methods in classification accuracy, computational efficiency, and generalizability. The source code is available at <uri xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">https://github.com/mahmad000/DiffFormer</uri>.
Authors
- Salvatore Distefano (ORCID: https://orcid.org/0000-0002-2752-626X)
- Silvia Liberata Ullo (ORCID: https://orcid.org/0000-0001-6294-0581)
- Adil Khan (ORCID: https://orcid.org/0000-0003-2220-8518)
- Manuel Mazzara (ORCID: https://orcid.org/0000-0002-3860-4948)
- Muhammad Ahmad (ORCID: https://orcid.org/0000-0001-8184-0068)
Institutions
- University of Messina (IT)
- King Fahd University of Petroleum and Minerals (SA)
- University of Sannio (IT)
- University of Hull (GB)
- Innopolis University (RU)
Publication Details
- Journal
- IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/jstars.2025.3558889
- Citations
- 7
- Primary Topic
- Remote-Sensing Image Classification
- Type
- article
- Field-Weighted Citation Impact
- 7.95