cproblog restricting the possible worlds of probabilistic
play

cProbLog: Restricting the Possible Worlds of Probabilistic Logic - PowerPoint PPT Presentation

cProbLog: Restricting the Possible Worlds of Probabilistic Logic Programs Dimitar Shterionov Prof. Gerda Janssens 1 Weight: 3 Weight: 4 Weight: 8 Weight: 6 2 Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 3 Weight:


  1. cProbLog: Restricting the Possible Worlds of Probabilistic Logic Programs Dimitar Shterionov Prof. Gerda Janssens 1

  2. Weight: 3 Weight: 4 Weight: 8 Weight: 6 2

  3. Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 3

  4. Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 Luggage weight 10 kg. 4

  5. Query: what is the probability of carrying items without exceeding the limit? Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 Luggage weight 10 kg. 5

  6. Query: what is the probability of carrying items without exceeding the limit? Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 ProbLog Luggage weight 10 kg. 6

  7. Query: what is the probability of carrying items without exceeding the limit? Additional knowledge: if skis are packed then boots also need to be packed. Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 Luggage weight 10 kg. 7

  8. Query: what is the probability of carrying items without exceeding the limit? Additional knowledge: if skis are packed then boots also need to be packed. Weight: 3 Weight: 4 0.33 Weight: 8 Weight: 6 0.25 0.125 0.16 cProbLog Luggage weight 10 kg. 8

  9. Outline ● ProbLog and Possible Worlds ● cProbLog – FOL sentences expressing constraints ● Implementation – constraint-evidence approach ● Examples ● Comparison to other systems 9

  10. Outline ● ProbLog and Possible Worlds ● cProbLog – FOL sentences expressing constraints ● Implementation – constraint-evidence approach ● Examples ● Comparison to other systems 10

  11. ProbLog Logic ● Compute the marginal ML Uncertainties probability given evidence • Learn from Interpretations 11

  12. weight(skis,6). weight(board, 8). weight(boots,4). weight(helmet,3). 0.160::pack(skis). 0.125::pack(board). 0.250::pack(boots). 0.330::pack(helmet). inlimit(Limit):- inlimit([skis,boots,board,helmet],Limit). inlimit([],Limit):- Limit>=0. inlimit([I|R],Limit):- pack(I), weight(I,W), L is Limit-W, inlimit(R,L). inlimit([I|R],Limit):- \+pack(I), inlimit(R,Limit). 12

  13. weight(skis,6). weight(board, 8). weight(boots,4). weight(helmet,3). 0.160::pack(skis). 0.125::pack(board). Probabilistic Facts 0.250::pack(boots). 0.330::pack(helmet). inlimit(Limit):- inlimit([skis,boots,board,helmet],Limit). inlimit([],Limit):- Limit>=0. inlimit([I|R],Limit):- pack(I), weight(I,W), L is Limit-W, inlimit(R,L). inlimit([I|R],Limit):- \+pack(I), inlimit(R,Limit). 13

  14. weight(skis,6). weight(board, 8). weight(boots,4). weight(helmet,3). 0.160::pack(skis). 0.125::pack(board). Probabilistic Facts 0.250::pack(boots). 0.330::pack(helmet). inlimit(Limit):- inlimit([skis,boots,board,helmet],Limit). inlimit([],Limit):- Limit>=0. inlimit([I|R],Limit):- pack(I), weight(I,W), L is Limit-W, inlimit(R,L). inlimit([I|R],Limit):- \+pack(I), inlimit(R,Limit). pack(ski) pack(board) pack(boots) pack(helmet) 0.16 0.84 0.125 0.875 0.25 0.75 0.33 0.67 14

  15. A possible world pack(ski) pack(board) pack(boots) pack(helmet) 0.875 0.25 0.33 0.84 15

  16. A possible world pack(ski) pack(board) pack(boots) pack(helmet) = 0.061 0.875 0.25 0.33 0.84 * * * 16

  17. A possible world pack(ski) pack(board) pack(boots) pack(helmet) = 0.061 0.875 0.25 0.33 0.84 * * * 17

  18. A possible world pack(ski) pack(board) pack(boots) pack(helmet) = 0.061 0.875 0.25 0.33 0.84 * * * A possible world corresponds to a model of the ProbLog program A query atom is true in some possible worlds. (the models of the ProbLog program and the query) 18

  19. A possible world pack(ski) pack(board) pack(boots) pack(helmet) = 0.061 0.875 0.25 0.33 0.84 * * * A possible world corresponds to a model of the ProbLog program A query atom is true in some possible worlds. (the models of the ProbLog program and the query) (the success probability of q) 19

  20. query(inlimit(10)). 20

  21. query(inlimit(10)). P( inlimit(10) ) = 0.9162 21

  22. Outline ● ProbLog and Possible Worlds ● cProbLog – FOL sentences expressing constraints ● Implementation – constraint-evidence approach ● Examples ● Comparison to other systems 22

  23. The MARG task Evidence – a set of atoms (E) with observed truth values (e) 23

  24. The MARG task Evidence – a set of atoms (E) with observed truth values (e) boots are already packed 24

  25. The MARG task Evidence – a set of atoms (E) with observed truth values (e) boots are already packed 25

  26. P( inlimit(10)|pack(boots)=true ) 26

  27. P( inlimit(10)|pack(boots)=true ) What about more complex additional knowledge? Eg.,“if the skis are packed then also the boots need to be packed” FOL: 27

  28. cProbLog: Generalization of Evidence to FOL Constraints What about more complex additional knowledge? Eg.,“if the skis are packed then also the boots need to be packed” FOL: 28

  29. cProbLog Syntax 29

  30. cProbLog Syntax pack(skis) implies pack(boots) for_all X in {1, 2, 3}: exists Y in {a, b}: match(X, Y) for_all X of init_node(X): exists Y of end_node(Y): edge(X, Y) implies not edge(X, 1) 30

  31. cProbLog Syntax domains pack(skis) implies pack(boots) for_all X in {1, 2, 3} : exists Y in {a, b} : match(X, Y) for_all X of init_node(X) : exists Y of end_node(Y) : edge(X, Y) implies not edge(Y, 1) determine the relevant grounding of the constraints ensure finite grounding 31

  32. cProbLog Semantics Constraints are true in a set of possible worlds (subset of the possible worlds of the initial ProbLog program) 32

  33. cProbLog Semantics Constraints are true in a set of possible worlds (subset of the possible worlds of the initial ProbLog program) Probability of a Query 33

  34. cProbLog Semantics Constraints are true in a set of possible worlds (subset of the possible worlds of the initial ProbLog program) Probability of a Query 34

  35. query(inlimit(10)). constraint(pack(skis) implies pack(boots)). 35

  36. query(inlimit(10)). constraint(pack(skis) implies pack(boots)). P( inlimit(10)|pack(skis) implies pack(boots) ) = 0.9218. 36

  37. Outline ● ProbLog and Possible Worlds ● cProbLog – FOL sentences expressing constraints ● Implementation – constraint-evidence approach ● Examples ● Comparison to other systems 37

  38. Additional rules + Evidence 38

  39. Additional rules Constraints + Evidence 39

  40. Additional rules Constraints + Evidence 40

  41. Constraint – Evidence Approach Additional rules Constraints + Evidence 41

  42. Constraint – Evidence Approach A transformation of a single constraint into prolog rules and setting evidence. 1.Convert to Prenex Normal Form 2.Generate Prolog rules + Instantiate every variable ▪ Conjunction ▪ Disjunction 3.Add evidence 4.Do ProbLog MARG 42

  43. Constraint – Evidence Approach A transformation of a single constraint into prolog rules and setting evidence. 1.Convert to Prenex Normal Form 2.Generate Prolog rules + Instantiate every variable Rewriting ▪ Conjunction rules ▪ Disjunction 3.Add evidence 4.Do ProbLog MARG 43

  44. Constraint – Evidence Approach A transformation of a single constraint into prolog rules and setting evidence. 1.Convert to Prenex Normal Form 2.Generate Prolog rules + Instantiate every variable Rewriting ▪ Conjunction rules ▪ Disjunction 3.Add evidence 4.Do ProbLog MARG for_all X in {1, 2, 3}: exists Y in {a, b} : match(X, Y) 44

  45. Constraint – Evidence Approach A transformation of a single constraint into prolog rules and setting evidence. 1.Convert to Prenex Normal Form 2.Generate Prolog rules + Instantiate every variable Rewriting ▪ Conjunction rules ▪ Disjunction 3.Add evidence 4.Do ProbLog MARG for_all X in {1, 2, 3}: exists Y in {a, b} : match(X, Y) constraint_aux(1):-match(1, a); match(1, b). constraint_aux(2):-match(2, a); match(2, b). constraint_aux(3):-match(3, a); match(3, b). constraint_aux(0):-constraint_aux(1), constraint_aux(2), constraint_aux(3). 45

  46. Constraint – Evidence Approach A transformation of a single constraint into prolog rules and setting evidence. 1.Convert to Prenex Normal Form 2.Generate Prolog rules + Instantiate every variable Rewriting ▪ Conjunction rules ▪ Disjunction 3.Add evidence 4.Do ProbLog MARG for_all X in {1, 2, 3}: exists Y in {a, b} : match(X, Y) constraint_aux(1):-match(1, a); match(1, b). constraint_aux(2):-match(2, a); match(2, b). constraint_aux(3):-match(3, a); match(3, b). constraint_aux(0):-constraint_aux(1), constraint_aux(2), constraint_aux(3). evidence(constraint_aux(0), true). 46

  47. Constraint – Evidence Approach Additional rules Constraints + Evidence ProbLog MARG inference 47

  48. Outline ● ProbLog and Possible Worlds ● cProbLog – FOL sentences expressing constraints ● Implementation – constraint-evidence approach ● Examples ● Comparison to other systems 48

  49. Burglary – Earthquake – Alarm burglary earthquake alarm John calls Merry calls 49

  50. Burglary – Earthquake – Alarm burglary earthquake alarm John calls Merry calls 50

Recommend


More recommend