E$^2$AT: Multimodal Jailbreak Defense via Dynamic Joint Optimization for Multimodal Large Language Models

Liming Lü, Shuchao Pang, Siyuan Liang, Haotian Zhu, X. Zeng Zeng, Aishan Liu, Yunhuai Liu, Yongbin Zhou

Abstract

Research endeavors have been made in learning robust Multimodal Large Language Models (MLLMs) against jailbreak attacks. However, existing methods for improving MLLMs' robustness still face critical challenges: (1) how to efficiently tune massive weight parameters and (2) how to ensure robustness against attacks across both visual and textual modalities. To this end, we propose an Efficient End-to-end Adversarial Training (E$^2$AT) framework for both visual and textual adversarial attacks. Specifically, for the visual aspect, E$^2$AT incorporates an efficient projector-based AT module that aligns the attack samples at the feature level. For training objectives, we propose a Dynamic Joint Multimodal Optimization (DJMO) strategy to enhance generalization ability against jailbreak attacks by dynamically adjusting weights between normal and adversarial objectives. Extensive experiments are conducted with five major jailbreak attack methods across three mainstream MLLMs. Results demonstrate that our E$^2$AT achieves the state-of-the-art performance, outperforming existing baselines by an average margin of 34% across text and image modalities, while maintaining clean task performance. Furthermore, evaluations of real-world embodied intelligent systems highlight the practical applicability of E$^2$AT, paving the way for the development of more secure and reliable multimodal systems.

The Challenge of Multimodal Jailbreaking

As Multimodal Large Language Models (MLLMs) like GPT-4V and LLaVA become more capable, their cross-modal flexibility expands their attack surface. Attackers can craft "jailbreaks" by hiding malicious intent in images, using adversarial text suffixes, or combining both to trick the model into generating harmful content or executing dangerous actions.

Current defenses struggle with two main issues:

  1. Computational Cost: Standard adversarial training (AT) requires fine-tuning massive modality-specific encoders, which is incredibly expensive and slow.
  2. Cross-Modal Vulnerability: Most defenses focus on a single modality (e.g., just text or just images). Attackers easily bypass these by exploiting the coupled interactions between vision and language.
Comparison of E$^2$AT (labeled as ProEAT) with existing frameworks and its application in a physical bomb retrieval experiment.

Efficient End-to-End Adversarial Training (E$^2$AT)

The authors propose E$^2$AT, which consists of two core innovations designed to be both computationally efficient and comprehensively robust across multiple modalities.

Projector-Based Adversarial Training

Instead of fine-tuning the massive, parameter-heavy vision encoder to resist visual attacks, E$^2$AT targets the projector—the lightweight module that connects the vision encoder to the language model. It uses Projected Gradient Descent (PGD) to generate adversarial image perturbations and trains the projector to align these adversarial features with clean features. This approach effectively "hardens" the pathway through which visual information enters the LLM without the need to update the entire visual backbone.

Dynamic Joint Multimodal Optimization (DJMO)

To defend against combined text-image attacks, the framework jointly optimizes the projector and the LLM. Crucially, DJMO uses an exponential moving average mechanism to dynamically adjust the loss weights between the "clean" task (normal conversation) and the "adversarial" task (rejecting jailbreaks). This prevents the common issue of "model lobotomy," where a model becomes overly cautious and loses its general utility while learning to be safe.

Detailed architecture of the E$^2$AT framework, showing the visual/text modules and the dynamic joint optimization process.

Diverse Rejection Prompts

Instead of training the model to output a rigid, fixed refusal (e.g., "I'm sorry, but I cannot..."), the authors use GPT-4 to generate diverse, natural rejection responses. This prevents the model from overfitting to a single refusal pattern, which often causes false positives on benign queries.

Experimental Evaluation

Datasets and Benchmarks

  • Training: The authors constructed a mixed dataset. Adversarial samples were generated using 520 malicious questions from Advbench paired with ImageNet images. Clean data was sourced from standard pretraining datasets like LLaVA-Instruction-80K and Bunny-695K.
  • Robustness Evaluation: The framework was tested on JailBreakV-28K, a massive benchmark of 28,000 test cases, and MM-SafetyBench, which assesses 13 safety categories including illegal acts and malware generation.
  • Utility Evaluation: LLaVA-Bench was used to ensure the models didn't lose their general conversational and reasoning abilities.

Key Results

  • State-of-the-Art Robustness: E$^2$AT outperformed existing baselines by an average margin of 34% across text and image modalities.
  • Near-Zero Attack Success Rate (ASR): On the JailBreakV-28K benchmark, E$^2$AT dropped the weighted ASR on LLaVA to just 0.054 (down from 0.452 with no defense). On Bunny-v1.0-4B, it dropped to an astonishing 0.002.
  • Real-World Embodied AI: In a physical experiment using a JetCobot robotic arm, the E$^2$AT-optimized model successfully recognized malicious instructions like "Put the bomb in Zone 3" and refused the command, whereas baseline models attempted to execute the dangerous action.

Conclusion and Future Work

E$^2$AT demonstrates that robust multimodal defense can be achieved efficiently by focusing on the cross-modal interface and using dynamic optimization strategies. While the results are promising across multiple architectures like LLaVA and Bunny, future work will involve testing generalization to even larger, unseen architectures and adapting to the evolving landscape of adversarial attack algorithms. By preserving model utility while drastically reducing vulnerability, E$^2$AT paves the way for more secure and reliable real-world multimodal systems.

Summary updated

Abstract

Research endeavors have been made in learning robust Multimodal Large Language Models (MLLMs) against jailbreak attacks. However, existing methods for improving MLLMs' robustness still face critical challenges: \ding{172} how to efficiently tune massive weight parameters and \ding{173} how to ensure robustness against attacks across both visual and textual modalities. To this end, we propose an \textbf{E}fficient \textbf{E}nd-to-end \textbf{A}dversarial \textbf{T}raining (E$^2$AT) framework for both visual and textual adversarial attacks. Specifically, for the visual aspect, E$^2$AT incorporates an efficient projector-based AT module that aligns the attack samples at the feature level. For training objectives, we propose a Dynamic Joint Multimodal Optimization (DJMO) strategy to enhance generalization ability against jailbreak attacks by dynamically adjusting weights between normal and adversarial objectives. Extensive experiments are conducted with five major jailbreak attack methods across three mainstream MLLMs. Results demonstrate that our E$^2$AT achieves the state-of-the-art performance, outperforming existing baselines by an average margin of 34\% across text and image modalities, while maintaining clean task performance. Furthermore, evaluations of real-world embodied intelligent systems highlight the practical applicability of E$^2$AT, paving the way for the development of more secure and reliable multimodal systems. Our code is available on \href{https://anonymous.4open.science/r/E2AT_568}{\textcolor{red}{https://anonymous.4open.science/r/E2AT\_568}}.
BibTeX
@misc{lu2025e,
  author = {Liming Lü and Shuchao Pang and Siyuan Liang and Haotian Zhu and X. Zeng Zeng and Aishan Liu and Yunhuai Liu and Yongbin Zhou},
  title = {{E$^2$AT: Multimodal Jailbreak Defense via Dynamic Joint Optimization for Multimodal Large Language Models}},
  year = {2025},
  eprint = {2503.04833},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.04833},
}
Figure