+ All Categories
Home > Documents > ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic...

ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic...

Date post: 26-Dec-2015
Category:
Upload: emma-welch
View: 221 times
Download: 7 times
Share this document with a friend
Popular Tags:
12
ML-Tutorial, Banff, Canada, 2004 (Propositional) LP – Some Notations lauses: IF burglary and earthquake are true THEN alarm is true Clause burglary. earthquake. alarm :- burglary, earthquake. marycalls :- alarm. johncalls :- alarm. Herbrand Base (HB) = all atoms in the program burglary, earthquake, alarm, marycalls, johncalls Program atom body head
Transcript
Page 1: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

(Propositional) LP – Some Notations

Clauses: IF burglary and earthquake are true THEN alarm is true

Clause

burglary.

earthquake.

alarm :- burglary, earthquake.

marycalls :- alarm.

johncalls :- alarm.

Herbrand Base (HB) = all atoms in the program

burglary, earthquake, alarm, marycalls, johncalls

Program

atom

body

head

Page 2: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Model Theoretic: Restrictions on Possible Worlds

burglary.

earthquake.

alarm :- burglary, earthquake.

marycalls :- alarm.

johncalls :- alarm.

• Herbrand Interpretation– Truth assigments to all elements of HB

• An interpretation is a model of a clause C If the body of C holds then the head holds, too.

burglary

earthquake

alarm

marycalls

johncalls

truefalse

truefalse

truefalse

truefalse

truefalse

Page 3: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004Goal

Proof Theoretic (Entailment):Restrictions on Possible Derivations

burglary.

earthquake.

alarm :- burglary, earthquake.

marycalls :- alarm.

johncalls :- alarm.

:- johncalls.

:- alarm.

:- burglary, earthquake.

:- earthquake.

{}

• A set of clauses can be used to prove that atoms are entailed by the set of clauses.

Page 4: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Bayesian Networks [Pearl 91]

Qualitative part:

Directed acyclic graph• Nodes - random vars. • Edges - direct influence

Compact representation of joint probability distributions

Quantitative part: Set of conditional probability distributions

0.9 0.1

e

b

e

0.2 0.8

0.01 0.99

0.9 0.1

be

b

b

e

BE P(A | B,E)Earthquake

JohnCalls

Alarm

MaryCalls

Burglary

P(E,B,A,M,J)

Together:Define a unique distribution in a compact, factored form

P(E,B,A,M,J)=P(E) * P(B) * P(A|E,B) * P(M|A) * P(J|A)

[illustration inspired by Kevin Murphy]

Page 5: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Traditional Approaches

P(j) = P(j|a) * P(m|a) * P(a|e,b) * P(e) * P(b)

+ P(j|a) * P(m|a) * P(a|e,b) * P(e) * P(b)

0.9 0.1

e

b

e

0.2 0.8

0.01 0.99

0.9 0.1

be

b

b

e

BE P(A | B,E)Earthquake

JohnCalls

Alarm

MaryCalls

Burglary

Model Theoretic

...

+ P(j|a) * P(m|a) * P(a|e,b) * P(e) * P(b)

burglary.

earthquake.

alarm :- burglary, earthquake.

marycalls :- alarm.

johncalls :- alarm.

Bayesian Networks [Pearl 91]

Page 6: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

(Hidden) Markov Models[Rabiner 89]

coin2

coin1

0.5

0.5

0.50.5

0.3 : head

0.7 : tail

0.5 : head

0.5 : tailMoore

coin2

coin1

0.5*0.5 : head

0.5*0.5 : tail

0.5*0.3 : tail

0.5*0.7 : head

0.5*

0.5

: he

ad

0.5*

0.5

: ta

il

0.5*

0.7

: he

ad

0.5*

0.3

: ta

ilMealy

Observations: t,

Hidden States: c1, c2, c1,c2, ...

Statistical models for sequences, i.e.

observations over time T=0,1,2,3,...

h, t, t, ...

Not obse

rved

Page 7: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

(Hidden) Markov Models

coin2

coin1

0.5*0.5 : head

0.5*0.5 : tail

0.5*0.3 : tail

0.5*0.7 : head

0.5*

0.5

: he

ad

0.5*

0.5

: ta

il

0.5*

0.7

: he

ad

0.5*

0.3

: ta

il

coin2.coin10.5*0.3 : tail

[Rabiner 89]

coin2

coin1

coin2

coin1

tail

coin2

coin1

tail

coin2

coin1

head

Prio

r

...

= P

P1

+ P2

+ P3

P11 P12 P13* *

P10 =

P20 + P4

...

Proof Theoretic

*

Page 8: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Stochastic Grammars

Weighted Rewrite Rules

SNP VP

VP PP

i saw

V NP P NP

Det N Det N

man with the telescopethe

1.0 : S NP, VP

1/3 : NP i 1/3 : NP Det, N 1/3 : NP NP, PP

1.0 : Det the

0.5 : N man 0.5 : N telescope

0.5 : VP V, NP 0.5 : VP VP, PP

1.0 : PP P, NP

1.0 : V saw

1.0 : P with1.0 * 1/3 * 0.5 * 0.5 * 1.0 * ...= 0.00231

Proof Theoretic

[Manning, Schütze 99]

Upgrade HMMs (regular

languages) to more complex

languages such as

context-free languages.

Page 9: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Upgrading to First-Order Logic

The maternal information mc/2 depends on the maternal and paternal pc/2 information of the mother mother/2: mchrom(fred,a). mchrom(fred,b),...

or better mc(P,a) :- mother(M,P), pc(M,a), mc(M,a). mc(P,a) :- mother(M,P), pc(M,a), mc(M,b). mc(P,b) :- mother(M,P), pc(M,a), mc(M,b). ...

father(rex,fred). mother(ann,fred).

father(brian,doro). mother(utta, doro).

father(fred,henry). mother(doro,henry).

pc(rex,a). mc(rex,a).

pc(ann,a). mc(ann,b).

...

Page 10: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Upgrading - continued

Propositional Clausal LogicExpressions can be true or false

Relational Clausal LogicConstants and variables refer to objects

Full Clausal LogicFunctors aggregate objects

alarm :- burglary, earthquake.

atom

clause

head body

Substitution: Maps variables to terms: {M / ann}:

mc(P,a) :- mother(ann,P),pc(ann,a),mc(ann,a).

Herbrand base: set of ground atoms (no variables):

{mc(fred,fred),mc(rex,fred),…}

atom

mc(P,a) :- mother(ann,P),pc(ann,a),mc(ann,a).clause

head body

variable (placeholder)constant

terms

nat(0).

nat(succ(X)) :- nat(X).

atom

clause

head body

variable

constant

functor

term

Interpretations can be infinite !

nat(0),nat(succ(0)),

nat(succ(succ(0))), ...

Page 11: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Forward Chainingfather(rex,fred). mother(ann,fred). father(brian,doro). mother(utta, doro). father(fred,henry). mother(doro,henry).pc(rex,a). mc(rex,a). pc(ann,a). mc(ann,b)....

mc(P,a) :- mother(M,P), pc(M,a), mc(M,a).

mc(P,a) :- mother(M,P), pc(M,a), mc(M,b).

{M/ann, P/fred}

mc(P,a):- mother(M,P), pc(M,a), mc(M,b).

mc(fred,a)

...

mother(ann,fred). pc(ann,a) mc(ann,b) father(rex,fred). ......

...Set of derivable ground atoms = least Herbrand model

Page 12: ICML-Tutorial, Banff, Canada, 2004 Overview 1.Introduction to PLL 2.Foundations of PLL –Logic Programming, Bayesian Networks, Hidden Markov Models, Stochastic.

ICM

L-T

uto

ria

l, B

anff,

Ca

nad

a, 2

004

Backward Chainingfather(rex,fred). mother(ann,fred). father(brian,doro). mother(utta, doro). father(fred,henry). mother(doro,henry).pc(rex,a). mc(rex,a). pc(ann,a). mc(ann,b)....

mc(P,a) :- mother(M,P), pc(M,a), mc(M,a).

mc(P,a) :- mother(M,P), pc(M,a), mc(M,b).

mother(ann,fred).

{M/ann}pc(ann,a),mc(ann,a)

mother(ann,fred).

{M/ann}pc(ann,a),mc(ann,b)

pc(ann,a).

mc(ann,a)

fail

pc(ann,a).

mc(ann,b)

success

mc(fred,a)

{P/fred}

mother(M,fred),pc(M,a),mc(M,a)

mc(P,a):- mother(M,P), pc(M,a), mc(M,a).

mother(M,fred),pc(M,a),mc(M,b)

mc(P,a):- mother(M,P), pc(M,a), mc(M,b).{P/fred}


Recommended