arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.13581cs.CVcs.AI
收藏

视觉语言模型的安全对齐

Safety Alignment for Vision Language Models

Nanjing University(南京大学);Chongqing University(重庆大学);Alibaba Group(阿里巴巴集团);Chinese University of Hong Kong(香港中文大学)

Zhendong Liu, Yuanbi Nie, Yingshui Tan, Xiangyu Yue, Qiushi Cui, Chongjun Wang, Xiaoyong Zhu, Bo Zheng

AI总结:

针对视觉语言模型视觉模态易受攻击的问题,提出添加安全模块并通过两阶段训练增强安全对齐,在RTVLM基准上超越GPT-4V,且对通用性能影响小。

摘要:

得益于大型语言模型(LLMs)的强大能力,将预训练的视觉编码器模型连接到LLMs可以实现视觉语言模型(VLMs)。然而,现有研究表明,VLMs的视觉模态是脆弱的,攻击者容易通过视觉模态特征绕过LLMs的安全对齐机制发起攻击。为了解决这一问题,我们通过添加安全模块(包括安全投影器、安全令牌和安全头)来增强现有VLMs的视觉模态安全对齐,并通过两阶段训练过程有效提高模型对风险图像的防御能力。例如,基于LLaVA-v1.5模型,我们在红队视觉语言模型(RTVLM)基准上取得了8.26的安全分数,超过了GPT-4V。我们的方法具有易用性、高灵活性和强可控性,在增强安全性的同时,对模型的通用性能影响极小。此外,我们的对齐策略还揭示了常用开源多模态数据集中一些潜在的风险内容。我们的代码将在匿名评审后开源。

英文摘要:

Benefiting from the powerful capabilities of Large Language Models (LLMs), pre-trained visual encoder models connected to an LLMs can realize Vision Language Models (VLMs). However, existing research shows that the visual modality of VLMs is vulnerable, with attackers easily bypassing LLMs' safety alignment through visual modality features to launch attacks. To address this issue, we enhance the existing VLMs' visual modality safety alignment by adding safety modules, including a safety projector, safety tokens, and a safety head, through a two-stage training process, effectively improving the model's defense against risky images. For example, building upon the LLaVA-v1.5 model, we achieve a safety score of 8.26, surpassing the GPT-4V on the Red Teaming Visual Language Models (RTVLM) benchmark. Our method boasts ease of use, high flexibility, and strong controllability, and it enhances safety while having minimal impact on the model's general performance. Moreover, our alignment strategy also uncovers some possible risky content within commonly used open-source multimodal datasets. Our code will be open sourced after the anonymous review.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑