[论文解读] Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoning
本文介绍 TabMWP,一个大规模的带表格上下文的数学文字题数据集,以及 PromptPG,一种基于策略梯度的方法,学习在上下文中选择示例以提升对带表格数据的少样本 GPT-3 推理表现。
Mathematical reasoning, a core ability of human intelligence, presents unique challenges for machines in abstract thinking and logical reasoning. Recent large pre-trained language models such as GPT-3 have achieved remarkable progress on mathematical reasoning tasks written in text form, such as math word problems (MWP). However, it is unknown if the models can handle more complex problems that involve math reasoning over heterogeneous information, such as tabular data. To fill the gap, we present Tabular Math Word Problems (TabMWP), a new dataset containing 38,431 open-domain grade-level problems that require mathematical reasoning on both textual and tabular data. Each question in TabMWP is aligned with a tabular context, which is presented as an image, semi-structured text, and a structured table. There are two types of questions: free-text and multi-choice, and each problem is annotated with gold solutions to reveal the multi-step reasoning process. We evaluate different pre-trained models on TabMWP, including the GPT-3 model in a few-shot setting. As earlier studies suggest, since few-shot GPT-3 relies on the selection of in-context examples, its performance is unstable and can degrade to near chance. The unstable issue is more severe when handling complex problems like TabMWP. To mitigate this, we further propose a novel approach, PromptPG, which utilizes policy gradient to learn to select in-context examples from a small amount of training data and then constructs the corresponding prompt for the test example. Experimental results show that our method outperforms the best baseline by 5.31% on the accuracy metric and reduces the prediction variance significantly compared to random selection, which verifies its effectiveness in selecting in-context examples.
研究动机与目标
- 介绍 TabMWP,这是一个具有表格上下文的开放域数学文字题大规模数据集,以实现半结构化的数学推理。
- 提出 PromptPG,一种基于强化学习的方法,学习为 GPT-3 选择上下文中的示例以提升少样本性能。
- 证明动态提示学习可以减少选择不稳定性并提升在 TabMWP 上的准确率。
- 提供对输入组件、消融研究和选择策略的分析,以理解驱动性能的因素。
提出的方法
- 将 TabMWP 定义为具有表格上下文(图像、半结构化文本,或结构化表格)的问题,问题类型为自由文本或多项选择。
- 以三种格式表示表格上下文(图像、半结构化文本、结构化表格),并为多步推理提供金标准解。
- 对 TabMWP 进行基线评估,使用 few-shot GPT-3,包括 few-shot 和 few-shot-CoT 提示。
- 引入 PromptPG,一种基于策略梯度的提示学习器,基于固定参数的 BERT 编码器+线性头,从候选池中对上下文示例进行评分。
- 使用 REINFORCE 最大化 GPT-3 回答的期望奖励,奖励为基于正确性而设定的 ±1,更新策略参数以偏好更好的提示。
- 将 PromptPG 与 UnifiedQA 和 TAPEX 基线(预训练和微调)以及其他提示策略进行比较,并报告在 TabMWP 上的准确率。
实验结果
研究问题
- RQ1一个带表格上下文的数学文字题数据集是否可以通过 GPT-3 在少样本设定下被有效解决?
- RQ2通过策略梯度学习选择上下文示例是否能提升准确性并降低相对于随机或启发式示例选择的稳定性问题?
- RQ3不同输入格式(图像、半结构化文本、表格)和题目类型(自由文本 vs 多项选择)如何影响性能?
- RQ4训练样本数量和候选提示数量对 PromptPG 的有效性有何影响?
主要发现
- PromptPG 在 TabMWP 上达到 68.23% 的平均准确率,较最佳基线提升最多 5.31 个百分点。
- PromptPG 相较于随机的上下文示例选择,降低了预测方差。
- 零样本 GPT-3 已经在 TabMWP 上与大型微调基线相近,但在 PromptPG 出现前,带 CoT 的少样本提示仍是最强的单一基线。
- 消融研究表明表格上下文和问题文本对准确率不可或缺;完整的 TQ(C) 输入可获得最佳性能。
- PromptPG 在自由文本和多项选择题、以及不同年级段(1-6、7-8)和答案类型上均能稳定提升性能。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。