Critical Tokens Matter: Token-Level Contrastive Estimation Enhence LLM's Reasoning Capability
该论文提出了一种名为cDPO的新型方法,通过识别和奖励关键词来增强大型语言模型在推理任务中的能力。
更新于 2024-12-04。作者:Zicheng Lin、Tian Liang、Jiahao Xu、Xing Wang、Ruilin Luo、Chufan Shi、Siheng Li、Yujiu Yang、Zhaopeng Tu。
中文摘要
大型语言模型(LLMs)在推理任务上展现出了令人瞩目的性能。它们通过自回归标记生成来构建推理轨迹,从而促进了一个连贯的思维链条的发展。在本研究中,我们探讨了单个标记对推理任务最终结果的影响。我们确定了“关键标记”的存在,这些标记会导致LLMs中的错误推理轨迹。具体来说,我们发现当LLMs被迫解码其他标记而不是关键标记时,它们往往会产生积极的结果。受此观察结果的启发,我们提出了一种新颖的方法——cDPO,旨在在对齐过程中自动识别和执行关键标记的标记级奖励。具体而言,我们开发了一种对比估计方法来自动识别关键标记。这是通过比较正负模型的生成似然度来实现的。为了达到这个目的,我们分别对正负模型在各种推理轨迹上进行微调,从而它们能够识别出错误轨迹中的关键标记,这些标记导致错误的结果。此外,为了在对齐过程中进一步将模型与关键标记信息对齐,我们将传统的DPO算法扩展到标记级DPO,并利用上述正负模型中的差分似然作为标记级DPO学习的重要权重。在GSM8K和MATH500基准测试中,使用两个广泛使用的模型Llama-3(8B和70B)和deepseek-math(7B)进行实验,证明了所提议方法cDPO的有效性。
英文摘要
Large Language Models (LLMs) have exhibited remarkable performance on reasoning tasks. They utilize autoregressive token generation to construct reasoning trajectories, enabling the development of a coherent chain of thought. In this work, we explore the impact of individual tokens on the final outcomes of reasoning tasks. We identify the existence of ``critical tokens'' that lead to incorrect reasoning trajectories in LLMs. Specifically, we find that LLMs tend to produce positive outcomes when forced to decode other tokens instead of critical tokens. Motivated by this observation, we propose a novel approach - cDPO - designed to automatically recognize and conduct token-level rewards for the critical tokens during the alignment process. Specifically, we develop a contrastive estimation approach to automatically identify critical tokens. It is achieved by comparing the generation likelihood of positive and negative models. To achieve this, we separately fine-tune the positive and negative models on various reasoning trajectories, consequently, they are capable of identifying identify critical tokens within incorrect trajectories that contribute to erroneous outcomes. Moreover, to further align the model with the critical token information during the alignment process, we extend the conventional DPO algorithms to token-level DPO and utilize the differential likelihood from the aforementioned positive and negative model as important weight for token-level DPO learning.Experimental results on GSM8K and MATH500 benchmarks with two-widely used models Llama-3 (8B and 70B) and deepseek-math (7B) demonstrate the effectiveness of the propsoed approach cDPO.
解读
一句话总结
该论文提出了一种名为cDPO的新型方法,通过识别和奖励关键词来增强大型语言模型在推理任务中的能力。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:大型语言模型在推理任务中存在错误推理轨迹,导致错误结果。 • 现有方案不足:目前的方法在推理和数学任务中存在挑战,如DPO算法在推理任务中可能降低正面示例的生成可能性。 • 研究目标:提出一种自动识别和奖励关键词的方法,以增强大型语言模型在推理任务中的能力。
问题2:论文的核心创新点是什么?
• 技术创新:提出了一种基于对比估计的方法来识别关键词。 • 方法改进:将DPO算法从示例级别扩展到关键词级别,并利用对比估计的结果作为奖励信号。 • 优势:与现有方法相比,cDPO在推理任务中实现了更高的准确性。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:在GSM8K和MATH500基准测试中,使用Llama-3和deepseek-math模型进行实验。 • 性能提升:cDPO在GSM8K和MATH500数据集上均优于基线策略,例如DPO和RPO。 • 对比结果:cDPO在GSM8K数据集上的平均得分达到77.2,在MATH500数据集上的平均得分达到33.4。
问题4:这个研究的实际应用价值是什么?
• 应用场景:推理任务,如数学问题解决。 • 实施建议:在推理任务中使用cDPO来提高大型语言模型的性能。 • 局限与展望:该方法目前主要用于数学推理任务,未来可以扩展到其他类型的推理任务。