AI 想太多,这篇教它什么时候闭嘴
大模型解题时经常「想太多」:答案已经出来了,它还在继续推理,白白烧算力。现有压缩方法都是事后把推理过程剪短,这篇换了个思路——在推理的每一步,让模型自己判断「现在该继续还是该收手」。做法是从模型自己的轨迹里找出「过度思考」的节点,冻结前面的推理,从那个节点重新生成更短的后续,再用偏好学习训练它学会在正确的地方停。结果:数学题输出长度缩短 41% 到 45%,代码任务缩短 23% 到 36%,准确率不降反升。它不是你明天能用上的东西,但「让 AI 学会及时收手」这件事,直接决定未来 AI 的推理成本能压到多低。
📄 原文摘要(英文)
Large reasoning models achieve strong performance on challenging tasks, but their long chain-of-thought often incurs substantial inference costs by continuing to deliberate after sufficient information has been obtained. Existing reasoning compression methods primarily operate on reasoning trajectories, paying less attention to the local decision of whether further reasoning is necessary given the current state. We propose LoCo, a local preference learning method for reasoning compression. LoCo detects candidate overthinking states from the model's own traces, freezes the corresponding reasoning prefixes, regenerates shorter verified continuations from the same states, and trains on the resulting state-conditioned preference pairs with DPO. This formulation teaches the model when to continue reasoning and when to conclude, rather than simply encouraging shorter trajectories overall. We construct training data entirely from self-generated mathematical traces and evaluate LoCo on five mathematical and three code generation benchmarks. LoCo reduces completion length by 41.7\%--45.4\% on mathematics and 23.4\%--36.3\% on code, while maintaining or improving accuracy and achieving the best AUC across all code benchmarks. LoCo consistently improves the accuracy-efficiency trade-off on mathematics and transfers effectively to code generation despite math-only training, demonstrating the cross-domain generality of local preference learning for reasoning compression. The code and model will be publicly released at https://github.com/MuyaoYuan/LoCo.