Skip to content
Publications

Article · IEEE Transactions on Geoscience and Remote Sensing · January 1, 2026

Iformer: Irregular Spatial–Spectral Transformer for Hyperspectral Image Classification

Muhammad Imran Ahmad, Manuel Mazzara

Abstract

The hyperspectral image (HSI) classification (HSIC) remains challenging due to severe class imbalance dominated by background pixels, thin and edge-adjacent structures with anisotropic context, nonstationary spectral responses across materials, and illumination variability in large HSI cubes. The existing convolutional and transformer-based methods often rely on stationary kernels and uniform spectral sampling, which limits their ability to model irregular spatial–spectral dependencies. This work introduces Iformer, a band-aware irregular spatial–spectral transformer that incorporates coordinate-constrained spectral modeling and geometry-aware spatial propagation. The proposed framework is built upon three core components. First, the irregular spectral aggregation (ISA) models the spectral axis using coordinate-aware anchors with content-gated attention, enabling adaptation to spectral nonstationarity while reducing spectral tokens ($S' \to R_{\mathrm {ref}} \ll S'$) to control computational complexity. Second, irregular spatial propagation ($\mathrm {ISA}_{\mathrm {spa}}$) introduces a coordinate-driven anisotropic kernel to capture directional spatial context, improving discrimination of fine and structurally complex regions. Third, irregular multihead self-attention (iMHSA) enables heterogeneous subspace allocation across attention heads, allowing the model to adapt its representational capacity to varying spectral–spatial complexities. A unified spatial–spectral embedding supports these components via a 3-D patchifier with channel reweighting and a calibrated CLS+GAP readout to improve prediction stability under class imbalance. Extensive experiments on four widely used benchmarks demonstrate that Iformer consistently achieves superior accuracy.

Remote-Sensing Image ClassificationAdvanced Neural Network ApplicationsSpectroscopy and Chemometric Analyseshyperspectral image classificationclass imbalancemulti-head self-attention

More by Manuel Mazzara