TL;DR
This paper introduces "self-interpreting images," a novel attack vector against Visual Language Models (VLMs). These images, subtly altered with "meta-instructions," can steer a VLM's interpretation of visual content to align with an adversary's agenda (e.g., political spin, misinformation) while still producing coherent and contextually relevant answers. This represents a significant advancement in indirect prompt injection, moving beyond simple text manipulation to subtly influence VLM outputs based on visual input.
What Problem Does This Paper Address?
Visual Language Models (VLMs) are increasingly used to interpret images and answer user questions. However, like their text-only counterparts (LLMs), VLMs are vulnerable to adversarial attacks and prompt injection. Existing attacks often focus on "jailbreaking" models to bypass safety guardrails or extracting sensitive information, typically by manipulating text prompts. These methods often result in outputs that are not contextually relevant to the image or the user's query, making them detectable.
The problem this paper addresses is the creation of stealthy, indirect attacks against VLMs that can influence their interpretation of visual content in a way that is both coherent with the image and the user's query, and satisfies an adversary's hidden objective. This is crucial because users increasingly rely on VLMs for information processing, making them susceptible to subtle manipulation of narratives, opinions, and even the promotion of malicious content embedded within seemingly innocuous images. The authors highlight the need for attacks that are not easily detectable and can operate even when the adversary doesn't know the exact user prompt or VLM being used.
Methods
The core innovation is the concept of "self-interpreting images" powered by "meta-instructions."
- Meta-instructions: These are not explicit text commands but rather hidden instructions embedded within an image perturbation. They guide the VLM to produce outputs that satisfy a specific adversary-chosen objective (e.g., a political bias, a specific sentiment, or even promoting a URL) while still accurately describing the image.
- Adversarial Image Perturbations: The authors develop a method to create these perturbed images. This involves generating question-answer pairs for a given image and then using these pairs, along with a meta-instruction, to train an image perturbation. This perturbation acts as a "soft prompt" – a learned vector that influences the VLM's internal representations.
- Soft Prompts: Unlike traditional "hard prompts" (textual instructions), soft prompts are continuous vectors that are concatenated to input embeddings. This approach allows for parameter-efficient fine-tuning and, crucially, can be embedded into images, making them a powerful tool for indirect prompt injection. The method uses Projected Gradient Descent (PGD) to search for these perturbations, optimizing for both semantic preservation and adherence to the meta-instruction.
- Evaluation: The authors employ evaluator models (e.g., sentiment classifiers, language detectors, and even GPT-4) to assess whether the VLM's outputs satisfy the meta-objective and preserve image semantics.
Datasets
- Synthetic Question-Answer Dataset: The authors generated a synthetic dataset using OpenAI's ChatGPT (GPT-4 Turbo and GPT-40). For a given image and its label, they prompted ChatGPT to generate multiple questions. Then, for each question and a specified meta-instruction, they prompted ChatGPT to generate an answer that satisfied the meta-instruction. This dataset was split into 40% for training and 60% for evaluation.
- Image Datasets: The experiments utilized images from MS COCO [12] and ImageNet [35].
Key Insights and Ideas
- Images as Stealthy Instruction Carriers: The most significant insight is that images can be subtly modified to carry complex, hidden instructions that VLMs can interpret and act upon. This bypasses traditional text-based prompt injection vulnerabilities.
- "Self-Interpreting" Images: The concept of an image that not only provides visual content but also dictates how that content should be interpreted by an AI is a powerful new attack paradigm.
- Soft Prompts Unlock Hidden Capabilities: The authors hypothesize that their image perturbations, acting as soft prompts, can "unlock" capabilities of the underlying LLM that might be suppressed in instruction-tuned VLMs. This allows for more nuanced and sophisticated steering than explicit text instructions.
- Meta-Instructions are More Powerful than Explicit Instructions in Some Cases: Surprisingly, in certain scenarios (e.g., injecting spam or URLs), the image-based meta-instructions achieved higher success rates than explicit text instructions, suggesting limitations in the VLMs' ability to follow direct commands for these specific tasks.
- Transferability of Attacks: The developed perturbations are shown to be transferable across different VLM architectures and sizes, indicating that a single attack can be effective against a wide range of target models without prior knowledge of the specific VLM.
Key Results
- High Success Rates for Meta-Objectives: The proposed method achieved comparable or even superior success rates to explicit text instructions across twelve different meta-objectives, including sentiment, formality, language, political bias, spam, and URL injection.
- Sentiment Manipulation: The attack effectively steered sentiment in VLM responses, with success rates for positive, negative, and neutral sentiment reaching up to 70-86% for some models.
- Spam and URL Injection: The attack successfully injected spam content and malicious URLs into VLM responses, with success rates as high as 49% for spam and 31% for URL injection on InstructBLIP.
- Preservation of Image Semantics: Quantitative analysis using embedding similarity and SSIM, along with oracle LLM evaluations, demonstrated that the perturbed images largely preserve their original visual semantics, making them appear natural to human observers.
- Stealthiness: Perturbations with lower L2 norms were found to be more stealthy, achieving a good balance between inducing the desired behavior and remaining imperceptible to humans.
Limitations and Future Work
- Transferability to GPT-4o: While transferability was generally good, it was weakest against GPT-4o, possibly due to unknown image pre-processing steps or architectural differences.
- Impact on Human Perception: The paper acknowledges that while the images appear visually similar to humans, the impact of these adversarial interpretations on human users' opinions and beliefs is an area for future study.
- Adaptive Attacks: The authors note that current defenses (like feature distillation) can be circumvented by adaptive adversaries who incorporate these defenses into their attack generation process. Designing stealthy adaptive attacks remains an open challenge.
- Other Modalities: The authors suggest that similar techniques could be extended to other modalities like audio.
- Agentic Systems: The potential for self-interpreting images to influence actions taken by LLM/VLM-based agents (e.g., API calls, code execution) is a promising avenue for future research.
- Ethical Considerations: The paper emphasizes the importance of considering the ethical implications and potential misuse of such attacks, particularly in the context of propaganda and misinformation.
Summary updated