Enhancing ENIGMA Given Clause Guidance uv 1 Josef Urban 1 Jan Jakub - - PowerPoint PPT Presentation

enhancing enigma given clause guidance
SMART_READER_LITE
LIVE PREVIEW

Enhancing ENIGMA Given Clause Guidance uv 1 Josef Urban 1 Jan Jakub - - PowerPoint PPT Presentation

Enhancing ENIGMA Given Clause Guidance uv 1 Josef Urban 1 Jan Jakub AITP18, Aussois, 29th March 2018 1 Czech Technical University in Prague Jan Jakub uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 1 / 29 Outline ATPs &


slide-1
SLIDE 1

Enhancing ENIGMA Given Clause Guidance

Jan Jakub˚ uv1 Josef Urban1 AITP’18, Aussois, 29th March 2018

1Czech Technical University in Prague Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 1 / 29

slide-2
SLIDE 2

Outline

ATPs & Given Clauses Enigma Models Enhanced Features Experiments with Boosting & Looping

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 2 / 29

slide-3
SLIDE 3

Outline

ATPs & Given Clauses Enigma Models Enhanced Features Experiments with Boosting & Looping

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 3 / 29

slide-4
SLIDE 4

Given Clause Loop Paradigm

Problem representation

  • first order clauses (ex. “x “ 0 _ Ppf px, xqq”)
  • posed for proof by contradiction

Given an initial set C of clauses and a set of inference rules, find a derivation of the empty clause (for example, by the resolution of clauses with conflicting literals L and L).

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 4 / 29

slide-5
SLIDE 5

Basic Loop

Proc = {} Unproc = all available clauses while (no proof found) { select a given clause C from Unproc move C from Unproc to Proc apply inference rules to C and Proc put inferred clauses to Unproc }

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 5 / 29

slide-6
SLIDE 6

Clause Selection Heuristics in E Prover

  • E Prover has several pre-defined clause weight functions.

(and others can be easily implemented)

  • Each weight function assigns a real number to a clause.
  • Clause with the smallest weight is selected.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 6 / 29

slide-7
SLIDE 7

E Prover Strategy

  • E strategy = E parameters influencing proof search

(term ordering, literal selection, clause splitting, . . . )

  • Weight functions to guide given clause selection.
  • Several clause weight functions can be combined together:

(10 * ClauseWeight1(10,0.1,...), 1 * ClauseWeight2(...), 20 * ClauseWeight3(...))

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 7 / 29

slide-8
SLIDE 8

Outline

ATPs & Given Clauses Enigma Models Enhanced Features Experiments with Boosting & Looping

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 8 / 29

slide-9
SLIDE 9

Enigma Basics

  • Idea: Use fast linear classifier to guide given clause selection!
  • ENIGMA stands for. . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 9 / 29

slide-10
SLIDE 10

Enigma Basics

  • Idea: Use fast linear classifier to guide given clause selection!
  • ENIGMA stands for. . .

Efficient learNing-based Inference Guiding MAchine

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 9 / 29

slide-11
SLIDE 11

LIBLINEAR: Linear Classifier

  • LIBLINEAR: open source library1
  • input: positive and negative examples (float vectors)
  • output: model („ a vector of weights)
  • evaluation of a generic vector: dot product with the model

1http://www.csie.ntu.edu.tw/~cjlin/liblinear/ Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 10 / 29

slide-12
SLIDE 12

Clauses as Feature Vectors

Consider the literal as a tree and simplify (sign, vars, skolems). “ f x y g sko1 sko2 x Ñ ‘ “ f f f g d d f

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 11 / 29

slide-13
SLIDE 13

Clauses as Feature Vectors

Features are descending paths of length 3 (triples of symbols). “ f x y g sko1 sko2 x Ñ ‘ “ f f f g d d f

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 11 / 29

slide-14
SLIDE 14

Clauses as Feature Vectors

Collect and enumerate all the features. Count the clause features. ‘ “ f f f g d d f # feature count 1 (‘,=,a) . . . . . . . . . 11 (‘,=,f) 1 12 (‘,=,g) 1 13 (=,f,f) 2 14 (=,g,d) 2 15 (g,d,f) 1 . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 12 / 29

slide-15
SLIDE 15

Clauses as Feature Vectors

Take the counts as a feature vector. ‘ “ f f f g d d f # feature count 1 (‘,=,a) . . . . . . . . . 11 (‘,=,f) 1 12 (‘,=,g) 1 13 (=,f,f) 2 14 (=,g,d) 2 15 (g,d,f) 1 . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 12 / 29

slide-16
SLIDE 16

Enigma Model Construction

  • 1. Collect training examples from E runs (useful/useless clauses).
  • 2. Enumerate all the features (π :: feature Ñ int).
  • 3. Translate clauses to feature vectors.
  • 4. Train a LIBLINEAR classifier (w :: float|dompπq|).
  • 5. Enigma model is E “ pπ, wq.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 13 / 29

slide-17
SLIDE 17

Given Clause Selection by Enigma

We have Enigma model E “ pπ, wq and a generated clause C.

  • 1. Translate C to feature vector ΦC using π.
  • 2. Compute prediction:

weight0pCq “ $ & % 1 iff w ¨ ΦC ą 0 10

  • therwise
  • 3. Combine prediction with clause length:

weightpCq “ weight0pCq ` δ ˚ |C|

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 14 / 29

slide-18
SLIDE 18

Enigma Given Clause Selection

  • We have implemented Enigma weight function in E.
  • Enigma model can be used alone to select a given clause:

(1 * Enigma(E,δ))

  • or in combination with other E weight functions:

(23 * Enigma(E,δ), 3 * StandardWeight(...), 20 * StephanWeight(...))

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 15 / 29

slide-19
SLIDE 19

Outline

ATPs & Given Clauses Enigma Models Enhanced Features Experiments with Boosting & Looping

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 16 / 29

slide-20
SLIDE 20

Conjecture Features

  • Enigma classifier E is independent on the goal conjecture!
  • Improvement: Extend ΦC with goal conjecture features.
  • Instead of vector ΦC take vector pΦC, ΦGq.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 17 / 29

slide-21
SLIDE 21

Conjecture Features and Prediction Rates (%)

AIM train accuracy 10-fold cross-val data noconj conj noconj conj simple 84.7 84.6 84.6 84.5 50-50 76.3 78.0 76.3 77.8 MZR train accuracy 10-fold cross-val data noconj conj noconj conj simple 92.2 95.0 90.8 93.9 50-50 89.2 91.9 88.8 91.5

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 18 / 29

slide-22
SLIDE 22

Horizontal Features

Function applications and arguments top-level symbols. ‘ “ f f f g d d f # feature count 1 (‘,=,a) . . . . . . . . . 100 “ pf , gq 1 101 f pf, fq 1 102 gpd, dq 1 103 dpfq 1 . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 19 / 29

slide-23
SLIDE 23

Static Clause Features

For a clause, its length and the number of pos./neg. literals. ‘ “ f f f g d d f # feature count/val 103 dpfq 1 . . . . . . . . . 200 len 9 201 pos 1 202 neg . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 20 / 29

slide-24
SLIDE 24

Static Symbol Features

For each symbol, its count and maximum depth. ‘ “ f f f g d d f # feature count/val 202 neg . . . . . . . . . 300 #‘pf q 1 301 #apf q . . . . . . . . . 310 %‘pfq 4 311 %apfq . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 21 / 29

slide-25
SLIDE 25

Static Symbol Features

For each symbol, its count and maximum depth. ‘ “ f f f g d d f # feature count/val 202 neg . . . . . . . . . 300 #‘pf q 1 301 #apf q . . . . . . . . . 310 %‘pfq 4 311 %apfq . . . . . . . . .

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 21 / 29

slide-26
SLIDE 26

Outline

ATPs & Given Clauses Enigma Models Enhanced Features Experiments with Boosting & Looping

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 22 / 29

slide-27
SLIDE 27

Boosting

  • Training data are uneven.
  • Usually we have more negative examples (cca 10 times).
  • Previously: Repeat positive examples 10 times.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 23 / 29

slide-28
SLIDE 28

Smarter Boosting

  • 1. Collect training data.
  • 2. Create classifier E “ pπ, wq.
  • 3. Compute prediction accuracy on the training data (using w).
  • 4. If pacc` ą acc´q then finish.
  • 5. Repeat misclassified positive clauses in the training data.
  • 6. Goto 2.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 24 / 29

slide-29
SLIDE 29

Looping

  • 1. Run E prover with strategy S on problems P.
  • 2. Collect/extend training data.
  • 3. Create classifier E “ pπ, wq from the training data.
  • 4. Construct strategies S0

E and SE.

  • 5. Evaluate S0

E and SE on problems P.

  • 6. Goto 2.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 25 / 29

slide-30
SLIDE 30

Experiments with Clustering

  • MPTP benchmarks (2079 problems from Mizar).
  • 10 E Prover strategies from auto mode (autos).
  • Problems are clustered into 33 articles/categories.
  • We train Enigma separately on all articles (for each S).
  • We take best-performing strategies on each article.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 26 / 29

slide-31
SLIDE 31

Best Enigma Models per Article

article total best best Enigma+ autos Enigma compts 23 7 7 +0.0% enumset1 96 86 86 +0.0% pre 37 21 22 +4.8% relset 32 20 22 +10.0% funct 235 160 185 +15.6% filter 65 6 7 +16.7%

  • rders

61 28 36 +28.6% wellord1 59 27 35 +29.6% waybel 174 42 74 +76.2%

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 27 / 29

slide-32
SLIDE 32

Total Portfolio Improvement on MPTP

portfolio solved autos% autos+ autos- E (auto-schedule) 1343

  • 3.8%

+25

  • 79

autos (10) 1397 +0% +0

Enigmas (62) 1450 +3.7% +103

  • 50

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 28 / 29

slide-33
SLIDE 33

Thank you.

Jan Jakub˚ uv, Josef Urban Enhancing ENIGMA Given Clause Guidance 29 / 29