arXiv:2506.03614cs.CVcs.AI2025-06NeurIPS

视觉语言模型能拼接分散的图像碎片,导致有害内容绕过审查

VLMs Can Aggregate Scattered Training Patches

  • 发现主流VLM可整合跨样本的图像碎片并还原完整信息
  • 在三个数据集上验证模型能从全图或文本提示中准确复现唯一标识
  • 揭示安全审查漏洞:有害内容被拆分后仍可重构,适合安全研究者关注

缓解视觉语言模型(VLM)风险的一种方法是移除训练数据中的危险样本。然而,当有害图像被分割为多个看似无害的小块并分散到多个训练样本中时,这种审查容易被绕过。VLM可能在训练过程中学会将这些片段拼接起来,在推理阶段生成有害响应,无论是基于完整图像还是文本引用。例如,若模型在包含血腥场景碎片的图像与标注为'安全'的描述上训练,后续可能仍将该场景描述为'安全'。我们定义这一能力为‘视觉拼接’——即在共享相同文本描述的多个训练样本间整合分散的视觉信息。本文在三个数据集上首次验证了常见开源VLM的视觉拼接能力:将每个(图像, 唯一合成ID)对按不同粒度拆分为(补丁, ID)对进行微调,结果发现模型能从全图或文本引用中正确恢复出对应ID。进一步模拟对抗性数据投毒场景,使用危险图像的补丁替换为'安全'或'不安全'等标签,证明有害内容可通过视觉拼接在训练后重建,构成严重安全威胁。代码已公开于https://github.com/ZHZisZZ/visual-stitching。

原文摘要 · Abstract (English)

One way to mitigate risks in vision-language models (VLMs) is to remove dangerous samples in their training data. However, such data moderation can be easily bypassed when harmful images are split into small, benign-looking patches, scattered across many training samples. VLMs may then learn to piece these fragments together during training and generate harmful responses at inference, either from full images or text references. For instance, if trained on image patches from a bloody scene paired with the descriptions "safe," VLMs may later describe, the full image or a text reference to the scene, as "safe." We define the core ability of VLMs enabling this attack as $\textit{visual stitching}$ -- the ability to integrate visual information spread across multiple training samples that share the same textual descriptions. In our work, we first demonstrate visual stitching abilities in common open-source VLMs on three datasets where each image is labeled with a unique synthetic ID: we split each $(\texttt{image}, \texttt{ID})$ pair into $\{(\texttt{patch}, \texttt{ID})\}$ pairs at different granularity for finetuning, and we find that tuned models can verbalize the correct IDs from full images or text reference. Building on this, we simulate the adversarial data poisoning scenario mentioned above by using patches from dangerous images and replacing IDs with text descriptions like ``safe'' or ``unsafe'', demonstrating how harmful content can evade moderation in patches and later be reconstructed through visual stitching, posing serious VLM safety risks. Code is available at https://github.com/ZHZisZZ/visual-stitching.

视觉拼接模型安全数据投毒VLM

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。