Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesis
Open accessAbstract
The use of deep learning techniques has achieved significant progress for program synthesis from input-output examples. However, when the program semantics become more complex, it still remains a challenge to synthesize programs that are consistent with the specification. In this work, we propose SED, a neural program generation framework that incorporates synthesis, execution, and debugging stages. Instead of purely relying on the neural program synthesizer to generate the final program, SED first produces initial programs using the neural program synthesizer component, then utilizes a neural program debugger to iteratively repair the generated programs. The integration of the debugger component enables SED to modify the programs based on the execution results and specification, which resembles the coding process of human programmers. On Karel, a challenging input-output program synthesis benchmark, SED reduces the error rate of the neural program synthesizer itself by a considerable margin, and outperforms the standard beam search for decoding.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Prior work on code repair has demonstrated that training the repair model on execution traces improves debugging performance.
“Prior work on code repair has demonstrated that training the repair model on execution traces improves the debugging performance (Wang et al., 2018;Gupta et al., 2020).”
From Teaching Large Language Models to Self-Debug (2023) · cites this paper as Gupta et al., 2020
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Still being checked.
Research works printed but not linked: 28
- [1][1] M. Balog, A. L. Gaunt, M. Brockschmidt, S. Nowozin, and D. Tarlow. Deepcoder: Learning to write programs. In International Conference on Learning Representations , 2017. -
- [2][2] R. Bunel, M. Hausknecht, J. Devlin, R. Singh, and P. Kohli. Leveraging grammar and reinforcement learning for neural program synthesis. In International Conference on Learning Representations , 2018. -
- [3][3] X. Chen, C. Liu, and D. Song. Execution-guided neural program synthesis. In International Conference on Learning Representations , 2019. -
- [4][4] J. Devlin, R. R. Bunel, R. Singh, M. Hausknecht, and P. Kohli. Neural program meta-induction. In Advances in Neural Information Processing Systems , pages 2080-2088, 2017. -
- [5][5] J. Devlin, J. Uesato, S. Bhupatiraju, R. Singh, A. rahman Mohamed, and P. Kohli. Robustfill: Neural program learning under noisy i/o. In ICML , 2017. -
- [6][6] E. Dinella, H. Dai, Z. Li, M. Naik, L. Song, and K. Wang. Hoppity: Learning graph transformations to detect and fix bugs in programs. In International Conference on Learning Representations , 2020. -
- [7][7] K. Ellis, M. I. Nye, Y. Pu, F. Sosa, J. B. Tenenbaum, and A. Solar-Lezama. Write, execute, assess: Program synthesis with a repl. In NeurIPS , 2019. -
- [8][8] K. Ellis, D. Ritchie, A. Solar-Lezama, and J. Tenenbaum. Learning to infer graphics programs from hand-drawn images. In Advances in neural information processing systems , pages 60596068, 2018. -
- [9][9] C. Fu, H. Chen, H. Liu, X. Chen, Y. Tian, F. Koushanfar, and J. Zhao. Coda: An end-to-end neural program decompiler. In NeurIPS , 2019. -
- [10][10] S. Gulwani, W. R. Harris, and R. Singh. Spreadsheet data manipulation using examples. Communications of the ACM , 55(8):97-105, 2012. -
- [11][11] R. Gupta, S. Pal, A. Kanade, and S. K. Shevade. Deepfix: Fixing common c language errors by deep learning. In AAAI , 2017. -
- [13][13] L. Laich, P. Bielik, and M. Vechev. Guiding program synthesis by learning to generate examples. In International Conference on Learning Representations , 2020. -
- [14][14] X.-B. D. Le, D.-H. Chu, D. Lo, C. Le Goues, and W. Visser. S3: syntax-and semantic-guided repair synthesis via programming by examples. In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering , pages 593-604, 2017. -
- [15][15] C. Le Goues, M. Dewey-Vogt, S. Forrest, and W. Weimer. A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each. In 2012 34th International Conference on Software Engineering (ICSE) , pages 3-13. IEEE, 2012. -
- [17][17] Z. Manna and R. J. Waldinger. Toward automatic program synthesis. Communications of the ACM , 14(3):151-165, 1971. -
- [18][18] B. Mehne, H. Yoshida, M. R. Prasad, K. Sen, D. Gopinath, and S. Khurshid. Accelerating search-based program repair. In 2018 IEEE 11th International Conference on Software Testing, Verification and Validation (ICST) , pages 227-238. IEEE, 2018. -
- [19][19] S. H. Muggleton, D. Lin, N. Pahlavi, and A. Tamaddoni-Nezhad. Meta-interpretive learning: application to grammatical inference. Mach. Learn. , 94(1):25-49, 2014. -
- [20][20] E. Parisotto, A.-r. Mohamed, R. Singh, L. Li, D. Zhou, and P. Kohli. Neuro-symbolic program synthesis. In International Conference on Learning Representations , 2017. -
- [21][21] R. E. Pattis. Karel the Robot: A Gentle Introduction to the Art of Programming . John Wiley & Sons, Inc., USA, 1st edition, 1981. -
- [22][22] E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. ACMSIGARCHComputer Architecture News , 41(1):305-316, 2013. -
- [23][23] E. C. Shin, I. Polosukhin, and D. Song. Improving neural program synthesis with inferred execution traces. In Advances in Neural Information Processing Systems , pages 8917-8926, 2018. -
- [24][24] R. Shin, N. Kant, K. Gupta, C. Bender, B. Trabucco, R. Singh, and D. X. Song. Synthetic datasets for neural program synthesis. In International Conference on Learning Representations , 2019. -
- [25][25] R. Shin, I. Polosukhin, and D. X. Song. Towards specification-directed program repair. In ICLR Workshop , 2018. -
- [27][27] S.-H. Sun, H. Noh, S. Somasundaram, and J. Lim. Neural program synthesis from diverse demonstration videos. In Proceedings of the 35th International Conference on Machine Learning , 2018. -
- [28][28] M. Vasic, A. Kanade, P. Maniatis, D. Bieber, and R. Singh. Neural program repair by jointly learning to localize and repair. In International Conference on Learning Representations , 2019. -
- [29][29] A. J. Vijayakumar, A. Mohta, O. Polozov, D. Batra, P. Jain, and S. Gulwani. Neural-guided deductive search for real-time program synthesis from examples. In ICLR , 2018. -
- [30][30] K. Wang, R. Singh, and Z. Su. Dynamic neural program embedding for program repair. In International Conference on Learning Representations , 2018. -
- [31][31] A. Zohar and L. Wolf. Automatic program synthesis of long programs with a learned garbage collector. In NeurIPS , 2018.
Cited by
Sorted by citations
CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
Jiang, N., Lutellier, T., & Tan, L. (2021) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse43902.2021.00107 · Cited by 336 · see citing works
Case-based Reasoning for Natural Language Queries over Knowledge Bases
Das, R., Zaheer, M., Thai, D., Godbole, A., Perez, E., Lee, J. Y., Tan, L., Polymenakos, L., & McCallum, A. (2021) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2021.emnlp-main.755 · Cited by 121 · see citing works
Teaching Large Language Models to Self-Debug
Chen, X., Lin, M., Schärli, N., & Zhou, D. (2023) · arXiv · doi:10.48550/arxiv.2304.05128 · Cited by 77 · see citing works
“Program repair is an area of research concerned with fixing bugs in code, where several neural network models have been developed to handle different types of bugs (Gupta et al., 2017; Yasunaga & Liang, 2021; Gupta et al., 2020; Wang et al., 2018; Le et al., 2022).”
BackgroundMethodInfluentialSelf-citationFully Autonomous Programming with Large Language Models
Liventsev, V., Grishina, A., Härmä, A., & Moonen, L. (2023) · Proceedings of the Genetic and Evolutionary Computation Conference · doi:10.1145/3583131.3590481 · Cited by 45 · see citing works
Fixing Large Language Models' Specification Misunderstanding for Better Code Generation
Tian, Z., Chen, J.-J., & Zhang, X.-Y. (2025) · International Conference on Software Engineering · doi:10.1109/icse55347.2025.00108
Tensfa: Detecting and Repairing Tensor Shape Faults in Deep Learning Systems
Wu, D., Shen, B., Chen, Y., Jiang, H., & Qiao, L. (2021) · Proceedings/Proceedings - International Symposium on Software Reliability Engineering · doi:10.1109/issre52982.2021.00014 · Cited by 12 · see citing works
Transcribing Natural Languages for the Deaf via Neural Editing Programs
Li, D., Xu, C., Liu, L., Zhong, Y., Wang, R., Petersson, L., & Li, H. (2022) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v36i11.21457 · Cited by 13 · see citing works
Latent Execution for Neural Program Synthesis Beyond Domain-Specific LanguagesPreprint
Chen, X., Song, D. X., & Tian, Y. (2021) · arXiv (Cornell University) · Cited by 12 · see citing works
Self-citationHasabnis, N., & Gottschlich, J. (2021) · doi:10.1145/3460945.3464954 · Cited by 9 · see citing works
Fully Autonomous Programming Using Iterative Multi-Agent Debugging with Large Language Models
Grishina, A., Liventsev, V., Härmä, A., & Moonen, L. (2025) · ACM Transactions on Evolutionary Learning and Optimization · doi:10.1145/3719351 · Cited by 11 · see citing works
Synergistic Utilization of LLMs for Program Synthesis
Zarb, D. V., Parks, G. T., & Kipouros, T. (2024) · Genetic and Evolutionary Computation Conference Companion (GECCO Companion) · doi:10.1145/3638530.3654426 · Cited by 4 · see citing works
When debugging encounters artificial intelligence: state of the art and open challenges
Song, Y., Xie, X., & Xu, B. (2024) · Science China Information Sciences · doi:10.1007/s11432-022-3803-9 · Cited by 3 · see citing works
Knowledge-Enhanced Program Repair for Data Science Code
Ouyang, S., Zhang, J. M., Sun, Z., & Meroño-Peñuela, A. (2025) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse55347.2025.00246 · Cited by 6 · see citing works
Latent Execution for Neural Program Synthesis
Chen, X., Song, D., & Tian, Y. (2021) · arXiv · doi:10.48550/arxiv.2107.00101 · Cited by 2 · see citing works
Self-citationDeep Learning Representations of Programs: A Systematic Literature Review
Shanmugasundaram, D., Arivukkarasu, P., Chen, H., & Cai, H. (2025) · ACM Computing Surveys · doi:10.1145/3769008 · Cited by 3 · see citing works
Learning to Combine Per-Example Solutions for Neural Program SynthesisPreprint
Shrivastava, D., Larochelle, H., & Tarlow, D. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2106.07175 · Cited by 2 · see citing works
Program Synthesis with LLM-Predicted Minimal Specialized Grammars
Zarb, D. V., Parks, G. T., & Kipouros, T. (2025) · Genetic and Evolutionary Computation Conference (GECCO) · doi:10.1145/3712256.3726430 · Cited by 1 · see citing works
Jiang, J., Shen, J., Kim, S., Yoo, K. M., Kim, J., & Kim, S. (2026) · arXiv · doi:10.48550/arxiv.2603.05863
“…2022; Li et al., 2022; Chen et al., 2022; Zhang et al., 2023b; Ni et al., 2023); (2) External Repairers , utilizing separate models to patch errors (Gupta et al., 2020; Jiang et al., 2023a; Zhang et al., 2023a); and (3) Feedback-Guided Refinement , including prompt-based self-reflection such as…”
Case-based Reasoning for Natural Language Queries over Knowledge BasesPreprint
Das, R., Zaheer, M., Thai, D., Godbole, A., Perez, E., Lee, J. Y., Tan, L., Polymenakos, L., & McCallum, A. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2104.08762 · Cited by 15 · see citing works
Unveiling the Power of Neural Program Synthesis in High Level Code Generation
Sai, G. K., Harshith, K. S. S., Varma, K. A., Kiran, G. Y., & Swaminathan, J. (2024) · International Conference on Computing, Communication and Networking Technologies (ICCCNT) · doi:10.1109/icccnt61001.2024.10725949
- Authors
- Gupta, K., Christensen, P. E., Chen, X., & Song, D.
- Affiliations
- University of California, Berkeley (US)
- Technical University of Denmark (DK)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2020
- Volume
- 33
- Pages
- 17685-17695
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2007.08095
- OpenAlex
- W3102935281
- Cited by
- 18
- References
- 0
- Citations by year
- 2025: 5 · 2024: 3 · 2023: 1 · 2022: 1 · 2021: 8
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- neural information processing systems
- Topics
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Physical Sciences › Computer Science › Artificial Intelligence › Evolutionary Algorithms and Applications
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Keywords
- neural program synthesis, program repair, debugging, program execution, specification consistency, error reduction, beam search decoding
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review