Skip to main content
QUICK REVIEW

[Paper Review] Graph2Tac: Online Representation Learning of Formal Math Concepts

Lasse Blaauwbroek, Miroslav Olšák|arXiv (Cornell University)|Jan 5, 2024
Topic ModelingComputer Science5 citations
TL;DR

The paper introduces Graph2Tac, a graph neural network for online representation learning of Coq definitions, achieving a 1.5x–1.72x improvement over offline baselines and complementing online k-NN for improved theorem proving in unseen domains.

ABSTRACT

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.

Motivation & Objective

  • Demonstrate that online information improves automated proving in Coq compared to offline learning.
  • Develop Graph2Tac to generate hierarchical, definition-aware embeddings for both seen and unseen definitions.
  • Benchmark Graph2Tac against online k-NN and other baselines to assess improvements in proving theorems in new mathematical domains.

Proposed method

  • Represent Coq knowledge as a large interconnected mono-graph of definitions and proof states.
  • Introduce a hierarchical definition embedding neural network that computes embeddings for new definitions from their graphs.
  • Train a graph neural network with a two-task objective: a definition embedding task and a proof-state/tactic prediction task.
  • Use a gated message-passing GNN with 8 hops to produce node embeddings; pool to graph embeddings; predict tactics and tactic arguments via MLPs and an RNN-based decoder.
  • During inference, compute embeddings for new definitions topologically, and predict tactics with beam search decoding (beam width 256).
  • Compare with online k-NN and baselines (CoqHammer, transformer, etc.) and analyze complementary strengths.

Experimental results

Research questions

  • RQ1Can online definition embeddings improve theorem proving on unseen Coq packages compared to offline learners?
  • RQ2How does Graph2Tac's hierarchical definition representation affect the prediction of tactics and their arguments?
  • RQ3What is the impact of combining Graph2Tac with online k-NN on overall proving performance?
  • RQ4How does Graph2Tac perform relative to CoqHammer, Proverbot9001, and transformer baselines on unseen domains?
  • RQ5To what extent does online learning from new definitions and proofs enhance proving success in real-world Coq libraries?

Key findings

  • Online k-NN yields 1.72x more theorems proved than an offline equivalent (25.8% vs 15.0%).
  • Graph2Tac's definition embedding task improves performance from 17.4% to 26.1% (1.5x) over an offline baseline.
  • Graph2Tac and online k-NN are complementary, with their combination solving 1.27x more theorems than either alone.
  • Both Graph2Tac and k-NN outperform all other general-purpose Coq provers (including CoqHammer, Proverbot9001, ASTactic, TacTok, Passport) by at least 1.48x.
  • Graph2Tac is the first neural network model conveniently available to Coq end-users via integration with the Tactician platform.
  • Across evaluations, Graph2Tac and k-NN together prove a substantial share of the test set (33.2%).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.