Article · IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing · January 1, 2025
DiffFormer: A Differential Spatial-Spectral Transformer for Hyperspectral Image Classification
Muhammad Imran Ahmad, Manuel Mazzara, Salvatore Distefano, Adil Khan, Silvia Liberata Ullo
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.
More by Manuel Mazzara
- Anchored Rank-Adversarial Fine-Tuning Pretrained Visual Place Recognition ModelsarXiv · 2026
- See the Future, Classify the Present: Stochastic Latent World Modeling for Hyperspectral ImagesarXiv · 2026
- Autoresearch with Coding Agents: Generalizers and Metric-Maximizers on Quran Recitation DataLecture notes in computer science · 2026 · Citations: 1
- What Counts as a Mistake? Annotating Recitation Events in Quran Memorization TranscriptsarXiv · 2026
