Chain of Code

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
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.
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.
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.
Broad applicability: Works across math, logic, and commonsense reasoning, positioning Chain of Code as a general-purpose CoT upgrade.