Organizations: School of Cyber Science and Engineering, Huazhong University of Science and Technology, Wuhan, 430074, China · Institute for Math & AI, Wuhan University, Wuhan, 430072, China · School of Natural and Computing Sciences, University of Aberdeen, Aberdeen, United Kingdom · School of Computer Science, University of St Andrews, St Andrews, United Kingdom
Large vision-language models (LVLMs) have demonstrated impressive capabilities in handling multi-modal downstream tasks, gaining increasing popularity. However, recent studies show that LVLMs are susceptible to both intentional and inadvertent attacks. Existing attackers ideally optimize adversarial perturbations with backpropagated gradients from LVLMs, thus limiting their scalability in practical scenarios as real-world LVLM applications will not provide any LVLM's gradient or details. Motivated by this research gap and counter-practical phenomenon, we propose a novel hard-label attack method for LVLMs, named HardPatch, to generate visual adversarial patches by solely querying the model. Our method provides deeper insights into how to investigate the vulnerability of LVLMs in local visual regions and generate corresponding adversarial substitution under the practical yet challenging hard-label setting. Specifically, we first split each image into uniform patches and mask each of them to individually assess their sensitivity to the LVLM model. Then, according to the descending order of sensitive scores, we iteratively select the most vulnerable patch to initialize noise and estimate gradients with further additive random noises for optimization. In this manner, multiple patches are perturbed until the altered image satisfies the adversarial condition. Extensive LVLM models and datasets are evaluated to demonstrate the adversarial nature of HardPatch. Our empirical observations suggest that with appropriate patch substitution and optimization, HardPatch can craft effective adversarial images to attack hard-label LVLMs.
Figures & tables
Figure 1: (a) Attack process of existing LVLM attackers. (b) We re-implement [ 29 ] in the hard-label setting by removing its surrogate model. Compared to it, our adversarial patches have fewer perturbations and are easier to add.
Figure 2: Overview of our proposed HardPatch attack. Given the input image and prompts, we first uniformly split the image into patches of the same size. Then, we individually mask each patch to assess their sensitivity to the LVLM model by measuring the semantic changes between their text output with the clean one. After that, we iteratively substitute the most vulnerable patch with noise and estimate gradients to update its noisy pattern. Multiple patches are perturbed until the final altered image achieves the adversarial condition.
LVLM
Attack
Dataset: MS-COCO
Dataset: ImageNet
Dataset: DALL-E
Cls.
Cap.
VQA
Cls.
Cap.
VQA
Cls.
Cap.
VQA
BLIP-2
Clean Tar
0.409
0.436
0.447
0.415
0.462
0.473
0.368
0.425
0.466
Ours Tar
0.862
0.833
0.827
0.831
0.814
0.860
0.802
0.841
0.848
Clean Untar
1.000
1.000
1.000
1.000
1.000
1.000
1.000
1.000
1.000
Ours Untar
0.524
0.601
0.547
0.543
0.582
0.556
0.539
0.594
0.525
MiniGPT-4
Clean Tar
0.438
0.451
0.463
0.419
0.447
0.504
0.396
0.441
0.497
Table 1: Attack performance on different LVLM models. As for targeted attack (↑) , we report the semantic similarity scores between the LVLM’s output and the attackers’ chosen label “Unknown". As for untargeted attack (↓) , we report the semantic similarity scores between the LVLM’s output and clean output.
Attack
Dataset: MS-COCO
Dataset: ImageNet
BLIP-2
MiniGPT-4
LLaVA-1.5
BLIP-2
MiniGPT-4
LLaVA-1.5
MF-it [ 29 ]
0.602
0.571
0.549
0.546
0.484
0.452
MF-ii [ 29 ]
0.641
0.623
0.567
0.592
0.572
0.450
MF-ii+it [ 29 ]
0.712
0.703
0.681
0.665
0.666
0.597
QueryAtt [ 102 ]
0.738
0.726
0.709
0.689
0.673
0.658
Qeba [ 103 ]
0.754
0.742
0.768
0.702
0.696
0.714
Table 2: Performance comparison (↑) with other LVLM attacks on two datasets. We set ϵ=8/255 for fair comparison.
Metric
Qwen2-VL
Intern-VL
GPT-4v
Claude-3.5
Overall
0.814
0.798
0.759
0.772
Table 3: Performance ( ↑ ) on more LVLMs on ImageNet [ 99 ] .
LVLMs
AT-PGD
AT-CW
Adv. Patch
Anydoor
Ours
Qwen2-VL
0.698
0.687
0.659
0.692
0.814
Intern-VL
0.683
0.695
0.664
0.676
0.798
Table 4: Evaluations ( ↑ ) on more LVLMs on ImageNet [ 99 ] .
Method
Access Level
Attack Success ( ↑ )
Queries
PGD
White-box
0.91
10
C&W
White-box
0.93
20
GrayAttack
Gray-box
0.85
50
NES
Black-box (score)
0.72
1000+
Global Noise
Black-box (hard-label)
0.69
300
Ours
Black-box (hard-label)
0.81
150
Table 5: Comparison across different attack settings.
Target Text
LVLM
Classification
Captioning
VQA
I am sorry
BLIP-2
0.801
0.792
0.837
MiniGPT-4
0.850
0.834
0.817
LLaVA-1.5
0.862
0.841
0.874
InstructBLIP
0.834
0.803
0.825
I do not know
BLIP-2
0.878
0.775
0.861
MiniGPT-4
0.825
0.809
0.842
Table 6: Targeted attack performance (↑) of our HardPatch on different LVLM models on MS-COCO dataset [ 98 ] with different target texts.
Figure 3: Performance comparison between our adversarial patch and the global noise on the MS-COCO dataset [ 98 ] .
Figure 4: Performance comparison between our adversarial patch and the global noise on the ImageNet dataset [ 99 ] .
Figure 5: Performance comparison between our adversarial patch and the global noise on the DALL-E dataset [ 100 , 14 ] .
Figure 6: Visualization of the adversarial examples generated by our HardPatch and the global noise on LLaVA-1.5 [ 2 ] under the targeted attack.
Figure 7: Performance comparison of our HardPatch in single-image and universal attack settings on the MS-COCO dataset [ 98 ] .
Figure 8: Performance comparison of our HardPatch in single-image and universal attack settings on the ImageNet dataset [ 99 ] .
Figure 9: Performance comparison of our HardPatch in single-image and universal attack settings on the DALL-E dataset [ 100 , 14 ] .
Figure 10: Visualization of the adversarial examples generated with LLaVA-1.5 [ 2 ] in both single-image attack and universal attack settings.
Max Number
LVLM
Classification
Captioning
VQA
Number =1
BLIP-2
0.678
0.642
0.651
MiniGPT-4
0.649
0.665
0.670
LLaVA-1.5
0.626
0.634
0.668
InstructBLIP
0.681
0.652
0.645
Number =2
BLIP-2
0.749
0.726
0.768
MiniGPT-4
0.761
0.704
0.753
Table 7: Targeted attack performance (↑) of our HardPatch on MS-COCO dataset [ 98 ] with different maximum adversarial patch number.
Image Split M
LVLM
Classification
Captioning
VQA
Split to 5×5
BLIP-2
0.881
0.842
0.839
MiniGPT-4
0.875
0.830
0.863
LLaVA-1.5
0.874
0.836
0.872
InstructBLIP
0.868
0.824
0.850
Split to 7×7
BLIP-2
0.862
0.833
0.827
MiniGPT-4
0.849
0.815
0.872
Table 8: Targeted attack performance (↑) of our HardPatch on MS-COCO dataset [ 98 ] with different image split. The maximum adversarial patch number is set to 4.
Patch Order
LVLM
Classification
Captioning
VQA
Random Order
BLIP-2
0.714
0.697
0.680
MiniGPT-4
0.696
0.672
0.733
LLaVA-1.5
0.729
0.703
0.737
InstructBLIP
0.688
0.675
0.699
Descending Order
BLIP-2
0.862
0.833
0.827
MiniGPT-4
0.849
0.815
0.872
Table 9: Targeted attack performance (↑) of our HardPatch on different patch orders on MS-COCO [ 98 ] dataset. The maximum adversarial patch number is set to 4.
Defense
LVLM
Classification
Captioning
VQA
With Defense
BLIP-2
0.828
0.779
0.781
MiniGPT-4
0.797
0.762
0.803
LLaVA-1.5
0.815
0.784
0.810
InstructBLIP
0.783
0.756
0.772
Without Defense
BLIP-2
0.862
0.833
0.827
MiniGPT-4
0.849
0.815
0.872
Table 10: Targeted attack performance (↑) of our HardPatch against defense strategy of RandomRotation on MS-COCO [ 98 ] dataset.
Defense
BLIP-2
MiniGPT-4
LLaVA-1.5
None
0.835
0.859
0.831
Simple Smoothing
0.748
0.756
0.772
JPEG Compression
0.762
0.748
0.756
Patch Diffusion
0.725
0.713
0.709
Color Distortion
0.777
0.794
0.770
Table 11: Averaged Attack performance ( ↑ ) on three tasks against more complicated defenses on ImageNet [ 99 ] dataset.
Output Text Encoder
BLIP-2
MiniGPT-4
LLaVA-1.5
CLIP
0.835
0.859
0.831
SentenceTransformer
0.842
0.861
0.837
Table 12: Ablations ( ↑ ) on output text encoders on ImageNet [ 99 ] .
MF [ 29 ]
AT [ 104 ]
Adv. Patch [ 43 ]
Anydoor [ 36 ]
Ours
Time
12.2min
1.8min
3.5min
2.6min
2.4min
Table 13: Analysis on the method efficiency of our HardPatch .
Method
Access Type
Forward
Backward
Time (s)
Single Inference
–
1
0
∼ 0.1
PGD (10 iters)
White-box
10
10
∼ 1–2
NES / ZOO
Score-based
500–2000
0
∼ 10–60
Global Noise (Hard-label)
Label-only
200–500
0
∼ 5–20
Ours
Label-only
100–300
0
∼ 3–10
Table 14: Computational cost comparison. Time is measured on a single GPU with batch size 1 and averaged over samples.
Mask
Perturbation
BLIP-2
MiniGPT-4
LLaVA-1.5
Targeted
Untargeted
Targeted
Untargeted
Targeted
Untargeted
✓
×
0.463
0.928
0.478
0.909
0.463
0.916
✓
✓
0.841
0.557
0.845
0.538
0.865
0.544
Table 15: Control experiments on masked patch on MSCOCO.
LVLMs
AT-PGD
AT-CW
Adv. Patch
Anydoor
Ours
Qwen2-VL
0.698
0.687
0.659
0.692
0.814
Intern-VL
0.683
0.695
0.664
0.676
0.798
Table 16: Evaluations ( ↑ ) on more LVLMs on ImageNet.
ImageNet to MSCOCO
MSCOCO to ImageNet
OOD Image
0.716
0.738
OOD Prompt
0.779
0.781
OOD Image&Prompt
0.685
0.679
Table 17: Evaluations ( ↑ ) on OOD data on BLIP-2 model.
Figure 11: Visualizations on untargeted/targeted adversarial samples and corresponding output for the input prompt “ Convey the main theme of this picture succinctly " on LLaVA-1.5 [ 2 ] .
Figure 12: Visualizations on the sensitivity score for each patch.
Adversarial attacks on vision-language models exploit images, text, and multimodal interactions to manipulate outputs, bypass safety, or degrade reliability.
Targeted adversarial attacks on Large Vision-Language Models (LVLMs) test whether small image perturbations can steer model responses toward attacker-specified content. Under the standard L-infinity constraint, targeted attacks become a regional perturbation budget allocation problem: attack success depends not only on the perturbation objective, but also on which regions receive updates and in what order. Existing localized attacks improve over global perturbations but rely on stochastic spatial sampling, often updating weakly influential regions. We address this limitation through an attention-based analysis showing that cross-modal attention identifies adversarially sensitive regions and that perturbing high-attention hotspots induces predictable redistribution toward subsequent salient regions. These findings motivate attention-guided region sequencing, which begins from dominant hotspots and progressively moves the update support toward next-salient regions. Based on these principles, we propose Stage-wise Attention-Guided Attack (SAGA), a black-box region-sequencing framework that uses a fixed attention map from an open-source LVLM to guide perturbation updates without accessing target-model parameters, gradients, or attention maps. Across ten closed-source and open-source LVLMs, SAGA achieves state-of-the-art attack success rates and the best overall imperceptibility. The source code is available at https://github.com/jaehyun-kwak/SAGA.
Large Vision-Language Models (LVLMs) have achieved remarkable performance on multimodal tasks but remain highly vulnerable to small adversarial perturbations in input images. Existing attacks typically target the vision encoder's final output embeddings, implicitly treating the encoder as a uniform attack surface, while a systematic analysis of which internal components are most vulnerable has remained largely unexplored. We show such analysis is essential, as adversarial vulnerability in LVLM vision encoders is structurally concentrated rather than uniformly distributed. Building on this, we propose Vision Encoder Vulnerable-Component-Targeted Universal Adversarial Perturbation (VEV-UAP), a task-agnostic and cost-efficient attack framework. Through a component- and layer-wise analysis of attention mechanisms, we identify the value components in middle layers as critical vulnerabilities that strongly influence downstream language model behavior. VEV-UAP selectively targets these components to generate a single universal perturbation shared across images, without involving textual inputs or the language model during optimization. Experiments across multiple LVLMs and tasks show VEV-UAP achieves state-of-the-art attack success rates with reduced computational overhead. Moreover, a single VEV-UAP transfers across LVLMs sharing the same vision encoder, even when paired with different language models, making it a practical framework for scalable robustness evaluation.
Hee-Seon Kim, Minbeom Kim, Seokil Ham +1
School of Electrical Engineering, KAIST, Daejeon 34141, Republic of Korea
Large Vision-Language Models (LVLMs) are foundational to modern multimodal applications, yet their susceptibility to adversarial attacks remains a critical concern. Prior white-box attacks rarely generalize across tasks, and black-box methods depend on expensive transfer, which limits efficiency. The vision encoder, standardized and often shared across LVLMs, provides a stable gray-box pivot with strong cross-model transfer. Building on this premise, we introduce PA-Attack (Prototype-Anchored Attentive Attack). PA-Attack begins with a prototype-anchored guidance that provides a stable attack direction towards a general and dissimilar prototype, tackling the attribute-restricted issue and limited task generalization of vanilla attacks. Building on this, we propose a two-stage attention enhancement mechanism: (i) leverage token-level attention scores to concentrate perturbations on critical visual tokens, and (ii) adaptively recalibrate attention weights to track the evolving attention during the adversarial process. Extensive experiments across diverse downstream tasks and LVLM architectures show that PA-Attack achieves an average 75.1% score reduction rate (SRR), demonstrating strong attack effectiveness, efficiency, and task generalization in LVLMs. Code is available at https://github.com/hefeimei06/PA-Attack.
Hefei Mei, Zirui Wang, Chang Xu +2
City University of Hong Kong · The University of Sydney