MetaSC:语言模型的测试时安全规范优化
MetaSC: Test-Time Safety Specification Optimization for Language Models
AI总结:
本文提出MetaSC框架,通过元批判机制在测试时迭代优化安全规范提示,无需修改模型权重即可提升语言模型对越狱攻击和通用安全任务的防御性能。
摘要:
我们提出了一种新颖的动态安全框架,在不修改模型权重的情况下,在推理时优化语言模型(LM)的安全推理。基于自批判方法的最新进展,我们的方法利用一种元批判机制,迭代地更新安全提示——称为规范——以自适应地驱动批判和修订过程。这种测试时优化不仅提高了针对对抗性越狱请求的性能,而且在多样化的通用安全相关任务中也表现出色,例如避免道德伤害或追求诚实的回应。我们在多个语言模型上的实证评估表明,与固定系统提示和静态自批判防御相比,动态优化的安全提示能产生显著更高的安全分数。代码发布于 https://github.com/vicgalle/meta-self-critique.git 。
英文摘要:
We propose a novel dynamic safety framework that optimizes language model (LM) safety reasoning at inference time without modifying model weights. Building on recent advances in self-critique methods, our approach leverages a meta-critique mechanism that iteratively updates safety prompts-termed specifications-to drive the critique and revision process adaptively. This test-time optimization not only improves performance against adversarial jailbreak requests but also in diverse general safety-related tasks, such as avoiding moral harm or pursuing honest responses. Our empirical evaluations across several language models demonstrate that dynamically optimized safety prompts yield significantly higher safety scores compared to fixed system prompts and static self-critique defenses. Code released at https://github.com/vicgalle/meta-self-critique.git .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。