arXiv · 2502.07985
MetaSC: Test-Time Safety Specification Optimization for Language Models
Abstract
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 .
Explore related subjects
Keep this discovery
Víctor Gallego. 2025-02-11. MetaSC: Test-Time Safety Specification Optimization for Language Models. https://arxiv.org/abs/2502.07985
Cite the original work for its findings. Save a collection to share your selection of sources.