arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.08901cs.CLcs.AI
收藏

少即是多:通过强化上下文剪枝提升LLM推理能力

Fewer is More: Boosting LLM Reasoning with Reinforced Context Pruning

Hong Kong University of Science and Technology(香港科技大学);Microsoft Research(微软研究院)

Xijie Huang, Li Lyna Zhang, Kwang-Ting Cheng, Fan Yang, Mao Yang

AI总结:

提出CoT-Influx方法,通过由粗到细的剪枝器与强化学习,在双倍上下文窗口中最大化输入简明CoT示例,显著提升LLM数学推理性能。

摘要:

大型语言模型(LLMs)展现了令人瞩目的能力,但在数学推理方面仍面临挑战。本研究提出CoT-Influx,这是一种突破少样本思维链(CoT)学习边界以提升LLM数学推理能力的新方法。基于在提示中加入更多简明CoT示例可提升推理性能的观察,CoT-Influx采用由粗到细的剪枝器,最大化有效且简明CoT示例的输入。该剪枝器首先尽可能多地选择关键CoT示例,随后剪枝不重要token以适配上下文窗口。我们使用包含多种难度和推理步骤的数学推理数据集训练该剪枝器,并结合数学专用的强化学习方法。结果,通过在token中启用双倍上下文窗口大小的更多CoT示例,CoT-Influx在多种LLM(LLaMA2-7B、13B、70B)和5个数学数据集上显著优于多种提示基线,实现高达4.55%的绝对提升。值得注意的是,无需任何微调,配备CoT-Influx的LLaMA2-70B在GSM8K上超越了GPT-3.5及PaLM、Minerva 540B等更大模型。CoT-Influx作为LLM的即插即用模块,与自洽、自验证等现有推理提示技术兼容。

英文摘要:

Large Language Models (LLMs) have shown impressive capabilities, yet they still struggle with math reasoning. In this work, we propose CoT-Influx, a novel approach that pushes the boundary of few-shot Chain-of-Thoughts (CoT) learning to improve LLM mathematical reasoning. Motivated by the observation that adding more concise CoT examples in the prompt can improve LLM reasoning performance, CoT-Influx employs a coarse-to-fine pruner to maximize the input of effective and concise CoT examples. The pruner first selects as many crucial CoT examples as possible and then prunes unimportant tokens to fit the context window. A math reasoning dataset with diverse difficulty levels and reasoning steps is used to train the pruner, along with a math-specialized reinforcement learning approach. As a result, by enabling more CoT examples with double the context window size in tokens, CoT-Influx significantly outperforms various prompting baselines across various LLMs (LLaMA2-7B, 13B, 70B) and 5 math datasets, achieving up to 4.55% absolute improvements. Remarkably, without any fine-tuning, LLaMA2-70B with CoT-Influx surpasses GPT-3.5 and a wide range of larger LLMs (PaLM, Minerva 540B, etc.) on the GSM8K. CoT-Influx serves as a plug-and-play module for LLMs and is compatible with most existing reasoning prompting techniques, such as self-consistency and self-verification.

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

↑