Efficient Deep Learning of Non-local Features for Hyperspectral Image Classification

Yu Shen, Sijie Zhu, Chen Chen, Qian Du, Liang Xiao, Delu Pan · DOI

Abstract

Deep learning based methods, such as Convolution Neural Network (CNN), have demonstrated their efficiency in hyperspectral image (HSI) classification. These methods can automatically learn spectral-spatial discriminative features within local patches. However, for each pixel in an HSI, it is not only related to its nearby pixels but also has connections to pixels far away from itself. Therefore, to incorporate the long-range contextual information, a deep fully convolutional network (FCN) with an efficient non-local module, named ENL-FCN, is proposed for HSI classification. In the proposed framework, a deep FCN considers an entire HSI as input and extracts spectral-spatial information in a local receptive field. The efficient non-local module is embedded in the network as a learning unit to capture the long-range contextual information. Different from the traditional non-local neural networks, the long-range contextual information is extracted in a specially designed criss-cross path for computation efficiency. Furthermore, by using a recurrent operation, each pixel's response is aggregated from all pixels of HSI. The benefits of our proposed ENL-FCN are threefold: 1) the long-range contextual information is incorporated effectively, 2) the efficient module can be freely embedded in a deep neural network in a plug-and-play fashion, and 3) it has much fewer learning parameters and requires less computational resources. The experiments conducted on three popular HSI datasets demonstrate that the proposed method achieves state-of-the-art classification performance with lower computational cost in comparison with several leading deep neural networks for HSI.

Introduction

Hyperspectral images (HSIs) are characterized by hundreds of narrow spectral bands, providing a wealth of information for precise land-cover classification. While Convolutional Neural Networks (CNNs) have excelled at extracting local spectral-spatial features, they often fail to capture long-range dependencies. A pixel's identity may be strongly correlated with distant pixels of the same class, a relationship that local patch-based methods ignore.

Traditional Non-Local (NL) modules address this by computing dense attention maps between all pixel pairs. However, for an image of size $H \times W$, this results in a complexity of $O((HW)^2)$, leading to massive memory consumption and computational overhead that often exceeds GPU limits for high-resolution HSIs.

Proposed Method: ENL-FCN

To overcome these limitations, we propose the Efficient Non-Local Fully Convolutional Network (ENL-FCN). The architecture, shown in Figure 1, utilizes a Fully Convolutional Network (FCN) backbone. Unlike patch-based approaches, the FCN processes the entire HSI simultaneously, avoiding redundant computations.

The overall architecture of the proposed ENL-FCN, featuring a deep FCN backbone and embedded Efficient Non-local Modules.

The network integrates local features from initial convolutional layers with non-local features extracted by the Efficient Non-Local (ENL) module. This fusion ensures that the final classification benefits from both immediate neighborhood context and global spatial relationships.

The Efficient Non-Local Module

The core innovation is the ENL module, which replaces the dense attention of standard NL modules with a sparse "criss-cross" mechanism.

Comparison between (a) the traditional non-local module and (b) the proposed efficient non-local module with criss-cross attention.

As illustrated in Figure 2, instead of comparing each pixel to every other pixel, the ENL module only calculates affinities along the horizontal and vertical axes passing through the pixel. This reduces the attention map size from $(H \times W) \times (H \times W)$ to $(H + W - 1) \times (H \times W)$. For a typical $145 \times 145$ HSI, this reduces memory requirements from 1760MB to just 24MB.

To achieve global context from these sparse paths, a recurrent operation is employed. By passing information through the module twice, a pixel first aggregates data from its row and column. In the second pass, it receives information from other pixels that have already aggregated data from their respective rows and columns, effectively enabling indirect communication between all pixels in the image.

Experimental Results

The ENL-FCN was evaluated on three benchmark datasets: Indian Pines (IP), Pavia University (PU), and Kennedy Space Center (KSC). The model achieved state-of-the-art Overall Accuracy (OA) across all datasets:

  • Indian Pines: 98.85% OA
  • Pavia University: 99.08% OA
  • KSC: 99.46% OA

Notably, on the KSC dataset, the ENL module reduced FLOPs by approximately 100x compared to a standard NL module ($2.12 \times 10^{11}$ vs $2.97 \times 10^{13}$). The model also demonstrated superior performance when training samples were limited, indicating that global contextual priors are highly effective for HSI classification.

Conclusion

The ENL-FCN provides a computationally efficient way to model long-range dependencies in HSIs. By leveraging a criss-cross attention mechanism and recurrent operations, it achieves global context with a fraction of the memory and processing power required by traditional non-local networks. Its plug-and-play nature makes it a versatile tool for enhancing various deep learning architectures in remote sensing.

Summary updated

Abstract

Deep learning based methods, such as Convolution Neural Network (CNN), have demonstrated their efficiency in hyperspectral image (HSI) classification. These methods can automatically learn spectral-spatial discriminative features within local patches. However, for each pixel in an HSI, it is not only related to its nearby pixels but also has connections to pixels far away from itself. Therefore, to incorporate the long-range contextual information, a deep fully convolutional network (FCN) with an efficient non-local module, named ENL-FCN, is proposed for HSI classification. In the proposed framework, a deep FCN considers an entire HSI as input and extracts spectral-spatial information in a local receptive field. The efficient non-local module is embedded in the network as a learning unit to capture the long-range contextual information. Different from the traditional non-local neural networks, the long-range contextual information is extracted in a specially designed criss-cross path for computation efficiency. Furthermore, by using a recurrent operation, each pixel's response is aggregated from all pixels of HSI. The benefits of our proposed ENL-FCN are threefold: 1) the long-range contextual information is incorporated effectively, 2) the efficient module can be freely embedded in a deep neural network in a plug-and-play fashion, and 3) it has much fewer learning parameters and requires less computational resources. The experiments conducted on three popular HSI datasets demonstrate that the proposed method achieves state-of-the-art classification performance with lower computational cost in comparison with several leading deep neural networks for HSI.
BibTeX
@article{shen2021efficient,
  author = {Yu Shen and Sijie Zhu and Chen Chen and Qian Du and Liang Xiao and Jianyu Chen and Delu Pan},
  title = {{Efficient Deep Learning of Non-local Features for Hyperspectral Image Classification}},
  journal = {IEEE Trans. Geosci. Remote. Sens.},
  year = {2021},
  url = {https://openreview.net/forum?id=yh_2RFnKHH6},
}
Figure