Skip to content

Researchers propose VMI, a visual memory injection attack for multi-turn conversationsVisual Memory Injection Attacks for Multi-Turn Conversations

Paper Tracker· arXiv:2602.15927· Christian Schlarmann, Matthias Hein·Indexed by this site · 2026-10-08· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

VMI lurks in multi-turn LVLMs with a small-perturbation image; the authors claim the trigger can still output the predetermined message after more than 10,000 tokens.

Threat modelThe attacker writes perturbations within ℓ∞ radius 8/255 into an image and publishes it to social platforms or image libraries. A benign user downloads it and uses it as the first-turn input to an LVLM, engaging in multi-turn conversation. Attack construction is white-box; transfer to fine-tuned models is evaluated as gray-box. The image remains in the context, and only when the user asks about the adversary-chosen trigger topic does it output the predetermined message, maintaining nominal behavior on other turns. The attacker does not control training or how the user asks questions.

Questions
Once an image enters a multi-turn LVLM conversation, it remains in the context, and subsequent rounds still process it. Existing visual targeted attacks are mostly limited to single turns: unrelated prompts may also output the target, or they require the user to immediately use a specific prompt after uploading. The authors aim to maintain nominal behavior in long conversations, only outputting the predetermined message when a selected topic is asked.
Methods
VMI uses APGD to jointly optimize the first-turn benign anchor and trigger target within ℓ∞ radius 8/255, switching between 2 and 8 context turns with τ=5. Intermediate replies are fixed to nominal outputs, with a default of 2000 iterations. Testing autoregressively rewrites history up to 27 turns, requiring keyword hits and no leakage.
Experiments and results
The authors state that there are successful instances for three open-source LVLMs and four target categories, and that held-out contexts and paraphrase prompts remain effective, with conversations exceeding 10,000 tokens. The authors state that Qwen3-VL is overall more resistant to attacks than Qwen2.5-VL; stock perturbations transfer to two fine-tuned models with performance similar to the source model. Pointwise SR∧ is not given in the main text.
Limitations and future work
In Limitations, the authors state: white-box access to the base model is required, API-only models remain an open problem, and the conversation contains only one input image. Experiments cover three open-source LVLMs and two fine-tuned variants. The main text does not provide pointwise SR∧, nor does it report the number of random repetitions.
Experimental setupQwen2.5-VL-7B-Instruct、Qwen3-VL-8B-Instruct et al. · COCO、LMARKS et al. · SR∧、SR_target et al.
Evaluated models
Qwen2.5-VL-7B-InstructQwen3-VL-8B-InstructLLaVA-OneVision-1.5-8B-InstructQwen-SEA-LION-v4-8B-VLQoQ-Med3-VL-8B
Benchmarks
COCOLMARKSDiverse⋆DiverseHoliday
Metrics
SR∧SR_targetSR_context
AI summaryResearchers propose a covert attack called Visual Memory Injection (VMI) targeting security weaknesses of generative large vision-language models (LVLMs) in multi-turn long-context scenarios. The attack scenario is that an attacker uploads tampered images to the web or social media, and ordinary users download the images and feed them to an LVLM. Under normal prompts, the model behaves normally; once the user gives a trigger prompt, the model outputs preset target information for manipulative purposes such as adversarial marketing or political persuasion. Unlike previous work focusing on single-turn attacks, VMI remains effective after long multi-turn conversations with users. The researchers validated the attack on several recent open-weight LVLMs and released the source code, noting that large-scale manipulation of users with perturbed images is feasible in multi-turn conversation scenarios, and calling for improved robustness of LVLMs against such attacks.

Researchers propose a covert attack called Visual Memory Injection (VMI) targeting security weaknesses of generative large vision-language models (LVLMs) in multi-turn long-context scenarios. The attack scenario is that an attacker uploads tampered images to the web or social media, and ordinary users download the images and feed them to an LVLM. Under normal prompts, the model behaves normally; once the user gives a trigger prompt, the model outputs preset target information for manipulative purposes such as adversarial marketing or political persuasion. Unlike previous work focusing on single-turn attacks, VMI remains effective after long multi-turn conversations with users. The researchers validated the attack on several recent open-weight LVLMs and released the source code, noting that large-scale manipulation of users with perturbed images is feasible in multi-turn conversation scenarios, and calling for improved robustness of LVLMs against such attacks.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors aim to make multi-turn LVLMs output a predetermined message only on the trigger topic, maintaining nominal behavior on other turns.

    In multi-turn conversations, a third party uses a small perturbed image to make an LVLM output a predetermined message only on a trigger topic after long contexts, without leaking on unrelated turns.

    • Scenario: The authors state that LVLM safety in long-context multi-turn settings is largely understudied. Images typically remain in the entire context; as an online chatbot, there are millions of user interactions daily. The authors believe this could be used for adversarial marketing, political persuasion in elections, and fraudulent financial advice, and one image can affect many users.
    • Existing limitations: The authors state that previous visual targeted attacks are limited to single turns. Unrelated prompts also output the target, causing suspicion, or require the user to say a specific prompt immediately after uploading. The authors consider the latter unrealistic because the attacker cannot control how benign users interact.
    • Observation and approach: The authors note that images are continuously processed, forming a visual memory that can influence subsequent replies. This paper proposes Visual Memory Injection (VMI): benign anchors maintain normal outputs when not triggered, and context cycling keeps the attack effective across conversation lengths.
    • Threat model:
      • Goal: Output the adversary-specified message on the trigger topic, while maintaining nominal behavior on other prompts, making it harder for users to detect.
      • Knowledge: Attack construction is white-box; for fine-tuned models based on public checkpoints, transfer is evaluated as gray-box.
      • Capability: Adds perturbations within ℓ∞ radius 8/255 and publishes to social platforms or image libraries. Does not control the training process or training data, nor the user's subsequent questions. Setting is a single image, input with the first prompt.
      • Victim: Benign users who download the image and converse with an LVLM over multiple turns.
  2. What related research exists?

    The authors position VMI as a multi-turn third-party targeted attack, distinguishing it from single-turn visual attacks, jailbreaks, and training-time poisoning.
    • Classic adversarial examples: Szegedy et al. (2014) and Goodfellow et al. (2015) studied model vulnerability to adversarial attacks. Subsequent work improving attack algorithms includes Carlini and Wagner (2017) and Croce and Hein (2020).
    • LVLM visual attacks: Qi et al. (2024), Carlini et al. (2023), Shayegani et al. (2024) used visual inputs for jailbreaks. Single-turn targeted attacks include Schlarmann and Hein (2023), Zhao et al. (2023), Bagdasaryan et al. (2023), Bailey et al. (2024), Miao et al. (2025). Luo et al. (2024) studied the transferability of targeted attacks across prompts in a single-turn setting. Lu et al. (2024) proposed test-time visual backdoors implanted by malicious users and evaluated them in a single turn; the paper contrasts that this work focuses on malicious third parties harming benign users in multi-turn conversations.
    • Prompt injection and multi-turn jailbreaks: Greshake et al. (2023), Zhan et al. (2024), Patlan et al. (2025) studied prompt injection in LLM agents, where adversaries rewrite external memory stores via input channels, memory modules, and external data. The paper contrasts that this work uses only visual inputs and does not assume external memory stores. For multi-turn jailbreaks, Russinovich et al. (2025), Yang et al. (2025b) target LLMs, while Jindal and Deshpande (2025), Das et al. (2026), Huang et al. (2025) are listed by the paper as LVLM multi-turn jailbreak studies. The paper states that in these works the malicious party is the user themselves, aiming to bypass safeguards to obtain disallowed outputs; the adversary in this work is a third party harming honest users, performing targeted attacks.
    • Training-time poisoning: Biggio et al. (2012), Gu et al. (2019), Schwarzschild et al. (2021), Carlini and Terzis (2022), and on LVLMs Lyu et al. (2024), Xu et al. (2024), Liu and Zhang (2025), implant backdoors during training. The paper states that this setting differs from this work because it does not assume the adversary can control the training process or training data.
    • Baselines and data: Algorithm comparisons are single target (a direct adaptation of Schlarmann and Hein, 2023), plus benign anchor, plus fixed context, and full VMI (Section 5.3). Images are from COCO (Lin et al., 2014) and the authors' collected LMARKS; context prompt sets are Diverse⋆, Diverse, Holiday.

    The authors position this work on multi-turn, third-party, visual-input targeted attacks: not relying on user self-jailbreaks, not controlling training, and not using agent external memory stores.

  3. How does the paper address this problem?

    VMI uses benign anchors and context looping to jointly optimize the nominal first round and the trigger target within a perturbation ball.

    VMI optimizes the image within a small ℓ∞ ball so that the first-turn anchor prompt produces a benign reply, and after contexts of varying lengths, increases the probability of the target reply only when the trigger prompt appears.

    Problem Setting

    • The image x is input with the first prompt, and subsequent turns are text-only. The i-th turn context is the concatenation of all previous prompts and outputs. The authors cite Yang et al. (2024; 2025a) and An et al. (2025) to show that images remain throughout the conversation.
    • The naive objective is to maximize the log probability of the trigger reply under a given context. The authors state that doing only this may cause the model to output the target on non-trigger prompts, making it detectable.
    • The final objective simultaneously constrains the first-turn anchor and the trigger target. k cycles from 2 to n:

    maxlog p(y|t,x̃)+log p(yi|c(k)⊕ ti,x̃)

    where y, t are the anchor reply and anchor prompt, and y^{i}, t^{i} correspond to the paper's target reply and trigger prompt. Additionally, the infinity norm must not exceed ε, and pixels must lie in the image space I.

    Benign Anchors and Four Target Categories

    • Anchors: COCO images require a short description, with the target being the model's unperturbed reply. LMARKS requires identifying the location, with the target being the correct name and city of the landmark in the image. Placeholders are filled according to the image.
    • Triggers: The user asks about the adversary-chosen topic to output the injected content. Table 1's four categories are phones, cars, political parties, and stocks; phones and cars use COCO, political parties and stocks use LMARKS. The car target includes a nonexistent object. Table 1 gives the original prompts and targets.
    • During optimization, intermediate-turn replies are fixed to nominal model outputs, not newly generated text on the adversarial image.

    Context Cycling and Optimization

    • Cycling: Start with a short context containing only the anchor and its reply, append a prompt–reply pair every τ steps, then return to the short context after reaching the maximum context length. The authors state this is to make the attack work on longer, structurally different histories.
    • Algorithm 1 first builds contexts of each length, switches indices cyclically during iterations, then performs one APGD step on the current context. The authors state that APGD has automatic step size and outperforms standard PGD.
    • Table 2: 2000 iterations, initial step size 0.1·ε, bfloat16, ℓ∞ with ε=8/255, maximum context 8 turns, τ=5. Testing can use up to 27 turns. Each pixel changes by at most 8/255 in any direction.

    Test-Time Protocol and Success Criteria

    • At inference, the adversarial image is used to autoregressively regenerate each prompt, and new replies are treated as subsequent history. The authors state this is closer to real use than the fixed contexts during optimization. Generation settings are temperature 0.6, top-p 0.95, image 224×224, up to 512 new tokens per turn.
    • s_target requires the target turn to contain positive keywords for the scenario and no negative words; s_context requires previous turns to contain no target-related keywords. Both must hold for success, then averaged over multiple attack images to get SR∧. The authors state this excludes cases where the target is output throughout. The keyword list is in Appendix A.1.
    • Appendix A.2 samples 28 context turns and 28 target turns from conversations already judged successful by the metrics, and 4 participants have 100% agreement on whether target behavior is exhibited. 95.2% of context turns without keywords are described as helpful.
  4. What experiments did the paper conduct?

    Evaluates VMI on three open-source LVLMs and four target categories; the authors state there are successful instances, but pointwise SR∧ is not marked in the main text.

    Experimental Setup

    • Models: Qwen2.5-VL-7B-Instruct, Qwen3-VL-8B-Instruct, LLaVA-OneVision-1.5-8B-Instruct. Table 3 specifies the vision encoders as Custom, SigLIP2-SO-400M, RICE-ViT-L, with sizes 8.3B, 8.8B, 8.5B. Transfer evaluation uses Qwen-SEA-LION-v4-8B-VL and QoQ-Med3-VL-8B, with perturbations optimized only on Qwen3-VL.
    • Data: 20 random images from COCO, 20 landmark images from LMARKS. Phones and cars use the former; political parties and stocks use the latter. 25 contexts each: Diverse⋆ generated by Gemini-fast, Diverse by ChatGPT-5.2, Holiday by Gemini-2.5-flash. Optimization uses only the first 6 Diverse⋆ contexts and their nominal outputs; Diverse and Holiday are not used in optimization.
    • Protocol: APGD, ε=8/255, default 2000 iterations, optimization up to 8 turns, τ=5. Testing autoregressively regenerates history, up to 27 turns. Each target has 3 additional anchor and trigger paraphrases (Table 4); paraphrase experiments do not use the original sentences, reporting mean and standard deviation. Temperature 0.6, top-p 0.95. The paper does not state the number of random repetitions.
    • Baselines: On Qwen3-VL, stock target, 2000 iterations, compare single target, w/o cycle & context, w/o cycle, and VMI (Section 5.3).
    • Metrics: SR∧ requires trigger hit and no context leakage; also look at SR_target and SR_context. Judgment is keyword matching, not an LLM judge.
    • Human evaluation: Appendix A.2, 4 people, 28 turns each in successful conversations; target behavior agreement rate 100%, context turns rated as helpful 95.2%.

    Main Results

    Swipe horizontally to read the table

    ModelDiverse⋆DiverseHoliday
    Qwen2.5-VL-7B-InstructNot reportedNot reportedNot reported
    Qwen3-VL-8B-InstructNot reportedNot reportedNot reported
    LLaVA-OneVision-1.5-8B-InstructNot reportedNot reportedNot reported

    Fig. 2 plots SR∧ versus token count for four target categories and three context sets, with y-axis scale 0%–100% and x-axis up to about 10^4. The main text does not give percentages for each point, so the table above is left blank. The two fine-tuned models are not in that figure.

    • The authors state that all three models and four targets have successful instances, and that the attacker can verify in advance and only propagate successful images. For the car target with a nonexistent object, the authors state the attack still works, and the model often fabricates reasons supporting the recommendation.
    • The authors state that Diverse⋆ is only partially used for optimization, and fully held-out Diverse and Holiday remain effective; Holiday is thematically coherent, and success occurs even when unrelated triggers appear. The authors state that the image and trigger can be more than 10,000 tokens apart. The introduction also states it can work after more than 25 unrelated turns; the experimental test upper limit is 27 turns.
    • The authors state that Qwen3-VL is overall more resistant to VMI than Qwen2.5-VL; LLaVA-OneVision-1.5 is least resistant on Holiday and most vulnerable in most scenarios on Diverse⋆ and Diverse. The Fig. 2 transcription only has legend and axis ticks, no curve endpoints, so this ranking cannot be verified from the transcribed text.

    Paraphrase and Cross-Model Transfer

    • Paraphrase: Fig. 3 gives mean SR∧ and standard deviation across three sentences when both anchor and trigger are paraphrased. The authors state there is a slight decrease relative to optimization with original sentences, but it remains effective. The main text does not give percentages for each point.
    • Transfer: Fig. 5 optimizes only the stock target on Qwen3-VL, then evaluates SEA-LION and Med3 as-is. The authors state that success rates remain high after transfer and are similar to the source model, so only a public base model is needed to affect users of its fine-tuned versions. The main text does not give percentages. The authors call this a gray-box scenario for proprietary fine-tunes.

    Algorithm Variants and Qualitative Examples

    • Variants: Fig. 4 compares four objectives on Qwen3-VL, stock target, 2000 iterations. The authors state that single target fails after the first turn; adding only the anchor improves very short conversations; adding a fixed eight-turn context improves across lengths; VMI with cycling is higher than these variants after multiple steps. The main text does not mark percentages.
    • Ablations: Fig. 6 breaks down two components on held-out Holiday. The authors state that single target has smaller but nonzero SR_target, and worst SR_context, meaning the target leaks into the context; adding the anchor improves SR_context but does not generalize across lengths; VMI has the highest SR_target, with SR_context comparable to the fixed-context variant. The authors state that SR_context barely changes with length, and if leakage occurs, it appears early in the conversation.
    • Examples: Appendix B gives trajectories for each model and target on Diverse and Holiday. The authors state that pre-trigger replies match the context, and the target appears only after the trigger, often with fabricated reasons (e.g., Fig. 14, 18, 19, 20). Fig. 19 caption states that the phone model was released after Qwen-2.5-7B, and most technical details in the example can be verified as hallucinations. Fig. 17's Diverse example does not give the predetermined car model but points to another Apple product and explains it is not a car; the same figure's Holiday example gives the predetermined recommendation. This is a single example, not an aggregate proportion.

    Other Ablations and Analysis

    • Iteration count (Fig. 22, only Qwen3-VL, stock target): The authors state that 500 iterations already succeed; increasing to 2000 improves across almost all context lengths; 8000 gives no stable gain and is worse on held-out Holiday, which the authors attribute to overfitting. The default is therefore 2000 iterations.
  5. What are some points that can be further explored?

    The authors note that white-box access to the base model is required, and the conversation contains only one image; API-only models remain an open problem.

    Limitations and future directions noted by the authors

    • The attack requires white-box access to the base model; designing attacks for models only accessible via API is called an open problem by the authors (Limitations).
    • The conversation is restricted to containing only one input image (Limitations).
    • In the Conclusion, the authors propose that LVLM safety evaluation should not only look at what the model directly refuses, but also whether, after extended nominal interactions, it can be quietly steered toward specific outputs.

    Experimental coverage

    • The models tested and plotted are Qwen2.5-VL-7B-Instruct, Qwen3-VL-8B-Instruct, LLaVA-OneVision-1.5-8B-Instruct; Fig. 5 additionally transfers perturbations on Qwen3-VL to Qwen-SEA-LION-v4-8B-VL and QoQ-Med3-VL-8B. The paper does not report numbers for API-only models (Section 5.1–5.2, Limitations).
    • Images are 20 each from COCO and LMARKS; targets are phone, car, political party, stock; contexts are 25 each from Diverse⋆, Diverse, Holiday. The optimized context is the first 6 entries of Diverse⋆, with testing up to 27 rounds (Section 5.1).
    • Algorithm variants and comparisons of 500, 2000, 8000 iterations are all on the stock target of Qwen3-VL (Fig. 4, Fig. 6, Fig. 22). Paraphrase experiments use three sentences per target, reporting mean and standard deviation (Fig. 3, Table 4).
    • Success is determined by keyword rules. Manual verification sampled from conversations already judged successful by the metric, with 4 people, 28 context rounds and 28 target rounds. The paper states 95.2%, but does not specify whether the denominator is rounds or ratings, nor does it report agreement on failed samples (Appendix A.2).
    • The paper does not report the number of random repetitions. The per-point SR∧ in Fig. 2–6 and Fig. 22 are not given numerically in the main text.
  6. Summarize the main content of the paper

    VMI makes the perturbed image lie dormant in multi-turn LVLMs, and the authors state that the predetermined message can still be output after the trigger topic appears.

    VMI is a targeted image attack for multi-turn LVLMs: a third party publishes an image with small perturbations, and a benign user treats it as ordinary input.

    • Problem: Single-turn visual attacks either also output the target on unrelated prompts, or assume the user immediately uses a specific prompt after uploading. The authors exploit the fact that the image remains in the context, keeping nominal rounds normal and only outputting the predetermined message on selected topics.
    • Method: Within an ℓ∞ radius of 8/255, APGD simultaneously optimizes the first-round benign anchor and the trigger target, switching between 2 and 8 rounds of context with τ=5. Intermediate replies are fixed to nominal outputs during optimization. At test time, history is rewritten autoregressively, up to 27 rounds. Success requires keyword hits and no context leakage.
    • Main experiments: On three open-source LVLMs, four target types, and three context sets, the authors claim successful instances for every model and scenario; the held-out Diverse, Holiday, and three paraphrases remain effective. The authors claim the trigger can be more than 10,000 tokens away from the image. The authors claim Qwen3-VL is overall more resistant to this attack than Qwen2.5-VL, and LLaVA-OneVision-1.5 is least resistant on Holiday and most vulnerable in most scenarios on the other two prompt sets. Per-point percentages are not marked in the text.
    • Transfer and variants: Perturbations for the stock target are optimized only on Qwen3-VL, and the authors claim transfer to two fine-tuned models achieves success rates similar to the source model. The authors claim that removing the anchor or the loop worsens long-conversation performance or stealth; 8000 iterations perform worse than 2000 on Holiday, which the authors attribute to overfitting. Keyword-based judgment agrees with 4 human judges at 100% on successful samples.
    • Authors' conclusion: The authors believe large-scale user manipulation via seemingly harmless images is feasible, and call for evaluating whether models can be steered to specific outputs after long nominal interactions, not just evaluating direct refusal. They also state: base-model white-box access is required, and only one input image is considered.

Related papers

Show 3 more papers
Read originalarxiv.org