Large Language Models (LLMs) are widely used for code generation. However, the correctness of code generated by LLMs remains a concern. A potential remedy to this concern is to have LLMs generate formal correctness proofs along with such code. However, compared with code generation, code-proof generation requires much higher reasoning capability and has much less existing data to learn from. In this paper, we present VeruSyn, a data synthesis pipeline for Verus, a state-of-the-art verification tool for system software written in Rust. Through self-synthesis and tutorial-based synthesis, VeruSyn achieves much larger scale and Verus-feature coverage than previous data-synthesis techniques designed for Verus; VeruSyn also supplements its dataset with long-chain-of-thought (CoT) data through agent trajectory synthesis. With VeruSyn, we synthesize the largest set of Verus verified programs: 6.9 million Rust programs, each with a formal specification and a proof that it meets that specification. This dataset lets us create a fine-tuned Qwen2.5-Coder-32B-Instruct model with appealing cost-proof tradeoff compared with state-of-the-art commercial models like Claude Sonnet 4.5. It also significantly outperforms models like o4-mini and previously proposed research models.


翻译:大型语言模型(LLMs)在代码生成领域已得到广泛应用,但其生成代码的正确性仍存在隐忧。一种潜在的解决方案是让LLMs在生成代码的同时生成形式化正确性证明。然而,与代码生成相比,代码-证明生成需要更强的推理能力,且现有可供学习的数据量极为有限。本文提出VeruSyn——一个面向Verus(当前最先进的Rust系统软件验证工具)的数据合成流程。通过自合成与基于教程的合成方法,VeruSyn在数据规模和Verus功能覆盖范围上均远超先前针对Verus设计的数据合成技术;同时,VeruSyn还通过智能体轨迹合成技术生成长链思维(CoT)数据以扩充数据集。借助VeruSyn,我们合成了规模最大的Verus验证程序集:包含690万个Rust程序,每个程序均配有形式化规范及其符合该规范的证明。基于该数据集,我们微调得到了Qwen2.5-Coder-32B-Instruct模型,与Claude Sonnet 4.5等前沿商业模型相比,该模型在成本与证明能力间展现出更优的平衡性,其性能也显著超越o4-mini等模型及先前提出的研究模型。

0
下载
关闭预览

相关内容

大语言模型中的检索与结构化增强生成综述
专知会员服务
34+阅读 · 2025年9月17日
什么是后训练?大语言模型训练后优化方法综述,87页pdf
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
《大语言模型的数据合成与增强综述》
专知会员服务
44+阅读 · 2024年10月19日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
最新论文解读 | 基于预训练自然语言生成的文本摘要方法
微软研究院AI头条
57+阅读 · 2019年3月19日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《国防领域敏感性分析白皮书》
专知会员服务
0+阅读 · 今天3:42
综述 | 从问答到任务完成:Agent系统与Harness设计
Agentic RL:框架、实践与长程智能体训练
专知会员服务
2+阅读 · 6月24日
重新思考无人机时代的生存能力
专知会员服务
6+阅读 · 6月24日
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
5+阅读 · 6月24日
在人工智能加速决策环境中拓展OODA循环
专知会员服务
6+阅读 · 6月24日
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
5+阅读 · 6月24日
综述 | 世界动作模型:少做梦,多行动
专知会员服务
7+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
12+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
5+阅读 · 6月23日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员