SAHs: Unraveling Safety Attention Heads in Large Vision-Language Models

IF 10.8 1区 工程技术 Q1 ENGINEERING, ELECTRICAL & ELECTRONIC
Ziwei Zheng;Lijun He;Junyao Zhao;Le Yang;Fan Li
{"title":"SAHs: Unraveling Safety Attention Heads in Large Vision-Language Models","authors":"Ziwei Zheng;Lijun He;Junyao Zhao;Le Yang;Fan Li","doi":"10.1109/TCSVT.2026.3710895","DOIUrl":null,"url":null,"abstract":"With the integration of an additional modality, large vision-language models (LVLMs) exhibit greater vulnerability to safety risks (e.g., jailbreaking) compared to their language-only predecessors. Although recent studies have devoted considerable effort to the post-hoc alignment of LVLMs, the inner safety mechanisms remain largely unexplored. In this paper, we discover that activations of LVLM attention heads can pose significant linear separability of malicious and benign prompts. We hypothesize that the model’s inherent safety perception is governed by sparse attention heads, which we term “safety heads.” Further analysis reveals that these heads act as specialized shields against malicious prompts; ablating them leads to higher attack success rates, while the model’s utility remains unaffected, which further confirms our hypothesis. Beyond empirical evidence, we also conduct a semantic analysis showing that safety heads are capable of isolating and amplifying unsafe semantics in both image and text inputs, offering interpretable insights into their protective role. By locating these safety heads and concatenating their activations, we construct a straightforward but powerful malicious prompt detector that integrates seamlessly into the generation process with minimal extra inference overhead. Despite its simple structure of a logistic regression model, the detector surprisingly exhibits strong zero-shot generalization capabilities. Experiments across various prompt-based attacks in both image and video domains confirm the effectiveness of leveraging safety heads to protect LVLMs.","PeriodicalId":13082,"journal":{"name":"IEEE Transactions on Circuits and Systems for Video Technology","volume":"36 10","pages":"15317-15331"},"PeriodicalIF":10.8000,"publicationDate":"2026-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Circuits and Systems for Video Technology","FirstCategoryId":"5","ListUrlMain":"https://ieeexplore.ieee.org/document/11598934/","RegionNum":1,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/7/7 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"ENGINEERING, ELECTRICAL & ELECTRONIC","Score":null,"Total":0}
引用次数: 0

Abstract

With the integration of an additional modality, large vision-language models (LVLMs) exhibit greater vulnerability to safety risks (e.g., jailbreaking) compared to their language-only predecessors. Although recent studies have devoted considerable effort to the post-hoc alignment of LVLMs, the inner safety mechanisms remain largely unexplored. In this paper, we discover that activations of LVLM attention heads can pose significant linear separability of malicious and benign prompts. We hypothesize that the model’s inherent safety perception is governed by sparse attention heads, which we term “safety heads.” Further analysis reveals that these heads act as specialized shields against malicious prompts; ablating them leads to higher attack success rates, while the model’s utility remains unaffected, which further confirms our hypothesis. Beyond empirical evidence, we also conduct a semantic analysis showing that safety heads are capable of isolating and amplifying unsafe semantics in both image and text inputs, offering interpretable insights into their protective role. By locating these safety heads and concatenating their activations, we construct a straightforward but powerful malicious prompt detector that integrates seamlessly into the generation process with minimal extra inference overhead. Despite its simple structure of a logistic regression model, the detector surprisingly exhibits strong zero-shot generalization capabilities. Experiments across various prompt-based attacks in both image and video domains confirm the effectiveness of leveraging safety heads to protect LVLMs.
在大视觉语言模型中揭示安全注意头
由于集成了额外的模态,大型视觉语言模型(LVLMs)与仅使用语言的前辈相比,更容易受到安全风险(例如,越狱)的影响。尽管最近的研究已经投入了相当多的精力来研究LVLMs的事后对齐,但其内部安全机制仍未被探索。在本文中,我们发现LVLM注意头的激活可以使恶意提示和良性提示具有显著的线性可分性。我们假设模型的固有安全感知是由稀疏的注意头控制的,我们称之为“安全头”。进一步分析表明,这些头部充当了抵御恶意提示的专门盾牌;消除它们会导致更高的攻击成功率,而模型的效用不受影响,这进一步证实了我们的假设。除了经验证据,我们还进行了语义分析,表明安全头能够在图像和文本输入中隔离和放大不安全语义,为其保护作用提供可解释的见解。通过定位这些安全头并连接它们的激活,我们构建了一个简单但功能强大的恶意提示检测器,它以最小的额外推理开销无缝集成到生成过程中。尽管它的逻辑回归模型结构简单,检测器出人意料地显示出强大的零射击泛化能力。在图像和视频域中进行的各种基于提示的攻击实验证实了利用安全头保护lvlm的有效性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
13.80
自引率
27.40%
发文量
660
审稿时长
5 months
期刊介绍: The IEEE Transactions on Circuits and Systems for Video Technology (TCSVT) is dedicated to covering all aspects of video technologies from a circuits and systems perspective. We encourage submissions of general, theoretical, and application-oriented papers related to image and video acquisition, representation, presentation, and display. Additionally, we welcome contributions in areas such as processing, filtering, and transforms; analysis and synthesis; learning and understanding; compression, transmission, communication, and networking; as well as storage, retrieval, indexing, and search. Furthermore, papers focusing on hardware and software design and implementation are highly valued. Join us in advancing the field of video technology through innovative research and insights.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书