# DiffFormer: a Differential Spatial-Spectral Transformer for Hyperspectral Image Classification

arXiv: https://arxiv.org/abs/2412.17350 · HTML: https://mlsanity.com/paper/2412.17350/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 57 references that are in the map.
- First posted on arXiv 23 Dec 2024.

## Builds on (most cited first, 8 of 8)

- [Searching for Activation Functions](https://mlsanity.com/paper/1710.05941/) (2017)
- [Hyperspectral Image Classification-Traditional to Deep Models: A Survey for Future Prospects](https://mlsanity.com/paper/2101.06116/) (2021)
- [Pyramid Hierarchical Transformer for Hyperspectral Image Classification](https://mlsanity.com/paper/2404.14945/) (2024)
- [WaveMamba: Spatial-Spectral Wavelet Mamba for Hyperspectral Image Classification](https://mlsanity.com/paper/2408.01231/) (2024)
- [Multi-head Spatial-Spectral Mamba for Hyperspectral Image Classification](https://mlsanity.com/paper/2408.01224/) (2024)
- [Transformers Fusion across Disjoint Samples for Hyperspectral Image Classification](https://mlsanity.com/paper/2405.01095/) (2024)
- [S4DL: Shift-sensitive Spatial-Spectral Disentangling Learning for Hyperspectral Image Unsupervised Domain Adaptation](https://mlsanity.com/paper/2408.15263/) (2024)
- [Multiple Sub-Pixel Target Detection for Hyperspectral Imaging Systems](https://mlsanity.com/paper/2301.06314/) (2023)

## Built on by (most cited first, 3 of 3)

- [3D Fourier-based Global Feature Extraction for Hyperspectral Image Classification](https://mlsanity.com/paper/2603.16426/) (2026)
- [Dynamic Memory Transformer for Hyperspectral Image Classification](https://mlsanity.com/paper/2504.13242/) (2025)
- [Cosine-Normalized Attention for Hyperspectral Image Classification](https://mlsanity.com/paper/2604.01763/) (2026)

## Abstract (arXiv)

Hyperspectral image classification (HSIC) has gained significant attention because of its potential in analyzing high-dimensional data with rich spectral and spatial information. In this work, we propose the Differential Spatial-Spectral Transformer (DiffFormer), a novel framework designed to address the inherent challenges of HSIC, such as spectral redundancy and spatial discontinuity. The DiffFormer leverages a Differential Multi-Head Self-Attention (DMHSA) mechanism, which enhances local feature discrimination by introducing differential attention to accentuate subtle variations across neighboring spectral-spatial patches. The architecture integrates Spectral-Spatial Tokenization through three-dimensional (3D) convolution-based patch embeddings, positional encoding, and a stack of transformer layers equipped with the SWiGLU activation function for efficient feature extraction (SwiGLU is a variant of the Gated Linear Unit (GLU) activation function). A token-based classification head further ensures robust representation learning, enabling precise labeling of hyperspectral pixels. Extensive experiments on benchmark hyperspectral datasets demonstrate the superiority of DiffFormer in terms of classification accuracy, computational efficiency, and generalizability, compared to existing state-of-the-art (SOTA) methods. In addition, this work provides a detailed analysis of computational complexity, showcasing the scalability of the model for large-scale remote sensing applications. The source code will be made available at urlhttps://github.com/mahmad000/DiffFormer after the first round of revision.
