CARE:通过回滚与内省干预实现解码时安全对齐
CARE: Decoding Time Safety Alignment via Rollback and Introspection Intervention
AI总结:
提出CARE框架,通过守卫模型监控、回滚机制和内省干预,在解码时实现安全对齐,兼顾安全、质量与效率。
摘要:
随着大型语言模型(LLMs)在现实世界应用中的日益部署,确保其解码过程中输出的安全性已成为一个关键挑战。然而,现有的解码时干预方法,如对比解码(Contrastive Decoding),往往在安全性和响应质量之间强制进行严重的权衡。在这项工作中,我们提出了CARE,一种新颖的解码时安全对齐框架,它整合了三个关键组件:(1)一个用于实时安全监控的守卫模型,能够检测潜在不安全的内容;(2)一个带有令牌缓冲区的回滚机制,能够在更早阶段高效地纠正不安全输出,而不会干扰用户体验;(3)一种新颖的基于内省的干预策略,其中模型对其之前的输出生成自我反思性批评,并将这些反思纳入上下文以指导后续的解码步骤。该框架通过使用其守卫模型进行精确干预、回滚机制进行及时纠正,以及我们新颖的内省方法进行有效的自我纠正,实现了卓越的安全-质量权衡。实验结果表明,我们的框架在安全性、质量和效率方面实现了优越的平衡,实现了较低的有害响应率和对用户体验的最小干扰,同时保持了高响应质量。
英文摘要:
As large language models (LLMs) are increasingly deployed in real-world applications, ensuring the safety of their outputs during decoding has become a critical challenge. However, existing decoding-time interventions, such as Contrastive Decoding, often force a severe trade-off between safety and response quality. In this work, we propose CARE, a novel framework for decoding-time safety alignment that integrates three key components: (1) a guard model for real-time safety monitoring, enabling detection of potentially unsafe content; (2) a rollback mechanism with a token buffer to correct unsafe outputs efficiently at an earlier stage without disrupting the user experience; and (3) a novel introspection-based intervention strategy, where the model generates self-reflective critiques of its previous outputs and incorporates these reflections into the context to guide subsequent decoding steps. The framework achieves a superior safety-quality trade-off by using its guard model for precise interventions, its rollback mechanism for timely corrections, and our novel introspection method for effective self-correction. Experimental results demonstrate that our framework achieves a superior balance of safety, quality, and efficiency, attaining a low harmful response rate and minimal disruption to the user experience while maintaining high response quality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。