atlas

Research map / Large language models / Reasoning and chain of thought

Transformers Learn to Implement Multi-step Gradient Descent with Chain of Thought

ICLR 2025 · Large language models › Reasoning and chain of thought · approach: Chain-of-thought training and analysis

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.

Analyzes gradient-flow training dynamics of a one-layer linear transformer with chain-of-thought on an in-context weight prediction linear regression task, showing CoT learns multi-step GD with near-exact recovery while the no-CoT model is limited to one GD step.

Problem

Understanding how transformers are trained on chain-of-thought data to perform multi-step reasoning, and whether CoT training provably outperforms direct-answer training, in the setting of in-context linear regression.

Approach

Introduces in-context weight prediction (predicting the ground-truth weight vector rather than a query label) and a CoT objective summing next-step prediction losses over GD intermediate states; proves no-CoT one-layer linear attention is limited to one GD step with error Theta(d^2/n), whereas gradient flow on the CoT loss converges to a multi-step GD solution with polynomially small error.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add autoregressive CoT with Θ(log d) gradient stepsOne-layer linear transformer · In-context weight predictionevaluation loss: from Θ(d/polylog d) to O(1/poly d)Helped
Use one-layer transformer without CoT instead of CoT with Θ(log d) stepsOne-layer linear transformer · In-context weight predictionevaluation loss: Θ(d^2/n) -> O(1/poly d)Hurt
Increase CoT inference steps from 10 to 40Trained one-layer transformer · Synthetic in-context weight predictionevaluation lossHelped
Use L = Θ(log d) loopsLooped transformer · Linear regression ICLloss: loss lower bound \frac{d^{5/2}L\cdot 4^L}{\sqrt{n}} -> ξHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic Gaussian linear regression data

Benchmarks: synthetic in-context weight prediction (d=10, n=20)

Metrics: evaluation loss weight matrix structure

Baselines: one-layer linear transformer without CoT looped transformer multi-step GD

Builds on: linear self-attention ICL as gradient descent looped transformer multi-step GD (Gatmiry et al.) Zhang et al. 2024 training dynamics of linear transformers

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