Token-by-Token Regeneration and Domain Biases: A Benchmark of LLMs on Advanced Mathematical Problem-Solving

📄 arXiv: 2501.17084v1 📥 PDF

作者: Evgenii Evstafev

分类: cs.LG

发布日期: 2025-01-28

备注: 8 pages, 8 figures


💡 一句话要点

评估LLM在高级数学问题求解中的token再生能力与领域偏差

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 数学问题求解 符号推理 代码生成 模型评估

📋 核心要点

  1. 现有LLM在复杂数学问题求解,特别是符号推理和输出一致性方面存在不足,难以胜任竞赛级别难题。
  2. 通过让LLM生成可执行的Python代码作为推理步骤,并引入基于mistral-large-2411的评分框架,更准确地评估模型性能。
  3. 实验表明,模型性能差距显著,逐token再生虽略微提升准确率,但降低了代码执行时间,揭示了效率与精度的权衡。

📝 摘要(中文)

本研究评估了10个参数量为70亿到80亿的大型语言模型(LLM)在复杂数学问题求解方面的能力,特别是符号推理和保持输出一致性。使用了MATH数据集中的945个竞赛级别问题,重点考察了模型生成可执行Python代码作为推理步骤的能力,涉及超过9450次代码执行。引入了一个评估框架,使用mistral-large-2411模型对答案进行5分制评分,以解决数学符号不一致的问题。研究还考察了逐token再生输出对结果改进的影响。结果显示,最佳商业模型(gpt-4o-mini,得分83.7%)与效果最差的开源模型(open-codestral-mamba:v0.1,得分49.2%)之间存在显著的34.5%的性能差距,尤其是在数论等复杂领域。虽然逐token再生略微提高了llama3.1:8b模型的准确率(+0.8%),但也减少了36.7%的代码执行时间,突出了效率和精度之间的权衡。研究还发现,问题难度与所有模型的准确率呈负相关。尽管使用了受控执行环境,但只有不到1%的生成代码是不安全的,3.17%的问题在10次尝试后仍未解决,表明混合推理方法可能是有益的。

🔬 方法详解

问题定义:论文旨在评估大型语言模型在解决高级数学问题时的能力,特别是它们在符号推理和保持输出一致性方面的表现。现有方法的痛点在于,LLM在处理复杂数学问题时,常常难以生成正确且连贯的推理步骤,导致最终答案错误。此外,数学符号的多样性也给评估带来了挑战。

核心思路:论文的核心解决思路是让LLM生成可执行的Python代码作为推理过程的一部分。通过执行这些代码,可以验证LLM的推理步骤是否正确。此外,论文还引入了一个基于mistral-large-2411模型的评分框架,用于更准确地评估LLM的答案,从而解决数学符号不一致的问题。

技术框架:整体流程包括:1) 从MATH数据集中选择竞赛级别数学问题;2) 使用不同的LLM生成解决问题的Python代码;3) 执行生成的代码并获得答案;4) 使用mistral-large-2411模型对答案进行评分;5) 分析不同LLM的性能,并考察逐token再生输出对结果的影响。主要模块包括问题生成模块、代码生成模块、代码执行模块和答案评估模块。

关键创新:最重要的技术创新点在于引入了基于mistral-large-2411模型的评分框架,该框架能够更准确地评估LLM在数学问题求解中的表现,解决了传统评估方法中数学符号不一致的问题。此外,研究还考察了逐token再生输出对结果的影响,为优化LLM的推理过程提供了新的思路。

关键设计:论文使用了MATH数据集中的945个竞赛级别问题。评估框架使用mistral-large-2411模型对答案进行5分制评分。研究考察了逐token再生输出对llama3.1:8b模型的影响,并分析了代码执行时间的变化。此外,论文还分析了生成代码的安全性,以及未解决问题的比例。

📊 实验亮点

实验结果表明,gpt-4o-mini模型在MATH数据集上取得了83.7%的得分,显著优于其他开源模型。逐token再生略微提高了llama3.1:8b模型的准确率(+0.8%),但代码执行时间减少了36.7%。研究还发现,问题难度与所有模型的准确率呈负相关,表明LLM在处理更复杂问题时仍面临挑战。

🎯 应用场景

该研究成果可应用于提升数学教育的智能化水平,例如开发更智能的辅导系统,帮助学生理解和解决复杂的数学问题。此外,该研究也有助于提高LLM在科学计算、金融建模等领域的应用能力,使其能够更好地处理涉及复杂数学推理的任务。

📄 摘要(原文)

Large language models (LLMs) excel in many natural language tasks, yet they struggle with complex mathemat-ical problem-solving, particularly in symbolic reasoning and maintaining consistent output. This study evalu-ates 10 LLMs with 7 to 8 billion parameters using 945 competition-level problems from the MATH dataset. The focus is on their ability to generate executable Python code as a step in their reasoning process, involving over 9,450 code executions. The research introduces an evaluation framework using mistral-large-2411 to rate answers on a 5-point scale, which helps address inconsistencies in mathematical notation. It also examines the impact of regenerating output token-by-token on refining results. The findings reveal a significant 34.5% per-formance gap between the top commercial model (gpt-4o-mini, scoring 83.7%) and the least effective open-source model (open-codestral-mamba:v0.1, scoring 49.2%). This disparity is especially noticeable in complex areas like Number Theory. While token-by-token regeneration slightly improved accuracy (+0.8%) for the model llama3.1:8b, it also reduced code execution time by 36.7%, highlighting a trade-off between efficiency and precision. The study also noted a consistent trend where harder problems correlated with lower accuracy across all models. Despite using controlled execution environments, less than 1% of the generated code was unsafe, and 3.17% of problems remained unsolved after 10 attempts, suggesting that hybrid reasoning methods may be beneficial.