2025-02-13 · 专家 · 自然语言处理 · 机器学习

MetaSC: Test-Time Safety Specification Optimization for Language Models

本文提出了一种名为MetaSC的动态安全框架,通过优化语言模型在推理时的安全推理,提高了模型在对抗攻击和道德危害等安全相关任务中的安全性。

更新于 2025-02-13。作者:Víctor Gallego。

中文摘要

我们提出了一种新颖的动态安全框架,该框架在推理时优化语言模型(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 to be released at https://github.com/vicgalle/meta-self-critique.git .

解读

一句话总结

本文提出了一种名为MetaSC的动态安全框架,通过优化语言模型在推理时的安全推理,提高了模型在对抗攻击和道德危害等安全相关任务中的安全性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt