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.
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:
- Pixel Attack: Subtle, distributed noise across the entire image.
- Corner Attack: Four small adversarial patches placed in the corners of the image.
- Border Attack: An adversarial frame surrounding the image.
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