question answering (and textual...

63
Question Answering (and Textual Entailment) Prof. Sameer Singh CS 295: STATISTICAL NLP WINTER 2017 March 14, 2017 Based on slides from Dan Jurafsky, Yejin Choi, Stephen Clark, Dan Klein, Niranjan Balasubramanian, and everyone else they copied from.

Upload: others

Post on 09-May-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

QuestionAnswering(andTextualEntailment)

Prof.SameerSinghCS295:STATISTICALNLP

WINTER2017

March14,2017

BasedonslidesfromDanJurafsky,YejinChoi,StephenClark,DanKlein,Niranjan Balasubramanian,andeveryoneelsetheycopiedfrom.

Page 2: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Upcoming…

• Homework4wasdueonlastnight• Lowestgradeofthehomeworks willbedroppedHomework

• Finalreportdueinaweek:March20,2017• Instructionscomingsoon:ACLstyle,5pages(+references)Project

• Papersummariesduetonight• Summary2gradedSummaries

CS295:STATISTICALNLP(WINTER2017) 2

TA/InstructorEvaluationsareavailable!

Page 3: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Outline

QuestionAnswering

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 3

IR-BasedQASystem

OtherExtensions

Page 4: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Outline

QuestionAnswering

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 4

IR-BasedQASystem

OtherExtensions

Page 5: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

QuestionsinModernSystemsFactoidquestions◦ Whowrote“TheUniversalDeclarationofHumanRights”?◦ Howmanycaloriesarethereintwoslicesofapplepie?◦ Whatistheaverageageoftheonsetofautism?◦ WhereisAppleComputerbased?

Complex(narrative)questions:◦ Inchildrenwithanacutefebrileillness,whatistheefficacyofacetaminopheninreducingfever?

◦ WhatdoscholarsthinkaboutJefferson’spositionondealingwithpirates?

CS295:STATISTICALNLP(WINTER2017) 5

Page 6: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Commercialsystems:mainlyfactoidquestions

WhereistheLouvreMuseumlocated? InParis,France

What’stheabbreviation forlimitedpartnership? L.P.

What arethenamesofOdin’sravens? Huginn andMuninn

What currencyisusedinChina? Theyuan

Whatkindofnutsareusedinmarzipan? almonds

WhatinstrumentdoesMaxRoachplay? drums

WhatisthetelephonenumberforStanfordUniversity? 650-723-2300

CS295:STATISTICALNLP(WINTER2017) 6

Page 7: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

ParadigmsforQA

IR-basedapproaches◦ TREC;IBMWatson;Google

Knowledge-basedandHybridapproaches◦ IBMWatson;AppleSiri;WolframAlpha;TrueKnowledgeEvi

CS295:STATISTICALNLP(WINTER2017) 7

Page 8: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Manyquestionscanalreadybeansweredbywebsearch

CS295:STATISTICALNLP(WINTER2017) 8

Page 9: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

IR-basedQuestionAnswering

CS295:STATISTICALNLP(WINTER2017) 9

Page 10: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

IR-basedFactoidQA

CS295:STATISTICALNLP(WINTER2017) 10

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 11: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Knowledge-basedQA(Siri)Buildasemanticrepresentationofthequery◦ Times,dates,locations,entities,numericquantities

Mapfromthissemanticstoquerystructureddataorresources◦ Geospatialdatabases◦ Ontologies(Wikipediainfoboxes,dbPedia,WordNet,Yago)◦ Restaurantreviewsourcesandreservationservices◦ Scientificdatabases

CS295:STATISTICALNLP(WINTER2017) 11

Page 12: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Hybridapproaches(Watson)Buildashallowsemanticrepresentationofthequery

GenerateanswercandidatesusingIRmethods◦ Augmentedwithontologiesandsemi-structureddata

Scoreeachcandidateusingricherknowledgesources◦ Geospatialdatabases◦ Temporalreasoning◦ Taxonomicalclassification

CS295:STATISTICALNLP(WINTER2017) 12

Page 13: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

IBM’sWatson

WonJeopardy onFebruary16,2011!

13

WILLIAMWILKINSON’S“ANACCOUNTOFTHEPRINCIPALITIESOF

WALLACHIAANDMOLDOVIA”INSPIREDTHISAUTHOR’SMOSTFAMOUSNOVEL

BramStoker

CS295:STATISTICALNLP(WINTER2017)

Page 14: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

MotivationforWatson

CS295:STATISTICALNLP(WINTER2017) 14

Page 15: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

SingleSourceisnotSufficient

CS295:STATISTICALNLP(WINTER2017) 15

Page 16: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

WatsonArchitecture

CS295:STATISTICALNLP(WINTER2017) 16

. . .

Models

Answer & Confidence

Question

Evidence

Sources

Models

Models

Models

Models

ModelsPrimarySearch

CandidateAnswer

Generation

Answer Sources Evidence

RetrievalEvidence Scoring

Learned Modelshelp combine and

weigh the Evidence

Hypothesis and Evidence Scoring

Merging &

Ranking

Synthesis

Page 17: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

WatsonPerformance

CS295:STATISTICALNLP(WINTER2017) 17

Page 18: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Outline

QuestionAnswering

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 18

IR-BasedQASystem

OtherExtensions

Page 19: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

IR-basedFactoidQA

CS295:STATISTICALNLP(WINTER2017) 19

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 20: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

IR-basedFactoidQAQUESTIONPROCESSING◦ Detectquestiontype,answertype,focus,relations◦ Formulatequeriestosendtoasearchengine

PASSAGERETRIEVAL◦ Retrieverankeddocuments◦ Breakintosuitablepassagesandrerank

ANSWERPROCESSING◦ Extractcandidateanswers◦ Rankcandidates

◦ usingevidencefromthetextandexternalsources

CS295:STATISTICALNLP(WINTER2017) 20

Page 21: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FactoidQ/A

CS295:STATISTICALNLP(WINTER2017) 21

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 22: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

QuestionProcessingAnswerTypeDetection◦ Decidethenamedentitytype(person,place)oftheanswer

QueryFormulation◦ ChoosequerykeywordsfortheIRsystem

QuestionTypeclassification◦ Isthisadefinitionquestion,amathquestion,alistquestion?

FocusDetection◦ Findthequestionwordsthatarereplacedbytheanswer

RelationExtraction◦ Findrelationsbetweenentitiesinthequestion

CS295:STATISTICALNLP(WINTER2017) 22

Page 23: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

QuestionProcessing

AnswerType:USstate

Query:twostates,border,Florida,north

Focus:thetwostates

Relations:borders(Florida,?x,north)

CS295:STATISTICALNLP(WINTER2017) 23

They’rethetwostatesyoucouldbereenteringifyou’recrossingFlorida’snorthernborder

Page 24: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AnswerTypes:NamedEntities

WhofoundedVirginAirlines?PERSON

WhatCanadiancityhasthelargestpopulation?CITY

CS295:STATISTICALNLP(WINTER2017) 24

Page 25: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

PartofAnswerTypeTaxonomy

CS295:STATISTICALNLP(WINTER2017) 25

LOCATION

NUMERIC

ENTITY HUMAN

ABBREVIATIONDESCRIPTION

country city state

datepercent

money

sizedistance

individual

title

group

food

currency

animal

definition

reason expression

abbreviation

Li,Roth.LearningQuestionClassifiers.COLING(2002)

Page 26: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AnswerTypes

CS295:STATISTICALNLP(WINTER2017) 26

Page 27: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

MoreAnswerTypes

CS295:STATISTICALNLP(WINTER2017) 27

Page 28: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AnswertypesinWatson

2500answertypesin20,000Jeopardyquestionsample◦ Themostfrequent200answertypescover<50%ofdata

The40mostfrequentJeopardyanswertypes

he,country,city,man,film,state,she,author,group,here,company,president,capital,star,novel,character,woman,river,island,king,song,part,series,sport,singer,actor,play,team,show,actress,animal,presidential,composer,musical,nation,book,title,leader,game

CS295:STATISTICALNLP(WINTER2017) 28Ferrucci etal.BuildingWatson:AnOverviewoftheDeepQA Project.AIMagazine.2010

Page 29: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AnswerTypeDetection

CS295:STATISTICALNLP(WINTER2017) 29

Hand-writtenRules

Regularexpression-basedrulescangetsomecases:◦ Who{is|was|are|were}PERSON

Otherrulesusethequestionheadword:◦ (theheadwordofthefirstnounphraseafterthewh-word)◦ WhichcityinChinahasmostforeignfinancialcompanies?◦ WhatisthestateflowerofCalifornia?

MachineLearning

QuestionwordsandphrasesPart-of-speechtagsParsefeatures(headwords)NamedEntitiesSemanticallyrelatedwords

Page 30: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FactoidQ/A

CS295:STATISTICALNLP(WINTER2017) 30

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 31: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

KeywordSelectionAlgorithm1.Selectallnon-stopwordsinquotations2.SelectallNNPwordsinrecognizednamedentities3.Selectallcomplexnominals withtheiradjectivalmodifiers4.Selectallothercomplexnominals5.Selectallnounswiththeiradjectivalmodifiers6.Selectallothernouns7.Selectallverbs8.Selectalladverbs9.SelecttheQFWword(skippedinallprevioussteps)10.Selectallotherwords

CS295:STATISTICALNLP(WINTER2017) 31Moldovan,Harabagiu,Pasca,Mihalcea,Goodrum,GirjuandRus.TREC(1999)

Page 32: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Choosingkeywords

CS295:STATISTICALNLP(WINTER2017) 32

Whocoinedtheterm“cyberspace”inhisnovel“Neuromancer”?

1 1

4 4

7

cyberspace/1Neuromancer/1term/4novel/4coined/7

Page 33: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FactoidQ/A

CS295:STATISTICALNLP(WINTER2017) 33

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 34: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

PassageRetrieval

RetrievedocumentsusingIR◦ querytermsaskeywords

CS295:STATISTICALNLP(WINTER2017) 34

Step1

Step2Segmentthedocumentsintoshorterunits◦ somethinglikeparagraphs

Step3Passageranking◦ Useanswertypetohelprerank passages

Page 35: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FeaturesforPassageRanking

NumberofNamedEntitiesoftherighttypeinpassage

Numberofquerywordsinpassage

NumberofquestionN-gramsalsoinpassage

Proximityofquerykeywordstoeachotherinpassage

Longestsequenceofquestionwords

Rankofthedocumentcontainingpassage

CS295:STATISTICALNLP(WINTER2017) 35

Eitherinrule-basedclassifiersorwithsupervisedmachinelearning

Page 36: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FactoidQ/A

CS295:STATISTICALNLP(WINTER2017) 36

DocumentDocumentDocument

DocumentDocume

ntDocumentDocume

ntDocument

Question Processing

PassageRetrieval

Query Formulation

Answer Type Detection

Question

Passage Retrieval

Document Retrieval

Answer Processing

Answer

passages

Indexing

RelevantDocs

DocumentDocumentDocument

Page 37: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AnswerExtractionRunananswer-typenamed-entitytaggeronthepassages◦ Eachanswertyperequiresanamed-entitytaggerthatdetectsit◦ IfanswertypeisCITY,taggerhastotagCITY◦ CanbefullNER,simpleregularexpressions,orhybrid

Returnthestringwiththerighttype:◦ WhoistheprimeministerofIndia(PERSON)◦ ManmohanSingh,PrimeMinisterofIndia,hadtoldleftleadersthatthedealwouldnotberenegotiated.

◦ HowtallisMt.Everest?(LENGTH)◦ TheofficialheightofMountEverestis29035feet

CS295:STATISTICALNLP(WINTER2017) 37

Page 38: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

RankingCandidateAnswersButwhatiftherearemultiplecandidateanswers!

Q:WhowasQueenVictoria’ssecondson?

AnswerType:Person

CS295:STATISTICALNLP(WINTER2017) 38

• Passage:TheMariebiscuitisnamedafterMarieAlexandrovna,thedaughterofCzarAlexanderIIofRussiaandwifeofAlfred,thesecondsonofQueenVictoriaandPrinceAlbert

Page 39: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

RankingCandidateAnswersButwhatiftherearemultiplecandidateanswers!

Q:WhowasQueenVictoria’ssecondson?

AnswerType:Person

CS295:STATISTICALNLP(WINTER2017) 39

• Passage:TheMariebiscuitisnamedafterMarieAlexandrovna,thedaughterofCzarAlexanderIIofRussiaandwifeofAlfred,thesecondsonofQueenVictoriaandPrinceAlbert

Page 40: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FeaturesforMLAnswertypematch:Candidatecontainsaphrasewiththecorrectanswertype.

Patternmatch:Regularexpressionpatternmatchesthecandidate.

Questionkeywords:#ofquestionkeywordsinthecandidate.

Keyworddistance:Distanceinwordsbetweenthecandidateandquerykeywords

Noveltyfactor:Awordinthecandidateisnotinthequery.

Appositionfeatures:Thecandidateisanappositivetoquestionterms

Punctuationlocation:Thecandidateisimmediatelyfollowedbyacomma,period,quotationmarks,semicolon,orexclamationmark.

Sequencesofquestionterms:Thelengthofthelongestsequenceofquestiontermsthatoccursinthecandidateanswer.

CS295:STATISTICALNLP(WINTER2017) 40

Page 41: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

ScoringCandidatesinWatsonEachcandidateanswergetsscoresfrom>50components◦ (fromunstructuredtext,semi-structuredtext,triplestores)◦ logicalform(parse)matchbetweenquestionandcandidate◦ passagesourcereliability◦ geospatiallocation◦ Californiais”southwestofMontana”

◦ temporalrelationships◦ taxonomicclassification

CS295:STATISTICALNLP(WINTER2017) 41

Page 42: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Outline

QuestionAnswering

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 42

IR-BasedQASystem

OtherExtensions

Page 43: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AskMSR

CS295:STATISTICALNLP(WINTER2017) 43

1 2

3

45

QuestionProcessing Search

AnswerExtractionAnswerScoring

Dumais, Banko, Brill, Lin, Ng,SIGIR(2002)

Page 44: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Step1:RewriteQueries

CS295:STATISTICALNLP(WINTER2017) 44

Intuition: Questions are often syntactically quite closeto sentences with the answer• Where istheLouvreMuseumlocated?

• TheLouvreMuseumislocated in Paris• Who createdthecharacterofScrooge?

• Charles DickenscreatedthecharacterofScrooge

Page 45: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

FeedbackLoops:FALCON

CS295:STATISTICALNLP(WINTER2017) 45

Page 46: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 46

Whichobjectisthebestconductorofelectricity?(A) awaxcrayon(B)aplasticspoon(C)arubbereraser(D)anironnail

Page 47: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 47

Whichobjectisthebestconductorofelectricity?(A) awaxcrayon(B)aplasticspoon(C)arubbereraser(D)anironnail

Page 48: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 48

Fourthgradersareplanningaroller-skaterace.Whichsurfacewouldbethebestforthisrace?(A)gravel(B)sand(C)blacktop(D)grass

Page 49: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 49

Fourthgradersareplanningaroller-skaterace.Whichsurfacewouldbethebestforthisrace?(A)gravel(B)sand(C)blacktop (D)grass

§ Informationretrievalmethodsfail§ Wordco-occurrencemethodsstruggle

Graders are commonly used in the construction and maintenance of dirt roads and gravel roads

Also strong correlations between:grass « racegravel « surface

Page 50: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 50

Astudentputstwoidenticalplantsinthesametypeandamountofsoil.Shegivesthemthesameamountofwater.Sheputsoneoftheseplantsnearasunnywindowandtheotherinadarkroom.Thisexperimenttestshowtheplantsrespondto

(A)light(B)air(C)water(D)soil

Page 51: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

AllenAIScienceChallenge

CS295:STATISTICALNLP(WINTER2017) 51

Astudentputstwoidenticalplantsinthesametypeandamountofsoil.Shegivesthemthesameamountofwater.Sheputsoneoftheseplantsnearasunnywindowandtheotherinadarkroom.Thisexperimenttestshowtheplantsrespondto

(A)light (B)air(C)water(D)soil

Knowledge needed(forexample):§ nearsunnywindow® receivelight§ inadarkroom® nolight§ testX’sresponsetoY

® compareX+YwithX+not(Y)

Page 52: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Outline

QuestionAnswering

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 52

IR-BasedQASystem

OtherExtensions

Page 53: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

NaturalLanguage&Meaning

CS295:STATISTICALNLP(WINTER2017) 53

Meaning

Language

AmbiguityVariability

interpretatio

n expression

Page 54: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

InferencevsEntailment

CS295:STATISTICALNLP(WINTER2017) 54

MeaningRepresentation

Natural Language

Inference

TextualEntailment

Page 55: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

TextualEntailment

CS295:STATISTICALNLP(WINTER2017) 55

• Adirectionalrelationbetweentwotextfragments:Text(t) andHypothesis(h):

t entails h (t Þ h) if humans reading t will infer that h is most likely true

• Assuming“commonbackgroundknowledge”–whichisindeedexpectedfromapplications

Page 56: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Example

CS295:STATISTICALNLP(WINTER2017) 56https://cogcomp.cs.illinois.edu/page/resource_view/9

Page 57: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

MoreSentencePairs

CS295:STATISTICALNLP(WINTER2017) 57

1. Some students came to school by car.Some students came to school.

2. No students came to school by car. Some students came to school.

3. John drove legally. John drove.

4. John drove predictably.John drove.

5. Legally, John could drive.John drove.

Page 58: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

EntailmentwithKnowledge

CS295:STATISTICALNLP(WINTER2017) 58

Fortextualentailmenttoholdwerequire:◦ text ANDknowledgeÞ h,but◦ knowledgeshouldnotentailh alone

Systemsare notsupposedtovalidateh’struthregardlessoft(e.g.bysearchinghontheweb)

t entails h (t Þ h) if humans reading t will infer that h is most likely true

Page 59: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Example

CS295:STATISTICALNLP(WINTER2017) 59

TEXT: …WhilenooneaccusesMadonnaofdoinganythingillegalinadoptingthe4-year-oldgirl,reportedlynamedMercy,therearequestionsnonethelessabouthowMadonnaisabletonavigateMalawi's18-to-24monthvettingperiodinjustamatterofdaysorweeks…

HYPOTHESIS:

Madonnais50yearsold.

Page 60: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

ThirdLabel:Contradictions

CS295:STATISTICALNLP(WINTER2017) 60

t contradicts h (t ^ h) if humans reading t will find the relations/events described by h to be highly unlikely given t.

Page 61: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Example

CS295:STATISTICALNLP(WINTER2017) 61

Page 62: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

MoreExamples

CS295:STATISTICALNLP(WINTER2017) 62

Page 63: Question Answering (and Textual Entailment)sameersingh.org/courses/statnlp/wi17/slides/lecture-0314... · 2020-04-19 · Question Answering (and Textual Entailment) Prof. Sameer Singh

Applications

CS295:STATISTICALNLP(WINTER2017) 63

QuestionAnswering

InformationExtraction

MachineTranslation

InformationRetrieval

Question Expected answer formWho bought Overture? >> X bought Overture

Overture’s acquisitionby Yahoo

Yahoo bought Overture

text hypothesized answer

entails

Heabhorredthemen’sunctuousways.

Hedislikedthemen’sflatteringways.

Similaritybasedonwhetherdocumententailsthequery.