面向安全的回溯方法
Backtracking for Safety
AI总结:
针对LLM安全对齐浅层化及长生成中细微毒性难以纠正的问题,本文提出回溯方法,可在违规时回到更安全状态并局部修正,兼顾安全性与效率。
摘要:
大语言模型(LLM)已在各类任务中展现出卓越能力,但确保其安全性并与人类价值观保持一致仍然至关重要。当前的安全对齐方法,例如监督微调和基于强化学习的方法,可能容易受到对抗攻击,并且往往导致浅层安全对齐,主要关注阻止生成输出初始 token 中的有害内容。虽然重置等方法可以通过丢弃先前 token 并重新开始生成过程,从不安全生成中恢复,但它们并不适合处理细微的安全违规,例如在原本良性且冗长的生成过程中可能出现的毒性。本文提出一种新颖的回溯方法,旨在解决这些局限。当生成过程中出现安全违规时,该方法允许模型回到更安全的生成状态,而不必一定回到开头。这种方法能够针对性地纠正有问题的片段,而无需丢弃整个生成文本,从而保持效率。我们证明,该方法显著减少了生成过程中出现的毒性,同时对效率的影响极小。
英文摘要:
Large language models (LLMs) have demonstrated remarkable capabilities across various tasks, but ensuring their safety and alignment with human values remains crucial. Current safety alignment methods, such as supervised fine-tuning and reinforcement learning-based approaches, can exhibit vulnerabilities to adversarial attacks and often result in shallow safety alignment, primarily focusing on preventing harmful content in the initial tokens of the generated output. While methods like resetting can help recover from unsafe generations by discarding previous tokens and restarting the generation process, they are not well-suited for addressing nuanced safety violations like toxicity that may arise within otherwise benign and lengthy generations. In this paper, we propose a novel backtracking method designed to address these limitations. Our method allows the model to revert to a safer generation state, not necessarily at the beginning, when safety violations occur during generation. This approach enables targeted correction of problematic segments without discarding the entire generated text, thereby preserving efficiency. We demonstrate that our method dramatically reduces toxicity appearing through the generation process with minimal impact to efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。