atlas

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

ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving

ICLR 2024 · Large language models › Agents, code and math · approach: Inductive and abstract reasoning evaluation · 21 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.

Trains LLaMA-2 and CodeLLaMA models (7B to 70B) to solve math problems by interleaving natural-language rationale with executed program calls, using GPT-4-generated trajectories for imitation learning plus an output space shaping step.

Problem

Open-source LLMs struggle with complex mathematical reasoning; natural-language CoT is weak at precise computation while program-only (PAL) methods lack planning and error handling.

Approach

Interleave natural-language rationales with program-based tool calls in multi-round trajectories, train via imitation learning on GPT-4-annotated trajectories, then apply output space shaping (sampling valid trajectories and correcting invalid ones with a 34B teacher) to broaden the model's output space.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train CodeLLaMA-34B with ToRA tool-integrated reasoning and output space shapingCodeLLaMA-34B · MATHaccuracy: 23.9 -> 50.8Helped
Continue code training to make ToRA-Code rather than ToRAToRA, same model size · MATHaccuracy: 40.1 -> 44.6; 43.0 -> 48.1Helped
Remove output space shaping (ablation)ToRA-Code-7B · MATH overallaccuracy: 44.6~ -> 40.2~Hurt
Add output space shaping (ablation)ToRA-Code-7B · MATH overallaccuracy: 40.2~ -> 44.6~Helped
Remove rationale from the interleaved format (ablation)ToRA-Code-7B · MATH overallaccuracy: 44.6~ -> 36.8~Hurt
Add rationale to program-based tool use (ablation)ToRA-Code-7B · MATH overallaccuracy: 36.8~ -> 44.6~Helped
Remove output space shaping (ablation)ToRA-Code-13B · MATH overallaccuracy: 48.1~ -> 44.6~Hurt
Add output space shaping (ablation)ToRA-Code-13B · MATH overallaccuracy: 44.6~ -> 48.1~Helped
Remove rationale from the interleaved format (ablation)ToRA-Code-13B · MATH overallaccuracy: 48.1~ -> 40.2~Hurt
Add rationale to program-based tool use (ablation)ToRA-Code-13B · MATH overallaccuracy: 40.2~ -> 48.1~Helped
Remove output space shaping (ablation)ToRA-Code-34B · MATH overallaccuracy: 50.8 -> 47.4~Hurt
Add output space shaping (ablation)ToRA-Code-34B · MATH overallaccuracy: 47.4~ -> 50.8Helped

Surprising findings

Limitations

Experimental setup

Datasets: GSM8k MATH GSM-Hard SVAMP TabMWP ASDiv SingleEq SingleOp AddSub MultiArith

Benchmarks: GSM8k MATH GSM-Hard SVAMP TabMWP ASDiv MAWPS

Metrics: accuracy

Baselines: GPT-4 CoT GPT-4 PAL ChatGPT PAL WizardMath Platypus-2 CodeLLaMA PAL LLaMA-2 RFT Toolformer

Builds on: PAL Rejection sampling fine-tuning Toolformer LLaMA-2 CodeLLaMA

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