DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10...

43
DTProbLog A Decision-Theoretic Probabilistic Prolog Guy Van den Broeck Ingo Thon Martijn van Otterlo Luc De Raedt

Transcript of DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10...

Page 1: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

DTProbLogA Decision-Theoretic Probabilistic Prolog

Guy Van den BroeckIngo Thon

Martijn van OtterloLuc De Raedt

Page 2: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 2

Motivation

● Many real-world decision problems are relational and probabilistic

● Wildfire control● Who to vaccinate for swine flu● Viral marketing● ...

Page 3: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 3

Motivation

● Combination of relations, uncertainty and decision theory largely ignored

some exceptions are MLDNs, DTLPs and FOMDPs

● Relations with uncertainty

= Statistical Relational Learning

● ProbLog is a simple probabilistic Prolog● DTProbLog is a decision-theoretic ProbLog

Page 4: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 4

Outline

● DTProbLog: the Language● DTProbLog: the Algorithms

● Exact Solution Algorithm● Approximate Solution Algorithms

● Experiments: Viral Marketing● Related Work & Conclusions

Page 5: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 5

DTProbLog: the Language

Page 6: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 6

HomerMarge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

Page 7: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 7

Homer1 Marge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

Page 8: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 8

Homer1 Marge

0.3

Bart0.3

Lisa

Lenny

Apu

Moe0.3

SeymourRalph

Maggie

Page 9: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 9

Homer1 Marge

0.39

Bart0.41

Lisa0.25

Lenny0.14

Apu0.17

Moe0.34

Seymour0.25 Ralph

0.21

Maggie0.17

Page 10: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 10

Homer1 Marge

0.39

Bart0.41

Lisa0.25

Lenny0.14

Apu0.17

Moe0.34

Seymour0.25 Ralph

0.21

Maggie0.17

ProbLogProbabilistic Facts0.3 :: buy_trust(_,_).

Background Knowledgebuys(X) :­    trusts(X,Y),    buys(Y),    buy_trust(X,Y).

Page 11: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 11

HomerMarge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

Page 12: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 12

Homer0.20 Marge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

Page 13: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 13

Homer0.20 Marge

0.08

Bart0.08

Lisa0.05

Lenny0.03

Apu0.03

Moe0.07

Seymour0.05 Ralph

0.04

Maggie0.03

Page 14: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 14

Homer0.20 Marge

0.08

Bart0.08

Lisa0.05

Lenny0.03

Apu0.03

Moe0.07

Seymour0.05 Ralph

0.04

Maggie0.03

Probabilistic Facts0.3 :: buy_trust(_,_).0.2 :: buy_marketing(_). 

Background Knowledgebuys(X) :­               buys(X) :­    trusts(X,Y),             marketed(X),    buys(Y),                 buy_marketing(X).    buy_trust(X,Y).

ProbLog

Page 15: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 15

HomerMarge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

Page 16: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 16

Homer0.25 Marge

0.11

Bart0.12

Lisa0.08

Lenny0.10

Apu0.11

Moe0.25

Seymour0.12 Ralph

0.08

Maggie0.05

Page 17: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 17

HomerMarge

Bart Lisa

Lenny

Apu

Moe

SeymourRalph

Maggie

????

??

?? ????

??

??

??

??

+$5

-$3

Which strategy gives the maximum expected utility?

Page 18: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 18

$1.1

2

Homer0.12 Marge

0.13

Bart0.27

Lisa0.13

Lenny0.06

Apu0.11

Moe0.12

Seymour0.27 Ralph

0.16

Maggie0.07

+$5

-$3

Page 19: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 19

$1.1

2

Homer0.12 Marge

0.13

Bart0.27

Lisa0.13

Lenny0.06

Apu0.11

Moe0.12

Seymour0.27 Ralph

0.16

Maggie0.07

Probabilistic Facts ...

Background Knowledge...

Decisions ? :: marketed(P) :­ person(P).

Utility Factsbuys(P) => 5 :­ person(P).                marketed(P) => ­3 :­ person(P).

DTProbLog

Page 20: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 20

DTProbLog: the Algorithms

Page 21: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 21

DTProbLog: the Algorithms

● DTProbLog solves decision problems in complex relational and uncertain environments.

● Exact solution algorithm● Extends ProbLog's BDD-based inference● Efficient datastructures: BDD and ADD

● Approximate algorithms● Local search● K-best proofs

Page 22: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 22

Example:Dressing for unpredictable weather

Decision Facts Probabilistic Facts? :: umbrella.         0.3 :: rainy.? :: raincoat.         0.5 :: windy.

Background Knowledgedry :­ rainy, umbrella, not(broken_umbrella).dry :­ rainy, raincoat.dry :­ not(rainy).

broken_umbrella :­ umbrella, rainy, windy.

Utility Factsumbrella => ­2.        dry => 60.raincoat => ­20.       broken_umbrella => ­40.

Page 23: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 23

Exact Solution Algorithm

1 Find all proofs for each utility attribute (Prolog)

2

3

4

5

Binary decision diagrams from the proofs

Algebraic decision diagrams for the probability of each attribute

Algebraic decision diagrams for the utility of each attribute

Algebraic decision diagram for the total utility

Page 24: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 24

1 Find all proofs for each utility attribute (Prolog)

2 Binary decision diagrams from the proofs

dry => 60.broken_umbrella => ­40.

umbrella => ­2.raincoat => ­20. 

● Leafs indicate attribute true or false ● Nodes are probabilistic facts or decisions

false true

Page 25: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 25

3 Algebraic decision diagrams for the probability of each attribute

dry => 60.

broken_umbrella => ­40.

umbrella => ­2.

raincoat => ­20. 

● Probabilistic facts are marginalized out● Nodes are decisions only● Leafs are probabilities

Page 26: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 26

4 Algebraic decision diagrams for the utility of each attribute

dry => 60.

broken_umbrella => ­40.

umbrella => ­2.

raincoat => ­20. 

● Leafs are expected utilities

Page 27: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 27

5 Algebraic decision diagram for the total utility

+ sound pruning (ADD not built entirely in memory)

Page 28: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 28

Approximate Solution: Local Search

1 Find all proofs for each utility attribute (Prolog)

2

3

4

5

Binary decision diagrams from the proofs

Algebraic decision diagrams for the probability of each attribute

Algebraic decision diagrams for the utility of each attribute

Algebraic decision diagram for the total utility

Page 29: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 29

Approximate Solution: Local Search

1 Find all proofs for each utility attribute (Prolog)

2

3

4

5

Binary decision diagrams from the proofs

Algebraic decision diagrams for the probability of each attributeAlgebraic decision diagrams for the utility of each attributeAlgebraic decision diagram for the total utility

3 Greedy hillclimber search

Page 30: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 30

Approximate Solution: K-best Proofs

1 Find all proofs for each utility attribute (Prolog)

2

3

4

5

Binary decision diagrams from the proofs

Algebraic decision diagrams for the probability of each attribute

Algebraic decision diagrams for the utility of each attribute

Algebraic decision diagram for the total utility

Page 31: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 31

Approximate Solution: K-best Proofs

1 Find all proofs for each utility attribute (Prolog)

2

3

4

5

Binary decision diagrams from the proofs

Algebraic decision diagrams for the probability of each attribute

Algebraic decision diagrams for the utility of each attribute

Algebraic decision diagram for the total utility

1 Find the k most likely proofs for each utility attribute

Page 32: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 32

Experiments: Viral Marketing

Page 33: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 33

Experiments: Viral Marketing

● Synthetic dataset

Random power law graphs of increasing size

● Real-world Epinions dataset [Domingos02]

Page 34: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 34

(Q1) Does the exact solution algorithm perform better than naively calculating the utility of all strategies?

Page 35: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 35

(Q2) What is the difference in runtime and solution quality between exact and local search?

Page 36: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 36

(Q3) What is the difference in runtime and solution quality between for different values of k in k-best.

Page 37: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 37

(Q4) Do the algorithms scale?

Epinions social network● 75,000 people● 500,000 trust relations

YES● Local search● 17-best proofs● Solved in 16 hours

Page 38: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 38

Related Work & Conclusions

Page 39: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 39

Related Work

Representation Solution Evaluation

Relational Probabilities Global optimum

Local optimum

Exact inference

Approximate inference

Influence Diagrams

MLDNs[Nath]

ICL[Poole]

DTLPs[Chen]

DTProbLog

Page 40: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 40

Summary

● DTProbLog, the programming language● Probabilistic Prolog● Decisions● Utilities: rewards or costs attached to goals

● Solution algorithms● Exactly● Approximately

● Experiments● Effective● Scale well

Page 41: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 41

Ongoing and Future Work

● Sequential decision problems● Easy to represented in DTProbLog● Bad fit for solution algorithms

● Solvers● Integer linear programming● Bounded approximation● Monte-Carlo

● Lifting (many BDDs have same structure)● Learning DTProbLog programs● Inverse reinforcement learning

Page 42: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 42

Thank You!

Page 43: DTProbLog - UCLA StarAI Lab - Newsstarai.cs.ucla.edu/slides/AAAI10.pdf · 2019. 1. 13. · 07/14/10 DTProbLog 3 Motivation Combination of relations, uncertainty and decision theory

07/14/10 DTProbLog 43

Viral Marketing

Decisions ? :: marketed(P) :­ person(P).

Probabilistic Facts0.3 :: buy_trust(_,_). 0.2 :: buy_marketing(_).

Background Knowledgebuys(X) :­               buys(X) :­    trusts(X,Y),             marketed(X),    buys(Y),                 buy_marketing(X).    buy_trust(X,Y).

Utility Factsbuys(P) => 5 :­ person(P).                marketed(P) => ­3 :­ person(P).