Work

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

Year: 2025
Type: article
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,DiffFormerincorporates 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 thatDiffFormerconsistently outperforms state-of-the-art (SOTA) methods in classification accuracy, computational efficiency, and generalizability. The source code is available athttps://github.com/mahmad000/DiffFormer.
Language: English
Open Access status: gold
Estimated APC paid: $1,800
OpenAlex ID: W4409261268
FWCI: 11.45
Cites: 49
Cited by: 27
Related to: 10