---
title: "Reasoning-Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning Models"
source: "arXiv AI/CL/LG（论文）"
source_tier: "t2"
url: "https://arxiv.org/abs/2611.06095v1"
permalink: "https://feed.astralor.com/items/itm_3e4740c238f83106376e62dd"
published: "2026-11-04T07:42:05.000Z"
score: 61
channel: "tech"
tags: ["推理效率","Reasoning-Trace Overflow","Code Generation","Empirical Study","Explicit Reasoning Models","Explicit","Across","Our"]
---

# Reasoning-Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning Models

## 速览

Explicit reasoning can help language models generate code, but it also introduces a practical risk: the model may spend so much of its output budget reasoning that it never produces usable code. We study this behaviour …

## 关键点

- Explicit reasoning can help language models generate code, but it also introduces a practical risk: the model may spend so much of its output budget reasoning that it never produces usable code.
- We study this behaviour in relatively small open-weight reasoning models, framing it as reasoning-trace overflow.
- Across seven models and six code benchmark settings, we measure how much of a fixed 32k-token output budget is spent on reasoning, whether that reasoning improves pass@1, and whether lightweight inference-time controls …

## 全文

Explicit reasoning can help language models generate code, but it also introduces a practical risk: the model may spend so much of its output budget reasoning that it never produces usable code. We study this behaviour in relatively small open-weight reasoning models, framing it as reasoning-trace overflow. Across seven models and six code benchmark settings, we measure how much of a fixed 32k-token output budget is spent on reasoning, whether that reasoning improves pass@1, and whether lightweight inference-time controls can mitigate overflow. Our results show that the value of reasoning is highly conditional. Overflow is rare on simpler function-level tasks, but becomes common on harder code-generation benchmarks and for particular model families: on several model--benchmark pairs, more than half of generations exhaust the full 32k-token budget while still reasoning. Most complete overflow is associated with repetitive reasoning loops, although substantial long reasoning also occurs without looping. Disabling reasoning can therefore be competitive for overflow-prone models, simply because it ensures that an answer is produced. At the same time, reasoning remains valuable for stronger models on harder algorithmic and code-understanding tasks. Finally, prompt steering can substantially reduce overflow for some models but is inconsistent, while budgeted transitions provide more direct control and can improve both performance and token efficiency for overflow-prone models. These findings suggest that explicit reasoning should be treated as a controllable resource for code generation, rather than an always-on capability.

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_3e4740c238f83106376e62dd
