[论文解读] Graph2Tac: Online Representation Learning of Formal Math Concepts
本文推出 Graph2Tac,一种用于 Coq 定义的在线表示学习的图神经网络,在离线基线的基础上实现了 1.5x–1.72x 的提升,并且与在线 k-NN 互补,从而在未见领域的定理证明中提高性能。
In proof assistants, the physical proximity between two formal mathematical concepts is a strong predictor of their mutual relevance. Furthermore, lemmas with close proximity regularly exhibit similar proof structures. We show that this locality property can be exploited through online learning techniques to obtain solving agents that far surpass offline learners when asked to prove theorems in an unseen mathematical setting. We extensively benchmark two such online solvers implemented in the Tactician platform for the Coq proof assistant: First, Tactician's online $k$-nearest neighbor solver, which can learn from recent proofs, shows a $1.72 imes$ improvement in theorems proved over an offline equivalent. Second, we introduce a graph neural network, Graph2Tac, with a novel approach to build hierarchical representations for new definitions. Graph2Tac's online definition task realizes a $1.5 imes$ improvement in theorems solved over an offline baseline. The $k$-NN and Graph2Tac solvers rely on orthogonal online data, making them highly complementary. Their combination improves $1.27 imes$ over their individual performances. Both solvers outperform all other general-purpose provers for Coq, including CoqHammer, Proverbot9001, and a transformer baseline by at least $1.48 imes$ and are available for practical use by end-users.
研究动机与目标
- 证明在线信息相较于离线学习能提升 Coq 的自动证明能力。
- 开发 Graph2Tac,生成对已知与未知定义都具有层次化、面向定义的嵌入。
- 以在线 k-NN 等基线对 Graph2Tac 进行基准比较,以评估在新数学域中的定理证明改进。
提出的方法
- 将 Coq 知识表示为定义和证明状态之间的大型互联单一图。
- 引入一个层次化的定义嵌入神经网络,通过它们的图计算新定义的嵌入。
- 用双任务目标训练图神经网络:定义嵌入任务和证明状态/策略预测任务。
- 使用带门控消息传递的 GNN,8跳以生成节点嵌入;汇聚为图嵌入;通过 MLP 和基于 RNN 的解码器预测 tactics 和 tactic arguments。
- 在推理阶段,对新定义进行拓扑计算嵌入,并使用束搜索解码来预测 tactics(束宽 256)。
- 与在线 k-NN 与基线(CoqHammer、transformer 等)进行比较,并分析互补优势。
实验结果
研究问题
- RQ1在线定义嵌入能否在未见的 Coq 包中相较于离线学习提升定理证明吗?
- RQ2Graph2Tac 的层次化定义表示如何影响对 tactics 及其参数的预测?
- RQ3将 Graph2Tac 与在线 k-NN 相结合对整体证明性能有何影响?
- RQ4Graph2Tac 相较于 CoqHammer、Proverbot9001、transformer 等基线在未见域上的表现如何?
- RQ5在线学习自新定义和证明在现实世界的 Coq 库中在多大程度上提升了证明成功率?
主要发现
- 在线 k-NN 的定理证明数量比等效离线方法多 1.72x(25.8% vs 15.0%)。
- Graph2Tac 的定义嵌入任务将离线基线的性能从 17.4% 提升到 26.1%(1.5x)。
- Graph2Tac 与在线 k-NN 是互补的,两者结合比任意单独使用多解 1.27x 的定理。
- Graph2Tac 与 k-NN 在所有其他通用 Coq 证明器(包括 CoqHammer、Proverbot9001、ASTactic、TacTok、Passport)之上至少领先 1.48x。
- Graph2Tac 是第一个通过与 Tactician 平台集成,方便供 Coq 最终用户使用的神经网络模型。
- 在所有评估中,Graph2Tac 与 k-NN 一起证明了测试集的显著份额(33.2%)。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。