[Paper Review] Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoning
The paper introduces TabMWP, a large-scale tabular math word problem dataset, and PromptPG, a policy-gradient-based method that learns in-context example selection to improve few-shot GPT-3 reasoning over tabular data.
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.
Motivation & Objective
- Introduce TabMWP, a large-scale dataset of open-domain math word problems with tabular context to enable semi-structured mathematical reasoning.
- Propose PromptPG, a reinforcement learning-based method that learns to select in-context examples for GPT-3 to improve few-shot performance.
- Demonstrate that dynamic prompt learning reduces selection instability and improves accuracy on TabMWP.
- Provide analyses of input components, ablations, and selection strategies to understand factors driving performance.
Proposed method
- Define TabMWP as problems with a tabular context (image, semi-structured text, or structured table) and questions of free-text or multi-choice type.
- Represent tabular context in three formats (image, semi-structured text, structured table) and provide gold solutions for multi-step reasoning.
- Baseline evaluation with few-shot GPT-3, including few-shot and few-shot-CoT prompts, on TabMWP.
- Introduce PromptPG, a policy-gradient-based prompt learner built on a fixed-parameter BERT encoder plus a linear head to score in-context examples from a candidate pool.
- Use REINFORCE to maximize the expected reward of GPT-3 answers, with reward = ±1 based on correctness, updating the policy parameters to favor better prompts.
- Compare PromptPG against UnifiedQA and TAPEX baselines (pre-trained and fine-tuned) and other prompting strategies, reporting accuracy on TabMWP.
Experimental results
Research questions
- RQ1Can a dataset of tabular-context math word problems be effectively solved by GPT-3 in few-shot settings?
- RQ2Does learning to select in-context examples via policy gradient improve accuracy and reduce stability issues over random or heuristic example selection?
- RQ3How do different input formats (image, semi-structured text, table) and question types (free-text vs multi-choice) impact performance?
- RQ4What is the impact of the number of training examples and candidate prompts on the effectiveness of PromptPG?
Key findings
- PromptPG achieves 68.23% average accuracy on TabMWP, outperforming the best baseline by up to 5.31 percentage points.
- PromptPG reduces prediction variance compared with random in-context example selection.
- Zero-shot GPT-3 already rivals large fine-tuned baselines on TabMWP, but few-shot prompting with CoT remains the strongest single baseline before PromptPG.
- Ablation studies show both tabular context and question text are indispensable for accuracy; full TQ(C) input yields the best performance.
- PromptPG consistently improves performance across free-text and multi-choice questions, and across grade levels (1-6 and 7-8) and answer types.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.