arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.09662cs.CL
收藏

使用话语链对大型语言模型进行红队测试以实现安全对齐

Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignment

Singapore University of Technology and Design(新加坡科技设计大学)

Rishabh Bhardwaj, Soujanya Poria

AI总结:

提出RED-EVAL基准和RED-INSTRUCT方法,通过话语链提示揭示LLM安全漏洞,并利用有害对话数据微调实现安全对齐,STARLING模型在保持效用的同时提升安全性。

摘要:

大型语言模型(LLMs)凭借其强大的多任务处理能力,仅通过优化下一个词预测目标便席卷全球。随着其特性和编码知识的涌现,LLMs产生有害输出的风险增加,使其不适合大规模公开部署。在这项工作中,我们提出了一个新的安全评估基准RED-EVAL,用于执行红队测试。我们表明,即使是广泛部署的模型也容易受到基于话语链(CoU)的提示的影响,使GPT-4和ChatGPT等闭源LLM系统被越狱,对超过65%和73%的有害查询做出不道德的回应。我们还证明了RED-EVAL在8个开源LLM中的一致性,在超过86%的红队测试尝试中生成了有害响应。接下来,我们提出了RED-INSTRUCT——一种用于LLMs安全对齐的方法。它包含两个阶段:1)HARMFULQA数据收集:利用CoU提示,我们收集了一个数据集,包含1.9K个涵盖广泛主题的有害问题,以及来自ChatGPT的9.5K个安全对话和7.3K个有害对话;2)SAFE-ALIGN:我们展示了如何利用对话数据集通过最小化有帮助响应的负对数似然,并通过梯度上升对有害响应的样本损失进行惩罚,来实现LLMs的安全对齐。我们的模型STARLING,一个微调的Vicuna-7B,在RED-EVAL和HHH基准上评估时,观察到更安全的对齐,同时保持了基线模型(TruthfulQA、MMLU和BBH)的效用。

英文摘要:

Larger language models (LLMs) have taken the world by storm with their massive multi-tasking capabilities simply by optimizing over a next-word prediction objective. With the emergence of their properties and encoded knowledge, the risk of LLMs producing harmful outputs increases, making them unfit for scalable deployment for the public. In this work, we propose a new safety evaluation benchmark RED-EVAL that carries out red-teaming. We show that even widely deployed models are susceptible to the Chain of Utterances-based (CoU) prompting, jailbreaking closed source LLM-based systems such as GPT-4 and ChatGPT to unethically respond to more than 65% and 73% of harmful queries. We also demonstrate the consistency of the RED-EVAL across 8 open-source LLMs in generating harmful responses in more than 86% of the red-teaming attempts. Next, we propose RED-INSTRUCT--An approach for the safety alignment of LLMs. It constitutes two phases: 1) HARMFULQA data collection: Leveraging CoU prompting, we collect a dataset that consists of 1.9K harmful questions covering a wide range of topics, 9.5K safe and 7.3K harmful conversations from ChatGPT; 2) SAFE-ALIGN: We demonstrate how the conversational dataset can be used for the safety alignment of LLMs by minimizing the negative log-likelihood over helpful responses and penalizing over harmful responses by gradient accent over sample loss. Our model STARLING, a fine-tuned Vicuna-7B, is observed to be more safely aligned when evaluated on RED-EVAL and HHH benchmarks while preserving the utility of the baseline models (TruthfulQA, MMLU, and BBH).

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

↑