VLMs Can Aggregate Scattered Training Patches
本文提出了视觉拼接的概念,即视觉语言模型(VLM)能够整合多个具有相同文本描述的训练样本中的分散视觉信息,并展示了其潜在的安全风险。
更新于 2025-06-05。作者:Zhanhui Zhou、Lingjie Chen、Chao Yang、Chaochao Lu。
中文摘要
为了减轻视觉语言模型(VLMs)中的风险,一种方法是在其训练数据中移除危险样本。然而,当有害图像被分割成小块、看似无害的碎片,并散布在多个训练样本中时,这种数据审核很容易被绕过。在这种情况下,VLMs可能会在训练过程中学会将这些碎片拼接起来,并在推理时生成有害的响应,无论是来自完整图像还是文本引用。例如,如果模型在带有“安全”描述的血腥场景图像片段上训练,那么它后来可能会将完整图像或场景的文本引用描述为“安全”。我们定义VLMs实现这种攻击的核心能力为视觉拼接——即整合跨多个训练样本且共享相同文本描述的视觉信息的能力。在我们的工作中,我们首先在三个数据集上展示了常见开源VLMs的视觉拼接能力,每个图像都带有唯一的合成ID:我们将每个(图像,ID)对分割成不同粒度的{(片段,ID)}对进行微调,并发现调整后的模型可以从完整图像或文本引用中口头说出正确的ID。在此基础上,我们通过使用危险图像的片段并替换ID为“安全”或“不安全”等文本描述来模拟上述对抗性数据中毒场景,展示了有害内容如何在片段中规避审核,并通过视觉拼接重建,从而对VLMs的安全性构成严重风险。代码可在https://github.com/ZHZisZZ/visual-stitching上获取。
英文摘要
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 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 (image, ID) pair into {(patch, 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)能够整合多个具有相同文本描述的训练样本中的分散视觉信息,并展示了其潜在的安全风险。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:视觉语言模型(VLM)在处理图像和文本数据时,可能学习到有害的知识,尤其是在训练数据包含有害内容的情况下。
- 现有方案不足:通过简单地从训练数据中移除有害的图像-文本对来防止VLM学习危险事实的方法可能被绕过,因为有害图像可以被分割成看似无害的小块,并分散在多个训练样本中。
- 研究目标:评估VLM的视觉拼接能力,并展示其如何被用于绕过数据审核并注入有害知识。
问题2:论文的核心创新点是什么?
- 技术创新:提出了视觉拼接的概念,即VLM能够整合分散的视觉信息。
- 方法改进:开发了一套评估VLM视觉拼接能力的基准数据集。
- 优势:揭示了VLM的视觉拼接能力,以及其潜在的安全风险。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在三个合成数据集上评估了VLM的视觉拼接能力,并展示了如何通过视觉拼接绕过数据审核。
- 性能提升:大多数VLM在基于图像的视觉拼接方面表现出色,而在基于引用的视觉拼接方面也表现出非平凡的成果。
- 对比结果:与基线方法相比,VLM能够从分散的视觉信息中重建有害内容。
问题4:这个研究的实际应用价值是什么?
- 应用场景:揭示了VLM视觉拼接能力的潜在应用场景,如绕过数据审核和注入有害知识。
- 实施建议:需要开发更严格的审核技术,以防止VLM学习到有害知识。
- 局限与展望:未来工作可以集中在评估私有VLM的视觉拼接能力,以及开发更有效的数据审核技术。
来源
机器可读索引:llms.txt