CoCA:通过准则校准恢复多模态大语言模型的安全感知能力
CoCA: Regaining Safety-awareness of Multimodal Large Language Models with Constitutional Calibration
AI总结:
针对多模态大语言模型因模态鸿沟导致的视觉输入安全感知弱化问题,提出CoCA准则校准方法,通过校准输出分布恢复模型安全感知且不损失原有能力,经多类基准验证有效。
摘要:
得益于大语言模型(LLMs)的强大能力,多模态大语言模型(MLLMs)的部署在处理涉及视觉输入的对话方面已取得显著成效。这类MLLM通常以LLM为基础构建,搭配图像编码器将图像处理到LLM的词元嵌入空间中。然而,视觉模态的引入带来了一种独特的漏洞:尽管LLM已在文本数据集上训练以对齐人类价值观,但MLLM易受恶意视觉输入的影响,容易生成敏感或有害的回复。本文首先提出问题:“MLLM是否具备针对恶意图像输入的安全感知能力?”我们发现,在MLLM的输入中加入一条明确安全要求的准则后,模型的安全感知能力得到提升。这一现象证实了MLLM针对图像输入的安全感知能力是存在的,只是被模态鸿沟削弱了。随后我们提出了一种简单却有效的技术——CoCA(准则校准),它通过校准模型的输出分布来增强MLLM的安全感知能力。我们提出的策略能帮助模型恢复原本的安全感知能力,同时不损失其原有性能。我们在多模态安全基准和多模态理解基准上都验证了该方法的有效性。
英文摘要:
The deployment of multimodal large language models (MLLMs) has demonstrated remarkable success in engaging in conversations involving visual inputs, thanks to the superior power of large language models (LLMs). Those MLLMs are typically built based on the LLMs, with an image encoder to process images into the token embedding space of the LLMs. However, the integration of visual modality has introduced a unique vulnerability: the MLLM becomes susceptible to malicious visual inputs and prone to generating sensitive or harmful responses, even though the LLM has been trained on textual dataset to align with human value. In this paper, we first raise the question: ``Do the MLLMs possess safety-awareness against malicious image inputs?". We find that after adding a principle that specifies the safety requirement into the input of the MLLM, the model's safety awareness becomes boosted. This phenomenon verifies the existence of MLLM's safety-awareness against image inputs, it is only weakened by the modality gap. We then introduce a simple yet effective technique termed CoCA, which amplifies the safety-awareness of the MLLM by calibrating its output distribution. Our proposed strategy helps the model reclaim its original safety awareness without losing its original capabilities. We verify the effectiveness of our approach on both multimodal safety and understanding benchmarks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。