arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.03224cs.AIcs.LG
收藏

无需训练仍有增益。利用能量函数引导的蒙特卡洛树搜索释放大型语言模型的数学推理能力

No Train Still Gain. Unleash Mathematical Reasoning of Large Language Models with Monte Carlo Tree Search Guided by Energy Function

Haotian Xu

AI总结:

本文提出结合蒙特卡洛树搜索和轻量级能量函数的方法,将微调LLM重构为Residual-EBM并利用MCTS评估推理路径,无需额外训练即在GSM8k和AQUA-RAT上显著提升pass@1。

摘要:

大型语言模型(LLMs)展现出令人印象深刻的语言理解和上下文学习能力,使其适用于自然语言处理(NLP)任务和复杂的数学推理。然而,当应用于数学推理任务时,尽管解决方案具有高概率,LLMs往往难以生成正确的推理步骤和答案。为了克服这一限制并在无需额外微调步骤的情况下增强微调LLMs的数学推理能力,我们提出一种结合蒙特卡洛树搜索(MCTS)和轻量级能量函数的方法,对决策步骤进行排序并实现即时反应和精确推理。具体而言,我们将微调LLMs重新表述为基于残差的能量模型(Residual-EBM),并采用噪声对比估计来估计能量函数的参数。然后,我们利用以能量函数作为路径验证器的MCTS来搜索输出空间并评估推理路径。通过在两个数学推理基准GSM8k和AQUA-RAT上的大量实验,我们展示了我们方法的卓越能力,该方法在无需额外微调或带有人类反馈对齐的强化学习的情况下,显著提升了微调模型的pass@1指标。

英文摘要:

Large language models (LLMs) demonstrate impressive language understanding and contextual learning abilities, making them suitable for natural language processing (NLP) tasks and complex mathematical reasoning. However, when applied to mathematical reasoning tasks, LLMs often struggle to generate correct reasoning steps and answers despite having high probabilities for the solutions. To overcome this limitation and enhance the mathematical reasoning capabilities of fine-tuned LLMs without additional fine-tuning steps, we propose a method that incorporates Monte Carlo Tree Search (MCTS) and a lightweight energy function to rank decision steps and enable immediate reaction and precise reasoning. Specifically, we re-formulate the fine-tuned LLMs into a Residual-based Energy Model (Residual-EBM) and employ noise contrastive estimation to estimate the energy function's parameters. We then utilize MCTS with the energy function as a path verifier to search the output space and evaluate the reasoning path. Through extensive experiments on two mathematical reasoning benchmarks, GSM8k and AQUA-RAT, we demonstrate the exceptional capabilities of our method, which significantly improves the pass@1 metric of the fine-tuned model without requiring additional fine-tuning or reinforcement learning with human feedback alignment.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑