{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/exedec-execution-decomposition-for","title":"ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesis","arxiv_id":"2307.13883","date":"2023-07-26","proceeding":null,"authors":["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.","url_abs":"https://arxiv.org/abs/2307.13883v2","url_pdf":"https://arxiv.org/pdf/2307.13883v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[],"tasks":[{"task_slug":"program-synthesis","task_name":"Program Synthesis"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2307.13883","atlas_url":"https://app.syntology.ai/?focus=2307.13883","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.13883"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/google-deepmind/exedec","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":13,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":16,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"323ec9d2adf0a81f","entry":"add_beam_dim","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/decode.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/decode.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"323ec9d2adf0a81f"}},{"code_sha256_prefix":"075fd59d804e340b","entry":"brevity_penalty","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/decode.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/decode.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"075fd59d804e340b"}},{"code_sha256_prefix":"4b1a9cf5feab44ca","entry":"create_dataset","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/llm_utils.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/llm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4b1a9cf5feab44ca"}},{"code_sha256_prefix":"758199a57cc4780a","entry":"flatten_beam_dim","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/decode.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/decode.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"758199a57cc4780a"}},{"code_sha256_prefix":"8ba7238984c6122b","entry":"flatten_num_io_dim","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"models/base_models.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/models/base_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8ba7238984c6122b"}},{"code_sha256_prefix":"6521c64803ccbc0e","entry":"get_boolean_options","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/launch_end_to_end_predict.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/launch_end_to_end_predict.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6521c64803ccbc0e"}},{"code_sha256_prefix":"195e13318aaa4b57","entry":"make_aligned_relative_position","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/decomposition_models.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/decomposition_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"195e13318aaa4b57"}},{"code_sha256_prefix":"ee2a82c6ca375fca","entry":"multinomial","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/old_decode.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/old_decode.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ee2a82c6ca375fca"}},{"code_sha256_prefix":"914b193e68f5628d","entry":"product_sweep","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/launch_end_to_end_predict.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/launch_end_to_end_predict.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"914b193e68f5628d"}},{"code_sha256_prefix":"8705b2614e592b74","entry":"shift_right","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"models/base_models.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/models/base_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8705b2614e592b74"}},{"code_sha256_prefix":"7484b09be8359551","entry":"solver_parallel_run","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/run_llm_experiment.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/run_llm_experiment.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7484b09be8359551"}},{"code_sha256_prefix":"de375dd399608a9a","entry":"to_python_form","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/llm_utils.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/llm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"de375dd399608a9a"}},{"code_sha256_prefix":"7688708073c0de19","entry":"unflatten_num_io_dim","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"models/base_models.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/models/base_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7688708073c0de19"}},{"code_sha256_prefix":"6da1245365dfd0a7","entry":"get_sweep","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/launch_train.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/launch_train.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6da1245365dfd0a7"}},{"code_sha256_prefix":"bd6bc5a2d5328634","entry":"make_relative_position_bucket","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"models/relative_attention.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/models/relative_attention.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bd6bc5a2d5328634"}},{"code_sha256_prefix":"d204dbbda2b2669f","entry":"query_llm","repo":"google-deepmind/exedec","repo_kind":"found_in_text","path":"spec_decomposition/cached_llm_access.py","file_url":"https://github.com/google-deepmind/exedec/blob/HEAD/spec_decomposition/cached_llm_access.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d204dbbda2b2669f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}