arXiv:2607.20791cs.AIcs.CL2026-07

高温度采样会削弱大模型拒答能力,本文提出高效方法保持拒答行为。

Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Sampling

论文配图:Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Sampling
图 1 · 摘自论文原文
  • 设计序列解码机制,在高温采样下保留贪婪解码的拒答行为。
  • 在三个数据集上保持91%-99%的拒答率,且不影响安全提示响应。
  • 适合需要高多样性输出又需保障安全性的实际应用场景。

高温度采样是提升大语言模型输出多样性的主要手段。近期基于截断的采样技术缓解了高温采样导致的文本退化问题,可在不牺牲连贯性的前提下提升多样性。然而,高温采样通过增加词元概率分布熵,已被证实会削弱模型的防御机制,降低对有害提示的拒答率。尽管高温采样优势明显且安全防护至关重要,目前仍缺乏有效方法在高熵环境下维持模型的拒答行为。为此,我们系统研究温度对拒答行为的影响,并提出一种高效的顺序解码方法,在高温采样下仍能保留模型贪婪解码时的拒答响应,额外延迟极小。大量实验表明,该方法在三个基准数据集上保持了91%-99%的贪婪解码拒答行为,且不影响模型对安全提示的高温响应。本工作展示了在高多样性需求场景中高效维护拒答行为的可行性。

原文摘要 · Abstract (English)

High-temperature sampling is one of the primary mechanisms for increasing diversity in LLMs. Recent advances in truncation-based sampling techniques have helped mitigate drawbacks of high-temperature sampling such as neural text degeneration, thereby enabling greater diversity in LLM outputs without sacrificing coherence. However, increasing the entropy of the token probability distribution via high temperatures has also been shown to weaken model guardrails by reducing the model's refusal response in the presence of harmful prompts. Despite the potential benefits of high-temperature sampling and the importance of maintaining model safety, there is a lack of existing solutions for maintaining the refusal behavior of LLMs under a higher entropy regime. To address this gap, we systematically study how temperature influences refusal behavior in LLMs and propose an efficient sequential decoding approach which preserves a model's greedy decoding refusal response at high temperatures while incurring minimal additional latency. Through extensive experiments, we show that our approach preserves 91-99% of the greedy decoding refusal behavior across three benchmark datasets without compromising the model's high-temperature response for safe prompts. Our work demonstrates how refusal behavior can be maintained in an efficient manner for applications which require high-temperature sampling.

大模型安全采样策略拒答机制

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