atlas

Research map / Large language models / Agents, code and math

Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verification

ICLR 2024 · Large language models › Agents, code and math · approach: Mathematical and structural reasoning benchmarks · 17 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes explicit code-based self-verification (CSV), a zero-shot prompt that makes GPT-4 Code Interpreter verify its answer with code and revise when verification fails, combined with verification-guided weighted majority voting, reaching 84.32% on MATH.

Problem

Math word problem solving with LLMs, where GPT-4 Code Interpreter achieves strong accuracy but lacks reliable answer verification; the paper asks whether its code generation and self-debugging can be exploited to self-verify and correct solutions without external models or users.

Approach

Analyzes how constraining code usage affects GPT4-Code accuracy (Code Usage Frequency), then uses a zero-shot code-based verification prompt so the model checks its own answer with code and revises if False, and weights majority voting by verification state (True > Uncertain > False).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add code-based self-verification to GPT4-CodeGPT4-Code · MATHaccuracy: 69.69 -> 73.54Helped
Add verification-guided weighted majority voting to code-based self-verificationGPT4-Code + CSV · MATHaccuracy: 73.54 -> 84.32Helped
Add code-based self-verification and verification-guided votingGPT4-Code · GSM8Kaccuracy: 92.9 -> 97.0Helped
Add code-based self-verification and verification-guided votingGPT4-Code · MMLU-Mathaccuracy: 87.5 -> 89.2Helped
Add code-based self-verification and verification-guided votingGPT4-Code · MMLU-STEMaccuracy: 86.8 -> 87.0Helped
Replace code-based self-verification with natural-language self-verification (ablation)GPT4-Code · MATHaccuracy: 69.69 -> 69.29Hurt
Use code-based self-verification instead of no verification (ablation)GPT4-Code · MATHaccuracy: 69.69 -> 73.54Helped
Set voting weights with true > uncertain ≥ false (ablation)GPT4-Code + CSV + weighted voting · MATHaccuracyHelped
Set weights to true=0.5, uncertain=0.5, false=1 (ablation)GPT4-Code + CSV + weighted voting · MATHaccuracyHurt
Restrict code use to one code block instead of prohibiting code use (ablation)GPT4-Code · MATHaccuracy: +6.9 percentHelped
Prohibit code use instead of allowing code once (ablation)GPT4-Code · MATHaccuracy: +6.9 percentHurt

Surprising findings

Limitations

Experimental setup

Datasets: MATH GSM8K MMLU-Math MMLU-STEM

Benchmarks: MATH GSM8K MMLU-Math MMLU-STEM

Metrics: accuracy precision recall

Baselines: GPT-4 (CoT) GPT-4 (PHP) GPT-3.5 GPT-4 Model selection Chinchilla Galactica LLaMA 2 OpenLLM

Builds on: chain-of-thought self-consistency program-aided language models self-refine

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy