P-VMI: adversarial images persistently influence multi-round dialogue via the KV cacheVisual Memory Attacks Can Persist Through The KV Cache
Translation in progress — untranslated text is omitted.
Researchers from ServiceNow AI Research and other institutions propose the Persistent Visual Memory Injection (P-VMI) attack, which can write hidden backdoors from adversarial images into the KV cache of subsequent tokens, allowing the image to influence model outputs even after being masked. On Qwen3-VL-8B-Instruct, the strongest P-VMI configuration achieves about 90% target success rate, and even when the image is exposed only in the first round, it works in stricter settings; the original VMI attack has 0% success after masking the image at trigger time, indicating that persistence requires dedicated optimization. The research also shows the attack can pass through context compression that retains summary KV cache, and on Gemma-4-12B the trigger success rate exceeds 90% (within three dialogue rounds) and drops to 73% after six rounds. Cache-swap ablation localizes the persistent effect to the KV cache, and a single linear direction in the residual stream predicts attack success with AUC between 0.90 and 0.95.
- When long-context agents ingest untrusted input, existing defenses and context management mechanisms assume that removing or masking the malicious input eliminates the harm, but the retained KV cache may become a vehicle for the attack to persist and spread covertly.
- Propose persistent visual memory injection (P-VMI), dividing the optimization objective into a benign anchor term when the image is visible and a target term backpropagated through the KV cache after masking, using APGD for end-to-end optimization.
- On Qwen3-VL-8B-Instruct, after masking, SR∧ reaches about 90% at most, and with context compression retaining summary KV caches, the average success rate is 89%; a single direction in the residual stream can predict success with a merged AUC of 0.91.
- The attack requires white-box gradient access, and transfer to black-box models was not tested; evaluation did not cover generalization to new problems; most reported results are the best case among three sub-selections; recomputing the KV cache can eliminate this attack channel.
The paper demonstrates that the influence of adversarial images can remain in the KV cache after the image is masked, providing a new attack surface for evaluating the security of cache reuse and context compression.
Related events and news
1 events · 1 news mentions
- This event's paper
多模态模型视觉记忆攻击可残留于KV缓存
News that mentions this paper
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:决策性模型护栏也能被攻击者绕过
Visual Memory Attacks Can Persist Through The KV Cache(https://arxiv.org/abs/2610.09027)