Test-Time Backdoor Attacks on Multimodal Large Language Models

Dong Lu, Tianyu Pang, Chao Du, Qian Liu, Xianjun Yang, Min Lin · DOI

Introduction

Multimodal Large Language Models (MLLMs), such as LLaVA and GPT-4V, have demonstrated remarkable capabilities in integrating visual and textual information. However, this integration introduces new security vulnerabilities. This paper introduces AnyDoor, a novel "test-time" backdoor attack that compromises MLLMs without requiring access to the training data or model weights. By applying a universal adversarial perturbation to input images, an attacker can induce malicious model behavior whenever a specific textual trigger is present in the prompt.

Overview of the AnyDoor test-time backdoor attack mechanism.

Problem Definition: Test-Time vs. Traditional Backdoors

Traditional backdoor attacks are typically "supply chain" vulnerabilities where an attacker poisons a portion of the training dataset. This forces the model to learn an association between a trigger (e.g., a specific visual patch) and a target malicious output. Such attacks are resource-intensive and require access to the training pipeline.

In contrast, AnyDoor operates entirely at inference time. It exploits the interaction between visual and textual modalities to inject a backdoor dynamically. This approach is easier to deploy—potentially as simple as a physical sticker on a camera lens—and harder to detect during the training phase.

Methodology: AnyDoor Pipeline

The AnyDoor pipeline utilizes Universal Adversarial Perturbations (UAPs) optimized via Projected Gradient Descent (PGD). The attack is designed around "modality decoupling," where the visual modality is used for the "setup" of the backdoor and the textual modality is used for its "activation."

Attack Strategies

The authors explore three primary visual perturbation strategies to embed the backdoor:

  1. Pixel Attack: Subtle, distributed noise across the entire image.
  2. Corner Attack: Four small adversarial patches placed in the corners of the image.
  3. Border Attack: An adversarial frame surrounding the image.
Visual comparison of Border, Corner, and Pixel attack strategies with varying intensities.

The optimization objective is to find a perturbation that, when added to any image, causes the model to output a target malicious string (e.g., "I want to destroy the whole world") only when the prompt contains a specific trigger (e.g., the word "SUDO"). Crucially, the model must maintain its original performance on benign inputs without the trigger.

Experimental Evaluation

The effectiveness of AnyDoor was evaluated across several popular open-source MLLMs, including LLaVA-1.5, MiniGPT-4, InstructBLIP, and BLIP-2. Testing was conducted on three diverse datasets: VQAv2 (standard natural images), SVIT (complex reasoning), and DALLE-3 (synthetic images).

Key Results

  • High Success Rates: The Border Attack proved most effective, frequently achieving over 90% ExactMatch success in triggering the target output.
  • Fidelity: The attack maintains high performance on benign questions, making the backdoor nearly invisible during normal operation.
  • Model Sensitivity: Smaller models (e.g., 7B parameters) generally exhibited higher vulnerability compared to larger models (e.g., 13B parameters), though all tested models were susceptible.
  • Robustness: The perturbations showed resilience against common image corruptions like cropping and resizing, although Gaussian noise was found to be an effective, albeit unintentional, defense in some scenarios.

Discussion and Conclusion

AnyDoor highlights a critical vulnerability in the current generation of MLLMs. The ability to decouple the setup and activation of a backdoor across different modalities makes these attacks highly flexible and dangerous in real-world applications like robotics or autonomous systems.

While the current implementation assumes white-box access to model gradients for optimization, the transferability of adversarial examples suggests that black-box variants may be feasible. This research serves as a call to action for the development of robust defense mechanisms that can detect and mitigate universal perturbations at test time, as traditional training-data sanitization is insufficient against this new class of threats.

Summary updated

BibTeX
@misc{lu2024test,
  author = {Dong Lu and Tianyu Pang and Chao Du and Qian Liu and Xianjun Yang and Min Lin},
  title = {{Test-Time Backdoor Attacks on Multimodal Large Language Models}},
  year = {2024},
  eprint = {2402.08577},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.08577},
}
Figure