CC-BY Fabian M. Suchanek Fact Extraction by Reasoning 60 >path
Semantic IE You are here 2 Knowledge representation Entity Recognition Entity Disambiguation singer Fact Extraction          KB construction Entity Typing singer Elvis
Problems in extending a KB 3 “Hermione is married to Ron”
Problems in extending a KB 4 “Hermione is married to Ron” +  ? “Ron”
Problems in extending a KB 5 “Hermione is married to Ron” “Ron” ? ? +  ?
Problems in extending a KB 6 “Hermione is married to Ron” “Ron” ? ? killed ? spouse ? +  ?
Problems in extending a KB 7 “Hermione is married to Ron” “Ron” ? ? Fact extraction faces at least 3 problems: •  Understand patterns •  Disambiguate entities •  Resolve inconsistencies (“X is married to Y” = killed(X,Y)?) (“Ron”= Ronald Reagan?) (Reagan married to 2 women?) killed ? spouse ? Let’s solve all three problems together! +  ?
Idea: Solve all problems together hasSpouse(Hermione,RonWeasley)  8 “Hermione is married to Ron” “Ron” Magic happens here
How to holistically reason on Fact Extraction 9 There are several ways to model a fact extraction problem under constraints (disambiguation, logical coherence, etc.): •   as a maximum satisfiability (MaxSat) problem •   as an integer logic programming problem •   as a constraint satisfaction problem •   as a Markov Logic problem Most of these are relaxations or generalizations of the MaxSat problem -> we’ll look into this one! ->Weighted-max-sat Magic happens here
Back to our problem A ∧ B ⇒ C  transform everything to logical formulas hasSpouse(Hermione,RonWeasley)  Find best conclusion 10 “Hermione is married to Ron” “Ron”
Consistency Consistency constraints can be expressed by rules: Rules and weights can be designed manually. Such rules will guide our information extraction process. hasSpouse(X,Y)∧different(Y,Z)⇒ ¬ hasSpouse(X,Z) [10]  hasSpouse(X,Y) ⇒ type(X,person) [20]  loves(X,Y)∧ ¬ hasSpouse(X,Y) ⇒ type(X,stupidPerson) [3]  11 ...
A KB can be expressed as rules Every fact from the KB can be expressed as a weighted rule: type(Hermione,Person) [100]  ⇒ type(Hermione,Person) [100]  12 High weight This is corresponds to the rule
Assuming completeness If we assume the KB to be complete on a relation, we can create negative rules: ¬ type(Hermione,chicken) [100]  ¬ type(Hermione,cat) [100]  ¬ type(Hermione,mouse) [100]  ¬ type(Hermione,X) [100]  For all X  where type(Hermione,X) ∕∈ KB  , add 13 ... i.e.
Expressing the corpus as rules 14 Hermione married Ron. D42: occurs (“Hermione”, “married”, “Ron”)
Expressing the corpus as rules occurs (“Hermione”, “married”, “Ron”) 15 Hermione married Ron. D42: means (“Ron”, RonaldReagan ) means (“Ron”, RonWeasley ) The word “Ron” can mean different entities (from the KB): But only one entity in practice: means(X,Y) ∧ different(Y,Z) ⇒ ¬ means(X,Z) 
Weights for corpus rules 16 occurs (“Hermione”, “married”, “Ron”)[3] means (“Ron”, RonaldReagan )[5] means (“Ron”, RonWeasley )[10] means(X,Y) ∧ different(Y,Z) ⇒ ¬ means(X,Z)  [100] # occurrences From disambiguation by context/prior “Hard” rule with very high weight Let us ignore the weights for a moment.
Deducing patterns 17 hasSpouse KB Ron married Nacy. +
Deducing patterns 18 hasSpouse KB Ron married Nacy. “X married Y” is pattern for hasSpouse (X,Y) + =
Deducing patterns “X married Y” is pattern for hasSpouse (X,Y) 19 hasSpouse KB Ron married Nacy. + = hasSpouse(RonaldReagan,NancyDavis) 
Deducing patterns “X married Y” is pattern for hasSpouse (X,Y) 20 hasSpouse KB Ron married Nacy. occurs (“Ron”,“married”, “Nancy”) means (“Ron”, RonaldReagan ) means (“Nancy”, NancyDavis ) + = hasSpouse(RonaldReagan,NancyDavis) 
Deducing patterns “X married Y” is pattern for hasSpouse (X,Y) 21 hasSpouse KB Ron married Nacy. occurs (“Ron”,“married”, “Nancy”) means (“Ron”, RonaldReagan ) means (“Nancy”, NancyDavis ) + = occurs(X,P,Y)  ∧ means(X,X')  ∧ means(Y,Y')  ⇒ isPatternFor(P,R)  ∧ R(X',Y')  hasSpouse(RonaldReagan,NancyDavis) 
Deducing patterns “X married Y” is pattern for hasSpouse (X,Y) occurs(X,P,Y)  ∧ means(X,X')  ∧ means(Y,Y')  ⇒ isPatternFor(P,R)  ∧ R(X',Y')  22 hasSpouse KB Ron married Nacy. occurs (“Ron”,“married”, “Nancy”) means (“Ron”, RonaldReagan ) means (“Nancy”, NancyDavis ) hasSpouse(RonaldReagan,NancyDavis)  + = isPatternFor( “married”,hasSpouse) 
Applying patterns “X married Y” is pattern for hasSpouse (X,Y) 23 Elvis married Priscilla. >task +
Applying patterns “X married Y” is pattern for hasSpouse (X,Y) 24 Elvis married Priscilla. >task hasSpouse + =
Applying patterns “X married Y” is pattern for hasSpouse (X,Y) 25 hasSpouse Elvis married Priscilla. >task occurs(X,P,Y)  ∧ means(X,X')  ∧ means(Y,Y')  isPatternFor (“married”,hasSpouse ) ∧ isPatternFor(P,R)  ⇒ R(X',Y')  occurs (“Elvis”, “married”, “Priscilla”) means (“Elvis”, ElvisPresley ) means (“Priscilla”, PriscillaPresley ) + =
Applying patterns “X married Y” is pattern for hasSpouse (X,Y) occurs(X,P,Y)  ∧ means(X,X')  ∧ means(Y,Y')  isPatternFor (“married”,hasSpouse ) ∧ isPatternFor(P,R)  ⇒ R(X',Y')  26 hasSpouse Elvis married Priscilla. occurs (“Elvis”, “married”, “Priscilla”) means (“Elvis”, ElvisPresley ) means (“Priscilla”, PriscillaPresley ) >task hasSpouse(ElvisPresley,PriscillaPresley)   + =
occurs(X,P,Y)  ∧ means(X,X')  ∧ means(Y,Y')  ∧ isPatternFor(P,R)  ⇒ R(X',Y')  Task: Pattern deduction by rules ∧ R(X',Y')  ⇒ isPatternFor(P,R)  ∧ means(X,X')  ∧ means(Y,Y')  occurs(X,P,Y)  2: means (“Elvis”,ElvisPresley ) 3: means (“Priscilla”, PriscillaPresley ) 4: hasSpouse(PriscillaPresley,ElvisPresley)  1: occurs (“Priscilla”, “adores”, “Elvis”) 5: occurs (“Madonna”, “adores”, “Elvis”) 6: means (“Madonna”, Madonna ) 27 Pattern deduction: Pattern application: Compute facts that will be in the best world. All rules have weight 1.
Life is not easy • words are ambiguous   • corpora may err   • parsing may fail   • contradictions may occur occurs (“Priscilla”, “loves”, “Mike”) 28 “Ron” “Madonna is married to Elvis” “Elvis thinks that Priscilla loves Mike.” Reagan was married twice. => we will compute the most plausible world
Finding the most plausible world “Hermione married Ron” “Ron” spouse 29 World1: spouse World2: spouse
Finding the most plausible world “Hermione married Ron” World1: spouse World2: spouse occurs (“Hermione”, “married”,“Ron”)[1] isPatternFor (“married”, spouse )[1] means (“Hermione”, Hermione )[5] means (“Ron”, RonWeasley )[2] means (“Ron”, RonaldReagan )[3] means(X, Y) ∧ Y ∕ = Z ⇒ ¬ means(X, Z) [10] spouse(X, Y) ∧ Y∕ = Z ⇒ ¬ spouse(Z, X) [6] + Symmetry of marriage + Pattern Application Rule [10] + Facts from the KB [100] 30 “Ron” spouse
Finding the most plausible world “Hermione married Ron” occurs (“Hermione”, “married”,“Ron”)[1] isPatternFor (“married”, spouse )[1] means (“Hermione”, Hermione )[5] means (“Ron”, RonWeasley )[2] means (“Ron”, RonaldReagan )[3] means(X, Y) ∧ Y ∕ = Z ⇒ ¬ means(X, Z) [10] spouse(X, Y) ∧ Y∕ = Z ⇒ ¬ spouse(Z, X) [6] + Symmetry of marriage + Pattern Application Rule [10] + Facts from the KB [100] loses 2 wins 3 loses 6 31 World1: spouse World2: spouse “Ron” spouse
Finding the most plausible world loses 2 wins 3 loses 6 “Hermione married Ron” occurs (“Hermione”, “married”,“Ron”)[1] isPatternFor (“married”, spouse )[1] means (“Hermione”, Hermione )[5] means (“Ron”, RonWeasley )[2] means (“Ron”, RonaldReagan )[3] means(X, Y) ∧ Y ∕ = Z ⇒ ¬ means(X, Z) [10] spouse(X, Y) ∧ Y∕ = Z ⇒ ¬ spouse(Z, X) [6] + Symmetry of marriage + Pattern Application Rule [10] + Facts from the KB [100] loses 3 wins 6 wins 2 32 World1: spouse World2: spouse “Ron” spouse
Summary: Fact extraction by reasoning Fact extraction by reasoning converts •   background knowledge (existing KB) •   logical constraints •   the corpus into logical rules and aims to find the most plausible possible world given these evidences. 33 stupid happy spouse is is
References Suchanek et al: “SOFIE - a self-organizing framework for IE”, WWW 2009 Weikum et al: “Machine Knowledge” , 2021 34