AdaCoT:通过强化学习实现帕累托最优的自适应思维链触发
AdaCoT: Pareto-Optimal Adaptive Chain-of-Thought Triggering via Reinforcement Learning
AI总结:
AdaCoT通过强化学习(PPO)将自适应思维链触发建模为帕累托优化问题,利用选择性损失掩蔽稳定训练,在降低简单查询计算成本的同时保持复杂任务性能。
摘要:
大型语言模型(LLMs)展现了卓越的能力,但在处理需要复杂推理的任务时常常面临挑战。虽然思维链(Chain-of-Thought, CoT)提示显著增强了推理能力,但它会不加区分地为所有查询生成冗长的推理步骤,导致大量的计算成本和低效率,尤其是对于较简单的输入。为了解决这一关键问题,我们引入了AdaCoT(自适应思维链),一个新颖的框架,使LLMs能够自适应地决定何时调用CoT。AdaCoT将自适应推理构建为一个帕累托优化问题,旨在平衡模型性能与CoT调用相关的成本(包括频率和计算开销)。我们提出了一种基于强化学习(RL)的方法,具体利用近端策略优化(PPO),通过调整惩罚系数来动态控制CoT触发决策边界,从而使模型能够基于隐式查询复杂度来确定CoT的必要性。一个关键的技术贡献是选择性损失掩蔽(Selective Loss Masking, SLM),旨在抵消多阶段RL训练中的决策边界坍缩,确保鲁棒且稳定的自适应触发。实验结果表明,AdaCoT成功地在帕累托前沿上导航,对于不需要复杂推理的查询,大幅减少了CoT的使用。例如,在我们的生产流量测试集上,AdaCoT将CoT触发率降低至低至3.18%,并将平均响应令牌数减少了69.06%,同时在复杂任务上保持了高性能。
英文摘要:
Large Language Models (LLMs) have demonstrated remarkable capabilities but often face challenges with tasks requiring sophisticated reasoning. While Chain-of-Thought (CoT) prompting significantly enhances reasoning, it indiscriminately generates lengthy reasoning steps for all queries, leading to substantial computational costs and inefficiency, especially for simpler inputs. To address this critical issue, we introduce AdaCoT (Adaptive Chain-of-Thought), a novel framework enabling LLMs to adaptively decide when to invoke CoT. AdaCoT framed adaptive reasoning as a Pareto optimization problem that seeks to balance model performance with the costs associated with CoT invocation (both frequency and computational overhead). We propose a reinforcement learning (RL) based method, specifically utilizing Proximal Policy Optimization (PPO), to dynamically control the CoT triggering decision boundary by adjusting penalty coefficients, thereby allowing the model to determine CoT necessity based on implicit query complexity. A key technical contribution is Selective Loss Masking (SLM), designed to counteract decision boundary collapse during multi-stage RL training, ensuring robust and stable adaptive triggering. Experimental results demonstrate that AdaCoT successfully navigates the Pareto frontier, achieving substantial reductions in CoT usage for queries not requiring elaborate reasoning. For instance, on our production traffic testset, AdaCoT reduced CoT triggering rates to as low as 3.18\% and decreased average response tokens by 69.06%, while maintaining high performance on complex tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。