用大模型把论文里的算法证明自动转成可验证代码
From Scientific Texts to Verifiable Code: Automating the Process with Transformers
- 用Transformer解析论文中的形式化证明,构建代码生成的逻辑结构
- 自动补全人类省略的低层证明细节,降低形式化验证门槛
- 适合关注形式化验证与自动化代码生成的研究者
尽管大量科研文献提出了具有形式保证的算法,但当前系统中可验证的代码仍极为有限。这一差距源于形式化验证的高成本:证明过程耗时且要求严格的形式规范。本文提出,利用大型语言模型中的Transformer架构,读取包含形式化证明的论文,将其中的推理过程转化为可验证代码。我们通过Transformer首先从论文原文中构建证明的形式化结构,再自动处理人类常省略的底层证明细节。该方法有望显著降低形式化验证的难度,推动学术研究中的形式化算法更顺畅地进入真实软件系统,从而提升代码的可靠性与安全性。
原文摘要 · Abstract (English)
Despite the vast body of research literature proposing algorithms with formal guarantees, the amount of verifiable code in today's systems remains minimal. This discrepancy stems from the inherent difficulty of verifying code, particularly due to the time-consuming nature and strict formalism of proof details that formal verification tools require. However, the emergence of transformers in Large Language Models presents a promising solution to this challenge. In this position paper, we believe that transformers have the potential to read research papers that propose algorithms with formal proofs and translate these proofs into verifiable code. We leverage transformers to first build a formal structure of the proof using the original text from the paper, and then to handle the tedious, low-level aspects of proofs that are often omitted by humans. We argue that this approach can significantly reduce the barrier to formal verification. The above idea of reading papers to write verifiable code opens new avenues for automating the verification of complex systems, enabling a future where formally verified algorithms from academic research can more seamlessly transition into real-world software systems, thereby improving code reliability and security.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。