arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.05252cs.SEcs.AIcs.LO
收藏

从科学文本到可验证代码:使用 Transformer 自动化该过程

From Scientific Texts to Verifiable Code: Automating the Process with Transformers

KTH Royal Institute of Technology(瑞典皇家理工学院)

Changjie Wang, Mariano Scazzariello, Marco Chiesa

AI总结:

本文提出利用大型语言模型中的 Transformer 阅读含形式化证明的科学论文,构建证明结构并补全低层细节,以自动生成可验证代码、降低验证门槛。

摘要:

尽管有大量研究文献提出了具有形式化保证的算法,但当今系统中的可验证代码数量仍然很少。这种差异源于代码验证的内在困难,尤其是形式化验证工具所需的证明细节既耗时又具有严格的形式化要求。然而,大型语言模型中 Transformer 的出现为应对这一挑战提供了一种有前景的解决方案。在这篇立场论文中,我们认为 Transformer 有潜力阅读那些提出带形式化证明的算法的研究论文,并将这些证明转化为可验证代码。我们利用 Transformer,首先使用论文中的原始文本构建证明的形式化结构,然后处理人类常常省略的、繁琐的低层证明内容。我们认为,这种方法可以显著降低形式化验证的门槛。上述通过阅读论文来编写可验证代码的想法,为自动化复杂系统验证开辟了新途径,使未来来自学术研究的经形式化验证的算法能够更无缝地转化为现实世界的软件系统,从而提高代码的可靠性和安全性。

英文摘要:

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.

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

↑