Data Leakage in Patch-Based Hyperspectral Image Classification
Field: Computer Vision Author: Mohammed Q. Alkhatib Published: 2026-10-06 arXiv: 2610.08770
Overview
Patch-based learning improves hyperspectral image (HSI) classification by exploiting local spectral-spatial information, but random train-test sampling from the same image can cause spatial patch overlap, leading to data leakage and optimistic performance estimates.
Methodology
The paper investigates same-class train-test spatial overlap in patch-based HSI classification using two measures:
- Overlap Percentage (OP) — quantifies the global amount of overlapped testing patch pixels.
- Average Overlap Ratio (AOR) — measures the local severity among affected testing patches.
- Deep patch-based models achieve high accuracy under random sampling: 3D-CNN reaches 96.17% overall accuracy.
- Under non-random spatial sampling, performance drops dramatically:
- 3D-CNN falls to 55.20%.
- ViT drops by 40.71 percentage points.
- 2D-CNN drops by 38.81 percentage points.
- Patch size analysis: increasing patch size from 5×5 to 19×19 raises the overlap percentage under random sampling from 23.28% to 77.02%.
Experiments on the Pavia University dataset compare random and non-random spatial sampling using SVM, MLP, 2D-CNN, 3D-CNN, ViT, and MorpMamba.
Key Findings
Conclusion
Random patch-based evaluation can substantially inflate reported classification performance, especially for models that strongly exploit spatial context. Researchers should adopt non-random spatial sampling protocols to obtain realistic performance estimates.
--- *Auto-collected on 2026-10-08*