Lune

ICLR2024Top-tier venue

ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis

Kensen Shi, Joey Hong, Yinlin Deng, Pengcheng Yin, Manzil Zaheer, Charles Sutton

Abstract

When writing programs, people have the ability to tackle a new complex task by decomposing it into smaller and more familiar subtasks. While it is difficult to measure whether neural program synthesis methods have similar capabilities, we can measure whether they compositionally generalize, that is, whether a model that has been trained on the simpler subtasks is subsequently able to solve more complex tasks. In this paper, we characterize several different forms of compositional generalization that are desirable in program synthesis, forming a meta-benchmark which we use to create generalization tasks for two popular datasets, RobustFill and DeepCoder. We then propose ExeDec, a novel decomposition-based synthesis strategy that predicts execution subgoals to solve problems step-by-step informed by program execution at each step. When used with Transformer models trained from scratch, ExeDec has better synthesis performance and greatly improved compositional generalization ability compared to baselines. Finally, we use our benchmarks to demonstrate that LLMs struggle to compositionally generalize when asked to do programming-by-example in a few-shot setting, but an ExeDec-style prompting approach can improve the generalization ability and overall performance.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • OpenRCA: Can Large Language Models Locate the Root Cause of Software Failures? cites NExT: Teaching Large Language Models to Reason about Code Execution
  • COGS: A Compositional Generalization Challenge Based on Semantic Interpretation cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
  • Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge Bases cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
  • Compositional Generalization via Neural-Symbolic Stack Machines cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng et al.ICML 2024 · 73 citations
  2. FactorSim: Generative Simulation via Factorized RepresentationFan-Yun Sun, S. I. Harini, Angela Yi, Yihan Zhou et al.NeurIPS 2024 · 11 citations
  3. Gradient-Based Program Synthesis with Neurally Interpreted LanguagesMatthew Macfarlane, Clément Bonnet, Herke van Hoof, Levi LelisICLR 2026 · 3 citations
  4. Programming by Example meets Historical Linguistics: A Large Language Model Based Approach to Sound Law InductionAtharva Naik, Darsh Agrawal, Hong Sng, Clayton Marr et al.ACL 2025 · 1 citation
  5. OpenRCA: Can Large Language Models Locate the Root Cause of Software Failures?Junjielong Xu, Qinan Zhang, Zhiqing Zhong, Shilin He et al.ICLR 2025

Builds on23

  1. Measuring Compositional Generalization: A Comprehensive Method on Realistic DataDaniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman et al.ICLR 2020 · 401 citations
  2. Beyond I.I.D.: Three Levels of Generalization for Question Answering on Knowledge BasesYu Gu, Sue Kase, Michelle Vanni, Brian M. Sadler et al.WWW 2021 · 304 citations
  3. COGS: A Compositional Generalization Challenge Based on Semantic InterpretationNajoung Kim, Tal LinzenEMNLP 2020 · 149 citations
  4. Compositional Generalization via Neural-Symbolic Stack MachinesXinyun Chen, Chen Liang, Adams Wei Yu, Dawn Song et al.NeurIPS 2020 · 112 citations
  5. DreamCoder: bootstrapping inductive program synthesis with wake-sleep library learningKevin Ellis, Catherine Wong, Maxwell I. Nye, Mathias Sablé-Meyer et al.PLDI 2021 · 97 citations

Related papers

  1. Limits of Transformer Language Models on Learning to Compose AlgorithmsJonathan Thomm, Giacomo Camposampiero, Aleksandar Terzic, Michael Hersche et al.NeurIPS 2024 · 16 citations
  2. RoboDreamer: Learning Compositional World Models for Robot ImaginationSiyuan Zhou, Yilun Du, Jiaben Chen, Yandong Li et al.ICML 2024 · 140 citations
  3. HYSYNTH: Context-Free LLM Approximation for Guiding Program SynthesisShraddha Barke, Emmanuel Anaya Gonzalez, Saketh Ram Kasibatla, Taylor Berg-Kirkpatrick et al.NeurIPS 2024 · 34 citations
  4. Environment Generation for Zero-Shot Compositional Reinforcement LearningIzzeddin Gur, Natasha Jaques, Yingjie Miao, Jongwook Choi et al.NeurIPS 2021 · 50 citations
  5. Outline, Then Details: Syntactically Guided Coarse-To-Fine Code GenerationWenqing Zheng, S. P. Sharan, Ajay Kumar Jaiswal, Kevin Wang et al.ICML 2023 · 35 citations
Dusk over the sea between two cliffs drawn in fine vertical lines