NL-Debugging: Exploiting Natural Language as an Intermediate Representation for Code Debugging

📅 2025-05-21
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the challenge of diagnosing and repairing algorithmic logic errors in code debugging. We propose NL-Debugging, the first framework to employ natural language (NL) as a semantic-level intermediate representation for debugging. Our method integrates large language model–driven NL reasoning, execution-feedback-guided iterative NL refinement, and bidirectional code–NL mapping with consistency verification. Key contributions are: (1) establishing structured NL descriptions as the optimal intermediate representation for debugging; (2) empirically demonstrating NL reasoning’s substantial gains in localizing and fixing complex defects—including logic errors and missing boundary conditions; and (3) extending the modifiable search space beyond syntactic repair to ensure semantic consistency. Experiments show that NL-Debugging achieves a 32.7% higher repair success rate and reduces average debugging steps by 41% compared to state-of-the-art baselines.

Technology Category

Application Category

📝 Abstract
Debugging is a critical aspect of LLM's coding ability. Early debugging efforts primarily focused on code-level analysis, which often falls short when addressing complex programming errors that require a deeper understanding of algorithmic logic. Recent advancements in large language models (LLMs) have shifted attention toward leveraging natural language reasoning to enhance code-related tasks. However, two fundamental questions remain unanswered: What type of natural language format is most effective for debugging tasks? And what specific benefits does natural language reasoning bring to the debugging process? In this paper, we introduce NL-DEBUGGING, a novel framework that employs natural language as an intermediate representation to improve code debugging. By debugging at a natural language level, we demonstrate that NL-DEBUGGING outperforms traditional debugging methods and enables a broader modification space through direct refinement guided by execution feedback. Our findings highlight the potential of natural language reasoning to advance automated code debugging and address complex programming challenges.
Problem

Research questions and friction points this paper is trying to address.

Identify effective natural language formats for debugging
Explore benefits of natural language reasoning in debugging
Improve code debugging via natural language intermediate representation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses natural language as intermediate debugging representation
Enables broader modification space via execution feedback
Outperforms traditional code-level debugging methods
🔎 Similar Papers
No similar papers found.