让大模型根据问题难度动态选择推理路径,提升解题能力。
DOTS: Learning to Reason Dynamically in LLMs via Optimal Reasoning Trajectories Search
- 将推理拆解为可组合的原子动作,动态搜索最优解题路径。
- 在8个任务上超越静态推理方法,难题下计算更深、更精准。
- 适合需要智能决策的复杂推理场景,如数学与逻辑问题。
提升大语言模型(LLMs)的推理能力近年来备受关注。已有研究证明,通过提示策略(如分步思考、反思后再答、编程求解等)可有效辅助推理。然而这些方法通常对所有问题采用固定的推理模式,未考虑问题特征或模型自身能力。本文提出DOTS,一种基于最优推理轨迹搜索的动态推理方法,能根据问题特性与模型能力自适应调整推理路径。该方法包含三个步骤:首先定义可组合的原子推理动作模块;其次针对每个训练样本,通过迭代探索与评估,为特定任务模型搜索最优动作序列;最后利用收集到的最优轨迹,训练模型以规划未见问题的推理路径。我们提出两种学习范式:一是在外部模型上微调作为规划器引导主模型,二是直接微调主模型使其内化推理规划能力。在8个推理任务上的实验表明,本方法持续优于静态推理技术与基线指令微调。进一步分析显示,模型可根据问题复杂度调节计算量,在难题上投入更多推理深度。
原文摘要 · Abstract (English)
Enhancing the capability of large language models (LLMs) in reasoning has gained significant attention in recent years. Previous studies have demonstrated the effectiveness of various prompting strategies in aiding LLMs in reasoning (called "reasoning actions"), such as step-by-step thinking, reflecting before answering, solving with programs, and their combinations. However, these approaches often applied static, predefined reasoning actions uniformly to all questions, without considering the specific characteristics of each question or the capability of the task-solving LLM. In this paper, we propose DOTS, an approach enabling LLMs to reason dynamically via optimal reasoning trajectory search, tailored to the specific characteristics of each question and the inherent capability of the task-solving LLM. Our approach involves three key steps: i) defining atomic reasoning action modules that can be composed into various reasoning action trajectories; ii) searching for the optimal action trajectory for each training question through iterative exploration and evaluation for the specific task-solving LLM; and iii) using the collected optimal trajectories to train an LLM to plan for the reasoning trajectories of unseen questions. In particular, we propose two learning paradigms, i.e., fine-tuning an external LLM as a planner to guide the task-solving LLM, or directly fine-tuning the task-solving LLM with an internalized capability for reasoning actions planning. Our experiments across eight reasoning tasks show that our method consistently outperforms static reasoning techniques and the vanilla instruction tuning approach. Further analysis reveals that our method enables LLMs to adjust their computation based on problem complexity, allocating deeper thinking and reasoning to harder problems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。