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

面向大型语言模型的全面事后安全对齐:安全补丁方法

Towards Comprehensive Post Safety Alignment of Large Language Models via Safety Patching

Harbin Institute of Technology(哈尔滨工业大学);Singapore Management University(新加坡管理大学);National University of Singapore(新加坡国立大学)

Weixiang Zhao, Yulin Hu, Zhuojun Li, Yang Deng, Jiahe Guo, Xingyu Sui, Yanyan Zhao, Bing Qin, Tat-Seng Chua, Ting Liu

AI总结:

针对LLM安全对齐中安全机制脆弱、过度安全及实用性损失问题,提出SafePatching框架,通过两种安全补丁集成实现全面事后安全对齐,实验验证其优于基线并平衡有用性与无害性。

摘要:

大型语言模型(LLM)的安全对齐正日益受到关注。然而,当前经过安全对齐的LLM存在脆弱且不平衡的安全机制,仍可能被诱导生成不安全响应,表现出过度安全(拒绝安全的用户输入),并在安全对齐后无法保持通用实用性。为此,我们提出了一种新颖的事后安全对齐(PSA)方法,以解决这些固有和新出现的安全挑战,包括安全增强、过度安全缓解和实用性保持。具体而言,我们引入了SafePatching,一个用于全面PSA的新框架,其中在有害数据上开发了两种不同的安全补丁以增强安全性并缓解过度安全担忧,然后无缝集成到目标LLM骨干中而不损害其实用性。在四个代表性对齐LLM(包括LLaMA-2/3、Gemma和Mistral)上的大量实验表明,SafePatching实现了比基线方法更全面的PSA,进一步优化了当前对齐LLM中有用性与无害性之间的平衡。此外,SafePatching在持续PSA场景中展示了其优越性。

英文摘要:

Safety alignment of large language models (LLMs) has been gaining increasing attention. However, current safety-aligned LLMs suffer from the fragile and imbalanced safety mechanisms, which can still be induced to generate unsafe responses, exhibit over-safety by rejecting safe user inputs, and fail to preserve general utility after safety alignment. To this end, we propose a novel post safety alignment (PSA) method to address these inherent and emerging safety challenges, including safety enhancement, over-safety mitigation, and utility preservation. In specific, we introduce \textsc{SafePatching}, a novel framework for comprehensive PSA, where two distinct safety patches are developed on the harmful data to enhance safety and mitigate over-safety concerns, and then seamlessly integrated into the target LLM backbone without compromising its utility. Extensive experiments on four representative aligned LLMs, including LLaMA-2/3, Gemma and Mistral, show that \textsc{SafePatching} achieves a more comprehensive PSA than baseline methods, further optimizing the balance between being helpful and harmless in current aligned LLMs. Also, \textsc{SafePatching} demonstrates its superiority in continual PSA scenarios.

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

↑