paper-with-me

Papers

Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step-by-step

2024-02-25 · Li Zhong, Zilong Wang, Jingbo Shang

Large language models (LLMs) are leading significant progress in code generation. Beyond one-pass code generation, recent works further integrate unit tests and program verifiers into LLMs to iteratively refine the generated programs. However, these works consider the generated programs as an indivisible entity, which falls short for LLMs in debugging the programs, especially when the programs contain complex logic flows and data operations. In contrast, when human developers debug programs, they typically set breakpoints and selectively examine runtime execution information. The execution flow and the intermediate variables play a crucial role in the debugging process, yet they are underutilized in the existing literature on code generation. In this study, we introduce Large Language Model Debugger (LDB), a novel debugging framework that enables LLMs to refine their generated programs with the runtime execution information. Specifically, LDB segments the programs into basic blocks and tracks the values of intermediate variables after each block throughout the runtime execution. This allows LLMs to concentrate on simpler code units within the overall execution flow, verify their correctness against the task description block by block, and efficiently pinpoint any potential errors. Experiments demonstrate that LDB consistently enhances the baseline performance by up to 9.8% across the HumanEval, MBPP, and TransCoder benchmarks, archiving new state-of-the-art performance in code debugging for various LLM selections.

📄 PDF Abstract BibTeX arXiv:2402.16906

Code (1)

floridsleeves/llmdebugger 공식 구현

Tasks

Code GenerationHumanEvalLanguage ModelingLanguage ModellingLarge Language Modelmbpp

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically

Similar Papers 제목 키워드 기반

From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging

2024-10-02 · Yuling Shi, Songsong Wang, Chengcheng Wan, Xiaodong Gu

While large language models have made significant strides in code generation, the pass rate of the generated code is bottlenecked on subtle errors, often requiring human intervention to pass tests, especially for complex…

Auto DebuggingBug fixingCode GenerationHumanEval+1

HLSDebugger: Identification and Correction of Logic Bugs in HLS Code with LLM Solutions

2025-07-29 · Jing Wang, Shang Liu, Yao Lu, Zhiyao Xie arxiv

High-level synthesis (HLS) accelerates hardware design by enabling the automatic translation of high-level descriptions into efficient hardware implementations. However, debugging HLS code is a challenging and labor-inte…

Type prediction

LM-Debugger: An Interactive Tool for Inspection and Intervention in Transformer-Based Language Models

2022-04-26 · Mor Geva, Avi Caciularu, Guy Dar, Paul Roit 외

The opaque nature and unexplained behavior of transformer-based language models (LMs) have spurred a wide interest in interpreting their predictions. However, current interpretation methods mostly focus on probing models…

Prediction

Towards a Neural Debugger for Python

2026-03-10 · Maximilian Beck, Jonas Gehring, Jannik Kossen, Gabriel Synnaeve arxiv

Training large language models (LLMs) on Python execution traces grounds them in code execution and enables the line-by-line execution prediction of whole Python programs, effectively turning them into neural interpreter…

Code Generation

HDLdebugger: Streamlining HDL debugging with Large Language Models

2024-03-18 · Xufeng Yao, Haoyang Li, Tsz Ho Chan, Wenyi Xiao 외

In the domain of chip design, Hardware Description Languages (HDLs) play a pivotal role. However, due to the complex syntax of HDLs and the limited availability of online resources, debugging HDL codes remains a difficul…

RetrievalRetrieval-augmented Generation