🚀NEW LABGetting Started with Claude AgentsStart lab
Reasoning

Chain of Code

First page
Chain of Code
Paper summary

DeepMind's Chain of Code extends CoT by encouraging LMs to write pseudocode that mixes real code with LM-simulated sub-routines.

Ask this paper

Key points
01

LMulator: The LM generates pseudocode programs and explicitly annotates sub-tasks that can't be executed; a "LMulator" simulates those sub-tasks with the LM while the interpreter handles the rest.

02

Undefined-behavior handling: The interpreter catches undefined behavior and cleanly hands off to the LM, sidestepping the brittleness of code-first approaches that fail silently on hard ops.

03

84% on BIG-Bench Hard: Achieves 84% on BIG-Bench Hard - a 12-point gain over Chain of Thought and a clean demonstration that mixing exact execution with LM simulation beats either alone.

04

Broad applicability: Works across math, logic, and commonsense reasoning, positioning Chain of Code as a general-purpose CoT upgrade.

Every Monday
Get next week’s papers.
Subscribe on Substack