arXiv:2605.14084cs.SEcs.AI2026-05

通过零空间编辑融合思考与指令模型,提升代码代理的推理与工具使用能力。

CRANE: Constrained Reasoning Injection for Code Agents via Nullspace Editing

论文配图:CRANE: Constrained Reasoning Injection for Code Agents via Nullspace Editing
图 1 · 摘自论文原文
  • 利用思维与指令模型的差异方向,定向注入合理推理路径。
  • 在多个基准上实现显著性能提升,最高增益达19.5%。
  • 无需训练即可融合模型,适合追求高效部署的开发者。

代码代理需在长周期项目状态中进行推理,并严格遵守工具使用规范。在成对的Instruct/Thinking检查点中,这两种能力互补但不一致:Instruct模型简洁且工具纪律性强,而Thinking模型虽具备更强的规划与恢复能力,却常过度思虑,导致代理性能下降。本文提出CRANE(基于零空间编辑的约束推理注入方法),一种无需训练的参数编辑技术,将Thinking-Instruct的差值视为候选推理修改的方向池。CRANE结合幅度阈值去噪、保守泰勒门控以保留对推理迁移和工具使用均有益的更新,以及分段双曲正切投影以抑制格式敏感的更新方向。通过融合成对的Instruct与Thinking检查点,CRANE在保持Instruct级效率的同时,在Roo-Eval上使Qwen3-30B-A3B的pass1达到66.2%(+19.5%),Qwen3-Next-80B-A3B达81.5%(+8.7%);在SWE-bench-Verified上分别多解决14个实例(122/500 和 180/500);在Terminal-Bench v2上,pass1/pass5最高提升2.3%/7.8%,分别达7.6%/17.9%和14.8%/30.3%,全面优于其他融合策略。

原文摘要 · Abstract (English)

Code agents must both reason over long-horizon repository state and obey strict tool-use protocols. In paired Instruct/Thinking checkpoints, these capabilities are complementary but misaligned. The Instruct model is concise and tool-disciplined, whereas the Thinking model offers stronger planning and recovery behavior but often over-deliberates and degrades agent performance. We present CRANE (Constrained Reasoning Injection for Code Agents via Nullspace Editing), a training-free parameter-editing method that treats the Thinking-Instruct delta as a directional pool of candidate reasoning edits for the Instruct backbone. CRANE combines magnitude thresholding to denoise the delta, a Conservative Taylor Gate to retain edits that are jointly beneficial for reasoning transfer and tool-use preservation, and Graduated Sigmoidal Projection to suppress format-critical update directions. By merging paired Instruct and Thinking checkpoints, CRANE delivers strong gains over either individual model while preserving Instruct-level efficiency: on Roo-Eval it achieves pass1 of 66.2% (+19.5%) for Qwen3-30B-A3B and 81.5% (+8.7%) for Qwen3-Next-80B-A3B; on SWE-bench-Verified it resolves up to 14 additional instances at both scales (122/500 and 180/500); and on Terminal-Bench v2 it improves pass1/pass5 by up to 2.3%/7.8%, reaching 7.6%/17.9% and 14.8%/30.3%, respectively, consistently outperforming alternative merging strategies across all three benchmarks.

代码代理模型融合推理增强零空间编辑

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