arXiv:2506.09353cs.CRcs.CV2025-06AAAI被引 6

通过可学习的视觉安全提示增强大模型对恶意图像的识别能力

DAVSP: Safety Alignment for Large Vision-Language Models via Deep Aligned Visual Safety Prompt

  • 在输入图像周围添加可训练的安全提示区,扩大优化空间
  • 在模型激活空间中进行监督训练,提升对恶意查询的感知能力
  • 兼顾良性输入性能,适合需要安全防护的视觉语言模型应用

大型视觉语言模型在多种应用中取得显著进展,但仍易受利用视觉模态的恶意查询攻击。现有对齐方法难以在抵抗恶意查询的同时有效保持良性输入的可用性。为此,本文提出深度对齐视觉安全提示(DAVSP),包含两项关键创新:首先引入视觉安全提示,在输入图像周围添加可训练的填充区域,保留视觉特征并扩展优化空间;其次提出深度对齐,通过在模型激活空间中施加监督信号训练视觉安全提示,增强模型对恶意查询的内在感知能力,实现比先前方法更深层次的对齐。在两个代表性大视觉语言模型上的五个基准测试中,DAVSP均有效抵御恶意查询,同时保持良性输入的性能。消融实验表明,视觉安全提示与深度对齐均为必要组件,共同贡献整体效果。代码已公开于 https://github.com/zhangyitonggg/DAVSP。

原文摘要 · Abstract (English)

Large Vision-Language Models (LVLMs) have achieved impressive progress across various applications but remain vulnerable to malicious queries that exploit the visual modality. Existing alignment approaches typically fail to resist malicious queries while preserving utility on benign ones effectively. To address these challenges, we propose Deep Aligned Visual Safety Prompt (DAVSP), which is built upon two key innovations. First, we introduce the Visual Safety Prompt, which appends a trainable padding region around the input image. It preserves visual features and expands the optimization space. Second, we propose Deep Alignment, a novel approach to train the visual safety prompt through supervision in the model's activation space. It enhances the inherent ability of LVLMs to perceive malicious queries, achieving deeper alignment than prior works. Extensive experiments across five benchmarks on two representative LVLMs demonstrate that DAVSP effectively resists malicious queries while preserving benign input utility. Furthermore, DAVSP exhibits great cross-model generation ability. Ablation studies further reveal that both the Visual Safety Prompt and Deep Alignment are essential components, jointly contributing to its overall effectiveness. The code is publicly available at https://github.com/zhangyitonggg/DAVSP.

视觉语言模型安全对齐提示工程

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