arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.16637cs.CLcs.AIcs.LG
收藏

航向修正:利用合成偏好进行安全对齐

Course-Correction: Safety Alignment Using Synthetic Preferences

Alibaba Group(阿里巴巴集团);Central South University(中南大学);Ant Group(蚂蚁集团);Nanyang Technological University(南洋理工大学);Tsinghua University(清华大学)

Rongwu Xu, Yishuo Cai, Zhenhong Zhou, Renjie Gu, Haiqin Weng, Yan Liu, Tianwei Zhang, Wei Xu, Han Qiu

AI总结:

本文提出 C²-Eval 基准评估 LLM 自主航向修正能力,并利用包含 75 万对偏好的合成数据集 C²-Syn 进行偏好学习微调,在不损害通用性能的同时提升安全性与抗越狱能力。

摘要:

大型语言模型(LLM)生成有害内容的风险已成为一个关键问题。本文对评估和提升 LLM 执行“航向修正”(course-correction)任务的能力进行了系统研究,即模型能够自主地避免生成有害内容。首先,我们提出用于定量评估的 C²-Eval 基准,并分析了 10 个流行的 LLM,揭示了当前经过安全调优的 LLM 在航向修正方面能力参差不齐。为改进这一点,我们提出利用偏好学习对 LLM 进行微调,强调对及时航向修正的偏好。借助自动化流水线,我们构建了 C²-Syn,这是一个包含 75 万对成对偏好的合成数据集,通过数据驱动的偏好学习向模型传授及时航向修正的概念。在 Llama2-Chat 7B 和 Qwen2 7B 两个 LLM 上的实验表明,我们的方法有效增强了航向修正技能,且不影响通用性能。此外,该方法还有效提升了 LLM 的安全性,尤其是在抵御越狱攻击方面。

英文摘要:

The risk of harmful content generated by large language models (LLMs) becomes a critical concern. This paper presents a systematic study on assessing and improving LLMs' capability to perform the task of \textbf{course-correction}, \ie, the model can steer away from generating harmful content autonomously. To start with, we introduce the \textsc{C$^2$-Eval} benchmark for quantitative assessment and analyze 10 popular LLMs, revealing varying proficiency of current safety-tuned LLMs in course-correction. To improve, we propose fine-tuning LLMs with preference learning, emphasizing the preference for timely course-correction. Using an automated pipeline, we create \textsc{C$^2$-Syn}, a synthetic dataset with 750K pairwise preferences, to teach models the concept of timely course-correction through data-driven preference learning. Experiments on 2 LLMs, \textsc{Llama2-Chat 7B} and \textsc{Qwen2 7B}, show that our method effectively enhances course-correction skills without affecting general performance. Additionally, it effectively improves LLMs' safety, particularly in resisting jailbreak attacks.

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

↑