arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.04910cs.SE
收藏

通过扩大种子训练集来降低Rust系统证明合成的成本

Reducing the Costs of Proof Synthesis on Rust Systems by Scaling Up a Seed Training Set

Microsoft Research(微软研究院);State Key Laboratory of Novel Software Technology, Nanjing University(南京大学软件新技术国家重点实验室);School of Computer Science, Nanjing University(南京大学计算机学院)

Nongyu Di, Tianyu Chen, Shan Lu, Shuai Lu, Yeyun Gong, Peng Cheng, Jacob R. Lorch, Yuan Yao, Xiaoxing Ma

AI总结:

本文提出VeruSyn数据合成管道,通过自合成和教程合成扩大Verus验证工具的数据集,生成690万Rust程序及其形式化规格证明,提升代码生成模型的性价比和性能。

摘要:

大型语言模型(LLMs)广泛用于代码生成,但生成代码的正确性仍存疑。通过让LLMs生成形式化正确性证明可缓解此问题,但代码证明生成需要更高推理能力且数据较少。本文提出VeruSyn数据合成管道,用于Verus验证工具,通过自合成和教程合成扩大数据集规模和覆盖范围,并补充长链推理(CoT)数据。生成690万Rust程序及其形式化规格证明的数据集,用于训练细调Qwen2.5-Coder-32B-Instruct模型,其成本-正确性权衡优于商业模型如Claude Sonnet 4.5,并显著优于o4-mini和先前研究模型。

英文摘要:

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.

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

↑