Large Language Models (LLMs) have demonstrated impressive capabilities in code generation. While an interactive feedback loop can improve performance, writing effective tests is a non-trivial task. Early multi-agent frameworks, such as AgentCoder, automated this process but relied on generated tests as absolute ground truth. This approach is fragile: incorrect code frequently passes faulty or trivial tests, while valid solutions are often degraded to satisfy incorrect assertions. Addressing this limitation, newer methods have largely abandoned test generation in favor of planning and reasoning based on examples. We argue, however, that generated tests remain a valuable signal if we model them as noisy sensors guided by bayesian updates. To this end, we introduce BACE (Bayesian Anchored Co-Evolution), a framework that reformulates synthesis as a Bayesian co-evolutionary process where code and test populations are evolved, guided by belief distributions that are reciprocally updated based on noisy interaction evidence. By anchoring this search on minimal public examples, BACE prevents the co-evolutionary drift typical of self-validating loops. Extensive evaluations on LiveCodeBench v6 (post-March 2025) reveal that BACE achieves superior performance across both proprietary models and open-weight small language models.


翻译:摘要:大型语言模型(LLMs)在代码生成领域展现了卓越的能力。虽然交互式反馈循环能够提升性能,但撰写有效的测试用例仍是一项具有挑战性的任务。早期的多智能体框架(如AgentCoder)虽能自动化此过程,但将生成的测试用例视为绝对真实标准。这种方法的脆弱性表现在:不正确的代码常能通过有缺陷或琐碎的测试,而符合规范的解决方案却常因满足错误断言而退化。为克服这一局限,近期方法多放弃测试生成,转而采用基于示例的规划与推理策略。然而我们认为,若将生成的测试用例建模为受贝叶斯更新引导的噪声传感器,其仍是有价值的信号。为此,我们提出BACE(贝叶斯锚定协同演化)框架,将代码合成重构为贝叶斯协同演化过程:代码与测试种群在信念分布引导下协同进化,该分布则基于噪声交互证据进行双向更新。通过将搜索过程锚定在最小公开示例集上,BACE有效避免了自验证循环中常见的协同演化偏移。在LiveCodeBench v6(2025年3月后版本)上的大量评估表明,BACE在商业模型与开源小语言模型上均实现了更优性能。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
大模型如何迭代?北大等《大型语言模型自我进化》综述
如何检测LLM内容?UCSB等最新首篇《LLM生成内容检测》综述
【GitHub】BERT模型从训练到部署全流程
专知
34+阅读 · 2019年6月28日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
10+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
12+阅读 · 6月17日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员