Unraveling Patch Size Effects in Vision Transformers: Adversarial Robustness in Hyperspectral Image Classification

Read full text
Authors: Shashi Kiran Chandrappa, Sidike Paheding, Abel A. Reyes-Angulo
Cited by: 2
References: 37

Abstract

Vision Transformers (ViTs) have demonstrated strong performance in hyperspectral image (HSI) classification; however, their robustness is highly sensitive to patch size. This study investigates the impact of spatial patch size on clean accuracy and adversarial robustness using a standard ViT and a Channel Attention Fusion variant (ViT-CAF). Patch sizes from 1 × 1 to 19 × 19 are evaluated across four benchmark datasets under FGSM, BIM, CW, PGD, and RFGSM attacks. Descriptive results show that smaller patches, particularly 1 × 1 and 3 × 3, generally yield higher adversarial accuracy, while larger patches amplify localized perturbations and degrade robustness. Parameter analysis indicates that patch-size-dependent variations arise mainly from the embedding layer, with the Transformer backbone remaining fixed, confirming that robustness differences are driven primarily by spatial context rather than model capacity. These findings reveal a trade-off between spatial granularity and adversarial resilience and provide guidance for patch size selection in ViT-based HSI applications.

Fields of Study & Subjects

Adversarial Robustness in Machine Learning Remote-Sensing Image Classification Digital Media Forensic Detection

Publication details

Journal / source
Remote Sensing
Publisher
MDPI AG
Volume
18
Issue
4
Pages
656–656
Publication date
21 February 2026
Language
EN