atlas

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

Learning to Reason via Program Generation, Emulation, and Search

NeurIPS 2024 · Large language models › Agents, code and math · approach: Execution-based code verification · 0 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 7B/13B to generate Python pseudo-programs and emulate their execution (CoGEX), then uses a search procedure (CoTACS) to find one task-level program per dataset without weight updates.

Problem

Program-based reasoning has worked for algorithmic tasks, but softer reasoning tasks (commonsense, sentiment, moral judgment) are hard to express as executable code; the paper asks how to extend code synthesis to them.

Approach

Train LMs on Pythonic pseudo-programs with undefined leaf functions, have the LM emulate execution (filling in leaf functions from its knowledge) instead of running an interpreter, and search over candidate programs on a training set to pick one general program per task that is reapplied to all instances.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use CoTACS with 1000 examples rather than the strongest baselineCoGEX Llama-2 13B · Coinaccuracy: 63.8 -> 69.5Helped
Use CoTACS with 1000 examples rather than the strongest baselineCoGEX Llama-2 13B · Sumaccuracy: 44.5 -> 63.9Helped
Use CoTACS with 1000 examples rather than the strongest baselineCoGEX Llama-2 13B · SSTaccuracy: 92.4 -> 92.1Hurt
Use CoTACS with 1000 examples rather than the strongest baselineCoGEX Llama-2 13B · SVAMPaccuracy: 46.0 -> 50.3Helped
Retain top 3 programs instead of top 1 (ablation)CoGEX Llama-2 7B with CoTACS, 1000 examples · Average across 9 tasksaccuracy: 60.0 -> 60.8Helped
Retain top 3 programs instead of top 1 (ablation)CoGEX Llama-2 13B with CoTACS, 1000 examples · Average across 9 tasksaccuracy: 65.1 -> 66.1Helped
Use 10 rather than 1000 search examples (ablation)CoGEX Llama-2 7B with CoTACS k=1 · Average across 9 tasksaccuracy: 56.7 -> 60.0Hurt
Use 10 rather than 1000 search examples (ablation)CoGEX Llama-2 13B with CoTACS k=1 · Average across 9 tasksaccuracy: 61.7 -> 65.1Hurt
Generate only an NL plan instead of a Python program (ablation)CoTACS · Coin, SVAMP, and SumaccuracyHurt
Generate a separate program per instance instead of searching for reusable task programs (ablation)CoGEX · Word Sorting and SumaccuracyNo clear effect
Generate a separate program per instance instead of searching for reusable task programs (ablation)CoGEX · Other evaluated tasksaccuracyHurt
Use zero-shot chain-of-thought prompting instead of CoTACS (ablation)Alpaca models · SVAMP, Sum, and CoinaccuracyHurt

Surprising findings

Limitations

Experimental setup

Datasets: Alpaca CoLA Emotion SST-2 Coin flip Word Sorting (BIG-bench hard) SVAMP Large number sum CommonsenseQA Social IQa

Benchmarks: CoLA Emotion SST-2 Coin flip Word Sorting SVAMP Sum CommonsenseQA Social IQa AlpacaEval

Metrics: accuracy string-normalized exact match win rate

Baselines: Llama-2 2-shot BM25 in-context learning Alpaca zero-shot CoGEX end-to-end NL plan search zero-shot chain-of-thought Code Llama CoGEX fine-tuning

Builds on: Alpaca LoRA Llama-2 chain-of-thought BM25

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