atlas

Research map / Large language models / Language, safety and interpretability

Limits of Transformer Language Models on Learning to Compose Algorithms

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 2 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.

Shows that LLaMA models trained from scratch need more samples to learn compositions of pointer-execution, HSS and multiplication sub-tasks than the sum needed for the sub-tasks, backs this with a theoretical sample-inefficiency bound for gradient descent, and finds GPT-4 and Gemini-Pro fail at these compositions via prompting.

Problem

Whether Transformer language models learn compositions of discrete sub-tasks sample-efficiently, reusing primitives learned from sub-tasks, instead of relearning the composition from scratch.

Approach

Defines four hypotheses (H1-H4) on sample efficiency of composition learning, introduces two new pointer-execution tasks (PEN, PERM) with independently observable sub-tasks, and combines LLaMA training experiments, prompting experiments on GPT-4 and Gemini-Pro, and a complexity-theoretic bound on gradient descent memorization.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add task description to few-shot examplesGPT-4 and Gemini-Pro · PENtask accuracy: 0.00 -> 0.00No clear effect
Add standard chain-of-thought promptingGPT-4 and Gemini-Pro · PENtask accuracy: 0.00 -> 0.00No clear effect
Use Few-shot CoT examples that demonstrate each pointer-matching stepGPT-4 and Gemini-Pro · PENtask accuracy: 0.00No clear effect
Use Sub-task CoT examples that separate matching from neighbor outputGemini-Pro · PENmatch accuracy: 0.03 -> 0.33Helped
Remove additional attention traps (ablation)GPT-4 · PENmatch accuracy: 0.23 -> 0.39Helped
Remove additional attention traps (ablation)GPT-4 · PENtask accuracy: 0.00 -> 0.00No clear effect
Use hand-crafted Sub-task CoT to enumerate words and explicitly compute multicountsGPT-4 · PERMtask accuracy: 0.14 -> 0.42Helped
Train on the sub-tasks alongside the main task (ablation)LLaMA · PENtask accuracyNo clear effect
Train on the sub-tasks alongside the main task (ablation)LLaMA · PERMtask accuracyNo clear effect
Train on the sub-tasks alongside the main task (ablation)LLaMA · HSS and MULtask accuracyNo clear effect
Add auxiliary prediction heads and auxiliary losses (ablation)28 M-parameter LLaMA · PENaccuracy: 0% -> learn PEN with 300 K samplesHelped
Fine-tune a PEN-pretrained model on PEVLLaMA · PEVaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: PEN PERM HSS MUL PEV Cpy RCpy PE PER PEM SSE ADD

Benchmarks: PEN PERM HSS MUL

Metrics: task accuracy match accuracy termination accuracy

Baselines: GPT-4 Gemini-Pro LLaMA w/o sub-tasks auxiliary loss LLaMA

Builds on: chain-of-thought prompting Pointer Value Retrieval C-PVR Universal Transformer

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