用多智能体迭代思考生成安全推理数据,提升大模型安全性。
Towards Safety Reasoning in LLMs: AI-agentic Deliberation for Policy-embedded CoT Data Creation
- 多智能体反复讨论安全策略,生成高质量思维链
- 数据经精炼后准确率高,可直接用于模型微调
- 适合需要强化安全性的大模型训练团队
安全推理是大模型在生成回复前先推理安全策略的新范式,能缓解现有安全机制的过度拒绝和越狱漏洞问题。但高质量嵌入安全策略的思维链(CoT)数据集构建成本高,且易出现幻觉或政策冲突。为此,我们提出AIDSAFE:基于智能体迭代审议的安全推理数据生成方法,通过多智能体协作逐步扩展安全推理过程。数据精炼阶段消除重复、冗余与欺骗性内容,确保输出质量。AIDSAFE生成的思维链为监督微调(SFT)提供了坚实基础。此外,为满足偏好训练(如DPO)需求,我们引入信念增强策略,生成有区分度的选中与拒绝样本。实验表明,使用AIDSAFE数据微调开源大模型,显著提升了安全泛化能力与越狱鲁棒性,同时保持合理效用和不过度拒绝的准确性。相关数据集已公开:https://huggingface.co/datasets/AmazonScience/AIDSAFE
原文摘要 · Abstract (English)
Safety reasoning is a recent paradigm where LLMs reason over safety policies before generating responses, thereby mitigating limitations in existing safety measures such as over-refusal and jailbreak vulnerabilities. However, implementing this paradigm is challenging due to the resource-intensive process of creating high-quality policy-embedded chain-of-thought (CoT) datasets while ensuring reasoning remains accurate and free from hallucinations or policy conflicts. To tackle this, we propose AIDSAFE: Agentic Iterative Deliberation for Safety Reasoning, a novel data generation recipe that leverages multi-agent deliberation to iteratively expand reasoning on safety policies. A data refiner stage in AIDSAFE ensures high-quality outputs by eliminating repetitive, redundant, and deceptive thoughts. AIDSAFE-generated CoTs provide a strong foundation for supervised fine-tuning (SFT)-based safety training. Additionally, to address the need of preference data in alignment stages, such as DPO training, we introduce a supplemental recipe that uses belief augmentation to create distinct selected and rejected CoT samples. Our evaluations demonstrate that AIDSAFE-generated CoTs achieve superior policy adherence and reasoning quality. Consequently, we show that fine-tuning open-source LLMs on these CoTs can significantly improve safety generalization and jailbreak robustness while maintaining acceptable utility and over-refusal accuracy. AIDSAFE-generated CoT datasets can be found here: https://huggingface.co/datasets/AmazonScience/AIDSAFE
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。