Papers › ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis

ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis

26 Jul 2023arXiv:2307.13883archive 2025-07-28

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

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.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.13883")

Code

Syntology Ran 13 of 16 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 13 ran with no contract checked.

By repository: found in paper text by Syntology: 16 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

google-deepmind/exedec found in paper text by SyntologyApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 13 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13ran
3unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from google-deepmind/exedec. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

add_beam_dim google-deepmind/exedec/spec_decomposition/decode.py found in paper text by Syntology ran Apache-2.0 (permissive) · 323ec9d2adf0a81f · report
brevity_penalty google-deepmind/exedec/spec_decomposition/decode.py found in paper text by Syntology ran Apache-2.0 (permissive) · 075fd59d804e340b · report
create_dataset google-deepmind/exedec/spec_decomposition/llm_utils.py found in paper text by Syntology ran Apache-2.0 (permissive) · 4b1a9cf5feab44ca · report
flatten_beam_dim google-deepmind/exedec/spec_decomposition/decode.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 758199a57cc4780a · report
flatten_num_io_dim google-deepmind/exedec/models/base_models.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 8ba7238984c6122b · report
get_boolean_options google-deepmind/exedec/spec_decomposition/launch_end_to_end_predict.py found in paper text by Syntology ran Apache-2.0 (permissive) · 6521c64803ccbc0e · report
make_aligned_relative_position google-deepmind/exedec/spec_decomposition/decomposition_models.py found in paper text by Syntology ran Apache-2.0 (permissive) · 195e13318aaa4b57 · report
multinomial google-deepmind/exedec/spec_decomposition/old_decode.py found in paper text by Syntology ran Apache-2.0 (permissive) · ee2a82c6ca375fca · report
product_sweep google-deepmind/exedec/spec_decomposition/launch_end_to_end_predict.py found in paper text by Syntology ran Apache-2.0 (permissive) · 914b193e68f5628d · report
shift_right google-deepmind/exedec/models/base_models.py found in paper text by Syntology ran Apache-2.0 (permissive) · 8705b2614e592b74 · report
solver_parallel_run google-deepmind/exedec/spec_decomposition/run_llm_experiment.py found in paper text by Syntology ran Apache-2.0 (permissive) · 7484b09be8359551 · report
to_python_form google-deepmind/exedec/spec_decomposition/llm_utils.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · de375dd399608a9a · report
unflatten_num_io_dim google-deepmind/exedec/models/base_models.py found in paper text by Syntology ran Apache-2.0 (permissive) · 7688708073c0de19 · report
get_sweep google-deepmind/exedec/spec_decomposition/launch_train.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 6da1245365dfd0a7 · report
make_relative_position_bucket google-deepmind/exedec/models/relative_attention.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bd6bc5a2d5328634 · report
query_llm google-deepmind/exedec/spec_decomposition/cached_llm_access.py found in paper text by Syntology unverified Apache-2.0 (permissive) · d204dbbda2b2669f · report

Tasks

Program Synthesis

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections