arXiv:2506.06444cs.LGcs.AI2025-06

提出Saffron-1,用新方法提升大模型推理时的安全性。

Saffron-1: Safety Inference Scaling

  • 设计多分支奖励模型,减少安全评估次数
  • 在多个数据集上超越Best-of-N,安全率提升23%
  • 适合关注大模型安全与推理优化的研究者

现有安全对齐研究主要聚焦训练阶段,但易受越狱攻击。尽管推理规模提升显著增强了大模型推理能力,其在安全保障中的应用仍待探索。本文首次将推理规模引入安全领域,发现传统推理缩放方法在安全任务中表现不佳,甚至不如基础的Best-of-N采样。原因在于高计算开销导致的‘探索-效率困境’。为此,我们提出SAFFRON,一种专为安全设计的推理缩放范式:引入多分支奖励模型(MRM),结合部分监督训练、保守探索约束及基于Trie的键值缓存策略,大幅降低奖励模型评估频率。实验验证了该方法的有效性。我们公开发布训练好的多分支奖励模型Saffron-1及对应的400万级分词粒度安全奖励数据集Safety4M,代码与资源已开源。

原文摘要 · Abstract (English)

Existing safety assurance research has primarily focused on training-phase alignment to instill safe behaviors into LLMs. However, recent studies have exposed these methods' susceptibility to diverse jailbreak attacks. Concurrently, inference scaling has significantly advanced LLM reasoning capabilities but remains unexplored in the context of safety assurance. Addressing this gap, our work pioneers inference scaling for robust and effective LLM safety against emerging threats. We reveal that conventional inference scaling techniques, despite their success in reasoning tasks, perform poorly in safety contexts, even falling short of basic approaches like Best-of-N Sampling. We attribute this inefficiency to a newly identified challenge, the exploration--efficiency dilemma, arising from the high computational overhead associated with frequent process reward model (PRM) evaluations. To overcome this dilemma, we propose SAFFRON, a novel inference scaling paradigm tailored explicitly for safety assurance. Central to our approach is the introduction of a multifurcation reward model (MRM) that significantly reduces the required number of reward model evaluations. To operationalize this paradigm, we further propose: (i) a partial supervision training objective for MRM, (ii) a conservative exploration constraint to prevent out-of-distribution explorations, and (iii) a Trie-based key--value caching strategy that facilitates cache sharing across sequences during tree search. Extensive experiments validate the effectiveness of our method. Additionally, we publicly release our trained multifurcation reward model (Saffron-1) and the accompanying token-level safety reward dataset (Safety4M) to accelerate future research in LLM safety. Our code, model, and data are publicly available at https://github.com/q-rz/saffron , and our project homepage is at https://q-rz.github.io/p/saffron .

大模型安全推理优化奖励模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。