Abstract
Self-supervised learning (SSL) vision encoders learn high-quality image representations and thus have become a vital part of developing vision modality of large vision language models (LVLMs). Due to the high cost of training such encoders, pre-trained encoders are widely shared and deployed into many LVLMs, which are security-critical or bear societal significance. Under this practical scenario, we reveal a new backdoor threat that significant visual hallucinations can be induced into these LVLMs by merely compromising vision encoders. Because of the sharing and reuse of these encoders, many downstream LVLMs may inherit backdoor behaviors from encoders, leading to widespread backdoors. In this work, we propose BadVision, the first method to exploit this vulnerability in SSL vision encoders for LVLMs with novel trigger optimization and backdoor learning techniques. We evaluate BadVision on two types of SSL encoders and LVLMs across eight benchmarks. We show that BadVision effectively drives the LVLMs to attacker-chosen hallucination with over 99% attack success rate, causing a 77.6% relative visual understanding error while maintaining the stealthiness. SoTA backdoor detection methods cannot detect our attack effectively.
The Supply Chain Risk in Vision-Language Models
Training a Large Vision Language Model (LVLM) from scratch is prohibitively expensive. To save resources, developers typically "plug and play" pre-trained vision encoders—such as OpenAI’s CLIP—and freeze them while training the language component. This research identifies a massive security gap in this supply chain: if a malicious actor publishes a compromised version of a popular vision encoder online, any downstream model that uses it will "inherit" the backdoor. Unlike previous attacks limited to simple classification or visible patches, this work explores how to induce complex, free-form hallucinations using triggers that are completely invisible to the human eye.
The BadVision Framework
BadVision is designed for maximum effectiveness and stealth through two primary innovations:
- Bi-Level Trigger Optimization: Instead of using a fixed trigger (like a logo), BadVision uses bi-level optimization to find an "optimal" adversarial noise pattern. This pattern is mathematically crafted to pull the feature representations of any input image toward the feature representation of a specific target image chosen by the attacker.
- Trigger-Focusing Backdoor Learning: Standard backdoors often cause "feature concentration," making them easy for detectors like DECREE to spot. BadVision mitigates this by using a "trigger-focusing" loss. During training, the model is exposed to "invalid" adversarial triggers and taught to ignore them, responding only to the specific, optimized attack trigger. This ensures the backdoored encoder behaves exactly like a clean one unless the precise secret key (the trigger) is present.
Experimental Evaluation
The attack was evaluated using a shadow dataset of 5,000 images from PASCAL VOC, demonstrating that an attacker does not need the original training data of the encoder to succeed. The team tested the attack across eight diverse benchmarks to ensure real-world efficacy, including image captioning (COCO, Flickr30k, Vizwiz), Visual Question Answering (VQAv2, GQA), and Object Hallucination (POPE benchmarks).
Performance and Stealth
BadVision achieved a near-perfect Attack Success Rate (ASR) of over 99% across multiple benchmarks and different encoder architectures (CLIP and EVA-CLIP). When the trigger was active, it caused a 77.6% relative error in visual understanding, effectively "blinding" the model to the actual content of the image.
Crucially, the attack maintains "benign performance," meaning the model works perfectly on normal images. Furthermore, it bypassed state-of-the-art (SoTA) detection methods that successfully caught previous attack types. As shown in the comparison below, BadVision's hallucinations are natural-sounding, whereas previous methods like VLOOD often produce obvious textual artifacts that signal a compromised model.
Conclusion and Future Directions
The findings highlight a critical "inheritance" risk: because vision encoders are often shared and reused without modification, a single compromised encoder can infect an entire ecosystem of downstream models. The research also demonstrated zero-shot transferability, where a backdoor implanted in an encoder for a 7-billion parameter model (LLaVA-7B) transferred perfectly to a 13-billion parameter model without additional training.
While highly effective, the authors note that more sophisticated optimization techniques could make the attack even more potent. The most significant takeaway is the current defense gap; the authors call for the community to develop new detection methods specifically designed for the high-dimensional feature spaces of generative models.
Summary updated