Cross-Modal Safety Mechanism Transfer in Large Vision-Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xu, Shicheng, Pang, Liang, Zhu, Yunchang, Shen, Huawei, Cheng, Xueqi
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910849145241600
author Xu, Shicheng
Pang, Liang
Zhu, Yunchang
Shen, Huawei
Cheng, Xueqi
author_facet Xu, Shicheng
Pang, Liang
Zhu, Yunchang
Shen, Huawei
Cheng, Xueqi
contents Vision-language alignment in Large Vision-Language Models (LVLMs) successfully enables LLMs to understand visual input. However, we find that existing vision-language alignment methods fail to transfer the existing safety mechanism for text in LLMs to vision, which leads to vulnerabilities in toxic image. To explore the cause of this problem, we give the insightful explanation of where and how the safety mechanism of LVLMs operates and conduct comparative analysis between text and vision. We find that the hidden states at the specific transformer layers play a crucial role in the successful activation of safety mechanism, while the vision-language alignment at hidden states level in current methods is insufficient. This results in a semantic shift for input images compared to text in hidden states, therefore misleads the safety mechanism. To address this, we propose a novel Text-Guided vision-language Alignment method (TGA) for LVLMs. TGA retrieves the texts related to input vision and uses them to guide the projection of vision into the hidden states space in LLMs. Experiments show that TGA not only successfully transfers the safety mechanism for text in basic LLMs to vision in vision-language alignment for LVLMs without any safety fine-tuning on the visual modality but also maintains the general performance on various vision tasks (Safe and Good).
format Preprint
id arxiv_https___arxiv_org_abs_2410_12662
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Cross-Modal Safety Mechanism Transfer in Large Vision-Language Models
Xu, Shicheng
Pang, Liang
Zhu, Yunchang
Shen, Huawei
Cheng, Xueqi
Computer Vision and Pattern Recognition
Artificial Intelligence
Computation and Language
Vision-language alignment in Large Vision-Language Models (LVLMs) successfully enables LLMs to understand visual input. However, we find that existing vision-language alignment methods fail to transfer the existing safety mechanism for text in LLMs to vision, which leads to vulnerabilities in toxic image. To explore the cause of this problem, we give the insightful explanation of where and how the safety mechanism of LVLMs operates and conduct comparative analysis between text and vision. We find that the hidden states at the specific transformer layers play a crucial role in the successful activation of safety mechanism, while the vision-language alignment at hidden states level in current methods is insufficient. This results in a semantic shift for input images compared to text in hidden states, therefore misleads the safety mechanism. To address this, we propose a novel Text-Guided vision-language Alignment method (TGA) for LVLMs. TGA retrieves the texts related to input vision and uses them to guide the projection of vision into the hidden states space in LLMs. Experiments show that TGA not only successfully transfers the safety mechanism for text in basic LLMs to vision in vision-language alignment for LVLMs without any safety fine-tuning on the visual modality but also maintains the general performance on various vision tasks (Safe and Good).
title Cross-Modal Safety Mechanism Transfer in Large Vision-Language Models
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2410.12662