파이썬을 위한 신경망 디버거 개발 연구
Towards a Neural Debugger for Python
파이썬 실행 추적 데이터를 기반으로 대규모 언어 모델(LLM)을 훈련하면 코드 실행에 대한 이해도가 향상되고, 전체 파이썬 프로그램의 각 줄에 대한 실행 예측이 가능해져 사실상 신경망 인터프리터 역할을 수행할 수 있게 됩니다 (FAIR CodeGen Team et al., 2025). 하지만 개발자는 일반적으로 프로그램을 한 줄씩 실행하는 대신, 디버거를 사용하여 특정 브레이크포인트에서 실행을 멈추고 관련 부분만 검사하거나 수정합니다. 기존의 신경망 인터프리터 방식은 이러한 상호작용적인 제어 기능을 제공하지 못합니다. 이러한 한계를 극복하기 위해, 본 연구에서는 전통적인 디버거를 모방하는 신경망 디버거를 제안합니다. 신경망 디버거는 함수 내부로 들어가기(stepping into), 함수 위로 넘어가기(stepping over), 또는 함수 밖으로 나가기(stepping out)와 같은 기능은 물론, 특정 소스 코드 라인에 브레이크포인트를 설정하는 기능을 지원합니다. 본 연구에서 제안하는 신경망 디버거는, 대규모 LLM을 파인튜닝하거나, 더 작은 모델을 처음부터 훈련하여 얻을 수 있으며, 디버거 액션에 따라 순방향 실행(미래 상태 및 출력 예측)과 역방향 실행(과거 상태 또는 입력 추론)을 안정적으로 모델링할 수 있음을 보였습니다. CruxEval 데이터셋을 사용하여 평가한 결과, 제안하는 모델은 출력 및 입력 예측 작업 모두에서 뛰어난 성능을 보였으며, 이는 조건부 실행 모델링의 강력함을 입증합니다. 본 연구는 향후 신경망 디버거가 시뮬레이션된 디버깅 환경의 세계 모델 역할을 수행하여 실행 피드백을 제공하거나, 에이전트가 실제 디버깅 도구와 상호 작용할 수 있도록 하는, 보다 발전된 에이전트 기반 코딩 시스템 개발의 첫걸음을 내딛는 연구입니다. 이러한 능력은 더욱 강력한 코드 생성, 프로그램 이해, 그리고 자동화된 디버깅의 기반을 마련할 것입니다.
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 interpreters (FAIR CodeGen Team et al., 2025). However, developers rarely execute programs step by step; instead, they use debuggers to stop execution at certain breakpoints and step through relevant portions only while inspecting or modifying program variables. Existing neural interpreter approaches lack such interactive control. To address this limitation, we introduce neural debuggers: language models that emulate traditional debuggers, supporting operations such as stepping into, over, or out of functions, as well as setting breakpoints at specific source lines. We show that neural debuggers -- obtained via fine-tuning large LLMs or pre-training smaller models from scratch -- can reliably model both forward execution (predicting future states and outputs) and inverse execution (inferring prior states or inputs) conditioned on debugger actions. Evaluated on CruxEval, our models achieve strong performance on both output and input prediction tasks, demonstrating robust conditional execution modeling. Our work takes first steps towards future agentic coding systems in which neural debuggers serve as a world model for simulated debugging environments, providing execution feedback or enabling agents to interact with real debugging tools. This capability lays the foundation for more powerful code generation, program understanding, and automated debugging.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.