通过干净数据筛选增强安全对齐大语言模型的鲁棒性
Robustifying Safety-Aligned Large Language Models through Clean Data Curation
AI总结:
本文提出一个数据筛选框架,通过迭代修改文本降低困惑度并保持质量,有效中和预训练数据中的恶意文本影响并增加微调时的越狱难度,显著提升了LLMs的安全对齐鲁棒性。
摘要:
大语言模型(LLMs)在包含有害内容的数据集上训练时容易受到攻击,这会在两种场景下导致潜在的越狱攻击:预训练使用的众包数据中混入有害文本,以及通过微调对LLMs进行直接篡改。在这两种场景下,攻击者都能破坏LLMs的安全对齐,加剧系统故障。出于缓解这些对抗性影响的需求,我们的研究旨在通过中和预训练数据集中恶意文本的影响,或增加下游微调期间越狱的难度来增强安全对齐。在本文中,我们提出了一个数据筛选框架,旨在应对这两种场景下的对抗性影响。我们的方法在不知道攻击细节的假设下运行,仅专注于筛选干净文本。我们引入了一个迭代过程,旨在修改文本以降低LLMs感知到的困惑度,同时保持其文本质量。通过使用筛选后的干净文本对LLMs进行预训练或微调,我们观察到LLMs在抵御有害查询的安全对齐方面的鲁棒性有了显著提高。例如,当使用包含5%有害实例的众包数据集预训练LLMs时,添加等量的筛选文本显著降低了LLMs提供有害响应的可能性,并将攻击成功率降低了71%。我们的研究在缓解基于训练的越狱风险和巩固LLMs的安全利用方面迈出了重要一步。
英文摘要:
Large language models (LLMs) are vulnerable when trained on datasets containing harmful content, which leads to potential jailbreaking attacks in two scenarios: the integration of harmful texts within crowdsourced data used for pre-training and direct tampering with LLMs through fine-tuning. In both scenarios, adversaries can compromise the safety alignment of LLMs, exacerbating malfunctions. Motivated by the need to mitigate these adversarial influences, our research aims to enhance safety alignment by either neutralizing the impact of malicious texts in pre-training datasets or increasing the difficulty of jailbreaking during downstream fine-tuning. In this paper, we propose a data curation framework designed to counter adversarial impacts in both scenarios. Our method operates under the assumption that we have no prior knowledge of attack details, focusing solely on curating clean texts. We introduce an iterative process aimed at revising texts to reduce their perplexity as perceived by LLMs, while simultaneously preserving their text quality. By pre-training or fine-tuning LLMs with curated clean texts, we observe a notable improvement in LLM robustness regarding safety alignment against harmful queries. For instance, when pre-training LLMs using a crowdsourced dataset containing 5\% harmful instances, adding an equivalent amount of curated texts significantly mitigates the likelihood of providing harmful responses in LLMs and reduces the attack success rate by 71\%. Our study represents a significant step towards mitigating the risks associated with training-based jailbreaking and fortifying the secure utilization of LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。