Revisit Self-Debugging with Self-Generated Tests for Code Generation
On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis
Abstract (arXiv)
Large language models (LLMs) have shown significant advancements in code generation, but still face challenges on tasks beyond their basic capabilities. Recently, the notion of self-debugging has been proposed to boost the performance of code generation by leveraging execution feedback from tests. Despite its promise, the availability of high-quality tests in real-world scenarios is limited. In this context, self-debugging with self-generated tests is a promising solution but lacks a full exploration of its limitations and practical potential. Therefore, we investigate its efficacy on diverse programming problems. To deepen our understanding, we propose two distinct paradigms for the process: post-execution and in-execution self-debugging. Within the scope of self-contained Python programming tasks, we find that post-execution self-debugging struggles on basic problems but shows potential for improvement on competitive ones, due to the bias introduced by self-generated tests. On the other hand, in-execution self-debugging enables LLMs to mitigate the bias by solely leveraging intermediate states during execution, thereby enhancing code generation.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 16 of its 31 references that are in the map. First posted on arXiv 22 Jan 2025.
Builds on
16 of 31 references.
References · 16
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2023Self-collaboration Code Generation via ChatGPTcited by 255
- 2024Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineeringcited by 100
- 2024A Survey on Self-Evolution of Large Language Modelscited by 86
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
4 more
- 2023SelfEvolve: A Code Evolution Framework via Large Language Modelscited by 43
- 2024LeDex: Training LLMs to Better Self-Debug and Explain Codecited by 39
- 2023AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisationcited by 31
- 2023TraceFixer: Execution Trace-Driven Program Repaircited by 4
Built on by
Citing papers per year: 2025: 10; 2026: 11.
21 papers.
Sort:
By area:
- 2025VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code Generationcited by 13
- 2025RefineCoder: Iterative Improving of Large Language Models via Adaptive Critique Refinement for Code Generationcited by 8
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolutioncited by 7
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMscited by 5
- 2026How Many Tries Does It Take? Iterative Self-Repair in LLM Code Generation Across Model Scales and Benchmarkscited by 5
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
- 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolutioncited by 4
- 2025InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolutioncited by 3
- 2026Self-Authored Verification Is Unreliable in Heuristic Self-Improving Agentscited by 3
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkerscited by 2
- 2025Complementarity-driven Representation Learning for Multi-modal Knowledge Graph Completioncited by 1
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensuscited by 1
9 more
- 2026Agentic MIP Research: Accelerated Constraint Handler Generationcited by 1
- 2026Selection Without Signal, Recovery Through Expression: A Measurement Study of Post-Hoc Falsification Operators for Frozen Small Code Modelscited by 1
- 2025Mutual Evidential Deep Learning for Medical Image Segmentationcited by 0
- 2025Co-Evidential Fusion with Information Volume for Medical Image Segmentationcited by 0
- 2025Adaptive Fuzzy Time Series Forecasting via Partially Asymmetric Convolution and Sub-Sliding Window Fusioncited by 0
- 2026Inference-Time Code Selection via Symbolic Equivalence Partitioningcited by 0
- 2026COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generationcited by 0
- 2026ExeCRE: Execution-Consistency Guided Reliability Estimation for Self-Correcting Code Generationcited by 0
- 2026ExecCritic: Learn to Test, Test to Improve for Coding Agentscited by 0
- 2026ExecCritic: Learn to Test, Test to Improve for Coding Agents8 Sep 2026
- 2026ExeCRE: Execution-Consistency Guided Reliability Estimation for Self-Correcting Code Generation5 Aug 2026
- 2026COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generation5 Aug 2026
- 2026Self-Authored Verification Is Unreliable in Heuristic Self-Improving Agents27 Jul 2026
- 2026Selection Without Signal, Recovery Through Expression: A Measurement Study of Post-Hoc Falsification Operators for Frozen Small Code Models15 Jun 2026
- 2026Agentic MIP Research: Accelerated Constraint Handler Generation9 May 2026
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkers3 May 2026
- 2026How Many Tries Does It Take? Iterative Self-Repair in LLM Code Generation Across Model Scales and Benchmarks12 Apr 2026
- 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolution8 Apr 2026
- 2026Inference-Time Code Selection via Symbolic Equivalence Partitioning7 Apr 2026
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus31 Mar 2026
- 2025InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolution20 Nov 2025
9 more
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution20 Nov 2025
- 2025Adaptive Fuzzy Time Series Forecasting via Partially Asymmetric Convolution and Sub-Sliding Window Fusion28 Jul 2025
- 2025Complementarity-driven Representation Learning for Multi-modal Knowledge Graph Completion28 Jul 2025
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMs23 Jun 2025
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action16 Jun 2025
- 2025VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code Generation4 Jun 2025
- 2025Co-Evidential Fusion with Information Volume for Medical Image Segmentation3 Jun 2025
- 2025Mutual Evidential Deep Learning for Medical Image Segmentation18 May 2025
- 2025RefineCoder: Iterative Improving of Large Language Models via Adaptive Critique Refinement for Code Generation13 Feb 2025
- 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolutioncited by 4
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkerscited by 2
- 2026Agentic MIP Research: Accelerated Constraint Handler Generationcited by 1
- 2026ExecCritic: Learn to Test, Test to Improve for Coding Agentscited by 0
- 2026ExecCritic: Learn to Test, Test to Improve for Coding Agents8 Sep 2026
- 2026Agentic MIP Research: Accelerated Constraint Handler Generation9 May 2026
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkers3 May 2026
- 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolution8 Apr 2026
- 2025VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code Generationcited by 13
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolutioncited by 7
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMscited by 5
- 2026How Many Tries Does It Take? Iterative Self-Repair in LLM Code Generation Across Model Scales and Benchmarkscited by 5
- 2025InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolutioncited by 3
- 2025Complementarity-driven Representation Learning for Multi-modal Knowledge Graph Completioncited by 1
- 2026Selection Without Signal, Recovery Through Expression: A Measurement Study of Post-Hoc Falsification Operators for Frozen Small Code Modelscited by 1
- 2025Mutual Evidential Deep Learning for Medical Image Segmentationcited by 0
- 2025Co-Evidential Fusion with Information Volume for Medical Image Segmentationcited by 0
- 2025Adaptive Fuzzy Time Series Forecasting via Partially Asymmetric Convolution and Sub-Sliding Window Fusioncited by 0
- 2026Inference-Time Code Selection via Symbolic Equivalence Partitioningcited by 0
- 2026COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generationcited by 0
12 most cited of 13 All 13 (JSON)
- 2026ExeCRE: Execution-Consistency Guided Reliability Estimation for Self-Correcting Code Generation5 Aug 2026
- 2026COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generation5 Aug 2026
- 2026Selection Without Signal, Recovery Through Expression: A Measurement Study of Post-Hoc Falsification Operators for Frozen Small Code Models15 Jun 2026
- 2026How Many Tries Does It Take? Iterative Self-Repair in LLM Code Generation Across Model Scales and Benchmarks12 Apr 2026
- 2026Inference-Time Code Selection via Symbolic Equivalence Partitioning7 Apr 2026
- 2025InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolution20 Nov 2025
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution20 Nov 2025
- 2025Adaptive Fuzzy Time Series Forecasting via Partially Asymmetric Convolution and Sub-Sliding Window Fusion28 Jul 2025
- 2025Complementarity-driven Representation Learning for Multi-modal Knowledge Graph Completion28 Jul 2025
- 2025The Debugging Decay Index: Rethinking Debugging Strategies for Code LLMs23 Jun 2025
- 2025VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code Generation4 Jun 2025
- 2025Co-Evidential Fusion with Information Volume for Medical Image Segmentation3 Jun 2025
12 newest of 13 All 13 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2023Teaching Large Language Models to Self-Debug
- 2025SELF-REDRAFT: Eliciting Intrinsic Exploration-Exploitation Balance in Test-Time Scaling for Code Generation
- 2024An Empirical Study on Self-correcting Large Language Models for Data Science Code Generation
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Models
- 2026On the risk of coding before testing: An empirical study on LLM-based test generation workflow
- 2025Learning to Generate Unit Tests for Automated Debugging