Making Every Step Effective: Jailbreaking Large Vision-Language Models Through Hierarchical KV Equalization

Shuyang Hao, Yiwei Wang, Bryan Hooi, Jun Liu, Muhao Chen, Zi Huang, Yujun Cai

Abstract

In the realm of large vision-language models (LVLMs), adversarial jailbreak attacks serve as a red-teaming approach to identify safety vulnerabilities of these models and their associated defense mechanisms. However, we identify a critical limitation: not every adversarial optimization step leads to a positive outcome, and indiscriminately accepting optimization results at each step may reduce the overall attack success rate. To address this challenge, we introduce HKVE (Hierarchical Key-Value Equalization), an innovative jailbreaking framework that selectively accepts gradient optimization results based on the distribution of attention scores across different layers, ensuring that every optimization step positively contributes to the attack. Extensive experiments demonstrate HKVE's significant effectiveness, achieving attack success rates of 75.08% on MiniGPT4, 85.84% on LLaVA and 81.00% on Qwen-VL, substantially outperforming existing methods by margins of 20.43%, 21.01% and 26.43% respectively. Furthermore, making every step effective not only leads to an increase in attack success rate but also allows for a reduction in the number of iterations, thereby lowering computational costs.

Introduction: The Challenge of LVLM Safety

Large Vision-Language Models (LVLMs) like LLaVA or Qwen-VL integrate safety filters to prevent the generation of harmful content. "Jailbreaking" is a critical red-teaming technique used to probe these filters by adding adversarial noise to images, tricking the model into bypassing its safety training.

Current gradient-based attacks often suffer from a lack of precision: they iteratively update images to minimize a harmful loss function but blindly accept every update. This frequently leads to "attention spikes" where the model focuses excessively on either the harmful content (triggering a refusal) or the bypass prompts (leading to nonsensical output). The key to a successful jailbreak lies in finding the "Goldilocks zone"—a state of attention equalization where the model processes both the harmful instruction and the bypass mechanism simultaneously.

Figure 1: Conceptual overview of attention equalization. Jailbreaking succeeds when attention is balanced between harmful information and bypass prompts.

The HKVE Framework

To address the inefficiencies of standard optimization, we introduce HKVE (Hierarchical Key-Value Equalization). This framework refines the adversarial process through two primary innovations:

1. Vision Sink Discovery

Empirical analysis reveals that the information flow of adversarial images is predominantly concentrated in the first two layers of the model, termed "vision sinks." By monitoring only these initial layers, HKVE can evaluate the effectiveness of an optimization step with minimal computational overhead.

2. Selective Acceptance via KV Equalization

Instead of accepting every gradient update, HKVE calculates the standard deviation of attention scores (Key-Value scores) in the vision sink layers. If a gradient step moves the model toward a more "equalized" state (lower standard deviation) between harmful information and prompt patches, it is prioritized. Conversely, steps that cause attention to spike in a single area are down-weighted or rejected.

Figure 3: The HKVE framework architecture, showing the iterative gradient-based optimization and the Key-Value Equalization process.

Experimental Evaluation

We evaluated HKVE using MM-SafetyBench, covering 13 prohibited scenarios including illegal activities, hate speech, and malware generation. The framework was tested against state-of-the-art models: MiniGPT4-v2-13B, LLaVA-1.5-13B, and Qwen-VL-Chat.

Key Results

  • Attack Success Rate (ASR): HKVE achieved an ASR of 75.08% on MiniGPT4, 85.84% on LLaVA, and 81.00% on Qwen-VL, outperforming previous state-of-the-art methods by 20% to 26%.
  • Computational Efficiency: By filtering out counter-productive updates, HKVE reached convergence in approximately 1,500 steps—a 60.13% reduction in time compared to traditional 4,000-step gradient attacks.
  • Transferability: Adversarial images generated via HKVE showed high effectiveness across different model architectures, suggesting that the "vision sink" vulnerability is a widespread trait in current LVLMs.

Conclusion and Future Work

HKVE demonstrates that balancing a model's gaze is more effective than simply overwhelming it with noise. While currently a white-box attack requiring internal gradient access, these findings provide a roadmap for developing more robust attention-based defenses. Future research will explore the translation of these insights into black-box scenarios and the creation of defensive mechanisms capable of neutralizing equalized adversarial patterns.

Summary updated

Abstract

In the realm of large vision-language models (LVLMs), adversarial jailbreak attacks serve as a red-teaming approach to identify safety vulnerabilities of these models and their associated defense mechanisms. However, we identify a critical limitation: not every adversarial optimization step leads to a positive outcome, and indiscriminately accepting optimization results at each step may reduce the overall attack success rate. To address this challenge, we introduce HKVE (Hierarchical Key-Value Equalization), an innovative jailbreaking framework that selectively accepts gradient optimization results based on the distribution of attention scores across different layers, ensuring that every optimization step positively contributes to the attack. Extensive experiments demonstrate HKVE's significant effectiveness, achieving attack success rates of 75.08% on MiniGPT4, 85.84% on LLaVA and 81.00% on Qwen-VL, substantially outperforming existing methods by margins of 20.43\%, 21.01\% and 26.43\% respectively. Furthermore, making every step effective not only leads to an increase in attack success rate but also allows for a reduction in the number of iterations, thereby lowering computational costs. Warning: This paper contains potentially harmful example data.
BibTeX
@inproceedings{hao2025making,
  author = {Shuyang Hao and Yiwei Wang and Bryan Hooi and Jun Liu and Muhao Chen and Zi Huang and Yujun Cai},
  title = {{Making Every Step Effective: Jailbreaking Large Vision-Language Models Through Hierarchical KV Equalization}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=EWJJ0Gmv9p},
}
Figure