做 LLM 推理优化的开发者终于有了一个基于置信度动态的简单有效方法——CDG 投票在多个模型上都能提升准确率,值得直接试。
本文首次揭示了大型语言模型(LLM)推理过程中置信度的动态模式:正确推理轨迹的置信度随时间提升(正增益),而错误轨迹则衰减。基于此发现,作者提出置信度动态增益(CDG)投票方法,在多个开源模型(DeepSeek-R1、gpt-oss、Gemma-3、Qwen-QwQ)和基准测试(AIME24/25、HMMT25、BRUMO25)上显著提升了推理答案选择的准确性。该方法为推理优化提供了新的判别信号,并附有理论解释。代码已开源。
Inference Time Optimization with Confidence Dynamics
Inference time optimization techniques, such as repeated sampling, have significantly advanced the reasoning capabilities of Large Language Models (LLMs). However, the critical role of model uncertainty remains largely underexplored in these optimization strategies. In this paper, we investigate the dynamics of confidence along reasoning trajectories and for first time reveal a surprising and unique pattern: correct answer traces tend to exhibit confidence improvement over time (positive confidence gain), while incorrect traces show attenuated or declining confidence as reasoning proceeds. Based on this observation, we propose Confidence Dynamic Gain (CDG) based voting, which incorporates how the confidence trajectory of the response evolves along the reasoning chain. Experiments across four open-source architectures (DeepSeek-R1, gpt-oss, Gemma-3, Qwen-QwQ) on the AIME24/25, HMMT25, and BRUMO25 benchmarks demonstrate that CDG yields a significant performance boost over baselines. These results demonstrate that our method provides a robust discriminative signal for improving answer selection in LLM reasoning. We also provide theoretical insights for this phenomenon. Code will be released at https://github.com/Accenture/CDG.git.