arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.08874cs.CLcs.CR
收藏

推理大语言模型是否在长上下文中拒绝它们推断出的内容?

Do Reasoning LLMs Refuse What They Infer in Long Contexts?

International Computer Science Institute(国际计算机科学研究所);College of Engineering, University of California, Berkeley(加州大学伯克利分校工程学院);Berkeley Lab(伯克利实验室)

Yu Fu, Haz Sameen Shahgir, Huanli Gong, Zhipeng Wei, N. Benjamin Erichson, Yue Dong

AI总结:

研究探讨了长上下文大语言模型在推断出有害目标时的拒绝能力,发现模型在长上下文中推断目标时拒绝率下降,揭示了长上下文安全漏洞。

摘要:

长上下文大语言模型能够推断出未明确陈述的目标。这种能力在文档、代码、检索证据和工具轨迹的推理中很有用,但也会带来安全风险:有害意图可能被分散在上下文中,只有在模型组合相关片段后才变得明显。现有的安全评估大多测试显式的有害请求,因此忽略了这种失败模式。我们引入了组合推理攻击,这是一种长上下文威胁模型,其中有害请求被分解为语义不完整的片段并嵌入长上下文中。最终查询是中性的;有害目标只有在模型检索片段、组合它们并推断出隐含目标时才会显现。我们使用AdvBench请求实例化这一设置,改变所需推理从直接检索到单跳聚合、链式推理和多跳演绎推理,并在上下文长达64k token的情况下评估了15个前沿大语言模型。模型通常在直接可检索的有害请求时拒绝。然而,当必须通过组合重建相同目标时,拒绝率急剧下降,通常在更长的上下文中出现更大的失败率。良性重建和片段位置分析表明,这些失败并非主要由于检索错误:模型通常推断出有害目标并配合。增加推理时间的推理提高了拒绝率,但仍然不完整且成本高昂。我们的结果揭示了长上下文安全差距:当前模型在看到有害请求时比在推断出有害目标时更擅长拒绝。

英文摘要:

Long-context LLMs can infer objectives that are not explicitly stated. This capability is useful for reasoning over documents, code, and tool traces, but it also introduces a safety risk. Harmful intent can be distributed across a context and become apparent only after the model combines the relevant information. Existing safety evaluations largely focus on explicitly stated harmful requests and therefore do not fully capture this failure mode. We introduce compositional reasoning attacks, a long-context attack setting in which harmful requests are decomposed into semantically incomplete fragments and embedded in long contexts. The final query is neutral, and the model must retrieve and combine the fragments to infer the implied harmful objective. Empirically, we show that models generally refuse harmful requests when they are explicitly stated. However, refusal rates drop when the same objectives must be reconstructed from fragments, and these failures often become more pronounced in longer contexts. Our analyses suggest that this gap cannot be explained by retrieval difficulties alone. Models can often reconstruct the harmful objective but do not reliably refuse it. Increasing inference-time reasoning effort improves refusal, but at a higher computational cost, with unsafe responses still occurring. Our results reveal a long-context safety gap: Models are better at refusing harmful requests they see than harmful objectives they infer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑