ASER A Largescale Eventuality Knowledge Graph Hongming Zhang

  • Slides: 33
Download presentation
ASER: A Large-scale Eventuality Knowledge Graph Hongming Zhang, Xin Liu, Haojie Pan, Yangqiu Song,

ASER: A Large-scale Eventuality Knowledge Graph Hongming Zhang, Xin Liu, Haojie Pan, Yangqiu Song, and Cane Leung Department of CSE, HKUST, Hong Kong Wisers AI Lab, Hong Kong 1

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal:

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal: large-scale and higher-order selectional preference • Application on the Winograd Schema Challenge 2

Natural language conversation requires a lot of commonsense knowledge Interacting with human involves a

Natural language conversation requires a lot of commonsense knowledge Interacting with human involves a lot of commonsense knowledge • Space • Time • Location • State • Causality • Color • Shape • Physical interaction • Theory of mind • Human interactions • … Judy Kegl, The boundary between word knowledge and world knowledge, TINLAP 3, 1987 Ernie Davis, Building AIs with Common Sense, Princeton Chapter of the ACM, May 16, 2019 3

Commonsense Knowledge is the Key • How to define commonsense knowledge? (Liu & Singh,

Commonsense Knowledge is the Key • How to define commonsense knowledge? (Liu & Singh, 2004) • “While to the average person the term ‘commonsense’ is regarded as synonymous with ‘good judgement’, ” • “in the AI community it is used in a technical sense to refer to the millions of basic facts and understandings possessed by most people. ” • “Such knowledge is typically omitted from social communications”, e. g. , • If you forget someone’s birthday, they may be unhappy with you. H Liu and P Singh, Concept. Net - a practical commonsense reasoning tool-kit, BTTJ, 2004 4

How to collect commonsense knowledge? • Concept. Net 5 (Speer and Havasi, 2012) •

How to collect commonsense knowledge? • Concept. Net 5 (Speer and Havasi, 2012) • Core is from Open Mind Common Sense (OMCS) (Liu & Singh, 2004) • Essentially a crowdsourcing based approach + text mining 5

The Scale Concept. Net (2002 -now) Database content Resource Capabilities Scales Commonsense Contextual inference

The Scale Concept. Net (2002 -now) Database content Resource Capabilities Scales Commonsense Contextual inference 1. 6 million relations among 300, 000 nodes (2004); Concept. Net 5. 5 (2017) 21 million edges over 8 million nodes (1. 5 million are English) OMCS (from the public) (automatic) • “A founder of AI, Marvin Minsky, once estimated that ‘. . . commonsense is knowing maybe 30 or 60 million things about the world and having them represented so that when something happens, you can make analogies with others’. ” (Liu & Singh, 2004) Slides credit: Haixun Wang 6

What contribute to Concept. Net 5. 5 (21 million edges and over 8 million

What contribute to Concept. Net 5. 5 (21 million edges and over 8 million nodes)? • Facts acquired from Open Mind Common Sense (OMCS) (Singh 2002) and sister projects in other languages (Anacleto et al. 2006) • Information extracted from parsing Wiktionary, in multiple languages, with a custom parser (“Wikiparsec”) • “Games with a purpose” designed to collect common knowledge (von Ahn, Kedia, and Blum 2006) (Nakahara and Yamada 2011) (Kuo et al. 2009) • Open Multilingual Word. Net (Bond and Foster 2013), a linked-data representation of. Word. Net (Miller et al. 1998) and its parallel projects in multiple languages • JMDict (Breen 2004), a Japanese-multilingual dictionary • Open. Cyc, a hierarchy of hypernyms provided by Cyc (Lenat and Guha 1989), a system that represents commonsense knowledge in predicate logic Most of them are entity-centric knowledge, there are only 116, 097 edges among 74, 989 nodes about events • A subset of DBPedia (Auer et al. 2007), a network of facts extracted from Wikipedia infoboxes Speer, Chin, and Havasi, Concept. Net 5. 5: An Open Multilingual Graph of General Knowledge. AAAI 2017. 7

Nowadays, • Many large-scale knowledge graphs about entities and their attributes (property-of) and relations

Nowadays, • Many large-scale knowledge graphs about entities and their attributes (property-of) and relations (thousands of different predicates) have been developed • Millions of entities and concepts • Billions of relationships NELL Google Knowledge Graph (2012) 570 million entities and 18 billion 8 facts

However, • Semantic meaning in our language can be described as ‘a finite set

However, • Semantic meaning in our language can be described as ‘a finite set of mental primitives and a finite set of principles of mental combination (Jackendoff, 1990)’. • The primitive units of semantic meanings include • • • Thing (or Object, Entity, Concept, Instance, etc. ), Activity, State, How to collect more Eventuality Event, knowledge about Place, eventualities rather Path, than entities and Property, relations? Amount, etc. Ray Jackendoff. (Ed. ). (1990). Semantic Structures. Cambridge, Massachusetts: MIT Press. 9

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal:

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal: large-scale and higher-order selectional preference • Application on the Winograd Schema Challenge 10

“Linguistic description – grammar = semantics” The lower bound of a semantic theory (Katz

“Linguistic description – grammar = semantics” The lower bound of a semantic theory (Katz and Fodor, 1963) • Disambiguation needs both “the speaker's knowledge of his language and his knowledge” (Katz and Fodor, 1963) • Compare semantic meanings by fixing grammar • Syntactically unambiguous Principle #1 Katz, J. J. , & Fodor, J. A. (1963). The structure of a semantic theory. Language, 39(2), 170– 210. 11

Selectional Preference (SP) Principle #2 • The need of language inference based on ‘partial

Selectional Preference (SP) Principle #2 • The need of language inference based on ‘partial information’ (Wilks, 1975) • The soldiers fired at the women, and we saw several of them fall. • The needed partial information: hurt things tending to fall down • “not invariably true” • “tend to be of a very high degree of generality indeed” • Selectional preference (Resnik, 1993) • A relaxation of selectional restrictions (Katz and Fodor, 1963) and as syntactic features (Chomsky, 1965) • Applied to is. A hierarchy in Word. Net and verb-object relations Yorick Wilks. 1975. An intelligent analyzer and understander of English. Communications of the ACM, 18(5): 264– 274. Katz, J. J. , & Fodor, J. A. (1963). The structure of a semantic theory. Language, 39(2), 170– 210. Noam Chomsky. 1965. Aspects of the Theory of Syntax. MIT Press, Cambridge, MA. 12 Philip Resnik. 1993. Selection and information: A class-based approach to lexical relationships. Ph. D. thesis, University of Pennsylvania.

A Test of Commonsense Reasoning • Proposed by Hector Levesque at U of Toronto

A Test of Commonsense Reasoning • Proposed by Hector Levesque at U of Toronto • An example taking from Winograd Schema Challenge • (A) The fish ate the worm. It was hungry. • (B) The fish ate the worm. It was tasty. • On the surface, they simply require the resolution of anaphora • But Levesque argues that for Winograd Schemas, the task requires the use of knowledge and commonsense reasoning http: //commonsensereasoning. org/winograd. html https: //en. wikipedia. org/wiki/Winograd_Schema_Challenge 13

The soldiers fired at the women, and we saw several of them fall. Why

The soldiers fired at the women, and we saw several of them fall. Why is it a challenge? • Must also be carefully written not to betray their answers by selectional restrictions or statistical information about the words in the sentence • (A) The fish ate the worm. It was hungry. • (B) The fish ate the worm. It was tasty. • Designed to be an improvement on the Turing test 14

SP-10 K: A Large-scale Evaluation Set of Selectional Preference • 72 out of 273

SP-10 K: A Large-scale Evaluation Set of Selectional Preference • 72 out of 273 questions satisfying nsubj_amod and dobj_amod relations • Jim yelled at Kevin because he was so upset. • We compare the scores • (yell, upset object) following nsubj_amod • (upset object , yell) following dobj_amod • Results Model Correct Wrong NA Accuracy (predicted) (overall) Stanford 33 35 4 48. 5% 48. 6% End 2 end (Lee et al. , 2018) 36 36 0 50. 0% PP* (Resnik, 1997) 36 19 17 65. 5% 61. 8% SP-10 K 13 0 56 100% 59. 0% dobj_amod Plausibility (lift, heavy object) 9. 17 (design, new object) 8. 00 (attack, small object) 5. 23 (inform, weird object) 3. 64 (earn, rubber object) 0. 63 nsubj_amod Plausibility (evil subject, attack) (recent subject, demonstrate) (random subject, bear) 9. 00 (happy subject, steal) 2. 25 (sunny subject, make) 0. 56 6. 00 4. 00 *PP: posterior probability for SP acquisition using Wikipedia data 15 Hongming Zhang, Hantian Ding, and Yangqiu Song. SP-10 K: A Large-Scale Evaluation Set for Selectional Preference Acquisition. ACL, 2019.

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal:

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal: large-scale and higher-order selectional preference • Application on the Winograd Schema Challenge 16

Higher-order Selectional Preference • The need of language inference based on ‘partial information’ (Wilks,

Higher-order Selectional Preference • The need of language inference based on ‘partial information’ (Wilks, 1975) • The soldiers fired at the women, and we saw several of them fall. • The needed partial information: hurt things tending to fall down • Many ways to represent it, e. g. , (hurt, X) connection (X, fall) • How to scale up the knowledge acquisition and inference? 17

ATOMIC • Crowdsoursing 9 Types of IF -THEN relations • All entity information has

ATOMIC • Crowdsoursing 9 Types of IF -THEN relations • All entity information has been removed to reduce ambiguity • Arbitrary texts Maarten Sap, Ronan Le. Bras, Emily Allaway, Chandra Bhagavatula, Nicholas Lourie, Hannah Rashkin, Brendan Roof, Noah A. 18 Smith, Yejin Choi: ATOMIC: An Atlas of Machine Commonsense for If-Then Reasoning. AAAI, 2019.

Knowly. Wood • Perform information extraction from free text • Mostly movie scripts and

Knowly. Wood • Perform information extraction from free text • Mostly movie scripts and novel books • Four relations: previous, next, parent, similarity • No subject information • Only verb+object Niket Tandon, Gerard de Melo, Abir De, Gerhard Weikum: Knowlywood: Mining Activity Knowledge From Hollywood Narratives. 19 CIKM 2015: 223 -232

A New Knowledge Graph: ASER Activities, States, Events, and their Relations • Use verb-centric

A New Knowledge Graph: ASER Activities, States, Events, and their Relations • Use verb-centric patterns from dependency parsing • Principle #1: For comparing semantics by fixing syntax (Katz and Fodor, 1963) • Maintain a set of key tags and a set of auxiliary tags • Principle #2: For obtaining frequent ‘partial information’ (Wilks, 1975) I depart away I sleep I have lunch I sleep Precedence (2) I make a call I sleep Precedence (3) Result (11) I I go slee p Contrast (3) Reason (6) I sleep I am hungry I sleep Conjunction (11) I am tired I sleep Conjunction (1) Result (3) I sleep I rest on a bench have nsubj I dobj lunch A hybrid graph of • Each eventuality is a hyper-edge of words 20 • Heterogeneous edges among eventualities

Eventualities • Using patterns to collect partial information • Six relations are also kept

Eventualities • Using patterns to collect partial information • Six relations are also kept but treated as auxiliary edges • • • advmod, amod, nummod, aux, compound, neg Pattern n 1 -nsubj-v 1 -dobj-n 2 n 1 -nsubj-v 1 -xcomp-a n 1 -nsubj-(v 1 -iobj-n 2)-dobj-n 3 n 1 -nsubj-a 1 -cop-be n 1 -nsubj-v 1 -xcomp-n 2 -cop-be n 1 -nsubj-v 1 -xcomp-v 2 -dobj-n 2 n 1 -nsubj-v 1 -xcomp-v 2 (n 1 -nsubj-a 1 -cop-be)-nmod-n 2 -case-p 1 n 1 -nsubj-v 1 -nmod-n 2 -case-p 1 (n 1 -nsubj-v 1 -dobj-n 2)-nmod-n 3 -case-p 1 n 1 -nsubjpass-v 1 -nmod-n 2 -case-p 1 Code s-v-o s-v-a s-v-o-o s-be-a s-v-be-o s-v-v s-be-a-p-o s-v-o-p-o spass-v-p-o Example `The dog barks' `I love you' `He felt ill' `You give me the book' `The dog is cute' `I want to be slim' `I want to be a hero' `I want to eat the apple' `I want to go' `It' cheap for the quality' `He walks into the room' `He plays football with me' `The bill is paid by me' 21

Extraction Results • Extract examples from 11 -billion tokens from Yelp, NYT, Wiki, Reddit,

Extraction Results • Extract examples from 11 -billion tokens from Yelp, NYT, Wiki, Reddit, Subtitles, E-books • Evaluate about 200 examples in each pattern using Amazon Turk 1000 100. 00% 98. 00% 96. 00% 100 94. 00% 92. 00% 10 90. 00% 88. 00% 1 #Eventuality (In millions) #Unique (In millions) #Accuracy -o -p sp as s-v sp s-v -o -p -o -o -p s-v s-b e- ap -o -v s-v o e-b s-v -b e- a a es-b -o -o -a -o s-v 0. 1 s-v 86. 00% 84. 00% 82. 00% 22

Distribution • Frequency characterizes selectional preference, e. g. , • `The dog is chasing

Distribution • Frequency characterizes selectional preference, e. g. , • `The dog is chasing the cat, it barks loudly‘ • ‘dog barks’ appears 12, 247 • ‘cat barks’ never appears 23

Eventuality Relations: Pattern Matching + Bootstrapping • Seeds from Penn Discourse Treebank (PDTB) (Prasad

Eventuality Relations: Pattern Matching + Bootstrapping • Seeds from Penn Discourse Treebank (PDTB) (Prasad et al. , 2007) • 14 relations taking from Co. NLL shared task • More frequent relations • Less ambiguous connectives • ‘so that’ 31 times only in ‘Result’ relations • Some are ambiguous • ‘while’: Conjunction 39 times, Contrast 111 times, Expectation 79 times, and Concession 85 times Relation Type Seed Patterns Precedence E 1 before E 2; E 1 , then E 2; E 1 till E 2; E 1 until E 2 Succession E 1 after E 2; E 1 once E 2 Synchronous E 1, meanwhile E 2; E 1 meantime E 2; E 1, at the same time E 2 Reason E 1, because E 2 Result E 1, so E 2; E 1, thus E 2; E 1, therefore E 2; E 1, so that E 2 Condition E 1, if E 2; E 1, as long as E 2 Contrast E 1, but E 2; E 1, however E 2; E 1, by contrast E 2; E 1, in contrast E 2; E 1 , on the other hand, E 2; E 1, on the contrary, E 2 Concession E 1, although E 2 Conjunction E 1 and E 2; E 1, also E 2 Instantiation E 1, for example E 2; E 1, for instance E 2 Restatement E 1, in other words E 2 Alternative E 1 or E 2; E 1, unless E 2; E 1, as an alternative E 2; E 1, otherwise E 2 Chosen. Alternative E 1, E 2 instead Exception E 1, except E 2 Prasad, R. , Miltsakaki, E. , Dinesh, N. , Lee, A. , Joshi, A. , Robaldo, L. , & Webber, B. L. (2007). The penn discourse treebank 2. 0 annotation manual. 24 Nianwen Xue, Hwee Tou Ng, Sameer Pradhan, Rashmi Prasad, Christopher Bryant, Attapol T. Rutherford. The Co. NLL-2015 Shared Task on Shallow Discourse Parsing.

Eventuality Relations: Pattern matching + Bootstrapping • Bootstrapping: incrementally self-supervised learning • For each

Eventuality Relations: Pattern matching + Bootstrapping • Bootstrapping: incrementally self-supervised learning • For each instance x = (E 1; E 2; sentence) • Use three bidirectional LSTMs • Reduce the confident rate by iterations to reduce error propagation 25

Extraction Results • Left: number of relations and overall accuracy • Right: accuracy of

Extraction Results • Left: number of relations and overall accuracy • Right: accuracy of each relations for the last iteration • Each point is annotated with 200 examples by Amazon Turk 26

#Eventualities #Relations oo lyw ow Kn (f ul l) ER AS e) or (c

#Eventualities #Relations oo lyw ow Kn (f ul l) ER AS e) or (c ER AS 5) 2 01 e t a l. , 8) 1000 X larger do n 20 1 . , 1, 000, 000 d (T an al e t ) al. , 20 18 e t ap (S IC AT OM lvi 8) 2 01 4) 00 , 2 gh e t a l. , ith Da m (S in d 20 03 ) l. , t a Si n & iu t ( L Pr o. P or a ( M en t 2 pt Ne ky e 05 ) 100, 000 Ev ce Co n vs jo 20 . , 20 14 ) 98 ) 1 9 l. , t a l er e t a la r e lm Pa us te an k ( P e. B Ti m k ( Ba n Pr op gu i E (A ak er e t a l. , (B et e. N AC Fr am Scales of Verb Related Knowledge Graphs 100 X larger 10, 000 1, 000 100, 000 1, 000 27

Multi-hop Reasoning based on Selectional Preference • One-hop • nsubj: (`sing’-nsubj-`singer’-) > (`sing’-nsubj-`house’) •

Multi-hop Reasoning based on Selectional Preference • One-hop • nsubj: (`sing’-nsubj-`singer’-) > (`sing’-nsubj-`house’) • dobj: (`eat’-dobj-`food’) > (`eat’-dobj-`rock’) • Two-hop • nsubj-amod/dobj-amod • (`eat’-nsubj-`[SUB]’-amod-`hungry’) > (`eat’-dobj-`[OBJ]’-amod-`hungry’) • Multi-hop • (`X eat dinner’->Causes->`X be full’) hungry’) > (`X eat dinner’->Causes->`X be

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal:

Outline • Motivation: NLP and commonsense knowledge • Consideration: selectional preference • New proposal: large-scale and higher-order selectional preference • Application on the Winograd Schema Challenge 29

Inference for Winograd Schema Challenge Question 97. The fish ate the worm. It was

Inference for Winograd Schema Challenge Question 97. The fish ate the worm. It was hungry. 98. The fish ate the worm. It was tasty. ASER Knowledge ASER(‘X ate Y’, ‘X was hungry’) = 18 ASER(‘X ate Y’, ‘Y was hungry’) = 1 ASER(‘X ate Y’, ‘X was tasty’) = 0 ASER(‘X ate Y’, ‘Y was tasty’) = 7 Extracted Eventualities The fish: (‘X ate Y’, ‘X was hungry’) the worm: (‘X ate Y’, ‘Y was hungry’) The fish: (‘X ate Y’, ‘X was tasty’) the worm: (‘X ate Y’, ‘Y was tasty’) Prediction The fish the worm 30

Results on Cases Consistent with Our Patterns • We selected a subset of 165

Results on Cases Consistent with Our Patterns • We selected a subset of 165 questions • The sentence does not have a subordinate clause • The targeting pronoun is covered by a pattern we used Methods Random Guess Deterministic (Raghunathan et al. , 2010) Statistical (Clark & Manning, 2015) Deep-RL (Clark & Manning, 2016) End 2 end (Lee et al. , 2018) Knowledge Hunting (Emami et al. , 2018) LM (single) (Trinh & Le, 2018) SP (human) (Zhang et al. , 2019) SP (PP) (Zhang et al. , 2019) ASER Correct 83 75 75 80 79 94 90 15 50 63 Wrong 82 71 78 76 84 71 75 0 26 27 Predicted NA Accuracy 0 50. 30% 19 51. 40% 12 49. 00% 9 51. 30% 2 48. 50% 0 56. 90% 0 54. 50% 150 100% 89 65. 80% 75 70. 00% Overall Accuracy 50. 30% 51. 20% 49. 10% 51. 20% 48. 50% 56. 90% 54. 50% 57. 30% 60. 90% 31

Overall Results Methods Random Guess Knowledge Hunting (Emami et al. , 2018) LM (single)

Overall Results Methods Random Guess Knowledge Hunting (Emami et al. , 2018) LM (single) (Trinh & Le, 2018) LM (Ensembel) (Trinh & Le, 2018) SP (human) (Zhang et al. , 2019) SP (PP) (Zhang et al. , 2019) GPT-2 (Radford et al. , 2019) BERT (Kocijan et al. , 2019) BERT+WSCR (Kocijan et al. , 2019) ASER (inference) BERT+ASER BERT+WSCR+ASER Supervision NA NA WSCR NA WSCR+ASER Overall Accuracy 50. 2% 57. 3% 54. 5% 61. 5% 52. 7% 54. 4 70. 7% 61. 9% 71. 4% 56. 6% 64. 5% 72. 5% WSCR: Rahman and Ng’s dataset (2012) ASER: Automatically constructed patterns as training examples 32

Conclusions and Future Work • We extended the concept of selectional preference for commonsense

Conclusions and Future Work • We extended the concept of selectional preference for commonsense knowledge extraction • Many potential extensions • • More patterns to cover More links in the KG More types of relations More applications • Code and data Thank you • https: //github. com/HKUST-Know. Comp/ASER • Project Homepage • https: //hkust-knowcomp. github. io/ASER/ 33