Data Leakage in Patch-Based Hyperspectral Image Classification: Quantifying the Impact of Spatial Overlap
Abstract
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. This paper investigates same-class train-test spatial overlap in patch-based HSI classification using two measures: overlap percentage (OP), which quantifies the global amount of overlapped testing patch pixels, and average overlap ratio (AOR), which measures the local severity among affected testing patches. Experiments on the Pavia University dataset compare random and non-random spatial sampling using SVM, MLP, 2D-CNN, 3D-CNN, ViT, and MorpMamba. The results show that deep patch-based models achieve high accuracy under random sampling, with 3D-CNN reaching 96.17% Overall Accuracy (OA), but drop substantially under non-random spatial sampling, where 3D-CNN decreases to 55.20% and ViT and 2D-CNN drop by 40.71 and 38.81 percentage points (PP), respectively. Patch-size analysis further shows that increasing the patch size from 5x5 to 19x19 raises the random-sampling overlap percentage from 23.28% to 77.02%. These findings demonstrate that random patch-based evaluation can substantially inflate classification performance, especially for models that strongly exploit spatial context. The code associated with this paper is available at: https://github.com/mqalkhatib/DataLeakageinHSIClassification.
Create a lesson
Metadata
- Comments
- paper accepted for presentation at IEEE-WHISPERS
Related papers
Benefit of Structured Representations: When Equivariance Helps in Image Classification
Shared title terminologycs.CVFlorian A. Hölzl, Daniel Rueckert, Georgios Kaissis
SPiXSeg: Rethinking MLLM-based Image Segmentation as Superpixel Classification
Shared title terminologycs.CVPiyush Tiwary, Sohini Dutta, Prathosh A. P
Quantifying Volumetric Risk: Class-Aware Asymmetric Weighted Conformal Prediction for 3D Medical Image Segmentation
Shared title terminologycs.CVShadi Alijani, Fereshteh Aghaee Meibodi, Homayoun Najjaran
OverLay++: Dense-Overlap Layout-to-Image Generation Dataset
Shared title terminologycs.CVShivansh Aggarwal, Shresth Grover, Divyansh Srivastava et al.
Multimodal Knowledge Distillation for Gastric Adenocarcinoma Classification from Whole-Slide Images
Shared title terminologycs.CVShrihari Dumbre, Bikash Santra
ReMeDi: Single-Image PBR Material Estimation via Reparameterization between Metal and Dielectric Hypotheses
Shared title terminologycs.CVFan Fei, Xin Huang, Yixin Zhu et al.