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

ImProver:基于代理的自动证明优化

ImProver: Agent-Based Automated Proof Optimization

Carnegie Mellon University(卡内基梅隆大学)

Riyaz Ahuja, Jeremy Avigad, Prasad Tetali, Sean Welleck

AI总结:

本文研究了自动证明优化问题,提出ImProver这一基于大语言模型的代理,用于重写证明以优化长度、可读性等任意标准,实验表明其能显著缩短证明并提高其模块化和可读性。

摘要:

大型语言模型(LLMs)已被用于在证明助手如Lean中生成数学定理的正式证明。然而,我们通常希望根据不同的下游用途优化正式证明,例如使其符合某种风格、易于阅读、简洁或模块化。适当优化的证明对于学习任务也非常重要,尤其是因为人工撰写的证明可能不适用于此目的。为此,我们研究了一个新的问题:自动证明优化,即重写证明以使其正确并优化任意标准,如长度或可读性。作为自动证明优化的一种初步方法,我们提出了ImProver,这是一个能够重写证明以优化任意用户定义指标的大型语言模型代理。我们发现直接应用LLMs进行证明优化效果有限,并在ImProver中引入了各种改进,例如新颖的链式状态技术中的符号Lean上下文使用,以及错误校正和检索。我们测试了ImProver在重写真实世界中的本科、竞赛和研究级数学定理方面的性能,发现ImProver能够重写证明使其显著更短、更模块化和更易读。

英文摘要:

Large language models (LLMs) have been used to generate formal proofs of mathematical theorems in proofs assistants such as Lean. However, we often want to optimize a formal proof with respect to various criteria, depending on its downstream use. For example, we may want a proof to adhere to a certain style, or to be readable, concise, or modularly structured. Having suitably optimized proofs is also important for learning tasks, especially since human-written proofs may not optimal for that purpose. To this end, we study a new problem of automated proof optimization: rewriting a proof so that it is correct and optimizes for an arbitrary criterion, such as length or readability. As a first method for automated proof optimization, we present ImProver, a large-language-model agent that rewrites proofs to optimize arbitrary user-defined metrics in Lean. We find that naively applying LLMs to proof optimization falls short, and we incorporate various improvements into ImProver, such as the use of symbolic Lean context in a novel Chain-of-States technique, as well as error-correction and retrieval. We test ImProver on rewriting real-world undergraduate, competition, and research-level mathematics theorems, finding that ImProver is capable of rewriting proofs so that they are substantially shorter, more modular, and more readable.

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

↑