arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.12274cs.CL
收藏

SafeInfer:面向大语言模型的上下文自适应解码时安全对齐

SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Models

Indian Institute of Technology Kharagpur(印度理工学院卡拉格普尔分校);Microsoft IDC(微软印度研发中心);Singapore University of Technology and Design(新加坡科技设计大学)

Somnath Banerjee, Sayan Layek, Soham Tripathy, Shanu Kumar, Animesh Mukherjee, Rima Hazra

AI总结:

SafeInfer提出一种上下文自适应解码时安全对齐方法,通过安全增强与安全引导解码两阶段提升大语言模型生成安全性,并引入HarmEval基准评估安全性能。

摘要:

安全对齐的语言模型往往表现出脆弱且不平衡的安全机制,从而增加了生成不安全内容的可能性。此外,通过编辑技术向语言模型融入新知识可能会进一步损害其安全性。为解决这些问题,我们提出了SafeInfer,一种上下文自适应的解码时安全对齐策略,用于针对用户查询生成安全响应。SafeInfer包含两个阶段:安全增强阶段,利用安全示范示例调整模型的隐藏状态,以提高生成更安全输出的可能性;以及安全引导解码阶段,根据安全优化的分布影响令牌选择,确保生成内容符合伦理准则。此外,我们提出了HarmEval,一个用于广泛安全评估的新基准,旨在根据领先AI科技巨头的政策,解决潜在的滥用场景。

英文摘要:

Safety-aligned language models often exhibit fragile and imbalanced safety mechanisms, increasing the likelihood of generating unsafe content. In addition, incorporating new knowledge through editing techniques to language models can further compromise safety. To address these issues, we propose SafeInfer, a context-adaptive, decoding-time safety alignment strategy for generating safe responses to user queries. SafeInfer comprises two phases: the safety amplification phase, which employs safe demonstration examples to adjust the model's hidden states and increase the likelihood of safer outputs, and the safety-guided decoding phase, which influences token selection based on safety-optimized distributions, ensuring the generated content complies with ethical guidelines. Further, we present HarmEval, a novel benchmark for extensive safety evaluations, designed to address potential misuse scenarios in accordance with the policies of leading AI tech giants.

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

↑