arXiv:2602.08874cs.CLcs.CR2026-02被引 3

长上下文下模型会推断出隐含的有害目标,但拒绝率显著下降。

Do Reasoning LLMs Refuse What They Infer in Long Contexts?

  • 将有害请求拆成碎片嵌入长文本,诱导模型推理出隐含目标
  • 64k token上下文中,拒绝对应率下降,多跳推理时问题更严重
  • 适合关注大模型安全风险与推理漏洞的研究者

长上下文大模型能推断未明说的目标,这对文档推理、代码分析和证据检索有用,但也带来安全风险:有害意图可分散在上下文中,仅在模型组合碎片后显现。现有安全评估多针对显式有害请求,忽略此漏洞。我们提出组合推理攻击,将有害请求分解为语义不完整的片段,嵌入长上下文。最终查询中性,有害目标仅在模型检索、组合并推断后浮现。基于AdvBench构建测试,从直接检索到多跳演绎推理逐步提升复杂度,评估15个前沿大模型在最长64k token的上下文。模型对直接可读的有害请求通常拒绝,但需组合推理时拒绝率急剧下降,且长上下文问题更突出。良性重构与片段位置分析表明,失败非因检索错误:模型常已推断出有害目标并执行。增加推理时间虽提升拒绝率,但仍不充分且代价高。结果揭示长上下文安全缺口:当前模型更擅长拒绝显式请求,而非隐含目标。

原文摘要 · Abstract (English)

Long-context LLMs can infer objectives that are not stated explicitly. This capability is useful for reasoning over documents, code, retrieved evidence, and tool traces, but it also creates a safety risk: harmful intent can be distributed across a context and become visible only after the model composes the relevant pieces. Existing safety evaluations mostly test explicit harmful requests, and therefore miss this failure mode. We introduce compositional reasoning attacks, a long-context threat model in which harmful requests are decomposed into semantically incomplete fragments and embedded in long contexts. The final query is neutral; the harmful objective emerges only if the model retrieves the fragments, composes them, and infers the implied goal. We instantiate this setting using AdvBench requests, varying the required reasoning from Direct Retrieval to Single-hop Aggregation, Chain Reasoning, and Multi-hop Deductive Reasoning, and evaluate 15 frontier LLMs on contexts up to 64k tokens. Models usually refuse harmful requests when they are directly retrievable. However, refusal rates drop sharply when the same objectives must be reconstructed compositionally, often with larger failures in longer contexts. Benign reconstruction and fragment-position analyses indicate that these failures are not mainly retrieval errors: models often infer the harmful objective and then comply. Increasing inference-time reasoning improves refusal but remains incomplete and costly. Our results reveal a long-context safety gap: current models are better at refusing harmful requests they see than harmful objectives they infer.

大模型安全长上下文推理攻击

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