TL;DR
This paper introduces Visual Memory Injection (VMI), a highly stealthy adversarial attack tailored for multi-turn conversations with Large Vision-Language Models (LVLMs). By applying an imperceptible perturbation to an image, an attacker can ensure the model behaves perfectly normally for dozens of turns until a specific "trigger" topic is raised, at which point it outputs a malicious target message. This reveals a critical security vulnerability: images can act as a persistent "visual memory" that silently steers long-term user interactions.
What Problem Does This Paper Address?
Most existing adversarial attacks on LVLMs focus on a single-turn setting—a single prompt accompanied by a single image. However, in real-world applications, users engage in extended, multi-turn dialogues with AI chatbots. Throughout these chats, the initial image remains inside the model's context window.
Prior single-turn attacks fail in this realistic scenario: they either cause the model to output the malicious response immediately (which instantly alerts the user) or their influence quickly fades as the conversation grows longer. This paper addresses this gap by demonstrating how an attacker can exploit the persistent "visual memory" of LVLMs to execute long-lasting, topic-triggered manipulation without raising suspicion early in the conversation.
Methods
The authors propose the VMI attack, which optimizes an image perturbation under an $\ell_\infty$-norm budget ($\epsilon = 8/255$) using Adaptive Projected Gradient Descent (APGD). The core methodology relies on two novel mechanisms:
- Benign Behavioral Anchoring: To keep the attack stealthy, the optimization objective jointly maximizes the probability of a helpful, accurate response to the initial image prompt (the "anchor") and the malicious response to the trigger prompt. This prevents the model from degenerating or leaking the attack payload prematurely.
- Context-Cycling: If an attack is optimized for a fixed conversation length, it overfits and fails at other turns. Context-cycling dynamically varies the length of the conversational history during the optimization process (cycling from 2 to $n$ turns). This forces the adversarial perturbation to remain effective across arbitrary dialogue lengths.
Datasets
The method was evaluated using two image sources and three distinct context prompt sets:
- Images: 20 random samples from the COCO dataset (used for product recommendation targets) and 20 landmark images from a custom LMARKS dataset (used for political and financial targets).
- Context Prompts:
Diverse*: A set of miscellaneous prompts partially seen during optimization.Diverse: A completely held-out set of miscellaneous prompts.Holiday: A completely held-out, thematically coherent set of prompts simulating a user planning a vacation.
Key Insights and Ideas
- Images as Persistent Memory: Because vision-language models retain the input image tokens across the entire multi-turn context window, the image acts as a permanent background bias. VMI successfully exploits this architectural property.
- The Necessity of Cycling: Standard optimization fails beyond the first few turns. Context-cycling is the "aha" mechanism that ensures the adversarial perturbation generalizes across varying conversational histories.
- Hallucinated Justifications: When triggered, the attacked models do not just blindly repeat the target phrase; they actively hallucinate convincing, elaborate reasoning to support the malicious recommendation (e.g., inventing tech specs for a non-existent "Apple iCar").
Key Results
The authors validated VMI against three state-of-the-art open-weight models: Qwen2.5-VL-7B-Instruct, Qwen3-VL-8B-Instruct, and LLaVA-OneVision-1.5-8B-Instruct.
- High Persistence: VMI achieved substantial attack success rates even after conversations extended past 25 turns and exceeded 10,000 tokens in context length.
- Robust Transferability: The attacks remained highly effective when evaluated on completely unseen prompt sets (
DiverseandHoliday) and when users phrased the trigger prompts differently (paraphrasing). - Gray-Box Transfer: Adversarial images optimized on the base Qwen3-VL model successfully transferred to downstream, fine-tuned variants like
Qwen3-VL→SEA-LIONandQwen3-VL→Med3without any extra optimization.
Limitations and Future Work
- White-Box Dependency: The attack generation process currently requires white-box access to the base model's gradients to optimize the pixel perturbations. Extending VMI to black-box, API-only models (like GPT-4V or Claude 3) remains an open challenge.
- Single Image Constraint: The current formulation assumes a conversation centered around a single initial image input. Future work is needed to explore how multi-image conversations affect or amplify visual memory injection vulnerabilities.
Summary updated