STAIR:通过内省推理改进安全对齐
STAIR: Improving Safety Alignment with Introspective Reasoning
AI总结:
提出STAIR框架,结合内省推理与安全对齐,通过SI-MCTS生成步骤级数据并优化,有效减少有害输出并保留有用性,安全性能媲美Claude-3.5。
摘要:
确保大型语言模型(LLMs)的安全性和无害性已变得与其应用性能同等重要。然而,现有的安全对齐方法通常面临安全与性能的权衡,且易受越狱攻击,这主要由于它们依赖对恶意查询的直接拒绝。在本文中,我们提出了STAIR,一个将安全对齐与内省推理相结合的新框架。我们通过以安全意识自我改进思维链(CoT)推理,使LLMs能够通过逐步分析识别安全风险。STAIR首先为模型配备结构化推理能力,然后利用我们新提出的安全知情蒙特卡洛树搜索(SI-MCTS)生成的步骤级推理数据,通过迭代偏好优化推进安全对齐。我们进一步在该数据上训练过程奖励模型,以指导测试时搜索以获得改进的响应。大量实验表明,与本能对齐策略相比,STAIR有效减少了有害输出,同时更好地保留了有用性。借助测试时扩展,STAIR在抵御流行越狱攻击方面取得了与Claude-3.5相当的安全性能。
英文摘要:
Ensuring the safety and harmlessness of Large Language Models (LLMs) has become equally critical as their performance in applications. However, existing safety alignment methods typically suffer from safety-performance trade-offs and the susceptibility to jailbreak attacks, primarily due to their reliance on direct refusals for malicious queries. In this paper, we propose STAIR, a novel framework that integrates SafeTy Alignment with Itrospective Reasoning. We enable LLMs to identify safety risks through step-by-step analysis by self-improving chain-of-thought (CoT) reasoning with safety awareness. STAIR first equips the model with a structured reasoning capability and then advances safety alignment via iterative preference optimization on step-level reasoning data generated using our newly proposed Safety-Informed Monte Carlo Tree Search (SI-MCTS). We further train a process reward model on this data to guide test-time searches for improved responses. Extensive experiments show that STAIR effectively mitigates harmful outputs while better preserving helpfulness, compared to instinctive alignment strategies. With test-time scaling, STAIR achieves a safety performance comparable to Claude-3.5 against popular jailbreak attacks. Relevant resources in this work are available at https://github.com/thu-ml/STAIR.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。