Improving the code generation capabilities of large language models (LLMs) typically relies on supervised fine-tuning or preference optimization, both of which require costly external resources such as powerful teacher models or reliable test units. However, in real-world scenarios, it is much harder to obtain reference solutions and test oracles than problem descriptions and test inputs. In this paper, we tackle a challenging yet realistic question: Can a code language model improve itself without access to a superior teacher and a test oracle? To answer this, we propose ConSelf, a self-improving approach built upon two key ideas. First, we introduce code semantic entropy, a novel metric that measures problem-level uncertainty by assessing the functional diversity of program behaviors, enabling a curriculum construction with the most learnable problems. Second, we present consensus-driven direct preference optimization (Con-DPO), a preference-based fine-tuning method that weights each preference pair by its behavioral consensus, thereby mitigating the impact of noisy self-generated supervision. Experiments on various benchmarks and backbone LLMs demonstrate that ConSelf significantly outperforms baselines, validating the effectiveness of semantic entropy-based curriculum construction and consensus-driven optimization in improving code generation without external supervision.


翻译:提升大语言模型代码生成能力通常依赖监督微调或偏好优化,两者均需昂贵的外部资源(如强大的教师模型或可靠的测试单元)。然而在真实场景中,获取参考解决方案和测试预言远比获取问题描述和测试输入困难。本文探讨一个具有挑战性的现实问题:在缺乏优秀教师模型与测试预言的情况下,代码语言模型能否实现自我改进?为此,我们提出ConSelf自改进方法,其核心基于两个关键思想:首先,引入代码语义熵这一新颖度量,通过评估程序行为的功能多样性衡量问题级不确定性,从而构建包含最具学习价值问题的课程体系;其次,提出共识驱动的直接偏好优化(Con-DPO)方法,该偏好微调方法根据行为一致性对偏好对加权,有效缓解自生成噪声监督的影响。在多个基准测试和骨干大语言模型上的实验表明,ConSelf显著优于基线方法,验证了基于语义熵的课程构建与共识驱动优化在无外部监督提升代码生成能力中的有效性。

0
下载
关闭预览

相关内容

大语言模型的自改进机制:技术综述与未来展望
专知会员服务
17+阅读 · 4月18日
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
大模型如何迭代?北大等《大型语言模型自我进化》综述
专知会员服务
16+阅读 · 2021年1月23日
最新论文解读 | 基于预训练自然语言生成的文本摘要方法
微软研究院AI头条
57+阅读 · 2019年3月19日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
【论文笔记】ICLR 2018 Wasserstein自编码器
专知
32+阅读 · 2018年6月29日
谷歌推出新型数据增强算法:AutoAugment
论智
20+阅读 · 2018年6月6日
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2013年12月31日
Arxiv
0+阅读 · 3月31日
VIP会员
相关主题
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 今天14:45
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 今天14:43
美以伊冲突:无人机与人工智能的运用
专知会员服务
3+阅读 · 今天14:31
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员