arXiv:2410.01504cs.CL2024-10被引 6

用角色驱动数据增强,让开源模型数学推理能力大幅提升

PersonaMath: Boosting Mathematical Reasoning via Persona-Driven Data Augmentation

  • 通过职业角色生成多样化思维链,提升训练数据质量
  • 7B模型在MATH上达61.2%准确率,超越所有基线方法
  • 仅需12.9万数据点,效率远超同类大模型数据集

尽管闭源大模型具备强大的数学解题能力,但开源模型仍面临挑战。为此,本文提出一种数据增强方法,并构建了基于MATH和GSM8K的PersonaMathQA数据集,用于训练PersonaMath模型。该方法分为两个阶段:第一阶段通过闭源模型重生成带详细思维链的指令,并引入基于职业的角色驱动数据增强技术,显著提升数据多样性与质量;第二阶段引入反思机制,充分挖掘更具挑战性的题目。在MATH和GSM8K上的评估显示,基于Qwen2.5-7B的PersonaMath-7B模型在MATH上达到61.2%准确率,在GSM8K上达到87.8%,优于所有基线方法,达当前最优水平。值得注意的是,本数据集仅包含128.9K条数据,仅为MetaMathQA的32.6%、MathInstruct的49.5%,却实现更优性能,证明其高质多样性和高效性。项目代码与模型已开源。

原文摘要 · Abstract (English)

While closed-source Large Language Models (LLMs) demonstrate strong mathematical problem-solving abilities, open-source models still face challenges with such tasks. To bridge this gap, we propose a data augmentation approach and introduce PersonaMathQA, a dataset derived from MATH and GSM8K, on which we train the PersonaMath models. Our approach consists of two stages: the first stage focuses on learning from Persona Diversification, and the second stage emphasizes learning from Reflection. In the first stage, we regenerate detailed chain-of-thought (CoT) solutions as instructions using a closed-source LLM and introduce a persona-driven data augmentation technique. This technique innovatively classifies personas based on occupations, significantly enhancing the dataset's diversity and quality. In the second stage, we incorporate reflection to fully leverage more challenging and valuable questions. Evaluation of our PersonaMath models on MATH and GSM8K reveals that the PersonaMath-7B model (based on Qwen2.5-7B) achieves an accuracy of 61.2% on MATH and 87.8% on GSM8K, surpassing all baseline methods and achieving state-of-the-art performance. Notably, our dataset contains only 128.9K data points-merely 32.6% of MetaMathQA and 49.5% of MathInstruct-yet our model outperforms these baselines, demonstrating the high quality and diversity of our dataset, which enables more efficient model training. We open-source the PersonaMathQA dataset, PersonaMath models, and our code for public usage.

数学推理数据增强角色建模开源模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。