paperbot · PL 论文追踪

全部论文 待读 收藏

P1 TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code

TraceCoder:面向 LLM 生成代码自动调试的轨迹驱动多智能体框架
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 5/10 · 论文聚焦于 LLM 生成代码的自动化调试与修复,采用运行时轨迹、因果分析和多智能体框架,与“PL→AI”中利用分析技术处理 LLM/Agent 相关程序有一定关联;但其核心不是静态分析在 Agentic 程序中的应用,也不是用 LLM 改进静态分析、浮点程序分析或贝叶斯程序分析,因此匹配度中等。引用 8 inbox
Jiangping Huang, Wenguang Ye, Weisong Sun, Jian Zhang, Mingyue Zhang, Yang Liu
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:用运行时轨迹与多智能体协作定位根因,并借助历史经验学习与回滚机制高效修复 LLM 生成的代码。

大语言模型生成的代码常含隐蔽而关键的缺陷,而现有自动修复方法多依赖通过/失败的粗粒度信号,难以洞察程序行为、精确定位错误,且无法从失败尝试中学习,导致修复循环重复低效。本文提出 TraceCoder,一个模拟人类专家“观察—分析—修复”流程的协作式多智能体框架:首先对代码插桩诊断探针,捕获细粒度运行时轨迹;随后对轨迹进行因果分析以定位失败根因;并引入历史经验学习机制(HLLM),从既往失败修复中提炼经验以指导后续策略、避免重蹈覆辙;同时用回滚机制保证每次修复迭代都是严格向正确解的改进,从而稳定收敛。多个基准实验显示,TraceCoder 相对先进基线在 Pass@1 上最高取得 34.43% 的相对提升;消融实验验证了各组件的作用,仅迭代修复过程即带来 65.61% 的相对精度增益,并在精度与成本效率上显著优于主流迭代式方法。

问题
LLM 生成的代码常含细微但严重的缺陷,现有自动修复仅依赖浅层的通过/失败信号,难以洞察程序行为并精确定位错误,也无法从先前失败中学习,修复过程重复低效。
方法
提出 TraceCoder 多智能体框架,模拟观察—分析—修复流程:通过插桩探针捕获细粒度运行时轨迹,对轨迹做因果分析定位根因,配合历史经验学习机制(HLLM)从失败尝试中提炼策略,并用回滚机制保证每次迭代严格改进。
评估
在多个基准上开展实验,Pass@1 相对现有先进基线最高提升 34.43%,并通过消融实验验证各组件贡献(仅迭代修复即带来 65.61% 相对增益),同时在精度与成本效率上优于主流迭代式方法。
原文摘要(Abstract)

Large Language Models (LLMs) often generate code with subtle but critical bugs, especially for complex tasks. Existing automated repair methods typically rely on superficial pass/fail signals, offering limited visibility into program behavior and hindering precise error localization. In addition, without a way to learn from prior failures, repair processes often fall into repetitive and inefficient cycles. To overcome these challenges, we present TraceCoder, a collaborative multi-agent framework that emulates the observe-analyze-repair process of human experts. The framework first instruments the code with diagnostic probes to capture fine-grained runtime traces, enabling deep insight into its internal execution. It then conducts causal analysis on these traces to accurately identify the root cause of the failure. This process is further enhanced by a novel Historical Lesson Learning Mechanism (HLLM), which distills insights from prior failed repair attempts to inform subsequent correction strategies and prevent recurrence of similar mistakes. To ensure stable convergence, a Rollback Mechanism enforces that each repair iteration constitutes a strict improvement toward the correct solution. Comprehensive experiments across multiple benchmarks show that TraceCoder achieves up to a 34.43% relative improvement in Pass@1 accuracy over existing advanced baselines. Ablation studies verify the significance of each system component, with the iterative repair process alone contributing a 65.61% relative gain in accuracy. Furthermore, TraceCoder significantly outperforms leading iterative methods in terms of both accuracy and cost-efficiency.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2602-06875,
  title = {TraceCoder: A Trace-Driven Multi-Agent Framework for Automated Debugging of LLM-Generated Code},
  author = {Jiangping Huang and Wenguang Ye and Weisong Sun and Jian Zhang and Mingyue Zhang and Yang Liu},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773187}
}