Skip to Content
Remote SensingRemote Sensing
  • Article
  • Open Access

21 February 2026

20 Pages

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

,
and
1
Department of Analytics, Dolan School of Business, Fairfield University, Fairfield, CT 06484, USA
2
Department of Computer Science and Engineering, School of Engineering and Computing, Fairfield University, Fairfield, CT 06484, USA
3
Department of Applied Computing, College of Computing, Michigan Technological University, Houghton, MI 49931, USA
*
Author to whom correspondence should be addressed.

Highlights

This work investigates the effect of spatial patch size on the classification accuracy and adversarial robustness of Vision Transformer-based architectures for hyperspectral image analysis.
What are the main findings?
  • Smaller patch sizes generally exhibit stronger adversarial robustness while maintaining comparable clean classification performance.
  • Larger patch sizes tend to reduce robustness by increasing sensitivity to localized adversarial perturbations, with some dataset-dependent variations.
What are the implications of the main findings?
  • Spatial patch size is an important design consideration when applying Vision Transformers to hyperspectral image classification tasks.
  • The findings provide practical guidance for informed patch-size selection in robust, deployment-aware transformer-based hyperspectral image classification models.

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.

1. Introduction

Hyperspectral imaging provides extensive spectral information across hundreds of narrow contiguous bands, enabling precise analysis across applications such as agriculture, environmental monitoring, and geological exploration [1,2,3]. However, the high dimensionality of hyperspectral data, combined with limited labeled samples, leads to the curse of dimensionality and overfitting (Hughes phenomenon) [4,5]. Additional challenges include high spectral correlation across adjacent bands, spectral variability from atmospheric and sensor effects, and severe class imbalance in available datasets [6,7]. Despite the richness of hyperspectral data, its high dimensionality and spatial–spectral complexity pose considerable challenges for traditional machine learning algorithms [6].
Deep learning methods, particularly convolutional neural networks (CNNs) [8], have previously demonstrated significant success in addressing these challenges by leveraging their ability to extract spatial features from high-dimensional data [9,10]. However, CNN architectures are predominantly effective at capturing local spatial features, often missing critical global contextual dependencies that hyperspectral data inherently possess [11].
Beyond deep neural networks, alternative paradigms have been explored for hyperspectral image analysis. Cross-scenario transfer learning addresses sensor and acquisition variability for reliable knowledge transfer between field and satellite hyperspectral data [12]. Sparse representation methods exploit shared spectral structures for robust classification [13], while recent prototype-based approaches extend to open set scenarios using fractional domain spectral modeling [14].
Vision Transformers (ViTs) [15] have recently introduced transformative capabilities to computer vision through self-attention mechanisms, effectively modeling long-range dependencies within images by processing image patches as sequential data. This property makes ViTs beneficial for hyperspectral image analysis [16,17], where understanding both fine-grained spectral variations and broader spatial contexts is crucial. However, the ViT’s performance is heavily influenced by patch size selection. Smaller patches preserve fine-grained spectral detail but may blur fine-grained spatial variations, even though the per-pixel spectral resolution is preserved [17].
Unlike convolutional architectures, Vision Transformers fundamentally alter the spatial abstraction mechanism through fixed-size tokenization. In hyperspectral imaging, where each pixel encodes high-dimensional spectral signatures, the choice of patch size directly determines the balance between spectral fidelity, spatial context aggregation, and model robustness. Despite its architectural importance, patch size is typically selected heuristically, with little understanding of its impact on stability under perturbations.
With the rising adoption of ViTs, understanding their vulnerability to adversarial attacks is crucial. Adversarial perturbations (i.e., subtle modifications aimed at misleading models) have been shown to negatively impact the performance of deep neural networks [18]. Studies [19,20] showed that ViTs, despite their advanced design, are uniquely vulnerable to targeted adversarial strategies. Moreover, Kim et al. [21] demonstrated that frequency-selective perturbations affect ViTs more significantly than CNNs, as ViTs rely more on phase and low-frequency information.
Despite these advances, most hyperspectral classification pipelines are evaluated mostly under the assumption of ideal conditions. This assumption is fragile in practice, as hyperspectral systems are routinely affected by sensor noise, atmospheric distortion, compression artifacts, and adversarial interference. In safety-critical applications such as environmental monitoring and defense-related remote sensing, lack of robustness can render high-accuracy models operationally unreliable. This is consequential because Hyperspectral Image (HSI) systems are deployed in settings where measurements can be noisy (e.g., sensor artifacts, atmospheric effects) or even intentionally manipulated. Moreover, transformer-based models introduce additional design choices, such as spatial patch size, that can materially affect not just accuracy, but also stability to perturbations. Through comprehensive experiments, we aim to identify optimal patch size strategies that balance high accuracy and strong defense, guiding future ViT-based deployments in hyperspectral imaging. This study addresses this specific gap by systematically quantifying how patch size influences both performance and robustness in ViT-based HSI classification.
In addition to ViT-based models, this study also incorporates a ViT-CAF (Vision Transform with Cross-Layer Adaptive Fusion) model as a comparative transformer architecture. This inclusion allows us to evaluate spatial tokenization with channel attention fusion, which yields different robustness characteristics compared with ViT under both clean and adversarial settings. The main contributions of this work are:
  • A systematic analysis of Vision Transformer patch sizes for hyperspectral image (HSI) classification across four benchmark datasets, covering P ∈ { 1 , 3 , … , 19 } .
  • A comprehensive robustness evaluation under multiple adversarial attacks (FGSM, PGD, CW, BIM, RFGSM) and perturbation levels, isolating the impact of patch size.
  • An empirical characterization of robustness trends showing that smaller patches generally yield higher adversarial accuracy, while larger patches degrade robustness for three of four datasets used in this study.
  • Practical guidelines for selecting ViT patch sizes in HSI applications where robustness to input perturbations is critical.
A systematic study of patch size in hyperspectral ViTs is therefore necessary to (i) provide principled guidelines for model design under limited training data, and (ii) understand how architectural granularity shapes robustness–accuracy trade-offs in safety-critical remote sensing applications. Our findings highlight non-trivial interactions between patch granularity, data regime, and attack strength, and lead to practical recommendations for selecting patch sizes that balance performance and robustness in real-world deployments.
In the rest of this paper, Section 2 provides the background of attention mechanism, vision transformers and HSI Classification, Section 3 introduces the proposed approach, while the experimental setup and the experimental analysis are presented in Section 4 and Section 5, respectively. Finally, we conclude the work in Section 6.

2. Related Work

Recent advances in deep learning have substantially improved hyperspectral image classification [22]. CNN-based methods, such as 3D-CNN-based and hybrid CNN-RNN frameworks, have successfully exploited both local and hierarchical spectral–spatial relationships in hyperspectral data, leading to significant gains in accuracy and generalization. Nevertheless, their inherent limitations in modeling long-range dependencies and global contextual information have prompted the exploration of more powerful transformer-based models designed to capture non-local interactions across the entire image scene.
Dosovitskiy et al. [15] introduced Vision Transformers, demonstrating competitive performance against CNNs by treating image patches as sequences processed via attention mechanisms, thereby enabling models to learn global relationships more effectively [23]. Inspired by this architectural innovation, recent studies have integrated ViTs into hyperspectral analysis to leverage their powerful sequence modeling capabilities. Roy et al. [24] explored ViTs for hyperspectral data, confirming their potential to effectively capture intricate spectral–spatial contexts and improving classification performance over traditional convolution-based approaches.
The robustness of ViTs against adversarial attacks has also attracted considerable research attention. Naseer et al. [25] reported that ViTs exhibit greater robustness than CNNs in certain adversarial scenarios due to their global attention mechanisms, which enable better feature aggregation and resistance to localized noise. Conversely, recent works highlight specific vulnerabilities of ViTs to adversarial perturbations designed explicitly for their architectural characteristics [26], particularly in scenarios involving patch-level manipulations or attention map distortions. These findings indicate that while ViTs offer improved resilience in some contexts, they are not universally robust and may require specialized defense strategies tailored to their transformer-based design.
More recent research has further explored and refined these insights. The Patch-Fool framework [20] demonstrates that even small, localized perturbations (on individual patches) optimized to mislead self-attention can degrade ViT performance to a level lower than analogous CNNs under certain conditions. Jain et al. [27] provided empirical and theoretical analysis showing that scaling logits, attack strength, and using strong attack protocols (e.g., AutoAttack, PGD) can nullify previously observed robustness gains of ViTs. Other works, such as “Query-Efficient Hard-Label Black-Box Attack against Vision Transformers” [28], show that ViTs are vulnerable in black-box settings when adversaries target perturbations across patches, especially when modifying low-frequency components or selectively weighting patches for attack.
Furthermore, several studies emphasized the importance of patch size optimization in ViTs, illustrating its significant impact on model performance. Patch size directly affects the granularity of information available to the attention mechanism, influencing both spatial resolution and model generalization. Caron et al. [29] systematically analyzed patch size influences on image classification tasks, providing initial insights applicable to hyperspectral imaging, where maintaining a balance between local detail and global context is critical. Improper patch sizing may lead to loss of fine-grained spectral features or increased computational overhead, highlighting the need for carefully tuned tokenization strategies tailored to the complexity of hyperspectral data.
Motivated by the previous work, this study focuses on how patch size affects both the classification accuracy and adversarial robustness of ViTs for hyperspectral images. While ViTs are good at capturing global features and have shown some resistance to attacks, their performance depends heavily on patch size. Prior research has not fully explored this connection in the hyperspectral domain.
Collectively, these studies underline the critical need to evaluate and optimize patch sizes systematically within ViT frameworks to ensure both accurate and robust hyperspectral classification. More details are provided in Section 3.

3. Proposed Methodology

3.1. Vision Transformers (ViTs)

Vision Transformers (ViTs), introduced by Dosovitskiy et al. [15], adapt Transformers [30], originally conceived for natural language processing tasks, for computer vision tasks. Contrasting with CNNs, which rely on local receptive fields to capture spatial features, ViTs utilize a self-attention mechanism to model global dependencies across an image. This characteristic may be particularly suitable for HSI classification since the spectral–spatial relationship spans both local and long-range contexts.

Overview of ViT Architecture

In this approach, the ViT is adapted for pixel-wise HSI classification, where a class label is predicted for each pixel based on its surrounding spectral–spatial context. As illustrated in Figure 1, for an HSI with dimensions H × W × B (height, width, and spectral bands, respectively), we extract a patch of size P × P × B centered around each labeled pixel, where P denotes the spatial patch size. This patch captures the local spectral–spatial neighborhood of the pixel, enabling the ViT to model both fine-grained spectral details and spatial relationships. In contrast to the standard ViT pipeline, which partitions the entire image into ( H / P ) × ( W / P ) non-overlapping patches (assuming divisibility), our approach generates one patch per labeled pixel. Consequently, the total number of extracted patches is N, where N corresponds to the number of labeled samples.
Figure 1. Overview of the proposed patch-based Vision Transformer (ViT) framework for hyperspectral image (HSI) classification. The input HSI cube is partitioned into spatial–spectral patches (illustrated in different colors), which are flattened and linearly projected into token embeddings augmented with positional encodings. The resulting token sequence is processed by stacked Transformer encoder blocks composed of multi-head self-attention and MLP layers with normalization. The final encoded representation is fed into an MLP classification head to produce the target class prediction.
Each P × P × B patch, with spectral bands B as channels, is reshaped into ( B , P , P ) and processed by the ViT. The patch is divided into M = P 2 sub-patches of size 1 × 1 × B (internal patch size p = 1 ), each flattened into a vector of length B and projected into a D-dimensional embedding space ( D = 64 ) using a trainable matrix E ∈ R B × D . This yields patch embeddings z 0 i = [ z 0 i , 1 , … , z 0 i , M ] ∈ R M × D for the i-th pixel’s patch. A learnable class token z cls ∈ R D is prepended, forming the sequence z 0 i = [ z cls , z 0 i , 1 , … , z 0 i , M ] ∈ R ( M + 1 ) × D , with indices 0 to M. Learnable positional embeddings p ∈ R ( M + 1 ) × D are added, represented as
z 0 ′ i = [ z cls , z 0 i , 1 , … , z 0 i , M ] + p .
where z 0 ′ i is processed by a Transformer encoder with L = 5 layers, each with multi-head self-attention (MSA, 4 heads) and a feed-forward network (MLP dimension 64). For the ℓ-th layer, we have
z ℓ ′ i = MSA ( LN ( z ℓ − 1 i ) ) + z ℓ − 1 i ,
z ℓ i = MLP ( LN ( z ℓ ′ i ) ) + z ℓ ′ i ,
where LN is layer normalization. MSA captures spectral–spatial dependencies among tokens. The class token’s output z L i , 0 ∈ R D (index 0) is passed to the classification head (LN with one linear layer dimension of 64) to predict the central pixel’s class label.

3.2. SpectralFormer and Adopted ViT-CAF Module

SpectralFormer, proposed by Hong et al. [31], is a Transformer-based model for hyperspectral image (HSI) classification. It introduces two main components: (i) a group-wise spectral embedding (GSE) to model correlations among neighboring spectral bands, and (ii) Cross-Layer Adaptive Fusion (CAF) to improve information propagation across Transformer layers.
In this work, we only adopt CAF from the original SpectralFormer architecture. As illustrated in Figure 2, we do not use the original group-wise spectral embedding or any spectral band grouping. Instead, our backbone already produces a sequence of patch tokens for each input patch, and ViT-CAF is used purely as a patch-based feature fusion mechanism between non-adjacent layers.
Figure 2. Overview of the proposed ViT-CAF framework for hyperspectral image (HSI) classification. The input HSI cube is partitioned into spatial–spectral patches, which are flattened and linearly projected into token embeddings with positional encodings. The token sequence is processed through multiple Transformer encoder blocks, where Cross-Layer Adaptive Fusion (CAF) integrates intermediate representations across layers to enhance feature interaction and spectral–spatial modeling. The fused representation is then passed to an MLP classification head to generate the final class prediction.

ViT-CAF

Given an input HSI, we first extract a spatial patch of size P × P × B centered at each labeled pixel. This patch is processed by our backbone network (e.g., a Transformer encoder) and represented as a sequence of N t tokens in a D-dimensional feature space. Let x ℓ i ∈ R ( N t + 1 ) × D denote the token features of the i-th patch at layer ℓ, where the first token is a classification token.
To enhance information flow across layers and reduce feature degradation, we adopt CAF in the aforementioned ViT framework. It introduces medium-range skip connections that fuse features from layer ℓ − 2 into layer ℓ in an adaptive way. Specifically, for layer ℓ, the forward propagation is defined as
z ^ ( l ) = w ¨ z ( l ) z ( l − 2 ) = β 1 ( l ) z ( l ) + β 2 ( l ) z ( l − 2 ) .
Here, z ( l ) ∈ R d denotes the output feature of the current encoder layer, while z ( l − 2 ) ∈ R d represents the output feature from two layers earlier. The vector w ¨ = [ β 1 ( l ) , β 2 ( l ) ] ∈ R 1 × 2 corresponds to the learnable fusion weights implemented via a 1 × 2 convolution, where β 1 ( l ) , β 2 ( l ) ∈ R control the relative contributions of the current and shallow encoder features during cross-layer adaptive fusion.
In our implementation, the encoder consists of L layers, and CAF connections are applied starting from the third layer (i.e., from layer ℓ = 3 onwards). After the final layer, the classification token x L i , 0 ∈ R D is fed into a simple classification head to predict the class label of the central pixel. In this way, ViT-CAF acts as a lightweight, patch-based cross-layer fusion module that improves feature propagation without relying on spectral band grouping.

3.3. Key Architectural Differences Between ViT and ViT-CAF

While both architectures share a common Transformer encoder backbone, their feature mechanisms differ fundamentally. The standard ViT employs a purely sequential architecture where information flows strictly from layer ℓ − 1 to layer ℓ through residual connections. Each layer processes features independently, relying on the immediately preceding layer’s output. In contrast, ViT-CAF introduces Cross-Layer Adaptive Fusion that establishes medium-range skip connections between non-adjacent layers. Specifically, at layer ℓ (for ℓ ≥ 3 ), ViT-CAF adaptively fuses features from both the current layer ℓ and the earlier layer ℓ − 2 using learnable weights β 1 ( ℓ ) and β 2 ( ℓ ) . This cross-layer fusion mechanism enables the model to preserve low-level spectral–spatial features from shallower layers while incorporating high-level semantic information from deeper layers, thereby reducing feature degradation and improving gradient flow during training.

3.4. Patch Size Variation

The choice of patch size P while using ViTs significantly influences the model’s performance, particularly in HSI classification [32].
In this research, we evaluate a range of patch sizes to explore their impact on classification accuracy and adversarial robustness. Specifically, we choose commonly used patch sizes P × P where P varies from 1 to 19 (i.e., P ∈ { 1 , 3 , 5 , 7 , 9 , 11 , 13 , 15 , 17 , 19 } ). These patch sizes correspond to spatial resolutions ranging from fine-grained (e.g., 1 × 1 , a single pixel) to coarse (e.g., 19 × 19 , a larger spatial region). This range allows us to systematically analyze the trade-offs between spatial detail and contextual information. For fairness, the same set of spatial patch sizes is applied to ViT-CAF so that both models operate under identical input sampling conditions.
As shown in Figure 1, feature extraction for HSI in ViTs begins with patch embedding into a D-dimensional space ( D = 64 in the setup), transforming the high-dimensional spectral–spatial patch into a compact representation. Positional embeddings retain spatial information, and the patch sequence is processed by the Transformer encoder. The self-attention mechanism computes attention scores between all patch pairs, dynamically weighing spectral–spatial regions. This effectively captures fine-grained spectral details and broader spatial patterns. The encoder aggregates features across layers (e.g., L = 5 ), and the class token summarizes global context for classification.

3.5. Adversarial Attack Methods

To evaluate the adversarial robustness of ViTs in HSI classification, we employ several well-known adversarial attack methods, including the Fast Gradient Sign Method (FGSM) [18], Projected Gradient Descent (PGD) [33], Carlini Wagner (CW) [34], Basic Iterative Method (BIM) [35] and Random initialization of Fast Gradient Sign Method (RFGSM) [36].
FGSM is a single-step attack that generates adversarial examples by perturbing the input image in the direction of the gradient of the loss function with respect to the input, scaled by a perturbation strength ϵ , illustrated as [37]
x adv = x + ϵ · sign ( ∇ x J ( x , y ) ) ,
where x is the original input, y is the true label, J is the loss function, and  ∇ x J is the gradient.
PGD, a more powerful iterative attack, refines this process by applying multiple small steps of FGSM while projecting the perturbations back into an ϵ -ball around the original input, expressed as [37]
x adv t + 1 = Proj ϵ ( x adv t + α · sign ( ∇ x J ( x adv t , y ) ) ) ,
where α is the step size, and  Proj ϵ ensures the perturbation stays within the allowed ϵ -bound. These attacks, along with others like Carlini and Wagner (CW), Basic Iterative Method (BIM), and Randomized FGSM (RFGSM), are used to assess the robustness of ViTs across different patch sizes and perturbation strengths.
Carlini and Wagner (CW) optimize perturbation minimally with a custom loss function, fooling classifiers by subtly altering input while remaining nearly indistinguishable from the original and formulated as [34]
x adv = arg min x ′ ∥ x ′ − x ∥ 2 2 + c · f ( x ′ ) , x ′ ∈ [ 0 , 1 ] n
where x adv is the adversarial example obtained by minimally perturbing the original input x , c is a constant balancing perturbation magnitude and adversarial success, and  f ( x ′ ) is a specially designed loss function enforcing misclassifications.
Basic Iterative Method (BIM) iteratively applies FGSM with small steps, projecting perturbed examples back into the allowable range to ensure adversarial effectiveness and feasibility, expressed as [35]   
x adv t + 1 = Clip x , ϵ x adv t + α · sign ∇ x J ( x adv t , y )
where x adv t + 1 is the adversarial example after iteration t + 1 , α is the step size, ϵ defines the perturbation limit, Clip x , ϵ restricts perturbations to an ϵ -neighborhood around the original input x , J is the loss function, and  ∇ x J ( x adv t , y ) denotes the gradient at iteration t.
Randomized FGSM (RFGSM) enhances FGSM by adding random initialization, making adversarial training more robust by avoiding overfitting to specific perturbations as below [36]
x adv = x + ( ϵ − α ) · sign ∇ x J ( x + α · sign ( N ( 0 , I ) ) , y )
where x adv represents the adversarially perturbed input, ϵ controls total perturbation magnitude, α determines the strength of the random initial perturbation from a normal distribution N ( 0 , I ) , and J is the loss whose gradient ∇ x J guides the attack direction toward fooling the classifier.
These adversarial attacks are used to assess the robustness of ViTs and ViT-CAF models across different patch sizes and perturbation strengths.

3.6. Implementation of Adversarial Attack in HSI

Algorithm 1 shown below represents a pseudocode on how we evaluate the vulnerability of a ViT when working with hyperspectral images under adversarial conditions. The process starts with preparing the dataset, training the model on different patch sizes, and then putting it through its paces on clean data. Once we know how it performs normally, we apply adversarial attacks with varying strengths to see how much the accuracy drops. By comparing the clean results (no adversarial attacks) to the attacked ones, we get a clear picture of the model’s robustness and where it struggles when the input data is subtly manipulated.
Algorithm 1 Adversarial Robustness Evaluation of ViT on Hyperspectral Data
  1:
Input: Hyperspectral dataset D, patch sizes P, adversarial methods A, perturbation levels ε , training epochs E
  2:
Load raw image data and corresponding labels from D
  3:
Normalize spectral bands for each pixel independently
  4:
Split dataset into training ( T r a i n ) and testing ( T e s t ) sets using per-class stratified sampling (20% training)
  5:
Initialize results container r e s u l t s ← ∅
  6:
for each patch size p ∈ P  do
  7:
Mirror hyperspectral image to allow patch extraction
  8:
Extract patch-wise spectral–spatial training and testing samples
  9:
Construct ViT model with input size p × p
10:
Train the ViT model on Train data for E epochs using the Adam optimizer and a learning rate scheduler
11:
Save trained model for p
12:
Evaluate model on clean test data ( ε = 0 )
13:
Record clean performance metrics (OA, AA, Kappa) in r e s u l t s
14:
for each attack a ∈ A  do
15:
for each epsilon ε ∈ { ε 1 , ε 2 , … }  do
16:
Generate adversarial examples using a with ε
17:
Evaluate ViT on adversarial samples
18:
Record adversarial metrics (OA, AA, Kappa) in r e s u l t s
19:
end for
20:
end for
21:
end for
22:
Output: Performance summary table of clean vs. adversarial results

4. Dataset and Experimental Setup

The comprehensive experimental workflow, as depicted in Figure 3, is structured into four primary stages: data preparation, model configuration, iterative training, and robustness evaluation. This pipeline systematically processes four benchmark hyperspectral datasets through a modular transformer architecture to analyze the interplay between spatial granularity and adversarial stability.
Figure 3. Overview of the systematic experimental pipeline for assessing the impact of patch size on ViT-based HSI classification.

4.1. Hyperspectral Datasets

The datasets used in our experiments are Indian Pines (IP), University of Pavia (UP), Salinas Valley (SV), and Kennedy Space Center (KSC), which are publicly available (http://www.ehu.eus/ccwintco/index.php?title=Hyperspectral_Remote_Sensing_Scenes (accessed on 16 February 2025)) and widely used for the evaluation of HSI classification methods. The details of the datasets are described as follows.
Indian Pines (IP): The Indian Pines dataset, captured by the AVIRIS sensor over Northwestern Indiana, contains a 145 × 145 image with 224 spectral bands spanning 400–2500 nm. The scene is about two-thirds agricultural land and one-third forest or natural vegetation. After removing water absorption bands, 200 spectral bands are used for analysis, with ground truth identifying 16 overlapping classes.
University of Pavia (UP): The University of Pavia HSI dataset, part of the Pavia scenes, was captured using the Reflective Optics System Imaging Spectrometer (ROSIS) sensor over Pavia, a city in northern Italy. The image dimensions are 610 × 340 , encompassing 103 spectral bands, and it features nine distinct land cover types with a spatial resolution of 1.3 meters.
Salinas Valley (SV): The Salinas Valley HSI dataset, acquired using the AVIRIS sensor over California’s Salinas Valley, consists of a 512 × 217 image with 3.7-meter spatial resolution and 220 spectral bands. After removing 20 water absorption bands, 204 remain. The ground truth includes 16 classes, covering vegetable crops, bare soils, and vineyard fields.
Kennedy Space Center (KSC): The Kennedy Space Center HSI dataset was collected by the AVIRIS sensor over the Kennedy Space Center in Florida. The dataset comprises 512 by 614 pixels with a spatial resolution of 18-meter pixels and contains bands with low signal-to-noise ratios. In this dataset, the water absorption bands and low signal to noise ratio bands (48 in total) were also discarded, which left 176 bands.

4.2. Train–Test Split

For each dataset, we use 20% of the samples as a training set and the other 80% as a test set selected randomly. Table 1 presents the detailed training and testing splits for the Indian Pines, Pavia University, Salinas, and Kennedy Space Center (KSC) datasets used in this study.
Table 1. Training and testing sets of the Indian Pines, Pavia, Salinas, and KSC datasets.
All experiments are run on an NVIDIA RTX A6000 graphics card with a dedicated 48 GB GPU.

4.3. Adversarial Perturbation Configuration

The epsilon range (0.05–0.3) was selected to comprehensively evaluate model robustness across varying attack intensities. Smaller epsilon values (0.05–0.10) represent imperceptible or near-imperceptible perturbations that test the model’s sensitivity to minimal adversarial noise, reflecting real-world scenarios where attacks must remain undetectable. Moderate values (0.15–0.20) correspond to perceptible but bounded perturbations that maintain visual similarity to clean images. Larger values (0.25–0.30) represent severe attacks that stress test model defenses under extreme conditions. This range aligns with widely adopted standards in adversarial machine learning literature, as established by foundational works on FGSM, PGD, and CW attacks, enabling systematic assessment of robustness from weak to strong attack regimes while maintaining realistic perturbation bounds for hyperspectral imagery.

4.4. Preprocessing Steps

The preprocessing of hyperspectral data is crucial for effective training of Vision Transformers (ViTs). Initially, training, testing, and true labeled data points are systematically extracted from the ground truth HSI datasets. This step involves indexing pixel coordinates corresponding to each labeled class, creating structured arrays of pixel positions representing different classes and dataset splits.
To preserve spatial context, each hyperspectral image undergoes boundary extension through a mirroring operation. Specifically, given an original hyperspectral cube of dimensions H × W × B (height, width, and spectral bands), a mirror padding extends image borders, resulting in an expanded dimension of ( H + 2 p ) × ( W + 2 p ) × B , where p is half of the patch size. The mirrored padding ensures consistency in spatial context extraction near the image boundaries, mitigating edge-related artifacts during the patch extraction process.
Subsequently, spatial neighborhood patches are extracted around each selected data point. For each pixel located at position ( x , y ) , a patch of size P × P × B is extracted from the hyperspectral cube, encapsulating the local spatial context and the full spectral information. This process is systematically applied to all training, testing, and ground-truth pixel locations, resulting in structured three-dimensional data arrays suitable for ViT input.
Specifically, the ViT model is trained and evaluated using patch sizes ranging from 1 × 1 to 19 × 19 with an increment of two, enabling a systematic investigation of the trade-off between spatial detail preservation and contextual coverage. This range was specifically chosen to cover both pixel-level (1 × 1, spectral-only) and spatial-context-rich settings (up to 19 × 19), allowing analysis of the transition from purely spectral to spectral–spatial classification. The model is trained for 500 epochs, with performance evaluated every five epochs to monitor convergence and facilitate early-stage diagnostics. A batch size of 64 is used throughout training, with the Adam optimizer (fixed learning rate of 10 − 3 ) employed for parameter updates. The cross-entropy loss function was adopted to guide learning.
The robustness analysis involved evaluating trained ViT and ViT-CAF models against a spectrum of adversarial attack methods, including FGSM, PGD, CW, BIM and RFGSM, across a range of perturbation strengths (epsilon values from 0.05 to 0.3 ).
Performance evaluation metrics included Overall Accuracy (OA), reflecting the total proportion of correct predictions, and Average Accuracy (AA), which is the mean of class-wise accuracies. Both are computed under clean (adversarial attack-free) and adversarial conditions, offering insights into ViT deployment in hyperspectral imaging.

5. Experimental Results

5.1. Effect of Patch Size on Accuracy

The comparative performances without adversarial attacks, shown in Figure 4 and Figure 5, demonstrate that the model’s accuracy generally improves as patch size increases. Furthermore, ViT and ViT-CAF-based models exhibit similar performance trends across different patch sizes.
Figure 4. Average Accuracy across different patches for datasets without Adversarial attack.
Figure 5. Overall Accuracy across different patches for datasets without adversarial attack.

5.2. Classification Maps

5.2.1. Without Adversarial Attack

Figure 6, Figure 7, Figure 8 and Figure 9 show classification maps of the ViT model on Indian Pines, Pavia University, Salinas and KSC datasets, respectively. It can be observed that there is a significant enhancement in per-pixel classification accuracy across all four benchmark HSI datasets when larger patch sizes are used during training.
Figure 6. Classification maps of ViT model on the Indian Pines dataset without adversarial attack: (a) RGB (b), ground truth, (c–l) predictions using ViT with patch sizes of (c) 1 × 1 , (d) 3 × 3 , (e) 5 × 5 , (f) 7 × 7 , (g) 9 × 9 , (h) 11 × 11 , (i) 13 × 13 , (j) 15 × 15 , (k) 17 × 17 , and (l) 19 × 19 .
Figure 7. Classification maps of ViT model on the Pavia dataset without adversarial attack: (a) RGB, (b) ground truth, (c–l) predictions using ViT with patch sizes of (c) 1 × 1 , (d) 3 × 3 , (e) 5 × 5 , (f) 7 × 7 , (g) 9 × 9 , (h) 11 × 11 , (i) 13 × 13 , (j) 15 × 15 , (k) 17 × 17 , and (l) 19 × 19 .
Figure 8. Classification maps of ViT model on the Salinas dataset without adversarial attack: (a) RGB, (b) ground truth, (c–l) predictions using ViT with patch sizes of (c) 1 × 1 , (d) 3 × 3 , (e) 5 × 5 , (f) 7 × 7 , (g) 9 × 9 , (h) 11 × 11 , (i) 13 × 13 , (j) 15 × 15 , (k) 17 × 17 , and (l) 19 × 19 .
Figure 9. Classification maps of ViT model on the KSC dataset without adversarial attack: (a) RGB, (b) ground truth, (c–l) predictions using ViT with patch sizes of (c) 1 × 1 , (d) 3 × 3 , (e) 5 × 5 , (f) 7 × 7 , (g) 9 × 9 , (h) 11 × 11 , (i) 13 × 13 , (j) 15 × 15 , (k) 17 × 17 , and (l) 19 × 19 .
In the classification maps, we observe that:
  • For Indian Pines (Figure 6), the spatial homogeneity improves markedly as patch size increases. Smaller patches result in fragmented classifications, especially in mixed vegetation regions, whereas larger patches yield smoother and more accurate class boundaries.
  • For Pavia University (Figure 7), larger patches help distinguish urban structures such as roads, buildings, and shadows more clearly. The class boundaries become more distinct and exhibit less noise and misclassification, particularly in complex urban regions containing asphalt surfaces and self-blocking brick areas.
  • For Salinas (Figure 8), which contains fine-grained agricultural classes, larger patches preserve inter-class separability much better. Crops such as “Grapes-untrained” and the various temporal stages of “Lettuce-romaine” (4wk, 5wk, 6wk, 7wk) show significantly improved consistency across field parcels.
  • For KSC (Figure 9), which is dominated by heterogeneous wetland vegetation, larger patches improve class coherence and reduce confusion among spectrally similar categories. Classes such as Scrub, Cattail marsh, Spartina marsh, and Willow swamp exhibit more consistent spatial patterns, while Water and Mud flats become more clearly delineated as patch size increases.
These qualitative improvements suggest that increasing the spatial context via patch size allows the model to capture better spectral–spatial correlations, which is especially critical in complex scenes with high class similarity. Moreover, it highlights the potential for ViT to leverage global contextual cues effectively when sufficient spatial information is available.

5.2.2. With Adversarial Attack

As represented in Table 2, across all average accuracies, pixel token size 1 stands out with ViT-CAF and a token size of 3 × 3 stands out for ViT. Across all adversarial attack types and patch sizes, the ViT-CAF model consistently demonstrates substantially higher robustness than the ViT model, particularly for small to medium patch sizes. By evaluating performance across ϵ values, stronger perturbations ( ϵ = 0.3) severely degrade accuracy regardless of model or attack type, indicating that attack strength is the dominant factor in vulnerability.
Table 2. Average Accuracy (%) of various adversarial attacks across different patch sizes: ViT vs ViT-CAF (averaged over all datasets). Blue font highlights the highest value within the “Average” row for each (attack, model).
Similarly, Table 3 shows the overall average accuracies across different patch sizes for individual datasets. The results reveal dataset-specific optimal patch sizes: Pavia achieved the highest accuracy of 12.77% at patch size 3, while KSC performed best at larger patch sizes (17 and 13) with accuracies of 3.00% and 2.81%, respectively. Salinas reached its peak performance of 3.06% at patch size 9, whereas Pines maintained relatively consistent accuracies across all patch sizes with a maximum of 1.86% at patch size 1.
Table 3. Overall Avg. Accuracy (%) across different patch sizes for various datasets. Highest accuracy per dataset is marked in bold.
Figure 10, Figure 11, Figure 12 and Figure 13 show the classification maps of the ViT model for adversarial attacks, where adversarial perturbations noticeably degrade the per-pixel classification accuracy across all four benchmark HSI datasets: Indian Pines, Pavia University, KSC, and Salinas. The degradation is evident regardless of patch size, and larger patches demonstrate comparatively less resilience to adversarial perturbations. This study adopts the FGSM attack with ϵ = 0.05 , which is chosen after preliminary tests showed it to be a relatively mild perturbation enough to highlight robustness differences, making the resulting classification maps easier to interpret.
Figure 10. Classification maps of ViT model on the Indian Pines dataset with FGSM attack and epsilon of 0.05 (a) RGB, (b) ground truth, (c) 3 × 3 , (d) 19 × 19 .
Figure 11. Classification maps of ViT model on the Pavia dataset with FGSM attack and epsilon of 0.05: (a) RGB, (b) ground truth, (c) 3 × 3 , (d) 19 × 19 .
Figure 12. Classification maps of ViT model on the Salinas dataset with FGSM attack and epsilon of 0.05: (a) RGB, (b) ground truth, (c) 3 × 3 , (d) 19 × 19 .
Figure 13. Classification maps of ViT model on the KSC dataset with FGSM attack and epsilon of 0.05: (a) RGB, (b) ground truth, (c) 3 × 3 , (d) 19 × 19 .
From the classification maps, we observe that:
  • For Indian Pines (Figure 10), predictions from smaller patches (e.g., 3 × 3 ) exhibit significant fragmentation, with fine details in mixed vegetation regions becoming noisy and erratic. Larger patches ( 19 × 19 ) maintain more coherent spatial patterns, though class boundaries become blurred, and confusion between spectrally similar classes, such as “Corn-notill” and “Soybean-notill”, or among the various grass-pasture categories, is more prevalent than in the no-attack case.
  • For Pavia University (Figure 11) in urban scenes, the adversarial perturbations disrupt the clear delineation of man-made structures. For 3 × 3 patches, class boundaries become jagged and inconsistent, with extensive misclassification in narrow roads, building edges, and shadowed regions. Larger patches ( 19 × 19 ) preserve the general shapes of major objects like meta sheets, but still exhibit boundary distortions and mixing between spectrally similar classes such as “Bare Soil” and “Meadows”.
  • For Salinas (Figure 12) in the fine-grained agricultural setting, the FGSM attack induces substantial salt-and-pepper noise for 3 × 3 patches, obliterating many of the clean parcel boundaries observed without attack. Inter-class confusion increases, especially among visually and spectrally similar crops like “Lettuce_romaine_4wk” and “Lettuce_romaine_5wk.” With larger patches ( 19 × 19 ), predicted results appear much noisier and more distorted, with widespread class mixing and degradation of field boundaries, indicating stronger vulnerability at this scale.
  • For KSC (Figure 13), the adversarial attack also disrupts classification in this highly heterogeneous wetland environment. Unlike Indian Pines, Pavia, and Salinas, KSC achieves higher robustness at larger patch sizes ( P = 19 ), which we attribute to its dominance by large, heterogeneous wetland vegetation regions. In this setting, broader spatial context helps disambiguate spectrally similar classes and provides a smoothing effect against localized adversarial perturbations.
These observations underscore the vulnerability of spectral–spatial models to well-crafted noise and point toward the necessity of incorporating explicit defense mechanisms alongside patch-based spatial context enhancement.

5.3. Effect of Patch Size on Adversarial Robustness

As shown in Table 2, robustness varies across attack types and patch sizes. FGSM results in the highest adversarial accuracy and, therefore, is the least damaging attack in this evaluation, while PGD and CW produce the strongest degradation. Small patch sizes (1–5) maintain substantially higher robustness across models. Accuracy drops sharply as patch size increases, with patches larger than 11 causing near-complete model failure in most cases. These findings highlight the sensitivity of both architectures to large localized perturbations and stronger iterative attacks.
Relatively, Table 3 shows the overall average accuracies across different patch sizes for individual datasets. The Pavia dataset demonstrates the highest overall robustness with peak accuracy of 12.77% at patch size 3. In contrast, KSC exhibits lower initial accuracy, achieving maximum accuracy of 3.00% at a patch size of 17, Salinas shows moderate robustness with peak performance of 4.46% at patch size 3, while Pines consistently exhibits the lowest accuracies across all patch sizes, with values rarely exceeding 2%. These results indicate that dataset characteristics significantly influence optimal patch size selection and overall adversarial robustness.

5.4. Parameter Efficiency

Table 4 reports the total number of model parameters (in thousands) for different patch sizes across the four datasets. A consistent increasing trend is observed as patch size grows from P = 1 to P = 19 for all datasets. In the ViT implementation, it is worth mentioning that the patch embedding layer projects flattened patches using a linear layer, causing the embedding parameter count to scale quadratically with patch size, while all Transformer encoder parameters remain unchanged.
Table 4. Parameter count (in thousands) across different patch sizes and datasets for the ViT model.
Although larger patch sizes increase embedding parameters, the overall growth is modest relative to the fixed Transformer backbone (e.g., from 346 K at P = 1 to 369 K at P = 19 on Indian Pines, with similar trends across datasets). These results indicate that the robustness degradation observed for larger patches cannot be attributed solely to increased parameter count, but is mainly driven by how spatial context is aggregated and how adversarial perturbations propagate within larger patches.

6. Conclusions and Future Work

This study examines how spatial patch size influences classification performance and adversarial robustness in two Vision Transformer (ViT)-based architectures, namely a standard ViT and ViT-CAF, for hyperspectral image (HSI) classification. Across four benchmark datasets and multiple adversarial attacks, we observe consistent robustness trends indicating that smaller patch sizes, particularly P = 1 and P = 3 , generally achieve higher adversarial accuracy while maintaining competitive clean performance, with P = 3 providing stable behavior across most settings. In contrast, larger patches (e.g., P > 11 ) tend to amplify localized perturbations, leading to pronounced robustness degradation. An exception is observed on the KSC dataset, where larger patches benefit from broader spatial context due to dominant wetland structures.
Although extremely small patches (e.g., P = 1 ) preserve robustness, they may limit spatial context, especially for the standard ViT. Overall, standard ViTs remain highly vulnerable under strong adversarial attacks, underscoring the need for dedicated defense strategies in HSI applications. These findings offer practical guidance for selecting patch sizes in robustness-critical deployments such as precision agriculture, environmental monitoring, and defense-related remote sensing.
Future work will investigate adaptive and data-driven patch size selection mechanisms, where patch granularity is dynamically adjusted based on local spectral–spatial complexity or learned jointly with the transformer architecture. Additionally, defense-aware training strategies, such as adversarial or robustness-guided learning, will be explored to mitigate the vulnerabilities observed under strong adversarial attacks. Finally, extending the analysis to a broader family of transformer architectures, including hierarchical ViTs, hybrid CNN–Transformer models, and lightweight transformers designed for low-data regimes. These directions aim to improve both the robustness and architectural generalization of transformer-based hyperspectral models in real-world HSI environments.

Author Contributions

Conceptualization, S.K.C., S.P. and A.A.R.-A.; Methodology, S.K.C. and S.P.; Software, S.K.C. and A.A.R.-A.; Validation, S.K.C., S.P. and A.A.R.-A.; Formal analysis, S.K.C.; Resources, S.P.; Writing—original draft, S.K.C.; Writing—review & editing, S.K.C., S.P. and A.A.R.-A.; Visualization, S.K.C.; Supervision, S.P.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The datasets analyzed in this study are publicly available and can be accessed at: https://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes (accessed on 14 February 2026).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bioucas-Dias, J.M.; Plaza, A.; Camps-Valls, G.; Scheunders, P.; Nasrabadi, N.; Chanussot, J. Hyperspectral remote sensing data analysis and future challenges. IEEE Geosci. Remote Sens. Mag. 2013, 1, 6–36. [Google Scholar] [CrossRef] [Scilit]
  2. Goetz, A.F.H.; Vane, G.; Solomon, J.E.; Rock, B.N. Imaging spectrometry for earth remote sensing. Science 1985, 228, 1147–1153. [Google Scholar] [CrossRef] [Scilit]
  3. Stuart, M.B.; McGonigle, A.J.S.; Willmott, J.R. Hyperspectral imaging in environmental monitoring: A review of recent developments and technological advances. Sensors 2023, 23, 1890. [Google Scholar] [CrossRef] [Scilit]
  4. Hughes, G. On the mean accuracy of statistical pattern recognizers. IEEE Trans. Inf. Theory 1968, 14, 55–63. [Google Scholar] [CrossRef] [Scilit]
  5. Rasti, B.; Hong, D.; Hang, R.; Ghamisi, P.; Kang, X.; Chanussot, J.; Benediktsson, J.A. Feature extraction for hyperspectral imagery: The evolution from shallow to deep. IEEE Geosci. Remote Sens. Mag. 2020, 8, 60–88. [Google Scholar] [CrossRef] [Scilit]
  6. Ghamisi, P.; Plaza, J.; Chen, Y.; Li, J.; Plaza, A.J. Advanced spectral classifiers for hyperspectral images: A review. IEEE Geosci. Remote Sens. Mag. 2017, 5, 8–32. [Google Scholar] [CrossRef] [Scilit]
  7. Paoletti, M.E.; Haut, J.M.; Plaza, J.; Plaza, A. Deep learning classifiers for hyperspectral imaging: A review. ISPRS J. Photogramm. Remote Sens. 2019, 158, 279–317. [Google Scholar] [CrossRef] [Scilit]
  8. Lecun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef] [Scilit]
  9. Chen, Y.; Jiang, H.; Li, C.; Jia, X.; Ghamisi, P. Deep feature extraction and classification of hyperspectral images based on convolutional neural networks. IEEE Trans. Geosci. Remote Sens. 2016, 54, 6232–6251. [Google Scholar] [CrossRef] [Scilit]
  10. Audebert, N.; Le Saux, B.; Lefèvre, S. Deep learning for classification of hyperspectral data: A comparative review. IEEE Geosci. Remote Sens. Mag. 2019, 7, 159–173. [Google Scholar] [CrossRef] [Scilit]
  11. Zhang, H.; Li, Y.; Zhang, Y.; Shen, Q. Spectral-spatial classification of hyperspectral imagery using a dual-channel convolutional neural network. Remote Sens. Lett. 2019, 10, 468–477. [Google Scholar] [CrossRef] [Scilit]
  12. Fu, B.; Wu, Y.; Zhang, L.; Sun, W.; Wang, Y.; Deng, T.; He, H.; Huang, K. Cross-Scenario Transfer Learning for Estimating Mangrove Nitrogen and Phosphorus Content from Field Hyperspectral Data to SDGSAT-1 and Sentinel-2 Images. Remote Sen. Environ. 2025, 329, 114923. [Google Scholar] [CrossRef] [Scilit]
  13. Li, C.; Zhang, H.; Shen, L. Maximum Likelihood Estimation Based Joint Sparse Representation for the Classification of Hyperspectral Remote Sensing Images. IEEE Trans. Geosci. Remote Sens. 2021, 59, 7581–7595. [Google Scholar]
  14. Feng, S.; Wang, S.; Xu, C.; Zhao, C.; Li, W.; Tao, R. Fractional Domain Information Enhanced Hyperspherical Prototype Learning Method for Hyperspectral Image Open-Set Classification. IEEE Trans. Geosci. Remote Sens. 2025, 63, 5515117. [Google Scholar] [CrossRef] [Scilit]
  15. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  16. Paheding, S.; Reyes, A.A.; Kasaragod, A.; Oommen, T. GAF-NAU: Gramian angular field encoded neighborhood attention U-Net for pixel-wise hyperspectral image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 19–20 June 2022; pp. 409–417. [Google Scholar]
  17. Sun, L.; Zhao, G.; Zheng, Y.; Wu, Z. Spectral–Spatial Feature Tokenization Transformer for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5522214. [Google Scholar] [CrossRef] [Scilit]
  18. Goodfellow, I.J.; Shlens, J.; Szegedy, C. Explaining and harnessing adversarial examples. arXiv 2014, arXiv:1412.6572. [Google Scholar]
  19. Mahmood, K.; Mahmood, I.; VanDijk, M. On the robustness of vision transformers to adversarial examples. arXiv 2021, arXiv:2104.02610. [Google Scholar] [CrossRef] [Scilit]
  20. Fu, Y.; Zhang, S.; Wu, S.; Wan, C.; Lin, Y. Patch-fool: Are vision transformers always robust against adversarial perturbations? arXiv 2022, arXiv:2203.08392. [Google Scholar] [CrossRef] [Scilit]
  21. Kim, G.; Kim, J.; Lee, J.S. Exploring adversarial robustness of vision transformers in the spectral perspective. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA, 3–8 January 2024; pp. 3976–3985. [Google Scholar]
  22. Chandrappa, S.K.; Paheding, S. Exploring the Depth of the KAN Method for Hyperspectral Image Classification. In Proceedings of the 2025 Northeast Section Conference, University of Bridgeport, Bridgeport, CT, USA, 22 March 2025; Available online: https://peer.asee.org/55021 (accessed on 20 May 2025).
  23. Chandrappa, S.K.; Paheding, S.; Reyes-Angulo, A.A.; Essa, A. Attention Based Spectral Profile Representation for Hyperspectral Image Classification. In Proceedings of the NAECON 2025—IEEE National Aerospace and Electronics Conference, Dayton, OH, USA, 28–31 July 2025; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  24. Roy, S.K.; Jamali, A.; Chanussot, J.; Ghamisi, P.; Ghaderpour, E.; Shahabi, H. SimPoolFormer: A two-stream vision transformer for hyperspectral image classification. Remote Sens. Appl. Soc. Environ. 2025, 37, 101478. [Google Scholar] [CrossRef] [Scilit]
  25. Naseer, M.; Ranasinghe, K.; Khan, S.; Hayat, M.; Khan, F.; Yang, M.H. Intriguing Properties of Vision Transformers. Adv. Neural Inf. Proceeding Syst. 2021, 34, 23296–23308. [Google Scholar]
  26. Fang, H.; Kong, J.; Yu, W.; Chen, B.; Li, J.; Wu, H.; Xia, S.T.; Xu, K. One Perturbation is Enough: On Generating Universal Adversarial Perturbations against Vision-Language Pre-training Models. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Honolulu, HI, USA, 19–23 October 2025; pp. 4090–4100. [Google Scholar]
  27. Jain, S.; Dutta, T. Towards Understanding and Improving Adversarial Robustness of Vision Transformers. In Proceedings of the CVPR 2024, Seattle, WA, USA, 17–21 June 2024. [Google Scholar]
  28. Zhou, C.; Shi, X.; Wang, Y.G. Query-Efficient Hard-Label Black-Box Attack against Vision Transformers. arXiv 2024, arXiv:2407.00389. [Google Scholar] [CrossRef] [Scilit]
  29. Caron, M.; Touvron, H.; Misra, I.; Jegou, H.; Mairal, J.; Bojanowski, P.; Joulin, A. Emerging Properties in Self-Supervised Vision Transformers. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 10–17 October 2021; pp. 9630–9640. [Google Scholar] [CrossRef] [Scilit]
  30. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 1–11. [Google Scholar]
  31. Hong, D.; Gao, B.; Yao, J.; Chanussot, J.; Zhu, X. SpectralFormer: Rethinking hyperspectral image classification with transformers. IEEE Trans. Geosci. Remote Sens. 2021, 60, 5518615. [Google Scholar] [CrossRef] [Scilit]
  32. Bazi, Y.; Bashmal, L.; Rahhal, M.M.A.; Dayil, R.A.; Ajlan, N.A. Vision Transformers for Remote Sensing Image Classification. Remote Sens. 2021, 13, 516. [Google Scholar] [CrossRef] [Scilit]
  33. Madry, A.; Makelov, A.; Schmidt, L.; Tsipras, D.; Vladu, A. Towards deep learning models resistant to adversarial attacks. arXiv 2017, arXiv:1706.06083. [Google Scholar]
  34. Carlini, N.; Wagner, D. Towards Evaluating the Robustness of Neural Networks. arXiv 2017. Available online: http://arxiv.org/abs/1608.04644 (accessed on 14 February 2026).
  35. Kurakin, A.; Goodfellow, I.J.; Bengio, S. Adversarial examples in the physical world. arXiv 2016. Available online: http://arxiv.org/abs/1607.02533 (accessed on 14 February 2026).
  36. Tramèr, F.; Kurakin, A.; Papernot, N.; Goodfellow, I.; Boneh, D.; McDaniel, P. Ensemble Adversarial Training: Attacks and Defenses. arXiv 2020. Available online: http://arxiv.org/abs/1705.07204 (accessed on 14 February 2026).
  37. Lad, A.; Bhale, R.; Belgamwar, S. Fast Gradient Sign Method (FGSM) Variants in White Box Settings: A Comparative Study. In Proceedings of the 2024 International Conference on Inventive Computation Technologies (ICICT), Lalitpur, Nepal, 24–26 April 2024; pp. 382–386. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.