Is Reasoning Capability Enough for Safety in Long-Context Language Models?
作者: Yu Fu, Haz Sameen Shahgir, Huanli Gong, Zhipeng Wei, N. Benjamin Erichson, Yue Dong
分类: cs.CL, cs.CR
发布日期: 2026-02-09
备注: 25 pages, 7 figures
💡 一句话要点
提出复合推理攻击模型以提升长文本语言模型的安全性
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 长文本处理 语言模型 推理能力 安全性 复合推理攻击
📋 核心要点
- 现有大型语言模型在处理隐含有害意图时,推理能力并未显著提升其安全性,存在安全隐患。
- 论文提出复合推理攻击模型,通过将有害查询分解为散布片段,考察模型在长上下文中的推理能力。
- 实验结果表明,推理能力强的模型未必更安全,且推理计算的增加能显著降低攻击成功率。
📝 摘要(中文)
大型语言模型(LLMs)越来越多地结合长上下文处理与高级推理能力,使其能够检索和综合分散在数万个标记中的信息。本文假设更强的推理能力应能提高安全性,帮助模型识别隐含的有害意图。我们在长上下文设置中测试该假设,发现其并不成立。我们引入了复合推理攻击,这是一种新威胁模型,其中有害查询被分解为散布在长上下文中的不完整片段。评估14个前沿LLM在64k标记的上下文中,我们发现:推理能力更强的模型并不更能抵御复合推理攻击;随着上下文长度增加,安全对齐持续下降;推理时的计算努力是关键的缓解因素。综合这些结果表明,安全性并不自动随着推理能力的提升而提升,尤其是在长上下文推理中。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在长上下文中识别隐含有害意图的能力不足,现有方法未能有效应对复合推理攻击所带来的安全挑战。
核心思路:论文提出复合推理攻击模型,利用分解的有害查询片段诱导模型进行推理,考察其在长上下文中的表现,揭示推理能力与安全性之间的关系。
技术框架:研究采用14个前沿LLM进行评估,设置上下文长度达到64k标记,分析模型在不同推理计算量下的表现。主要模块包括有害查询的分解、推理过程的诱导及安全性评估。
关键创新:引入复合推理攻击作为新威胁模型,揭示了推理能力与安全性之间的非线性关系,挑战了传统对推理能力提升安全性的假设。
关键设计:在实验中,采用了不同的推理计算量设置,评估其对攻击成功率的影响,发现增加推理计算可显著降低攻击成功率超过50个百分点。
📊 实验亮点
实验结果显示,推理能力更强的模型在面对复合推理攻击时并未表现出更高的安全性,且随着上下文长度的增加,安全对齐持续下降。此外,增加推理计算量可使攻击成功率降低超过50个百分点,表明推理时的计算努力是关键的缓解因素。
🎯 应用场景
该研究为大型语言模型的安全性提供了新的视角,特别是在长上下文处理场景中。其提出的复合推理攻击模型可用于评估和提升语言模型的安全性,具有重要的理论和实际应用价值,尤其在敏感信息处理和自动化决策系统中。未来,研究成果可为开发更安全的AI系统提供指导。
📄 摘要(原文)
Large language models (LLMs) increasingly combine long-context processing with advanced reasoning, enabling them to retrieve and synthesize information distributed across tens of thousands of tokens. A hypothesis is that stronger reasoning capability should improve safety by helping models recognize harmful intent even when it is not stated explicitly. We test this hypothesis in long-context settings where harmful intent is implicit and must be inferred through reasoning, and find that it does not hold. We introduce compositional reasoning attacks, a new threat model in which a harmful query is decomposed into incomplete fragments that scattered throughout a long context. The model is then prompted with a neutral reasoning query that induces retrieval and synthesis, causing the harmful intent to emerge only after composition. Evaluating 14 frontier LLMs on contexts up to 64k tokens, we uncover three findings: (1) models with stronger general reasoning capability are not more robust to compositional reasoning attacks, often assembling the intent yet failing to refuse; (2) safety alignment consistently degrades as context length increases; and (3) inference-time reasoning effort is a key mitigating factor: increasing inference-time compute reduces attack success by over 50 percentage points on GPT-oss-120b model. Together, these results suggest that safety does not automatically scale with reasoning capability, especially under long-context inference.