Lost in Context: Addressing Context Anxiety in Large Language Models
LLM EvaluationReasoningLong ContextContext AnxietyICML 2026CCF-A麻省理工学院https://openreview.net/pdf/b0672d0f1c2e12933dbed7a75227815b12699896.pdf
迷失于上下文:应对大型语言模型中的上下文焦虑
Abstract
Conventional wisdom suggests that reasoning models fail when problems exceed their capabilities. However, we find that frontier reasoning models sometimes possess the necessary capabilities to solve problems but fail due to premature self-doubt -- a phenomenon informally known as context anxiety. We provide the first systematic study of context anxiety, demonstrating that it arises, in part, from a model's inability to accurately estimate the tokens required to complete a task.
传统观点认为,推理模型会在问题超出自身能力时失败。 然而,我们发现,前沿推理模型有时具备解决问题所需的能力,却因过早自我怀疑而失败;这种现象通常称为“上下文焦虑”。 我们首次对上下文焦虑开展系统研究,并表明它的一个成因是模型无法准确估计完成任务所需的 token 数量。
We also show that context anxiety leads to material efficiency losses when models operate under perceived constraints. Building on this analysis, we further show that models can learn alternative strategies for solving long-horizon problems without exhibiting context anxiety, suggesting that performance improvements may be achievable not through scaling model capabilities, but by improving models' ability to accurately assess and adapt to their own limitations.
我们还表明,当模型受到感知到的约束影响时,上下文焦虑会造成明显的效率损失。 在此分析基础上,我们进一步证明,模型可以学习不产生上下文焦虑的替代策略来解决长程问题;这说明,提升性能的一条可行路径是增强模型准确评估并适应自身局限的能力,而不只是扩展模型能力。
1. Introduction


The rapid advancement of large language models has led to impressive gains in multi-step reasoning capabilities, with frontier models now capable of solving problems that require extended chains of thought and long-horizon planning. Advances in training and inference, including policy optimization over sampled reasoning traces and inference-time aggregation of candidate rationales, have further improved performance in difficult domains such as mathematics and programming. Yet a puzzling pattern has emerged: models sometimes fail not because they lack the capabilities to solve a problem, but because they believe they do. This raises a critical question: do models fail because problems are genuinely too complex, or because they believe they are?
大语言模型的快速发展显著提升了多步推理能力,前沿模型如今已经能够解决需要长推理链和长程规划的问题。 训练与推理技术的进步,包括对采样推理轨迹进行策略优化,以及在推理时聚合候选推理过程,进一步提高了模型在数学和编程等困难领域的表现。 然而,一个令人困惑的规律随之出现:模型有时失败,并非因为它们缺乏解决问题的能力,而是因为它们认为自己没有这种能力。 这引出了一个关键问题:模型失败是因为问题确实过于复杂,还是因为模型认为问题过于复杂?
When faced with challenging problems, models sometimes abandon tasks with worries that the solution to the task will exceed the tokens they have available. This same worry seems to reduce efficiency: models produce solutions less concisely. We describe this phenomenon as context anxiety -- when models worry about their ability to solve the task within their token limits, despite having sufficient tokens to complete them. Though this worry can manifest in different ways, underlying both manifestations is a model's inability to accurately estimate the tokens required to complete a task.
面对困难问题时,模型有时会担心解答任务所需的 token 超出可用额度,因而放弃任务。 同一种担忧似乎也会降低效率:模型给出的解法不够简洁。 我们将这种现象称为 上下文焦虑:模型明明拥有完成任务所需的足够 token,却担心自己无法在 token 限制内解决任务。 这种担忧可以表现为不同形式,但其共同根源是模型无法准确估计完成任务所需的 token 数量。
Understanding the distinction between failures due to context anxiety and failures due to genuine inability has practical implications for improving model performance. If failures stem from context anxiety rather than insufficient capabilities, then performance gains may be achievable not through scaling model size or training compute, but through improving models' ability to accurately assess their own limitations.
区分上下文焦虑导致的失败和真实能力不足导致的失败,对于提升模型性能具有实际意义。 如果失败源于上下文焦虑而非能力不足,那么提升模型准确评估自身局限的能力,可能比扩大模型规模或增加训练算力更有效。
This paper introduces the first systematic methodology for detecting and measuring context anxiety in large language models. We develop protocols to distinguish anxiety-driven failures (premature abandonment with claims of resource insufficiency) from capability-driven failures (genuine inability despite attempted solutions). We establish that a model's miscalibration of estimated token usage predicts the manifestation of context anxiety. Applying this methodology to the Tower of Hanoi puzzle, we find that frontier reasoning models expressing context anxiety misestimate their token usage by 24%, and this miscalibration predicts 15% lower accuracy and drives a 54% increase in token usage when solutions succeed.
本文首次提出用于检测和测量大语言模型上下文焦虑的系统方法。 我们设计了一套协议,用于区分 焦虑所致失败(模型声称资源不足并提前放弃)与 能力所致失败(模型尝试求解后因真实能力不足而失败)。 我们证实,模型对 token 用量估计的 校准误差可以预测上下文焦虑是否出现。 将该方法用于汉诺塔问题后,我们发现,表现出上下文焦虑的前沿推理模型对 token 用量的估计误差达到 24%;这种校准误差对应 15% 的准确率下降,并使成功解答时的 token 用量增加 54%。
Importantly, we observe this behavior even in models designed to reason over long contexts and adapt their generation length dynamically, including recent context-aware models. Finally, leveraging our anxiety measurement method, we show that lightweight supervised fine tuning over reasoning traces reduces context anxiety by over 50%, demonstrating that this failure mode is behaviorally mutable rather than capability limited. These findings suggest that accurate self-assessment, not just raw reasoning capabilities, fundamentally shapes reasoning model performance under extended contexts. We further validate these findings on a second long-horizon task---shortest-path grid search---observing qualitatively similar patterns in the appendix.
重要的是,即使模型专为长上下文推理而设计,并能动态调整生成长度,我们仍然观察到了这种行为;近期的上下文感知模型也不例外。 最后,借助上下文焦虑测量方法,我们证明,对推理轨迹进行轻量级监督微调可使上下文焦虑减少 50% 以上,说明这种失败模式 可以通过行为调整改变,并非受能力上限固定约束。 这些发现表明,在扩展上下文中,准确的自我评估与原始推理能力一样,会从根本上影响推理模型的表现。 我们还在第二项长程任务——最短路径网格搜索——上验证了这些发现,并在附录中观察到定性相似的规律。
2. Related Work
Context anxiety emerges at the intersection of reasoning capability and self-assessment. This section reviews work on multi-step reasoning methods, model behavior under contextual stress, and emergent patterns that shape when models engage with or abandon challenging tasks.
上下文焦虑出现在推理能力与自我评估的交汇处。 本节回顾多步推理方法、模型在上下文压力下的行为,以及影响模型何时投入或放弃困难任务的涌现规律。
2.1 From Chain-of-Thought Prompting to Robust Multi-Step Reasoning
Large language models have progressed from generating coherent text to addressing tasks requiring multi-step reasoning. While scaling and instruction tuning have expanded what models can solve, performance depends not only on underlying capability but also on whether models reliably engage in extended problem solving when necessary.
大语言模型已经从生成连贯文本发展到处理需要多步推理的任务。 规模扩展和指令微调扩大了模型能够解决的问题范围,但模型表现不仅取决于基础能力,也取决于模型能否在必要时稳定投入长时间的问题求解。
Chain-of-thought (CoT) prompting shows that instruction-tuned LLMs can substantially improve performance on multi-step tasks---without additional fine-tuning---by generating intermediate rationales during inference. Subsequent work studies which properties of CoT matter most and how example selection and formatting further amplify these gains.
思维链(CoT)提示表明,指令微调 LLM 可以在推理时生成中间推理过程,无需额外微调即可显著提升多步任务的表现。 后续工作研究了思维链的哪些性质最重要,以及示例选择和格式如何进一步放大这些收益。
However, CoT does not guarantee faithful reasoning: models can produce fluent chains that increase surface plausibility while remaining weakly coupled to relevant evidence or the final decision, particularly under distribution shift or increased task difficulty. This motivates approaches that impose structure or provide additional support during reasoning. For knowledge-intensive tasks, retrieval can be interleaved with reasoning so that intermediate claims are supported by evidence. Task decomposition strategies such as least-to-most prompting improve generalization by solving simpler subproblems before attempting the full task. Reasoning traces can also be used as supervision, with larger models acting as teachers whose rationales are distilled into smaller models.
然而,思维链并不能保证推理忠实:模型可能生成流畅的推理链,提高表面上的可信度,却与相关证据或最终决策联系松散;在分布偏移或任务难度增加时,这一问题尤其明显。 因此,一些方法开始为推理施加结构或提供额外支持。 对于知识密集型任务,可以交替执行检索与推理,使中间结论得到证据支持。 由易到难提示等任务分解策略先解决简单子问题,再尝试完整任务,从而提高泛化能力。 推理轨迹也可用作监督信号,由较大模型充当教师,并将其推理过程蒸馏到较小模型中。
Beyond supervision, alignment fine-tuning leverages feedback over multiple reasoning traces, encouraging models to prefer successful rationales and correcting miscalibration in internal scoring. At inference time, robustness can be improved by aggregating across diverse reasoning paths, such as self-consistency and step-aware verification. At the same time, longer reasoning increases latency and compute, motivating work on controlling verbosity and reducing redundant overthinking. Together, these results show that eliciting reasoning alone is insufficient: failures in calibration, grounding, and effort allocation persist even when models possess sufficient task-relevant capability.
除监督学习外,对齐微调还利用多条推理轨迹上的反馈,鼓励模型偏好成功的推理过程,并修正内部评分的校准误差。 在推理时,自洽性和步骤感知验证等方法可以聚合不同推理路径,从而提高鲁棒性。 与此同时,更长的推理会增加延迟和计算量,促使研究者控制输出冗长度并减少多余的过度思考。 这些结果共同说明,仅仅引出推理过程仍然不够:即使模型具备任务所需的能力,校准、证据支撑和投入分配方面的失败仍然存在。
2.2 Eliciting Reliable Reasoning under Contextual Stress
Even with advances in prompting, supervision, and decoding, substantial evidence suggests a mismatch between surface fluency and underlying reliability across regimes of difficulty. On harder problems or in longer contexts, models often maintain coherent intermediate steps while answer accuracy collapses. Moreover, the same model can produce responses with widely varying lengths and degrees of elaboration, indicating instability in how much reasoning is allocated to similar inputs. These failures reflect not only missing information, but shifts in behavior under contextual or cognitive stress and sensitivity to superficial prompt variations.
尽管提示、监督和解码方法不断进步,大量证据仍表明,在不同难度下,模型表面的流畅性与实际可靠性并不一致。 面对更难的问题或更长的上下文时,模型往往能够维持连贯的中间步骤,但答案准确率却会骤降。 此外,同一模型生成的回答在长度和详尽程度上可能相差很大,说明模型为相似输入分配的推理量并不稳定。 这些失败不仅反映信息缺失,也反映模型在上下文或认知压力下发生行为变化,并对提示中的表面变化十分敏感。
Work on calibration and self-knowledge further shows that models exhibit both sampling-related and competence-related uncertainty. While models can sometimes estimate whether they are likely to answer correctly, these self-assessments are task-dependent and often fail to generalize across formats or domains. As a result, models may display overconfidence on unfamiliar tasks or reduce effort prematurely when tasks appear difficult, even when sufficient information remains available.
关于校准与自我知识的研究进一步表明,模型同时存在与采样有关和与能力有关的不确定性。 模型有时能够估计自己是否可能正确作答,但这种自我评估依赖具体任务,通常无法跨格式或领域泛化。 因此,模型可能在陌生任务上过度自信,也可能在任务看起来困难时过早减少投入,即使仍有足够信息可用。
Long-context evaluations provide a clear lens into these effects. When task content is fixed but context length or structure varies, models exhibit substantial degradation and systematic changes in response behavior. These changes often appear as qualitative mode switches, including excessive elaboration, omission of critical steps, or premature termination. Generated reasoning traces may also be weakly coupled to internal decision processes, creating an illusion of deliberation even when answers are incorrect. Notably, related behaviors have also been observed in recent models explicitly designed for long-context reasoning, indicating that such failures are not restricted to models with limited context windows but can also arise in general purpose foundation models without explicit context management mechanisms.
长上下文评测为观察这些影响提供了清晰视角。 当任务内容保持不变,而上下文长度或结构发生变化时,模型性能会明显下降,回答行为也会系统性改变。 这些变化通常表现为定性的模式切换,包括过度展开、遗漏关键步骤或提前终止。 生成的推理轨迹也可能与内部决策过程联系较弱,使错误答案看起来像是经过了充分思考。 近期专为长上下文推理设计的模型中也出现了相关行为,这说明此类失败并不局限于上下文窗口较小的模型;缺少明确上下文管理机制的通用基础模型同样可能出现这些问题。
Taken together, these results suggest that reasoning performance is limited not only by representational or computational capacity, but by how models estimate task difficulty, solvability, and required effort under uncertainty. We view these interacting failures---miscalibration, unstable effort allocation, and context-sensitive mode switching---as manifestations of a broader behavioral phenomenon that can be described as context anxiety, in which perceived constraints alter how models engage in extended reasoning. This framing motivates our focus on token and effort estimation as mechanistic contributors to when models engage, overthink, or prematurely disengage in long-context settings.
综合来看,这些结果说明,推理表现不仅受表示能力或计算能力限制,也取决于模型如何在不确定性下估计任务难度、可解性和所需投入。 我们认为,校准误差、投入分配不稳定和上下文敏感的模式切换相互作用,共同构成一种更广泛的行为现象,即上下文焦虑;模型感知到的约束会改变其投入长时间推理的方式。 因此,我们重点研究 token 与投入估计如何影响模型在长上下文中开始推理、过度思考或提前放弃。
2.3 Emergent Behavioral Patterns under Context Anxiety
Prior work has documented emergent abilities in large language models, where qualitatively new behaviors appear as scale increases despite not being explicitly trained. There is active debate over whether such behaviors reflect genuine phase transitions or instead result from evaluation thresholds or sensitivity to task formulation. Regardless of cause, these findings show that model behavior can change abruptly across conditions.
以往工作记录了大语言模型中的涌现能力:随着规模增大,模型会出现未经明确训练的全新行为。 这些行为究竟反映真实的相变,还是由评测阈值或任务表述敏感性造成,仍存在广泛争论。 无论原因是什么,这些发现都表明,模型行为可能在条件变化时突然转变。
Emergent behaviors have been observed in reasoning-like skills such as analogy, where performance improves sharply beyond certain model scales, suggesting that apparent gains may reflect shifts in behavioral strategies or internal control policies. Scaling and stronger supervision can also amplify undesirable behaviors: models may overthink simple problems or disengage under uncertainty, and beliefs about competence influence whether models attempt, defer, or hedge.
类比等推理类技能中已经观察到涌现行为:模型超过一定规模后,性能会突然提高,这说明表面上的收益可能反映了行为策略或内部控制策略的转变。 规模扩展和更强监督也可能放大不良行为:模型可能对简单问题过度思考,或在不确定条件下停止投入;模型对自身能力的判断也会影响它选择尝试、推迟还是给出保守回答。
Long-context settings make these shifts especially visible. When context length or structure changes while task content remains fixed, models exhibit systematic performance drops and behavioral changes. Training objectives can further shape behavioral preferences: alignment and preference-based fine-tuning may encourage rationales that appear plausible even when they are not correct. We hypothesize that many of these behavioral shifts arise at inference time under contextual stress, driven by mismatches between perceived and actual constraints--particularly in estimates of required effort and available token budgets. These failures can be understood as manifestations of context anxiety.
在长上下文环境中,这些转变尤其明显。 当任务内容不变,而上下文长度或结构发生变化时,模型会表现出系统性的性能下降和行为变化。 训练目标也会进一步塑造行为偏好:对齐和基于偏好的微调可能鼓励模型生成看似合理但实际错误的推理过程。 我们推测,许多行为转变发生在上下文压力下的推理阶段,其驱动力是感知约束与真实约束不一致,尤其是对所需投入和可用 token 额度的估计不准。 这些失败可以理解为上下文焦虑的表现。
To investigate this mechanism in a controlled setting, we use the Tower of Hanoi task to isolate long-horizon planning under varying perceived constraints, enabling direct measurement of engagement, effort allocation, and associated failure modes.
为在受控环境中研究这一机制,我们使用汉诺塔任务,在不同感知约束下隔离长程规划过程,从而直接测量模型的投入程度、投入分配和相关失败模式。
3. Method

We introduce a systematic approach to quantify and mitigate context anxiety in large language models. Our methodology consists of three components: (1) automatic detection of context anxiety related reasoning behavior, (2) measurement of token usage calibration, and (3) a lightweight reasoning fine-tuning protocol for context anxiety mitigation without training new behaviors.
我们提出一种系统方法,用于量化和缓解大语言模型中的上下文焦虑。 该方法包括三个组成部分:(1)自动检测与上下文焦虑相关的推理行为;(2)测量 token 用量校准情况;(3)使用轻量级推理微调协议缓解上下文焦虑,而不训练新的行为。
3.1 Detection Protocol
To identify context anxiety, we analyze model outputs for explicit statements indicating the task is "too much" to process in their token limits. To reduce sensitivity to specific phrasing, we employ a panel of LLMs to classify reasoning traces for the presence of semantic equivalents for phrases like "exceeds my capacity," "too complex to solve completely," or "beyond my context window." We use the following protocol:
为识别上下文焦虑,我们分析模型输出中是否存在明确表述,声称任务“工作量过大”,无法在其 token 限制内处理。 为降低检测结果对具体措辞的敏感性,我们使用一组大语言模型判断推理轨迹中是否出现与“超出我的能力”“过于复杂,无法完整求解”或“超出我的上下文窗口”等说法语义等价的表达。 我们采用以下协议:
where
其中,
- Anxiety-driven failures: The model abandons the task while claiming resource insufficiency
- Capability-driven failures: The model attempts the task but produces incorrect solutions
- Successful attempts: The model completes the task with or without expressing difficulty
- 焦虑所致失败:模型声称资源不足并放弃任务
- 能力所致失败:模型尝试任务,但给出错误解答
- 成功尝试:模型完成任务,无论是否表达任务困难
This separation enables downstream analyses that isolate behavioral disengagement from problem-solving failures. Sensitivity and human-validation analyses of the detector are reported in the appendix.
这种区分使后续分析能够将行为上的停止投入与问题求解失败分离开来。 检测器的敏感性分析和人工验证分析见附录。
3.2 Calibration Measurement
To test whether context anxiety stems from miscalibration of expected token use, we measure how accurately models estimate their token requirements. We introduce the winsorized token ratio
为检验上下文焦虑是否源于预期 token 用量的校准误差,我们测量模型估计自身 token 需求的准确程度。 我们引入 缩尾 token 比率
where estimated tokens required is the number of tokens the model thinks it has used to generate its output. A ratio of 1.0 indicates perfect calibration; values greater than 1 indicate overestimation; values less than 1 indicate underestimation. We use winsorization at the 1th and 99th percentiles to reduce the influence of outliers.
其中,估计所需 token 数是模型认为自己生成输出时使用的 token 数量。 比率为 1.0 表示完全校准;大于 1 表示高估,小于 1 表示低估。 我们在第 1 和第 99 百分位进行缩尾处理,以减小离群值的影响。
Estimated token usage is elicited by prompting the same model to provide a numeric estimation of how many tokens it believes were required to complete the solution after generation is finished. While models do not have access to tokenizer internals, this estimate reflects perceived generation effort rather than true computational cost, which is precisely the quantity that should influence behavioral disengagement. Actual token counts are computed from the model's respective tokenizer. This evaluation allows us to quantify systematic biases in perceived effort relative to true generation cost.
生成结束后,我们提示同一个模型给出数值估计,说明它认为完成解答需要多少 token,由此获得估计 token 用量。 尽管模型无法访问分词器内部信息,但这一估计反映的是模型感知到的生成投入,而不是真实计算成本;感知投入正是可能影响模型停止投入的量。 实际 token 数由各模型对应的分词器计算。 这项评测使我们能够量化感知投入相对于真实生成成本的系统性偏差。
We analyze the correlation between overestimation of required tokens and context anxiety and whether miscalibration mediates the relationship between anxiety and task accuracy.
我们分析所需 token 高估与上下文焦虑之间的相关性,并检验校准误差是否在焦虑与任务准确率之间发挥中介作用。
3.3 Behavioral Adaptation for Long-Context Anxiety Reduction
To test whether context anxiety reflects a modifiable behavioral policy rather than a fixed capacity limitation, we evaluate a lightweight fine-tuning approach designed to reduce anxiety-driven disengagement without increasing model size or inference-time compute.
为检验上下文焦虑反映的是可修改的行为策略还是固定的能力限制,我们评估一种轻量级微调方法;该方法旨在不增加模型规模或推理时计算量的情况下,减少焦虑引起的停止投入。
We construct a distillation dataset from multiple teacher models, including both the target model and stronger frontier models. For each prompt, we filter responses to include only those that successfully complete the task and exhibit no detected context anxiety under the protocol described above. Each training example consists of the original prompt and the full reasoning trace. We then fine-tune the student model using standard supervised fine tuning on the filtered dataset, optimizing reasoning strategies without directly optimizing solutions. Figure 图2 summarizes this process.
我们使用多个教师模型构建蒸馏数据集,其中既包括目标模型,也包括能力更强的前沿模型。 对于每条提示,我们筛选响应,只保留成功完成任务且根据上述协议未检测到上下文焦虑的响应。 每个训练样本由原始提示和完整推理轨迹组成。 随后,我们使用标准监督微调在筛选后的数据集上微调学生模型,优化推理策略,而不直接优化解答结果。 图2 总结了这一过程。
This procedure encourages the model to adopt long-horizon strategies that solve difficult instances without invoking perceived resource constraints. This protocol isolates behavioral adaptation from capability expansion: the model is not given any new information or prompted with knowledge of a longer context, but is instead trained to follow non-anxious solution strategies when faced with identical task distributions. We evaluate whether this fine-tuned model exhibits reduced rates of context anxiety, improved calibration of token estimates, and improve accuracy-efficiency tradeoffs under long-context stress.
该过程鼓励模型采用长程策略,在不诉诸感知资源约束的情况下解决困难样本。 该协议将行为适应与能力扩展分离开来:模型不会获得任何新信息,也不会被提示拥有更长的上下文,而是在面对相同任务分布时接受训练,以遵循不焦虑的求解策略。 我们评估微调后的模型能否降低上下文焦虑率、改善 token 估计的校准程度,并在长上下文压力下改善准确率与效率之间的权衡。
4. Results
We apply this methodology to the Tower of Hanoi puzzle, a well-suited domain for studying context anxiety because:
我们将该方法应用于汉诺塔问题;该任务适合研究上下文焦虑,原因如下:
- Systematic scaling: Difficulty increases exponentially with the number of disks (
), requiring exactly moves for optimal solutions
- Known resource requirements: The solution space is deterministic, allowing us to verify whether tasks truly exceed model capabilities
- Sequential reasoning demands: The puzzle requires multi-step planning that exercises extended reasoning chains
- 系统性扩展:难度随圆盘数量
呈指数增长,最优解恰好需要 次移动
- 已知资源需求:解空间是确定性的,因此我们可以验证任务是否确实超出模型能力
- 序列推理需求:该问题需要多步规划,会使用较长的推理链
We test 30 unique problems per disk, ranging from 2 to 12 disks. Our evaluation set has 270 problems that span from trivial (7 moves) to challenging (4,095 moves).
对于 2 到 12 个圆盘的每种设置,我们测试 30 个不同问题。 评测集共包含 270 个问题,难度从简单的 7 次移动到困难的 4,095 次移动不等。
We evaluate a variety of open-source and closed-source models: DeepSeek R1, Claude Sonnet 3.7, Claude Sonnet 4.5, Gemini 2.5 Flash, Kimi K2 Thinking, and o4 Mini. All problems in our test set remain well within the maximum token limits of modern frontier models (typically 60K--128K tokens). This yields a total of 1,620 observations, of which 1,585 were available for analysis due to API errors.
我们评估了多种开源和闭源模型:DeepSeek R1、Claude Sonnet 3.7、Claude Sonnet 4.5、Gemini 2.5 Flash、Kimi K2 Thinking 和 o4 Mini。 测试集中的所有问题都远未达到现代前沿模型的最大 token 限制,后者通常为 60K--128K token。 实验共得到 1,620 条观测;受 API 错误影响,其中 1,585 条可用于分析。
4.1 LLMs have context anxiety
Frontier models all demonstrate some form of context anxiety. Further, context anxiety tends to increase with task complexity, as shown in Figure fig:context-anxiety-by-disks. Some models, i.e. Claude Sonnet 3.7 and DeepSeek R1, refuse nearly 100% of the most difficult problems in our dataset. The same qualitative pattern is observed on a second task family, shortest-path grid search.
所有前沿模型都表现出某种形式的上下文焦虑。 此外,如 fig:context-anxiety-by-disks 所示,上下文焦虑往往随任务复杂度增加而加剧。 部分模型,如 Claude Sonnet 3.7 和 DeepSeek R1,拒绝了数据集中近 100% 的最困难问题。 在第二类任务,即最短路径网格搜索中,我们也观察到相同的定性规律。

To distinguish between failures due to disengagement and failures due to genuine problem solving challenges, we further classify unsuccessful attempts into anxiety-driven and capability driven failures. This breakdown allows us to verify that many failures at higher disk counts are attributable to explicit disengagement rather than unsuccessful attempts at completing the task. As seen in Table tbl:context-anxiety-failures, we see that the majority of failures of DeepSeek R1 and Claude Sonnet 3.7 are anxiety-driven, while the majority of failures of Claude Sonnet 4.5, Gemini 2.5 Flash, Kimi K2 Thinking, and o4 Mini are capability-driven.
为区分停止投入导致的失败与真实问题求解困难导致的失败,我们进一步将未成功的尝试分为焦虑所致失败和能力所致失败。 这一拆分使我们能够验证,在圆盘较多时,许多失败源于模型明确停止投入,而不是模型尝试完成任务后未能成功。 如 tbl:context-anxiety-failures 所示,DeepSeek R1 和 Claude Sonnet 3.7 的大多数失败由焦虑导致,而 Claude Sonnet 4.5、Gemini 2.5 Flash、Kimi K2 Thinking 和 o4 Mini 的大多数失败由能力不足导致。
| Model | % Anxiety | % Capability |
|---|---|---|
| Claude Sonnet 3.7 | 73.4% | 26.6% |
| Claude Sonnet 4.5 | 10.7% | 89.3% |
| DeepSeek R1 | 66.3% | 33.7% |
| Gemini 2.5 Flash | 5.1% | 94.9% |
| Kimi K2 Thinking | 41.6% | 58.4% |
| o4 Mini | 19.7% | 80.3% |
4.2 Overestimating problem demands leads to context anxiety
What causes models to give up on problems they could theoretically solve? We hypothesize that context anxiety stems from poor calibration: models with context anxiety systematically overestimate how many tokens a problem will require, leading them to preemptively declare tasks unsolvable. To test this, we measure how accurately models estimate their token usage through the winsorized token ratio, as described in Section 3.2.
是什么原因导致模型放弃理论上能够解决的问题? 我们推测,上下文焦虑源于较差的校准:具有上下文焦虑的模型会系统性高估问题所需的 token 数量,进而提前宣称任务无法解决。 为检验这一点,我们按照第 3.2 节所述,通过 缩尾 token 比率 测量模型估计自身 token 用量的准确程度。


The results strongly support our hypothesis. As shown in Figure 图4, models that exhibit context anxiety overestimate their token requirements by approximately 24%. In contrast, models that attempt problems without expressing context anxiety underestimate their token requirements by 19%. The difference in estimation error between models with and without context anxiety is significant (
结果有力支持了我们的假设。 如 图4 所示,表现出上下文焦虑的模型将 token 需求高估了约 24%。 相比之下,未表现出上下文焦虑并尝试解题的模型将 token 需求低估了 19%。 有无上下文焦虑的模型之间,估计误差差异显著(
We hypothesize that this miscalibration acts as a self-fulfilling prophecy: models predict a task will be difficult, overestimate the token requirements required to complete the task, and prematurely terminate before any genuine attempt is made. The problem is not that tasks are too demanding--- it is that models perceive them to be. Conversely, when models predict a task will be easier, they underestimate token requirements, and this optimism leads them to actually attempt the problem.
我们推测,这种校准误差会成为自我实现的预言:模型预测任务很困难,高估完成任务所需的 token,并在真正尝试之前提前终止。 问题并非任务要求过高,而是模型认为任务要求过高。 相反,当模型预测任务较容易时,它们会低估 token 需求,而这种乐观判断会促使它们真正尝试解决问题。
4.3 Context anxiety decreases accuracy and token efficiency
The consequences of context anxiety extended beyond reduced accuracy. When models worry they lack sufficient resources and abandon problems prematurely, they fail to produce correct solutions, even for problems well within their capabilities. However, worry about resource constraints also harms token efficiency, producing correct answers less concisely and with longer response times.
上下文焦虑的后果不只限于准确率下降。 当模型担心自身资源不足并提前放弃问题时,即使问题完全在其能力范围内,它们也无法给出正确解答。 此外,对资源约束的担忧还会损害 token 效率,使正确答案不够简洁,并延长响应时间。
To quantify the impact of context anxiety on task accuracy and efficiency while controlling for baseline model capabilities and inherent task difficulty, we run an econometric analysis with task complexity and model fixed effects:
为在控制模型基础能力和任务固有难度的同时量化上下文焦虑对任务准确率与效率的影响,我们开展包含任务复杂度固定效应和模型固定效应的计量分析:
where
其中,
The inclusion of model fixed effects
加入模型固定效应
Table tbl:context-anxiety-regression presents our regression analysis separating the effect of context anxiety from two potential confounds. The results show that context anxiety reduces accuracy by 15.3% (
tbl:context-anxiety-regression 给出了回归分析,将上下文焦虑的影响与两个潜在混杂因素分离开来。 结果表明,即使考虑任务复杂度和不同模型的性能差异,上下文焦虑仍会使准确率降低 15.3%(
| (1) Accuracy (Yidm) | (2) Completion Tokens | |
|---|---|---|
| Context Anxiety (Cidm) | -0.153*** (0.026) | 2323.5*** (525.8) |
| Adj. R2 | 0.676 | 0.666 |
| N | 1,585 | 1,007 |
| Model FE (μm) | Yes | Yes |
| Disk FE (γd) | Yes | Yes |

Context anxiety is also associated with material efficiency losses among successful solutions. Awareness of token constraints appears to limit the ability of models to generate efficient solution strategies. Using the econometric regression with model and disk fixed effects, we find that correct answers produced with context anxiety are 54% longer (
在成功解答中,上下文焦虑也与明显的效率损失有关。 意识到 token 约束似乎会限制模型生成高效求解策略的能力。 使用包含模型固定效应和圆盘固定效应的计量回归后,我们发现,与没有上下文焦虑的正确答案相比,存在上下文焦虑时生成的正确答案长度增加 54%(
This dual effect suggests that context anxiety operates hurts performance on multiple fronts: it imposes pressure that reduces the likelihood of success, but when success is achieved, that same pressure yields less streamlined solutions.
这种双重影响表明,上下文焦虑会从多个方面损害性能:它施加的压力会降低成功概率;即使最终成功,同样的压力也会使解法不够精炼。
4.4 Behavioral adaptation reduces context anxiety



Finally, we test whether context anxiety reflects a modifiable behavioral policy rather than a fixed limitation of model capacity. Using behavioral adaptation described in Section 3.3, we fine-tune GPT-OSS-20B on filtered examples from the same Tower of Hanoi dataset, retaining only generations that successfully complete the task without expressing context anxiety.
最后,我们检验上下文焦虑反映的是可修改的行为策略,还是固定的模型能力限制。 我们采用第 3.3 节所述的行为适应方法,在同一汉诺塔数据集筛选出的样本上微调 GPT-OSS-20B,只保留成功完成任务且未表现出上下文焦虑的生成结果。
We perform supervised fine-tuning with loss restricted to the reasoning trace of each response, masking the final answer tokens from the training objective. This targets adaptation of the model's reasoning behavior rather than imitation of specific solution outputs. See the appendix for specific training and hyperparameter details.
我们进行监督微调,将损失限制在每条响应的推理轨迹上,并在训练目标中遮蔽最终答案 token。 这样做的目标是调整模型的推理行为,而不是模仿具体的解答输出。 具体训练设置和超参数见附录。
After fine tuning, the adapted model exhibits substantially less context anxiety compared to the baseline model. As shown in Figure 图5, the adapted model shifts toward reaching genuine capability limits, frequently producing exhaustive reasoning traces rather than prematurely abandoning the task. To isolate the factors driving this behavioral adaptation and evaluate the robustness of the learned policy, we perform a number of ablations. Table tbl:context-anxiety-heldout-accuracy summarizes the overall accuracy of the baseline, our anxiety-filtered Reasoning SFT, and an all-correct control across various held-out difficulties and domains. Overall, the Reasoning SFT model consistently matches or outperforms the baseline and the control, with the most pronounced gains observed on mid-tier difficulties and out-of-domain transfer tasks.
微调后,适应模型表现出的上下文焦虑明显少于基线模型。 如 图5 所示,适应模型更接近真实能力极限;它经常生成完整的推理轨迹,而不是提前放弃任务。 为分离驱动这种行为适应的因素,并评估所学策略的稳健性,我们开展了多项消融实验。 tbl:context-anxiety-heldout-accuracy 汇总了基线、经过焦虑筛选的推理 SFT,以及全部正确样本对照模型在不同留出难度和领域上的总体准确率。 总体而言,推理 SFT 模型始终持平或优于基线与对照模型,其中在中等难度和域外迁移任务上的提升最明显。
| Task | Difficulty | Baseline | Reasoning SFT | All-Correct SFT | ||
|---|---|---|---|---|---|---|
| Acc. | Δ | Acc. | Δ | |||
| Tower of Hanoi | 3 disks | 96.7% | 96.7% | +0.0 | 93.3% | -3.4 |
| 5 disks | 76.7% | 83.3% | +6.6 | 46.7% | -30.0 | |
| 7 disks | 3.3% | 6.7% | +3.4 | 0.0% | -3.3 | |
| Shortest Path | 5 × 5 | 3.3% | 30.0% | +26.7 | 23.3% | +20.0 |
| 7 × 7 | 0.0% | 6.7% | +6.7 | 0.0% | +0.0 | |
| 9 × 9 | 0.0% | 0.0% | +0.0 | 0.0% | +0.0 | |
4.4.1 Even / Odd Disk Held-Out Split
To test whether adaptation of reasoning policy transfers across difficulties rather than being specialized to the distilled disk counts, we fine-tune on filtered traces generated at even disk counts only (
为检验推理策略的适应能否跨难度迁移,而不是只适用于蒸馏时采用的圆盘数量,我们仅在偶数圆盘数量(
| Model | 3 disks | 5 disks | 7 disks |
|---|---|---|---|
| Baseline | 0.05 | 0.28 | 0.63 |
| Reasoning SFT | 0.02 | 0.12 | 0.34 |
4.5 Cross-Task Transfer (Hanoi Shortest Path)
We further evaluate the same Tower-of-Hanoi-distilled SFT checkpoint, without any shortest-path data in the fine-tuning mixture, on held-out shortest-path instances. Referring back to Table 表3, the fine-tuned model retains a non-trivial accuracy improvement on the unseen task family (most notably a +26.7% absolute gain on 5
我们进一步在留出的最短路径样本上评估同一个由汉诺塔数据蒸馏得到的 SFT 检查点;微调混合数据中不包含任何最短路径数据。 回看 表3,微调模型在未见过的任务族上仍保持了明显的准确率提升,其中在 5
4.6 All-Correct SFT Control (No Anxiety Filtering)
Finally, to isolate the contribution of the anxiety-based filter used to construct the training set, we train an otherwise identical SFT checkpoint on all correct traces (without removing examples in which the reasoning trace exhibited detected context anxiety) using the same hyperparameters, data volume, and masking scheme. As shown in Table 表3 and Figure 图5, the anxiety-filtered checkpoint severely outperforms the all-correct checkpoint on accuracy, reducing context anxiety and meeting or exceeding performance at all difficulty levels. These results indicate that the gains attributable to SFT are not fully explained by fine-tuning on successful traces in general, but rely specifically on the targeted behavioral filtering.
最后,为分离构建训练集时基于焦虑的筛选器所作的贡献,我们使用相同的超参数、数据量和遮蔽方案,在 全部 正确轨迹上训练另一个其他设置完全相同的 SFT 检查点;其中不会移除推理轨迹被检测到上下文焦虑的样本。 如 表3 和 图5 所示,经过焦虑筛选的检查点在准确率上远优于全部正确样本检查点,同时降低了上下文焦虑,并在所有难度上持平或超过其性能。 这些结果表明,SFT 带来的收益不能完全由一般意义上在成功轨迹上微调来解释,而是特别依赖有针对性的行为筛选。
5. Conclusion
In this work, we present an empirical study of context anxiety as a measurable and systematic behavioral failure mode in large language models. While prior work has examined long-context brittleness and reasoning degradation under stress, our results suggest that a subset of these failures reflect an emergent behavioral response to perceived constraints, which we characterize as context anxiety and show can be measured and mitigated.
在本工作中,我们对上下文焦虑开展实证研究,将其视为大语言模型中一种可测量、系统性的行为失败模式。 以往工作研究了长上下文脆弱性和压力下的推理退化,而我们的结果表明,其中一部分失败反映了模型对感知约束产生的涌现行为响应;我们将这种响应定义为上下文焦虑,并证明它可以被测量和缓解。
Using Tower of Hanoi as a controlled long-horizon planning task, we demonstrate that frontier reasoning models frequently abandon solvable problems while citing resource limitations, despite operating well within their available context windows. We further show that these failures are strongly associated with miscalibration in model estimates of required reasoning effort--particularly overestimation of token usage--and that this miscalibration predicts premature disengagement, reduced accuracy, and increased token usage.
我们将汉诺塔作为受控的长程规划任务,证明前沿推理模型虽然使用的上下文远未达到可用窗口上限,却经常以资源受限为由放弃可解问题。 我们进一步表明,这些失败与模型估计所需推理投入时的校准误差密切相关,尤其是对 token 用量的高估;这种校准误差可以预测提前停止投入、准确率下降和 token 用量增加。
Beyond diagnosis, we show that context anxiety is not a fixed property of reasoning models, but a behavioral regime that can be shifted. Lightweight supervised fine-tuning on non-anxious reasoning traces reduces premature task abandonment while preserving or improving both performance and efficiency, suggesting that models can learn alternative engagement strategies under perceived resource constraints. This points to a complementary axis of improvement to scaling and stronger reasoning supervision: improving how models assess and respond to their own limitations.
除诊断外,我们还证明,上下文焦虑并非推理模型的固定属性,而是一种可以改变的行为状态。 在无焦虑推理轨迹上进行轻量级监督微调,可以在保持或提升性能与效率的同时减少提前放弃任务;这说明模型能够在感知到资源约束时学习其他投入策略。 这揭示了规模扩展和加强推理监督之外的一条互补改进方向:改善模型评估和应对自身局限的方式。
Limitations. Our primary experimental setting focuses on a single long-horizon symbolic task, which enables precise control over solution length and difficulty but may not capture the full diversity of context anxiety within real-world reasoning scenarios; however, we observe qualitatively similar patterns on a the shortest-path grid search task, as illustrated in Figure 图2. In addition, our detection of context anxiety relies on explicit articulations of context anxiety in reasoning traces, which may underestimate more implicit forms of disengagement. Similar effort-estimation failures have been reported in code generation, tool use, and long-form writing, suggesting the same mechanism may underlie broader refusal and truncation behaviors. Future work should evaluate whether similar behavioral patterns arise across broader task classes and develop detection methods that do not depend on explicit self-reports.
局限性。 我们的主要实验设置聚焦于单个长程符号任务;这种设置可以精确控制解答长度和难度,但可能无法涵盖现实推理场景中上下文焦虑的全部多样性。不过,最短路径网格搜索任务也呈现了定性相似的规律,如 图2 所示。 此外,我们通过推理轨迹中明确表达的上下文焦虑进行检测,可能会低估更隐含的停止投入形式。 代码生成、工具使用和长篇写作中也有类似的投入估计失败报告,这说明同一机制可能构成更广泛的拒绝和截断行为的基础。 未来工作应评估类似行为规律是否会出现在更广泛的任务类别中,并开发不依赖明确自我报告的检测方法。
More broadly, our findings highlight the importance of calibration and behavioral factors in reasoning and performance. As models are increasingly deployed in settings requiring long-horizon planning, tool use, and autonomous task execution, failures may arise not only from insufficient capability, but from inaccurate internal assessments of feasibility and required effort. Understanding and correcting such miscalibration may therefore be critical for building more reliable and efficient reasoning systems.
更广泛地说,我们的发现突出了校准与行为因素对推理和性能的重要性。 随着模型越来越多地部署到需要长程规划、工具使用和自主任务执行的环境中,失败不仅可能源于能力不足,也可能源于模型对可行性和所需投入的内部评估不准确。 因此,理解并纠正此类校准误差,可能是构建更可靠、更高效推理系统的关键。
Impact Statement
This paper presents work whose goal is to advance the scientific understanding of reasoning behavior in large language models. By identifying and characterizing context anxiety as a behavioral failure mode linked to miscalibrated self-assessment, this work may inform future training and evaluation methods aimed at improving reliability and efficiency in deployed systems. Potential positive impacts include more robust long-horizon reasoning, reduced unnecessary refusals, and better utilization of computational resources in safety-critical or assistive applications. At the same time, improving model willingness to engage with difficult tasks must be balanced with appropriate safeguards to prevent overconfident or unsafe behavior. We view this work as contributing to the broader goal of building models that better understand both their capabilities and their limits, which is essential for safe and responsible deployment.
本文旨在推进对大语言模型推理行为的科学理解。 本工作将上下文焦虑识别并刻画为一种与自我评估校准误差相关的行为失败模式,可以为未来旨在提高已部署系统可靠性与效率的训练和评测方法提供依据。 潜在积极影响包括提高长程推理的稳健性、减少不必要的拒绝,以及在安全关键或辅助应用中更充分地利用计算资源。 与此同时,提高模型处理困难任务的意愿,必须与适当的防护措施相平衡,以防止模型产生过度自信或不安全的行为。 我们认为,这项工作有助于实现一个更广泛的目标:构建更了解自身能力和局限的模型,而这是安全、负责任部署的必要条件。