Markov Logic Network - University Of Illinoisswoh.web.engr.illinois.edu › ... › handout ›...

Preview:

Citation preview

MarkovLogicNetworkMatthewRichardson

andPedroDomingos

IE5982016,PresentbyHaoWu(haowu4)

Motivation- UnifyingLogicandProbability

• Logicandprobabilityaretwomostimportwayofreasoning.• “Classic”AIfavorslogicapproaches,whichismostlyrulebased.

• Theoremproofing.• Cannotdealwithuncertainty,verylimitedsuccess.

• “Modern”AIapproachesaredominatedbymoreprobabilisticmethods,whichhandlestheuncertaintyandnoiseinrealdata.

• DeepLearning,PGMandetc.• Hugesuccess

• SowhywestillwanttohaveLogic?(Whynotlearneverything?)

Whylogicisstillinteresting

• Logic,especially,First-orderlogicprovideaexpressive,compactandelegantwaytoexpressknowledge.

• Itonlytake30+linetowritedowntheruleofSudokuinProlog(andthesamecodecanalsosolveit).Howmanydatadoyouneedtolearneverythingfromscratch?

• Wewantanicewaytorepresentandsolveourproblems(efficiently).• Useexpertknowledgetohelpthedatadrivensystem.

• MarkovLogicisawaytoconnectsLogicandProbability.• Logichandlescomplexity.• Probabilityhandlesuncertainty.

Background:MarkovNetwork

• Potentialfunctionsdefinedovercliques

∏Φ=c

cc xZxP )(1)(

Smoking

Cough

Cancer

Asthma

FirstOrderLogic• Constants,variables,functions,predicatesE.g.:Anna,x,MotherOf(x),Friends(x,y)

• Literal: Predicateoritsnegation• Clause: Disjunctionofliterals• Grounding: ReplaceallvariablesbyconstantsE.g.:Friends(Anna,Bob)

• World (model,interpretation):Assignmentoftruthvaluestoallgroundpredicates

Comparision

( ))()(),(,)()(

ySmokesxSmokesyxFriendsyxxCancerxSmokesx

⇔⇒∀

⇒∀FOL:

MRF:

Smokes(B)

Cancer(A) Cancer(B)

Friends(A,B)

Smokes(A)

MarkovLogicNetwork

• AMarkovLogicNetwork(MLN) isasetofpairs(F,w) where• F isaformulainfirst-orderlogic• w isarealnumber

*Andweneedadatabasethatcontainsconstantsforgrounding.

( ))()(),(,)()(

ySmokesxSmokesyxFriendsyxxCancerxSmokesx

⇔⇒∀

⇒∀

1.15.1

( ))()(),(,)()(

ySmokesxSmokesyxFriendsyxxCancerxSmokesx

⇔⇒∀

⇒∀

1.15.1

+ Two constants: Anna (A) and Bob (B)

Cancer(A)

Smokes(A)Friends(A,A)

Friends(B,A)

Smokes(B)

Friends(A,B)

Cancer(B)

Friends(B,B)

MarkovLogicNetwork:Definition• Eachgroundformuladefinesaclique

• isthenumberoftruegroundingofformulai• isthestate(truthvalue)ofatomsinformulai

MarkovLogicNetworks

• A template forgroundMarkovRandomField.• CanhavetypetoreducethenumberofpredicateXconstants.

• i.e.Humancanonlybefriendwithanotherhuman.

• Expressivity:• Whensetallweighttoinfinitelarge,itbecomesFOL.• Everyprobabilitydistributionoverdiscreteorfinite- precisionnumericvariablescanberepresented asaMarkovlogicnetwork.

Inference(SameasinferenceonMRF*)*SometimeneedalittletwistforMCMCstyleinference

• MAPInference:

• ConditionalInference

)|(maxarg xyPy

• Learnfromadatabase• Cantolearnbothweights(parameters)andFOLformula(structure):

• Learningweights.• Byoptimizelikelihood.

• Learningformula:(InductiveLogicProgramming)• AnILPsystemwillderiveahypothesised logicprogramwhichentailsallthepositiveandnoneofthenegativeexamples.

• UseexistingInductivelogicprogrammingsystem.

Learning

Learningweight

• Optimizelikelihood.(Generativeapproach)

• Generalizedtoohard,doPseudo-likelihoodinstead.• CountingtruegroundingsofafirstorderclauseinaKBis#Pcomplete

• Optimizeconditionallikelihood.(Discriminativeapproach)

( )∑ ∑

=

−====

'

),'(exp

log),()|(log)(

yi iix

xi

ii

xynwZ

ZxynwxXyYPwf

( )∑ ∑

=

−===

xi ii

iii

xnwZ

ZxnwxXPwf

)'(exp

log)()(log)(

∑ ==l

lll xMBxXPxPL ))(|(log)(log

Application- Entityresolution(CitationDB)

• Author(bib,author)Title(bib,title)Venue(bib,venue)• HasWord(author,word)• HasWord(title,word)• HasWord(venue,word)• SameAuthor(author1,author2)• SameTitle(title1,title2)• SameVenue(venue1,venue2)• SameBib(bib1,bib2)

Application- Entityresolution

• Title(b1,t1)∧ Title(b2,t2)∧ HasWord(t1,+w)∧ HasWord(t2,+w)⇒SameBib(b1,b2)

• Author(b1,a1)∧ Author(b2,a2)∧ SameBib(b1,b2)⇒SameAuthor(a1,a2)

• Author(b1,a1)∧ Author(b2,a2)∧ SameAuthor(a1,a2)⇒Samebib(b1,b2)

Recommended