html5-img
1 / 48

Stochastic Logic Programs

Stochastic Logic Programs. Stephen Muggleton. Outline. Stochastic automata Stochastic context free grammars Stochastic logic programs Stochastic SLD-refutations. Deterministic Automata. Stochastic Automata. Stochastic Automata. SA Probabilities.

mari
Télécharger la présentation

Stochastic Logic Programs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stochastic Logic Programs Stephen Muggleton

  2. Outline • Stochastic automata • Stochastic context free grammars • Stochastic logic programs • Stochastic SLD-refutations

  3. Deterministic Automata

  4. Stochastic Automata

  5. Stochastic Automata

  6. SA Probabilities • Stochastic automata represent probability distributions • Probability of accepting u in L(A)

  7. SA Productions • Stochastic automata can be represented by labelled productions becomes

  8. SA Productions • Stochastic automata can be represented by labelled productions becomes

  9. Stochastic CFGs • Straightforward extension of SA • Probability of a string is the sum of probabilities of its derivations

  10. Stochastic Logic Programs • Set of weighted range restricted definite clauses • Require for each predicate q, sum of weights for clauses with q in their head is 1.

  11. SSLD-refutations • Analogous to stochastic CFG productions • A SSLD-refutation is a sequence: • Probability of is • Probability of an atom is where is an SLD refutation

  12. Learning in SLPs • Structure and parameters learned simultaneously • Requires existing ILP framework

  13. Derivation Overview • Generalisation Model • Optimal parameter choice • The general case • Two example case • Numerical solutions

  14. Generalisation Model • Add clauses one at a time • Given SLP S and positive examples E, choose x:H such that:

  15. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  16. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  17. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  18. Optimal Parameter Choice • Since maximizing choose x such that • Derivative is messy, but since monotonicity preserves extrema we can maximize

  19. General Derivation • Assuming S is non-recursive then has one of the forms: • c if p does not involve a q clause • cx if p involves x : H • c(1-x) if p involves a clause in q other than x : H

  20. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  21. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  22. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  23. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  24. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  25. General Derivation • Assuming S is non-recursive then has one of the forms: • c if p does not involve a q clause • cx if p involves x : H • c(1-x) if p involves a clause in q other than x : H

  26. General Derivation • Assuming S is non-recursive then has one of the forms: • c if p does not involve a q clause • cx if p involves x : H • c(1-x) if p involves a clause in q other than x : H

  27. General Derivation • Assuming S is non-recursive then has one of the forms: • c if p does not involve a q clause • cx if p involves x : H • c(1-x) if p involves a clause in q other than x : H

  28. General Derivation • Assuming S is non-recursive then has one of the forms: • c if p does not involve a q clause • cx if p involves x : H • c(1-x) if p involves a clause in q other than x : H

  29. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  30. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  31. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  32. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  33. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  34. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x to maximize the likelihood:

  35. Generalisation Model • If added to need to ensure weights sum to one. • Replace weight of each in by • Want to choose x such that:

  36. Two Parameter Solution • Only two clauses, e1 and e2 • Then we can analytically derive:

  37. Two Parameter Example

  38. Two Parameter Example

  39. Two Parameter Example

  40. Two Parameter Example

  41. Two Parameter Example

  42. Two Parameter Example

  43. Two Parameter Example

  44. Numerical Solutions • Analytical solutions for more clauses involve solving higher order polynomials • Exponentially many terms in polynomial • Numerical solutions a good idea • Use iteration method

  45. Iteration Method • Transform g(x) = 0 into x = f(x) • Iterate: • Converges so long as x0 close to root

  46. Iteration Method • In our case, use:

  47. Iteration Method Example

  48. Iteration Method Example

More Related