arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2607.01855cs.SE
收藏

多轮LLM编程对话中的回归累积

Regression Accumulation in Multi-Turn LLM Programming Conversations

Massey University(梅西大学);Alibaba Research Center for Complexity Sciences, Hangzhou Normal University(杭州师范大学阿里巴巴复杂性科学研究中心);University of Otago(奥塔哥大学)

Yonghui, Huang, Lin Ma, Amjed Tahir, Qian Zhang, Liwen Xiao, Lysa Xiao

AI总结:

研究多轮LLM编程对话中代码建议破坏先前需求的回归累积问题,通过构建542个任务链评估六种模型,发现40%-73%的任务出现回归,并验证了Verification Gate策略的有效性。

摘要:

在LLM辅助软件开发中,编码通常是迭代的。我们研究了多轮LLM编程对话中的回归累积,即后续代码建议可能破坏早期轮次引入的需求。因此,可靠性不仅取决于满足当前请求,还取决于保留先前满足的行为。我们从HumanEval+和MBPP+构建了542个任务,并将每个任务扩展为8轮需求演化链。我们在26,016个轮次实例(542 x 6 x 8)上评估了六种LLM。在每一轮,我们测试当前代码是否仍然通过早期基准测试。我们还从失败群体中分析了384个失败案例,并通过独立四标注者标注构建了多轮回归错误的分类法。我们的结果表明,所有六种模型都出现回归累积:40%到73%的任务在整个对话中丢失了先前正确的行为。所有模型的最终轮质量低于初始轮质量,尤其是当后续轮次添加输入验证或更广泛的输入类型时。手动分析表明,跨轮冲突(后续代码与早期需求冲突)是主要的失败类别。我们进一步发现,验证门(Verification Gate)——检查新代码是否通过先前测试并触发回滚和重试——是唯一能持续改进所有模型的策略,将DeepSeek-V3的最终轮质量从75.8%提高到87.9%,将Llama-3.1-8B从31.6%提高到47.3%。这些发现表明,强大的单轮性能可能高估多轮编码对话中的可靠性。未来的评估和工具设计应测试后续代码建议是否保留早期需求,并应包含验证门机制。

英文摘要:

In LLM-assisted software development, coding is often iterative. We study regression accumulation in multi-turn LLM programming conversations, where later code suggestions may break requirements introduced in earlier turns. Reliability therefore depends not only on satisfying the current request, but also on preserving previously satisfied behavior. We construct 542 tasks from HumanEval+ and MBPP+ and extend each task into an 8-turn requirement-evolution chain. We evaluate six LLMs on 26,016 turn instances (542 x 6 x 8). At each turn, we test whether the current code still passes earlier benchmark tests. We also analyze 384 failure cases from the failure population and build a taxonomy of multi-turn regression bugs through independent four-annotator labeling. Our results show that regression accumulation appears across all six models: 40% to 73% of tasks lose previously correct behavior over the full conversation. Final-turn quality is lower than initial-turn quality across models, especially when later turns add input validation or broader input types. Manual analysis shows that Cross-Turn Conflict, where later code conflicts with earlier requirements, is the main failure class. We further find that Verification Gate, which checks new code against prior tests and triggers rollback and retry, is the only strategy that consistently improves all models, raising final-turn quality from 75.8% to 87.9% on DeepSeek-V3 and from 31.6% to 47.3% on Llama-3.1-8B. These findings suggest that strong single-turn performance can overestimate reliability in multi-turn coding conversations. Future evaluation and tool design should test whether later code suggestions preserve earlier requirements and should include Verification Gate mechanisms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑