arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2604.19086cs.SE
收藏

MUCOCO:代码大语言模型的一致性自动测试

MUCOCO: Automated Consistency Testing of Code LLMs

Singapore University of Technology and Design(新加坡科技设计大学);Royal Holloway University of London(伦敦大学皇家霍洛威学院)

Chua Jin Chou, Khant That Lwin, Ezekiel Soremekun

AI总结:

本文提出MUCOCO方法,通过语义保持变异分析自动发现代码大语言模型中的不一致行为,实验表明其在暴露不一致性和性能上优于现有基准。

摘要:

代码大语言模型(Code LLMs)常表现出不一致的程序行为。开发者通常使用基准测试来评估Code LLMs,但大多数基准测试是手工编写的、静态的,且不针对一致性属性。本文提出科学问题:如何自动发现Code LLMs中的不一致程序行为?为此,我们提出一种自动化一致性测试方法,称为MUCOCO,该方法利用语义保持变异分析来暴露代码大语言模型中的不一致行为。给定一个编程查询,MUCOCO会自动将程序转换为语义等价的程序(即变异体),并检测变异体与原始程序之间的不一致(例如不同的输出或测试失败)。我们使用四个(4)编程任务和七个(7)LLMs评估MUCOCO。结果表明,MUCOCO在暴露不一致性方面有效,并优于最近的基线(TURBULENCE)。大约1/7(15%)由MUCOCO生成的输入暴露了不一致性。我们的工作推动了对Code LLMs进行一致性属性测试的必要性。

英文摘要:

Code LLMs often portray inconsistent program behaviors. Developers typically employ benchmarks to assess Code LLMs, but most benchmarks are hand-crafted, static and do not target consistency property. In this work, we pose the scientific question: how can we automatically discover inconsistent program behaviors in Code LLMs? To address this challenge, we propose an automated consistency testing method, called MUCOCO, which employs semantic-preserving mutation analysis to expose inconsistent behaviors in code LLMs. Given a coding query, MUCOCO automatically transforms its program into semantically equivalent programs (aka mutants) and detects inconsistencies between the mutants and the original program (e.g., different output or test failure). We evaluate MUCOCO using four (4) coding tasks and seven (7) LLMs. Results show that MUCOCO is effective in exposing inconsistency and outperforms the closest baseline (TURBULENCE). About one in seven (15%) inputs generated by MUCOCO exposed inconsistencies. Our work motivates the need to test Code LLMs for consistency property

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

↑