GPU-accelerated End-to-end Differentiable Planning and Reasoning - - PowerPoint PPT Presentation

gpu accelerated end to end differentiable planning and
SMART_READER_LITE
LIVE PREVIEW

GPU-accelerated End-to-end Differentiable Planning and Reasoning - - PowerPoint PPT Presentation

GPU-accelerated End-to-end Differentiable Planning and Reasoning Tim Rockt aschel Whiteson Research Lab, University of Oxford http://rockt.github.com Twitter: @ rockt tim.rocktaschel@cs.ox.ac.uk Talk at GTC Europe, ID 23372 12th of


slide-1
SLIDE 1

GPU-accelerated End-to-end Differentiable Planning and Reasoning

Tim Rockt¨ aschel

Whiteson Research Lab, University of Oxford http://rockt.github.com Twitter: @ rockt tim.rocktaschel@cs.ox.ac.uk

Talk at GTC Europe, ID 23372 12th of October 2017

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8
slide-9
SLIDE 9

XKCD, 17th May 2017

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 2/39

slide-10
SLIDE 10

XKCD, 17th May 2017

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 2/39

slide-11
SLIDE 11

XKCD, 17th May 2017

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Answers & Explanations

  • Rules
  • Programs
  • Natural Language
  • Plans

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 2/39

slide-12
SLIDE 12

XKCD, 17th May 2017

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Answers & Explanations

  • Rules
  • Programs
  • Natural Language
  • Plans

Answers & Explanations

  • Rules
  • Programs
  • Natural Language
  • Plans

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 2/39

slide-13
SLIDE 13

XKCD, 17th May 2017

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Data & Explanations

  • Rules
  • (Partial) Programs
  • Natural Language

Answers & Explanations

  • Rules
  • Programs
  • Natural Language
  • Plans

Answers & Explanations

  • Rules
  • Programs
  • Natural Language
  • Plans

Data Efficiency & Model Interpretability

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 2/39

slide-14
SLIDE 14

Joint work with

  • 1. End-to-end Differentiable Reasoning, Application: Knowledge Base Inference, NIPS 2017

Sebastian Riedel, University College London Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 3/39

slide-15
SLIDE 15

Joint work with

  • 1. End-to-end Differentiable Reasoning, Application: Knowledge Base Inference, NIPS 2017

Sebastian Riedel, University College London

  • 2. End-to-end Differentiable Planning, Application: Atari, work-in-progress

Gregory Farquhar Maximilian Igl Shimon Whiteson University of Oxford Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 3/39

slide-16
SLIDE 16

End-to-end Differentiable Reasoning

slide-17
SLIDE 17
slide-18
SLIDE 18
slide-19
SLIDE 19

Expert Systems

  • No/little training data
  • Interpretable
slide-20
SLIDE 20

Expert Systems

  • No/little training data
  • Interpretable
  • Behavior manually defined
  • No generalization
slide-21
SLIDE 21

Expert Systems

  • No/little training data
  • Interpretable
  • Behavior manually defined
  • No generalization
slide-22
SLIDE 22

Expert Systems

  • No/little training data
  • Interpretable
  • Behavior manually defined
  • No generalization

Representation Learning

  • Behavior learned
  • Strong generalization
slide-23
SLIDE 23

Expert Systems

  • No/little training data
  • Interpretable
  • Behavior manually defined
  • No generalization

Representation Learning

  • Behavior learned
  • Strong generalization
  • Lot of training data needed
  • Not interpretable
slide-24
SLIDE 24

Expert Systems

  • No/little training data
  • Interpretable

Representation Learning

  • Behavior learned
  • Strong generalization
slide-25
SLIDE 25
slide-26
SLIDE 26

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-27
SLIDE 27

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-28
SLIDE 28

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency Calculate gradient of proof success w.r.t. subsymbolic representations

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-29
SLIDE 29

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency Calculate gradient of proof success w.r.t. subsymbolic representations Rule application is explicit, but symbol comparison is neural

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-30
SLIDE 30

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency Calculate gradient of proof success w.r.t. subsymbolic representations Rule application is explicit, but symbol comparison is neural Use similarity between vector representations of symbols in proofs

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-31
SLIDE 31

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency Calculate gradient of proof success w.r.t. subsymbolic representations Rule application is explicit, but symbol comparison is neural Use similarity between vector representations of symbols in proofs Learn vector representations of symbols from data using gradient descent

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-32
SLIDE 32

Aims

Modular construction of neural networks for end-to-end differentiable reasoning in knowledge bases Incorporate background knowledge in form of rules ⇒ Data Efficiency Calculate gradient of proof success w.r.t. subsymbolic representations Rule application is explicit, but symbol comparison is neural Use similarity between vector representations of symbols in proofs Learn vector representations of symbols from data using gradient descent Induce interpretable logical rules from data by gradient descent ⇒ Model Interpretability

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 7/39

slide-33
SLIDE 33

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete!

Das et al. (2017) 8/39

slide-34
SLIDE 34

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people!

Das et al. (2017) 8/39

slide-35
SLIDE 35

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly

Das et al. (2017) 8/39

slide-36
SLIDE 36

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly Weak logical relationships that can be used for inferring facts

Das et al. (2017) 8/39

slide-37
SLIDE 37

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly Weak logical relationships that can be used for inferring facts melinda seattle livesIn?

Das et al. (2017) 8/39

slide-38
SLIDE 38

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly Weak logical relationships that can be used for inferring facts melinda bill spouseOf seattle livesIn?

Das et al. (2017) 8/39

slide-39
SLIDE 39

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly Weak logical relationships that can be used for inferring facts melinda bill spouseOf microsoft chairmanOf seattle livesIn?

Das et al. (2017) 8/39

slide-40
SLIDE 40

Task: Link Prediction

Real world knowledge bases (like Freebase, DBPedia, YAGO, etc.) are incomplete! placeOfBirth attribute is missing for 71% of people! Commonsense knowledge often not stated explicitly Weak logical relationships that can be used for inferring facts melinda bill spouseOf microsoft chairmanOf seattle headquarteredIn livesIn?

Das et al. (2017) 8/39

slide-41
SLIDE 41

Notation

Constant: homer, bart, lisa etc. (lowercase)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-42
SLIDE 42

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-43
SLIDE 43

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified) Term: constant or variable

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-44
SLIDE 44

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified) Term: constant or variable Predicate: fatherOf, parentOf etc. function from terms to a Boolean

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-45
SLIDE 45

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified) Term: constant or variable Predicate: fatherOf, parentOf etc. function from terms to a Boolean Atom: predicate and terms, e.g., parentOf(X, bart)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-46
SLIDE 46

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified) Term: constant or variable Predicate: fatherOf, parentOf etc. function from terms to a Boolean Atom: predicate and terms, e.g., parentOf(X, bart) Rule: head :– body. head: atom body: (possibly empty) list of atoms representing conjunction grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-47
SLIDE 47

Notation

Constant: homer, bart, lisa etc. (lowercase) Variable: X, Y etc. (uppercase, universally quantified) Term: constant or variable Predicate: fatherOf, parentOf etc. function from terms to a Boolean Atom: predicate and terms, e.g., parentOf(X, bart) Rule: head :– body. head: atom body: (possibly empty) list of atoms representing conjunction grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y). Fact: ground rule (no free variables) with empty body, e.g., parentOf(homer, bart).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 9/39

slide-48
SLIDE 48

Example Knowledge Base

1. fatherOf(abe, homer). 2. parentOf(homer, lisa). 3. parentOf(homer, bart). 4. grandpaOf(abe, lisa). 5. grandfatherOf(abe, maggie).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 10/39

slide-49
SLIDE 49

Example Knowledge Base

1. fatherOf(abe, homer). 2. parentOf(homer, lisa). 3. parentOf(homer, bart). 4. grandpaOf(abe, lisa). 5. grandfatherOf(abe, maggie). 6. grandfatherOf(X1, Y1) :– fatherOf(X1, Z1), parentOf(Z1, Y1). 7. grandparentOf(X2, Y2) :– grandfatherOf(X2, Y2).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 10/39

slide-50
SLIDE 50

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-51
SLIDE 51

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, bart)?

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-52
SLIDE 52

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, bart)? failure failure success {X/abe, Y/bart} 3.1 fatherOf(abe, Z)? 1 2 3

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-53
SLIDE 53

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, bart)? failure failure success {X/abe, Y/bart} 3.1 fatherOf(abe, Z)? 1 2 3 success {X/abe, Y/bart, Z/homer} 3.2 parentOf(homer, bart)? failure failure 1 2 3

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-54
SLIDE 54

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, bart)? failure failure success {X/abe, Y/bart} 3.1 fatherOf(abe, Z)? 1 2 3 success {X/abe, Y/bart, Z/homer} 3.2 parentOf(homer, bart)? failure failure 1 2 3 failure success {X/abe, Y/bart, Z/homer} failure 1 2 3

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-55
SLIDE 55

Prolog Backward Chaining Example

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, bart)? failure failure success {X/abe, Y/bart} 3.1 fatherOf(abe, Z)? 1 2 3 success {X/abe, Y/bart, Z/homer} 3.2 parentOf(homer, bart)? failure failure 1 2 3 failure success {X/abe, Y/bart, Z/homer} failure 1 2 3

What about grandpaOf(abe, bart)?

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 11/39

slide-56
SLIDE 56

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-57
SLIDE 57

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf No notion of similarity: apple ∼ orange, professorAt ∼ lecturerAt

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-58
SLIDE 58

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf No notion of similarity: apple ∼ orange, professorAt ∼ lecturerAt No generalization beyond what can be symbolically inferred: isFruit(apple), apple ∼ organge, isFruit(orange)?

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-59
SLIDE 59

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf No notion of similarity: apple ∼ orange, professorAt ∼ lecturerAt No generalization beyond what can be symbolically inferred: isFruit(apple), apple ∼ organge, isFruit(orange)? Hard to work with language, vision and other modalities ‘‘is a film based on the novel of the same name by’’(X, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-60
SLIDE 60

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf No notion of similarity: apple ∼ orange, professorAt ∼ lecturerAt No generalization beyond what can be symbolically inferred: isFruit(apple), apple ∼ organge, isFruit(orange)? Hard to work with language, vision and other modalities ‘‘is a film based on the novel of the same name by’’(X, Y) But... leads to powerful inference mechanisms and proofs for predictions: fatherOf(abe, homer). parentOf(homer, lisa). parentOf(homer, bart). grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, Q)? {Q/lisa}, {Q/bart}

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-61
SLIDE 61

Symbolic Representations

Symbols (constants and predicates) do not share any information: grandpaOf = grandfatherOf No notion of similarity: apple ∼ orange, professorAt ∼ lecturerAt No generalization beyond what can be symbolically inferred: isFruit(apple), apple ∼ organge, isFruit(orange)? Hard to work with language, vision and other modalities ‘‘is a film based on the novel of the same name by’’(X, Y) But... leads to powerful inference mechanisms and proofs for predictions: fatherOf(abe, homer). parentOf(homer, lisa). parentOf(homer, bart). grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y). grandfatherOf(abe, Q)? {Q/lisa}, {Q/bart} Fairly easy to debug and trivial to incorporate domain knowledge: Show to domain expert and let her change/add rules and facts

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 12/39

slide-62
SLIDE 62

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-63
SLIDE 63

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk Can capture similarity and even semantic hierarchy of symbols: vgrandpaOf = vgrandfatherOf, vapple ∼ vorange, vapple < vfruit

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-64
SLIDE 64

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk Can capture similarity and even semantic hierarchy of symbols: vgrandpaOf = vgrandfatherOf, vapple ∼ vorange, vapple < vfruit Can be trained from raw task data (e.g. facts in a knowledge base)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-65
SLIDE 65

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk Can capture similarity and even semantic hierarchy of symbols: vgrandpaOf = vgrandfatherOf, vapple ∼ vorange, vapple < vfruit Can be trained from raw task data (e.g. facts in a knowledge base) Can be compositional v‘‘is the father of’’ = RNNθ(vis, vthe, vfather, vof)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-66
SLIDE 66

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk Can capture similarity and even semantic hierarchy of symbols: vgrandpaOf = vgrandfatherOf, vapple ∼ vorange, vapple < vfruit Can be trained from raw task data (e.g. facts in a knowledge base) Can be compositional v‘‘is the father of’’ = RNNθ(vis, vthe, vfather, vof) But... need large amount of training data

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-67
SLIDE 67

Neural Representations

Lower-dimensional fixed-length vector representations of symbols (predicates and constants): vapple, vorange, vfatherOf, . . . ∈ Rk Can capture similarity and even semantic hierarchy of symbols: vgrandpaOf = vgrandfatherOf, vapple ∼ vorange, vapple < vfruit Can be trained from raw task data (e.g. facts in a knowledge base) Can be compositional v‘‘is the father of’’ = RNNθ(vis, vthe, vfather, vof) But... need large amount of training data No direct way of incorporating prior knowledge vgrandfatherOf(X, Y) :– vfatherOf(X, Z), vparentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 13/39

slide-68
SLIDE 68

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-69
SLIDE 69

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-70
SLIDE 70

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-71
SLIDE 71

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-72
SLIDE 72

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Plotkin (1970), Shapiro (1991), Muggleton (1991), De Raedt (1999) . . .

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-73
SLIDE 73

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Plotkin (1970), Shapiro (1991), Muggleton (1991), De Raedt (1999) . . . Statistical Predicate Invention (Kok and Domingos, 2007)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-74
SLIDE 74

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Plotkin (1970), Shapiro (1991), Muggleton (1991), De Raedt (1999) . . . Statistical Predicate Invention (Kok and Domingos, 2007)

Neural-symbolic Connectionism

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-75
SLIDE 75

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Plotkin (1970), Shapiro (1991), Muggleton (1991), De Raedt (1999) . . . Statistical Predicate Invention (Kok and Domingos, 2007)

Neural-symbolic Connectionism

Propositional rules: EBL-ANN (Shavlik and Towell, 1989), KBANN (Towell and Shavlik, 1994), C-LIP (Garcez and Zaverucha, 1999)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-76
SLIDE 76

Machine Learning & Logic

Fuzzy Logic (Zadeh, 1965) Probabilistic Logic Programming, e.g.,

IBAL (Pfeffer, 2001), BLOG (Milch et al., 2005), Markov Logic Networks (Richardson and Domingos, 2006), ProbLog (De Raedt et al., 2007) . . .

Inductive Logic Programming, e.g.,

Plotkin (1970), Shapiro (1991), Muggleton (1991), De Raedt (1999) . . . Statistical Predicate Invention (Kok and Domingos, 2007)

Neural-symbolic Connectionism

Propositional rules: EBL-ANN (Shavlik and Towell, 1989), KBANN (Towell and Shavlik, 1994), C-LIP (Garcez and Zaverucha, 1999) First-order inference (no training of symbol representations): Unification Neural Networks (Holld¨

  • bler, 1990; Komendantskaya 2011), SHRUTI

(Shastri, 1992), Neural Prolog (Ding, 1995), CLIP++ (Franca et al. 2014), Lifted Relational Networks (Sourek et al. 2015)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 14/39

slide-77
SLIDE 77

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-78
SLIDE 78

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle) DistMult (Yang et al., 2015) vs, vi, vj ∈ Rk

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-79
SLIDE 79

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle) DistMult (Yang et al., 2015) vs, vi, vj ∈ Rk

f (vs, vi, vj) = v⊤

s (vi ⊙ vj)

=

  • k

vskvikvjk

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-80
SLIDE 80

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle) DistMult (Yang et al., 2015) vs, vi, vj ∈ Rk

f (vs, vi, vj) = v⊤

s (vi ⊙ vj)

=

  • k

vskvikvjk

ComplEx (Trouillon et al., 2016) vs, vi, vj ∈ Ck

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-81
SLIDE 81

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle) DistMult (Yang et al., 2015) vs, vi, vj ∈ Rk

f (vs, vi, vj) = v⊤

s (vi ⊙ vj)

=

  • k

vskvikvjk

ComplEx (Trouillon et al., 2016) vs, vi, vj ∈ Ck

f (vs, vi, vj) = real(vs)⊤(real(vi) ⊙ real(vj)) + real(vs)⊤(imag(vi) ⊙ imag(vj)) + imag(vs)⊤(real(vi) ⊙ imag(vj)) − imag(vs)⊤(imag(vi) ⊙ real(vj))

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-82
SLIDE 82

State-of-the-art Neural Link Prediction

livesIn(melinda, seattle)? = f (vlivesIn, vmelinda, vseattle) DistMult (Yang et al., 2015) vs, vi, vj ∈ Rk

f (vs, vi, vj) = v⊤

s (vi ⊙ vj)

=

  • k

vskvikvjk

ComplEx (Trouillon et al., 2016) vs, vi, vj ∈ Ck

f (vs, vi, vj) = real(vs)⊤(real(vi) ⊙ real(vj)) + real(vs)⊤(imag(vi) ⊙ imag(vj)) + imag(vs)⊤(real(vi) ⊙ imag(vj)) − imag(vs)⊤(imag(vi) ⊙ real(vj))

Training Loss

L =

  • rs(ei,ej),y ∈ T

−y log (σ(f (vs, vi, vj))) − (1 − y) log (1 − σ(f (vs, vi, vj)))

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 15/39

slide-83
SLIDE 83

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-84
SLIDE 84

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-85
SLIDE 85

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

  • 1. fatherOf(abe, homer)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-86
SLIDE 86

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-87
SLIDE 87

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y)

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-88
SLIDE 88

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-89
SLIDE 89

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

· · · · · ·

  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-90
SLIDE 90

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

X/abe Y/bart Z/homer

· · · · · ·

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-91
SLIDE 91

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

X/abe Y/bart Z/homer

· · · · · ·

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

3.2 parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-92
SLIDE 92

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

X/abe Y/bart Z/homer

· · · · · ·

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

3.2 parentOf(Z, Y) parentOf homer bart

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-93
SLIDE 93

Differentiable Proving in a Nutshell

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y). grandfatherOf abe bart

· · ·

X/abe Y/bart

3.1 fatherOf(X, Z) 3.2 parentOf(Z, Y) fatherOf abe Z

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

X/abe Y/bart Z/homer

· · · · · ·

  • 1. fatherOf(abe, homer)
  • 2. parentOf(homer, bart)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

3.2 parentOf(Z, Y) parentOf homer bart

X/abe Y/bart Z/homer X/abe Y/bart Z/homer

· · ·

  • 1. fatherOf(abe, homer)
  • 3. grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)
  • 2. parentOf(homer, bart)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 16/39

slide-94
SLIDE 94

Proof States S = (Ψ, ρ)

Substitution set Ψ constructed in the proof so far

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 17/39

slide-95
SLIDE 95

Proof States S = (Ψ, ρ)

Substitution set Ψ constructed in the proof so far Neural network ρ that outputs a real-valued proof success score

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 17/39

slide-96
SLIDE 96

Proof States S = (Ψ, ρ)

Substitution set Ψ constructed in the proof so far Neural network ρ that outputs a real-valued proof success score

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 17/39

slide-97
SLIDE 97

Proof States S = (Ψ, ρ)

Substitution set Ψ constructed in the proof so far Neural network ρ that outputs a real-valued proof success score X/Q Y/bart SΨ Sρ

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 17/39

slide-98
SLIDE 98

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-99
SLIDE 99

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover Discrete objects (rules, atoms etc.) are used to instantiate proof modules

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-100
SLIDE 100

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover Discrete objects (rules, atoms etc.) are used to instantiate proof modules Modules transform proof states into new proof states

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-101
SLIDE 101

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover Discrete objects (rules, atoms etc.) are used to instantiate proof modules Modules transform proof states into new proof states X/Q Y/bart SΨ Sρ

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-102
SLIDE 102

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover Discrete objects (rules, atoms etc.) are used to instantiate proof modules Modules transform proof states into new proof states X/Q Y/bart SΨ Sρ X/Q Y/bart Z/homer S′

Ψ

S′

ρ Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-103
SLIDE 103

Proof Modules

unifyθ, orK

θ, andK θ

Modular construction of differentiable prover Discrete objects (rules, atoms etc.) are used to instantiate proof modules Modules transform proof states into new proof states X/Q Y/bart SΨ Sρ X/Q Y/bart Z/homer S′

Ψ

S′

ρ Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 18/39

slide-104
SLIDE 104

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-105
SLIDE 105

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-106
SLIDE 106

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-107
SLIDE 107

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL
  • 3. unifyθ(H, [ ], S) = FAIL

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-108
SLIDE 108

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL
  • 3. unifyθ(H, [ ], S) = FAIL
  • 4. unifyθ(h :: H, g :: G, S) = unifyθ(H, G, S′)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-109
SLIDE 109

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL
  • 3. unifyθ(H, [ ], S) = FAIL
  • 4. unifyθ(h :: H, g :: G, S) = unifyθ(H, G, S′)

S′

Ψ = SΨ ∪

{h/g}

if h ∈ V {g/h} if g ∈ V, h ∈ V ∅

  • therwise
  • Tim Rockt¨

aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-110
SLIDE 110

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL
  • 3. unifyθ(H, [ ], S) = FAIL
  • 4. unifyθ(h :: H, g :: G, S) = unifyθ(H, G, S′)

S′

Ψ = SΨ ∪

{h/g}

if h ∈ V {g/h} if g ∈ V, h ∈ V ∅

  • therwise
  • S′

ρ = min

  • Sρ,
  • exp (−θh: − θg:2)

if h ∈ V, g ∈ V 1

  • therwise
  • Tim Rockt¨

aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-111
SLIDE 111

Unification Module

unify takes two atoms represented as lists of terms and an upstream proof state, and maps these to a new proof state (substitution set and proof success)

  • 1. unifyθ([ ], [ ], S) = S
  • 2. unifyθ([ ], G, S) = FAIL
  • 3. unifyθ(H, [ ], S) = FAIL
  • 4. unifyθ(h :: H, g :: G, S) = unifyθ(H, G, S′)

S′

Ψ = SΨ ∪

{h/g}

if h ∈ V {g/h} if g ∈ V, h ∈ V ∅

  • therwise
  • S′

ρ = min

  • Sρ,
  • exp (−θh: − θg:2)

if h ∈ V, g ∈ V 1

  • therwise
  • Example:

unifyθ([grandpaOf, abe, bart], [s, Q, i], (∅, 0.7)) =

  • {Q/abe}, min(0.7, exp(−θgrandpaOf: − θs:2), exp(−θbart: − θi:2))
  • Tim Rockt¨

aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 19/39

slide-112
SLIDE 112

OR Module

  • 1. orK

θ(G, d, S) = [S′ | S′ ∈ andK θ(B, d, unifyθ(H, G, S)), H :– B ∈ K]

G is a goal atom, d is the maximum proof depth, and H :– B is a rule

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 20/39

slide-113
SLIDE 113

OR Module

  • 1. orK

θ(G, d, S) = [S′ | S′ ∈ andK θ(B, d, unifyθ(H, G, S)), H :– B ∈ K]

G is a goal atom, d is the maximum proof depth, and H :– B is a rule

  • r iterates through all rules (including rules with an empty body, i.e., facts) and

unifies the goal with the respective rule head

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 20/39

slide-114
SLIDE 114

OR Module

  • 1. orK

θ(G, d, S) = [S′ | S′ ∈ andK θ(B, d, unifyθ(H, G, S)), H :– B ∈ K]

G is a goal atom, d is the maximum proof depth, and H :– B is a rule

  • r iterates through all rules (including rules with an empty body, i.e., facts) and

unifies the goal with the respective rule head If unification succeeds, it instantiates an and module to prove all atoms in the body of the rule.

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 20/39

slide-115
SLIDE 115

OR Module

  • 1. orK

θ(G, d, S) = [S′ | S′ ∈ andK θ(B, d, unifyθ(H, G, S)), H :– B ∈ K]

G is a goal atom, d is the maximum proof depth, and H :– B is a rule

  • r iterates through all rules (including rules with an empty body, i.e., facts) and

unifies the goal with the respective rule head If unification succeeds, it instantiates an and module to prove all atoms in the body of the rule. In other words, it is translating goals into subgoals using rules, e.g., grandfatherOf(Q, bart) is translated into subgoals fatherOf(Q, Z) and parentOf(Z, bart) using the rule grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 20/39

slide-116
SLIDE 116

OR Module

  • 1. orK

θ(G, d, S) = [S′ | S′ ∈ andK θ(B, d, unifyθ(H, G, S)), H :– B ∈ K]

G is a goal atom, d is the maximum proof depth, and H :– B is a rule

  • r iterates through all rules (including rules with an empty body, i.e., facts) and

unifies the goal with the respective rule head If unification succeeds, it instantiates an and module to prove all atoms in the body of the rule. In other words, it is translating goals into subgoals using rules, e.g., grandfatherOf(Q, bart) is translated into subgoals fatherOf(Q, Z) and parentOf(Z, bart) using the rule grandfatherOf(X, Y) :– fatherOf(X, Z), parentOf(Z, Y) Example:

  • rK

θ ([grandfatherOf, Q, bart], d, S) =

[S′|S′ ∈ andK

θ ([[fatherOf, X, Z], [parentOf, Z, Y]], d, ({X/Q, Y/bart}, ˆ

Sρ)

  • result of unifyθ

), . . .]

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 20/39

slide-117
SLIDE 117

AND Module

  • 1. andK

θ (G, d, FAIL) = FAIL

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 21/39

slide-118
SLIDE 118

AND Module

  • 1. andK

θ (G, d, FAIL) = FAIL

  • 2. andK

θ (G, 0, S) = FAIL

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 21/39

slide-119
SLIDE 119

AND Module

  • 1. andK

θ (G, d, FAIL) = FAIL

  • 2. andK

θ (G, 0, S) = FAIL

  • 3. andK

θ ([ ], d, S) = S

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 21/39

slide-120
SLIDE 120

AND Module

  • 1. andK

θ (G, d, FAIL) = FAIL

  • 2. andK

θ (G, 0, S) = FAIL

  • 3. andK

θ ([ ], d, S) = S

  • 4. andK

θ (G :: G, d, S) = [S′′ | S′′ ∈ andK θ (G, d, S′), S′ ∈ orK θ (substitute(G, S), d − 1, S)]

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 21/39

slide-121
SLIDE 121

AND Module

  • 1. andK

θ (G, d, FAIL) = FAIL

  • 2. andK

θ (G, 0, S) = FAIL

  • 3. andK

θ ([ ], d, S) = S

  • 4. andK

θ (G :: G, d, S) = [S′′ | S′′ ∈ andK θ (G, d, S′), S′ ∈ orK θ (substitute(G, S), d − 1, S)]

Example:

andK

θ ([[fatherOf, X, Z], [parentOf, Z, Y]], d, ({X/Q, Y/bart}, ˆ

Sρ)

  • result of unifyθ in orK

θ

) = [S′′|S′′ ∈ andK

θ ([[parentOf, Z, Y]], d, S′), S′ ∈ orK θ ([fatherOf, Q, Z]

  • result of substitute

, d − 1, S)]

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 21/39

slide-122
SLIDE 122

Proof Aggregation

Goal G = [s, i, j] where s is the index of a predicate symbol and i, j are indices of constant symbols d maximum proof depth and proof start state (∅, 1) ntpK

θ(G, d) =

max

S ∈ orK

θ (G,d,(∅,1))

S=FAIL

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 22/39

slide-123
SLIDE 123

Proof Aggregation

Goal G = [s, i, j] where s is the index of a predicate symbol and i, j are indices of constant symbols d maximum proof depth and proof start state (∅, 1) ntpK

θ(G, d) =

max

S ∈ orK

θ (G,d,(∅,1))

S=FAIL

Training Loss

LntpK

θ =

  • (G,y) ∈ T

−y log(ntpK

θ(G, d)) − (1 − y) log(1 − ntpK θ(G, d)) Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 22/39

slide-124
SLIDE 124
  • rK

θ([s, i, j], 2, (∅, 1))

Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-125
SLIDE 125
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-126
SLIDE 126
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3) Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-127
SLIDE 127
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-128
SLIDE 128
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-129
SLIDE 129
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31) Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-130
SLIDE 130
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-131
SLIDE 131
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute S311 = ({X/i, Y/j, Z/homer}, ρ311) S312 = ({X/i, Y/j, Z/homer}, ρ312) S313 = FAIL 1. . . . 2. . . . 3.. . . Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-132
SLIDE 132
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute S311 = ({X/i, Y/j, Z/homer}, ρ311) S312 = ({X/i, Y/j, Z/homer}, ρ312) S313 = FAIL 1. . . . 2. . . . 3.. . . andK

θ([parentOf, Z, Y], 2, S32)

S32 = ({X/i, Y/j, Z/bart}, ρ32) Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-133
SLIDE 133
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute S311 = ({X/i, Y/j, Z/homer}, ρ311) S312 = ({X/i, Y/j, Z/homer}, ρ312) S313 = FAIL 1. . . . 2. . . . 3.. . . andK

θ([parentOf, Z, Y], 2, S32)

S32 = ({X/i, Y/j, Z/bart}, ρ32)

  • rK

θ([parentOf, bart, j], 1, S32)

substitute Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-134
SLIDE 134
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute S311 = ({X/i, Y/j, Z/homer}, ρ311) S312 = ({X/i, Y/j, Z/homer}, ρ312) S313 = FAIL 1. . . . 2. . . . 3.. . . andK

θ([parentOf, Z, Y], 2, S32)

S32 = ({X/i, Y/j, Z/bart}, ρ32)

  • rK

θ([parentOf, bart, j], 1, S32)

substitute S321 = ({X/i, Y/j, Z/bart}, ρ321) S322 = ({X/i, Y/j, Z/bart}, ρ322) S323 = FAIL 1.. . . 2. . . . 3. . . . Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-135
SLIDE 135
  • rK

θ([s, i, j], 2, (∅, 1))

unifyθ([fatherOf, abe, homer], [s, i, j], (∅, 1)) unifyθ([grandfatherOf, X, Y], [s, i, j], (∅, 1)) 1. 3. S1 = (∅, ρ1) S2 = (∅, ρ2) 2. . . . andK

θ([[fatherOf, X, Z], [parentOf, Z, Y]], 2, S3)

S3 = ({X/i, Y/j}, ρ3)

  • rK

θ([fatherOf, i, Z], 1, S3)

substitute unifyθ([fatherOf, abe, homer], [fatherOf, i, Z], S3) unifyθ([parentOf, homer, bart], [fatherOf, i, Z], S3) 1. 2. S33 = FAIL 3. . . . andK

θ([parentOf, Z, Y], 2, S31)

S31 = ({X/i, Y/j, Z/homer}, ρ31)

  • rK

θ([parentOf, homer, j], 1, S31)

substitute S311 = ({X/i, Y/j, Z/homer}, ρ311) S312 = ({X/i, Y/j, Z/homer}, ρ312) S313 = FAIL 1. . . . 2. . . . 3.. . . andK

θ([parentOf, Z, Y], 2, S32)

S32 = ({X/i, Y/j, Z/bart}, ρ32)

  • rK

θ([parentOf, bart, j], 1, S32)

substitute S321 = ({X/i, Y/j, Z/bart}, ρ321) S322 = ({X/i, Y/j, Z/bart}, ρ322) S323 = FAIL 1.. . . 2. . . . 3. . . . Example Knowledge Base:

  • 1. fatherOf(abe, homer).
  • 2. parentOf(homer, bart).
  • 3. grandfatherOf(X, Y) :–

fatherOf(X, Z), parentOf(Z, Y).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 23/39

slide-136
SLIDE 136

Batch Proving

A ∈ RN×k matrix of N subsymbolic representations B ∈ RM×k matrix of M other subsymbolic representations

exp     −

     k

i=1 A2 1i

. . . k

i=1 A2 Ni

   1⊤

M

   +    1N    k

i=1 B2 1i

. . . k

i=1 B2 Mi

  

⊤

   − 2AB⊤      ∈ RN×M

where 1N and 1M are vectors of N and M ones respectively, and the square root is taken element-wise.

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 24/39

slide-137
SLIDE 137

Calculation on GPU

Q

parentOf dadOf homer abe

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 25/39

slide-138
SLIDE 138

Calculation on GPU

Q

parentOf dadOf homer abe fatherOf parentOf grandmaOf abe homer mona homer bart lisa

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 25/39

slide-139
SLIDE 139

Calculation on GPU

Q

parentOf dadOf homer abe fatherOf parentOf grandmaOf abe homer mona homer bart lisa unify unify

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 25/39

slide-140
SLIDE 140

Calculation on GPU

Q Q /

parentOf dadOf homer abe fatherOf parentOf grandmaOf abe homer mona homer bart lisa homer bart lisa homer bart lisa unify unify unify (symbolic)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 25/39

slide-141
SLIDE 141

Calculation on GPU

Q Q /

parentOf dadOf homer abe fatherOf parentOf grandmaOf abe homer mona homer bart lisa homer bart lisa homer bart lisa unify unify unify (symbolic)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 25/39

slide-142
SLIDE 142

Neural Inductive Logic Programming

1 vfatherOf(vabe, vhomer). 2 vparentOf(vhomer, vlisa). 3 vparentOf(vhomer, vbart). 4 vgrandpaOf(vabe, vlisa). 5 vgrandfatherOf(vabe, vmaggie).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 26/39

slide-143
SLIDE 143

Neural Inductive Logic Programming

1 vfatherOf(vabe, vhomer). 2 vparentOf(vhomer, vlisa). 3 vparentOf(vhomer, vbart). 4 vgrandpaOf(vabe, vlisa). 5 vgrandfatherOf(vabe, vmaggie). 6 θ1(X1, Y1) :– θ2(X1, Z1), θ3(Z1, Y1). 7 θ4(X2, Y2) :– θ5(X2, Y2).

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 26/39

slide-144
SLIDE 144

Neural Inductive Logic Programming

1 vfatherOf(vabe, vhomer). 2 vparentOf(vhomer, vlisa). 3 vparentOf(vhomer, vbart). 4 vgrandpaOf(vabe, vlisa). 5 vgrandfatherOf(vabe, vmaggie). 6 θ1(X1, Y1) :– θ2(X1, Z1), θ3(Z1, Y1). 7 θ4(X2, Y2) :– θ5(X2, Y2).

Decoding Induced Rules Find closest representations of known predicate

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 26/39

slide-145
SLIDE 145

Neural Inductive Logic Programming

1 vfatherOf(vabe, vhomer). 2 vparentOf(vhomer, vlisa). 3 vparentOf(vhomer, vbart). 4 vgrandpaOf(vabe, vlisa). 5 vgrandfatherOf(vabe, vmaggie). 6 θ1(X1, Y1) :– θ2(X1, Z1), θ3(Z1, Y1). 7 θ4(X2, Y2) :– θ5(X2, Y2).

Decoding Induced Rules Find closest representations of known predicate Take minimum RBF similarity as rule confidence

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 26/39

slide-146
SLIDE 146

Neural Inductive Logic Programming

1 vfatherOf(vabe, vhomer). 2 vparentOf(vhomer, vlisa). 3 vparentOf(vhomer, vbart). 4 vgrandpaOf(vabe, vlisa). 5 vgrandfatherOf(vabe, vmaggie). 6 θ1(X1, Y1) :– θ2(X1, Z1), θ3(Z1, Y1). 7 θ4(X2, Y2) :– θ5(X2, Y2).

Decoding Induced Rules Find closest representations of known predicate Take minimum RBF similarity as rule confidence Rule confidence is an upper bound on the proof success that can be achieved when applying the rule

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 26/39

slide-147
SLIDE 147

Experiments

Benchmark Knowledge Bases: Kinship, Nations, UMLS (Kok and Domingos, 2007), and Countries (Bouchard et al., 2015) Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn

Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 27/39

slide-148
SLIDE 148

Experiments

Benchmark Knowledge Bases: Kinship, Nations, UMLS (Kok and Domingos, 2007), and Countries (Bouchard et al., 2015) Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn

Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 27/39

slide-149
SLIDE 149

Experiments

Benchmark Knowledge Bases: Kinship, Nations, UMLS (Kok and Domingos, 2007), and Countries (Bouchard et al., 2015) Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn locatedIn locatedIn

Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 27/39

slide-150
SLIDE 150

Experiments

Benchmark Knowledge Bases: Kinship, Nations, UMLS (Kok and Domingos, 2007), and Countries (Bouchard et al., 2015) Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn locatedIn

Test Country Train Country Region Subregion

neighborOf locatedIn locatedIn locatedIn locatedIn

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 27/39

slide-151
SLIDE 151

Details

Models implemented in TensorFlow

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 28/39

slide-152
SLIDE 152

Details

Models implemented in TensorFlow ComplEx Neural link prediction model by Trouillon et al. (2016)

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 28/39

slide-153
SLIDE 153

Details

Models implemented in TensorFlow ComplEx Neural link prediction model by Trouillon et al. (2016) NTP End-to-end differentiable prover

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 28/39

slide-154
SLIDE 154

Details

Models implemented in TensorFlow ComplEx Neural link prediction model by Trouillon et al. (2016) NTP End-to-end differentiable prover NTPλ Prover trained with ComplEx as auxiliary loss

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 28/39

slide-155
SLIDE 155

Details

Models implemented in TensorFlow ComplEx Neural link prediction model by Trouillon et al. (2016) NTP End-to-end differentiable prover NTPλ Prover trained with ComplEx as auxiliary loss Rule Templates:

Kinship, Nations & UMLS 20 #1(X, Y) :– #2(X, Y). 20 #1(X, Y) :– #2(Y, X). 20 #1(X, Y) :– #2(X, Z), #3(Z, Y). Countries S1 3 #1(X, Y) :– #1(Y, X). 3 #1(X, Y) :– #2(X, Z), #2(Z, Y). Countries S2 3 #1(X, Y) :– #2(X, Z), #3(Z, Y). Countries S3 3 #1(X, Y) :– #2(X, Z), #3(Z, W), #4(W, Y). Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 28/39

slide-156
SLIDE 156

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 29/39

slide-157
SLIDE 157

Results

Corpus Metric Model ComplEx NTP NTPλ Countries S1 AUC-PR 99.37 ± 0.4 90.83 ± 15.4 100.00 ± 0.0 S2 AUC-PR 87.95 ± 2.8 87.40 ± 11.7 93.04 ± 0.4 S3 AUC-PR 48.44 ± 6.3 56.68 ± 17.6 77.26 ± 17.0 Kinship MRR 0.46 0.36 0.48 HITS@1 0.34 0.24 0.39 HITS@3 0.49 0.40 0.47 HITS@10 0.74 0.60 0.71 Nations MRR 0.60 0.63 0.62 HITS@1 0.46 0.48 0.45 HITS@3 0.67 0.69 0.72 HITS@10 0.97 0.98 0.99 UMLS MRR 0.58 0.57 0.60 HITS@1 0.47 0.47 0.51 HITS@3 0.63 0.60 0.64 HITS@10 0.80 0.79 0.81

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 30/39

slide-158
SLIDE 158

Results

Corpus Examples of induced rules and their confidence Countries S1 0.90 locatedIn(X,Y) :– locatedIn(X,Z), locatedIn(Z,Y). S2 0.63 locatedIn(X,Y) :– neighborOf(X,Z), locatedIn(Z,Y). S3 0.32 locatedIn(X,Y) :– neighborOf(X,Z), neighborOf(Z,W), locatedIn(W,Y). Nations 0.68 blockpositionindex(X,Y) :– blockpositionindex(Y,X). 0.46 expeldiplomats(X,Y) :– negativebehavior(X,Y). 0.38 negativecomm(X,Y) :– commonbloc0(X,Y). 0.38 intergovorgs3(X,Y) :– intergovorgs(Y,X). UMLS 0.88 interacts with(X,Y) :– interacts with(X,Z), interacts with(Z,Y). 0.77 isa(X,Y) :– isa(X,Z), isa(Z,Y). 0.71 derivative of(X,Y) :– derivative of(X,Z), derivative of(Z,Y). Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 31/39

slide-159
SLIDE 159

End-to-end Differentiable Planning

work-in-progress

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 32/39

slide-160
SLIDE 160

DQN

Mnih et al. (2015) 33/39

slide-161
SLIDE 161

DQN zt

  • t

encode

Q

evaluate

Mnih et al. (2015) 33/39

slide-162
SLIDE 162

DQN zt

  • t

encode

Q

evaluate

L(θ) =

  

target

  • r
  • reward

+ γ

  • discount

max

a′ Q(s′, a′, θ−) −Q(s, a, θ)

  

2 Mnih et al. (2015) 33/39

slide-163
SLIDE 163

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 34/39

slide-164
SLIDE 164

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 35/39

slide-165
SLIDE 165

Tree Planning

zt

  • t

encode Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-166
SLIDE 166

Tree Planning

zt

  • t

encode

a1 a2 a3

transition Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-167
SLIDE 167

Tree Planning

Tree Transitioning zt

  • t

encode

a1 a2 a3

transition transition transition transition Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-168
SLIDE 168

Tree Planning

Tree Transitioning zt

  • t

encode

a1 a2 a3

transition transition transition transition evaluate evaluate evaluate Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-169
SLIDE 169

Tree Planning

Tree Transitioning zt

  • t

encode

a1 a2 a3

transition transition transition transition Q(ot, a3) max evaluate Q(ot, a2) max evaluate Q(ot, a1) max evaluate Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-170
SLIDE 170

Tree Planning

Tree Transitioning Value Prediction zt

  • t

encode

a1 a2 a3

transition transition transition transition

Q

Q(ot, a3) max evaluate Q(ot, a2) max evaluate Q(ot, a1) max evaluate Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 36/39

slide-171
SLIDE 171

Results

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 1e7 200 400 600 800 1000

DQN 938 TreeQN 1028

Enduro Steps Average Reward over 100 Episodes

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 37/39

slide-172
SLIDE 172

Results

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 1e7 500 1000 1500 2000 2500 3000

DQN 2497 TreeQN 3467

Alien Steps Average Reward over 100 Episodes

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 37/39

slide-173
SLIDE 173

Results

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 1e7 1000 2000 3000 4000

DQN 3854 TreeQN 4670

MsPacman Steps Average Reward over 100 Episodes

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 37/39

slide-174
SLIDE 174

Results

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 1e7 2000 4000 6000 8000 10000 12000

DQN 7845 TreeQN 13856

Seaquest Steps Average Reward over 100 Episodes

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 37/39

slide-175
SLIDE 175
slide-176
SLIDE 176

<

slide-177
SLIDE 177
slide-178
SLIDE 178

<

slide-179
SLIDE 179

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-180
SLIDE 180

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-181
SLIDE 181

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-182
SLIDE 182

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc.

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-183
SLIDE 183

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-184
SLIDE 184

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-185
SLIDE 185

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Scale to larger knowledge bases

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-186
SLIDE 186

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Scale to larger knowledge bases Connect to RNNs for natural language statements

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-187
SLIDE 187

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Scale to larger knowledge bases Connect to RNNs for natural language statements Proving of mathematical theorems

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-188
SLIDE 188

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Scale to larger knowledge bases Connect to RNNs for natural language statements Proving of mathematical theorems Visual reasoning

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-189
SLIDE 189

Summary

Prolog’s backward chaining as recipe for recursively constructing a neural network to prove facts in a knowledge base Proof success differentiable w.r.t. subsymbolic representations Can learn vector representations of symbols and induce interpretable rules

  • f predefined structure

Various GPU optimizations: batch proving, tree pruning etc. Outperform neural link prediction model on benchmark knowledge bases Future research:

Scale to larger knowledge bases Connect to RNNs for natural language statements Proving of mathematical theorems Visual reasoning

Encouraging preliminary results using tree planning for Atari

Tim Rockt¨ aschel GPU-accelerated End-to-end Differentiable Planning and Reasoning 39/39

slide-190
SLIDE 190

Thank you!

http://rockt.github.com tim.rocktaschel@cs.ox.ac.uk Twitter: @ rockt

slide-191
SLIDE 191

References

Guillaume Bouchard, Sameer Singh, and Theo Trouillon. 2015. On approximate reasoning capabilities of low-rank vector spaces. In Proceedings of the 2015 AAAI Spring Symposium on Knowledge Representation and Reasoning (KRR): Integrating Symbolic and Neural Approaches. Rajarshi Das, Arvind Neelakantan, David Belanger, and Andrew McCallum. 2017. Chains of reasoning over entities, relations, and text using recurrent neural networks. In Conference of the European Chapter of the Association for Computational Linguistics (EACL). Stanley Kok and Pedro M. Domingos. 2007. Statistical predicate invention. In Machine Learning, Proceedings of the Twenty-Fourth International Conference (ICML 2007), Corvallis, Oregon, USA, June 20-24, 2007, pages 433–440. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin A. Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. 2015. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533. URL https://doi.org/10.1038/nature14236. Tim Rockt¨ aschel and Sebastian Riedel. 2017. End-to-end differentiable proving. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, California, United States, volume abs/1705.11040. Th´ eo Trouillon, Johannes Welbl, Sebastian Riedel, ´ Eric Gaussier, and Guillaume Bouchard. 2016. Complex embeddings for simple link

  • prediction. In Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June

19-24, 2016, pages 2071–2080. Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. 2015. Embedding entities and relations for learning and inference in knowledge bases. In International Conference on Learning Representations (ICLR).