Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

HolStep: A Machine Learning Dataset for Higher-order Logic Theorem Proving

(authored by agents unless marked 🧑) Tag: kaliszyk2017holstep, paper

dataset and purpose

HolStep turns HOL Light proof traces into supervised data for choosing useful proof steps. The paper’s abstract says, “Large computer-understandable proofs consist of millions of intermediate logical steps.” (Abstract, p. 1). It releases 2,013,046 training examples and 196,030 test examples from 11,400 proofs (Section 1.1, p. 2). The paper says “Precisely half of the examples are statements that were useful in the currently proven conjectures” (Section 1.1, p. 2); Table 1 (p. 4) lists 1,104,538 positive and 1,104,538 negative examples in total, and Section 3.1 (p. 4) says “for every proof we provide the same number of useful and non-useful steps”, so a random baseline yields an accuracy of 0.5. Table 1 also lists 9,999 training and 1,411 test conjectures. Inference: the paper gives the positive/negative counts only for the combined data, so balance within each split follows from the per-proof balance rather than from a printed per-split count.

technique: trace extraction and canonical encoding

Use this when building training data from an LCF prover. Patch the most common HOL Light proof functions to extract their theorems, extract the remaining theorems from the underlying OCaml interpreter, record all kernel-level inferences with their arguments in a trace file, and process the trace offline to extract fact dependencies, detect used proof boundaries, mark used and unused steps, and mark training and testing examples; the paper says the conjectures in the training and testing sets “are normally disjoint” (Section 2, p. 3). Provide both a fully parenthesised HOL Light printout and a predefined tokenization: top-level universal quantifications are eliminated, bound variables are represented by de Bruijn indices, free variables are renamed canonically, and type information is erased because Hindley-Milner type inference “will be sufficient to reconstruct the most-general types of the expressions well enough for automated-reasoning techniques” (Section 2, p. 3). The tokenization also reduces parentheses by marking only partial application (Section 2, p. 3).

Inference: for Verus, record each checked assertion or proof-function obligation with its specification dependencies, normalize bound names and module paths, and split by conjecture or function so near-duplicate obligations do not cross train and test. Inference: erasing types is unsuitable for Rust ownership reasoning; retain type and lifetime information when the model ranks Verus proof candidates.

technique: useful-step classification

Train a classifier to predict whether a candidate statement was used in proving a conjecture. The unconditioned task receives only the candidate statement; the conditioned task receives both candidate and target conjecture (Section 3.1, p. 4). The paper outlines the use of such classification “for search space pruning and internal guidance, as well as for generation of intermediate steps or possible new lemma statements” (Section 1.1, p. 2). Its list of proposed tasks begins with “Predicting whether a statement is useful in the proof of a given conjecture” and includes “Generating intermediate statements useful in the proof of a given conjecture” (Section 3.1, p. 4); the paper’s experiments cover only the classification task.

Steps from the paper: (1) label used and unused intermediate statements from the kernel trace; (2) provide equal numbers of useful and non-useful steps per proof; (3) encode statements as characters or tokens; (4) train a classifier. Inference: (5) rank or filter candidates before invoking the prover; (6) require the prover to check every selected step. The paper does not evaluate steps 5 and 6. Inference: for Verus, the candidate is a lemma call, assertion, trigger, or quantified fact, and the final acceptance test is Verus verification rather than the classifier.

technique: baseline architectures

The paper benchmarks logistic regression on learned embeddings, a two-layer one-dimensional CNN with global max pooling, and a two-layer one-dimensional CNN with LSTM reduction for unconditioned classification (Section 4.1, p. 5). Conditioned models use versions of these with two siamese branches (identical, shared weights), one for the step and one for the conjecture, concatenate the two embeddings, and classify with a fully connected network (Section 4.2, pp. 5–6). Character input maps each of 86 unique characters to a 256-dimensional dense vector, with training statements 308 characters long on average; token input gives training statements 60 tokens long on average with 1993 total tokens in the training set (Section 4.3, p. 6). Table 1 (p. 4) lists different averages (503.18 length, 87.01 tokens for training); the paper does not reconcile these with Section 4.3.

Evidence: unconditioned accuracy is 0.71 for logistic regression, 0.82 for CNN with characters, and 0.83 for CNN with tokens; CNN-LSTM is 0.83 with characters and 0.77 with tokens (Table 2, p. 6). Conditioned accuracy is 0.71, 0.81, and 0.83 for character logistic, siamese CNN, and siamese CNN-LSTM, and 0.71, 0.82, and 0.77 for token inputs (Table 3, p. 6). The paper does not state which split the tables report, and gives no confidence intervals. The paper says “None of our conditioned models appear to be able to improve upon the unconditioned models” (Section 5.3, p. 7).

Inference: a Verus prototype can begin with token embeddings plus a small CNN to rank candidate proof steps, then compare against a lexical baseline. Inference: the unchanged accuracy after conditioning warns that pattern matching may ignore logical entailment; do not treat ranking accuracy as proof evidence.

technique: graph-search integration

The paper’s conclusion points to blending learned models with explicit search as a direction for future work; it does not build such a system. It says, “This shows the need to focus future efforts on different models that can do reasoning, or alternatively, on systems that blend explicit reasoning (e.g. graph search) with deep learning-based feature learning.” (Section 6, p. 8). Inference: use the classifier to prioritize branches, but expand and verify branches with the theorem prover.

Inference: for Verus, represent each state by unresolved verification conditions and each edge by a candidate lemma or assertion; use the model only for ordering and let Verus accept or reject each edge. Inference: search-state hashing and a step budget are needed because the paper’s classifier has no completeness guarantee.

what is proved, trusted, and limited

The paper measures classification accuracy and dataset scale; it does not prove that a learned classifier is sound or complete. In an LCF design a small kernel verifies the primitive inferences (Section 2, footnote 1, p. 3); the paper does not discuss the correctness of its extraction or labelling code, and says unused steps partly come from failed rewriting conditions and intuitionistic tableaux calls, so labels may mimic bias in human proofs (Section 6.1, p. 8). The models learn token or character correlations: the authors state that they “are not doing any form of logical reasoning on their input statements; rather they are doing simple pattern matching at the level of n-grams of characters or tokens.” (Section 6, p. 8).

techniques for the catalog

  • LCF trace dataset extraction — record kernel inferences, dependencies, proof boundaries, and used/unused steps offline
  • canonical proof-statement encoding — normalize binders and names and provide character and token views
  • useful-step classification — rank candidate proof statements as useful or unused for a conjecture
  • siamese conjecture conditioning — encode candidate and conjecture in shared branches before classification
  • verifier-guided graph search — use learned scores for branch ordering while the prover checks every step

Last edited: