Reproduce “On Code-Induced Reasoning in LLMs” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Abdul Waheed, Zhen Wu, Carolyn Rosé, Daphne Ippolito

Researchers from Carnegie Mellon University systematically investigated which specific properties of code enhance Large Language Model (LLM) reasoning, finding that structural characteristics are more critical than semantic content. The study demonstrated that abstract representations like pseudocode can be as effective as raw code for non-programming tasks, guiding the design of more efficient training data.

Key insights

  • Structural properties of code (e.g., formatting, control flow) are more critical for enhancing LLM reasoning, particularly for math and code tasks, than superficial semantic content (e.g., variable names).
  • Abstract representations of code, such as pseudocode and flowcharts, effectively distill algorithmic structure and can match or exceed the reasoning benefits of verbose, unperturbed code for natural language and math tasks.
  • LLMs exhibit robustness to semantic noise and low human interpretability in code, leveraging underlying surface-level regularities and recurring structural cues even when code is obfuscated or uses imaginary languages.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.