CS388: Natural Language Processing Lecture 21:...

42
CS388: Natural Language Processing Lecture 21: Dialogue Greg Durrett

Transcript of CS388: Natural Language Processing Lecture 21:...

Page 1: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

CS388:NaturalLanguageProcessingLecture21:Dialogue

GregDurrett

Page 2: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Administrivia‣ Proposalduetodayat5pm

‣ ProposalsreturnedASAP,thenProject2

Page 3: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Recall:ExtracGveSummarizaGon‣ Countnumberofdocumentseachbigramoccursintomeasureimportance

GillickandFavre(2009)

score(massiveearthquake)=3score(Iraqicapital)=1score(sixkilled)=2score(magnitude7.3)=2

‣ ILPformulaGon:candsareindicatorvariablesindexedoverconcepts(bigrams)andsentences,respecGvely

“setcito1iffsomesentencethatcontainsitisincluded”

sumofincludedsentences’lengthscan’texceedL

‣ Findsummarythatmaximizesthescoreofbigramsitcovers

Page 4: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Recall:Compression

‣ Nowsjvariablesarenodesorsetsofnodesintheparsetree

Atleastsixpeoplewerekilledandmanyothersinjured

S SCC

S

s2s1

‣ Newconstraint:s2≤s1“s1isaprerequisitefors2”

Page 5: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Recall:Pointer-Generator

Seeetal.(2017)

Page 6: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Recall:Seq2seqSummarizaGon

Seeetal.(2017)

‣ SoluGons:copymechanism,coverage,justlikeinMT…

‣ ThingsmightsGllgowrong,nowayofprevenGngthis…

Page 7: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

ThisLecture‣ Chatbotdialoguesystems

‣ Task-orienteddialogue

‣ OtherdialogueapplicaGons

Page 8: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Chatbots

Page 9: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

TuringTest(1950)‣ ImitaGongame:AandBarelockedinroomsandanswerC’squesGonsviatypewriter.BotharetryingtoactlikeB

A B

C

B B

trainedjudgeC trainedjudge

OriginalInterpretaGon: StandardInterpretaGon:

‣ Thetestisnot“doesthiscomputerseemhuman-liketorandompeoplewithawebbrowser?”

Page 10: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

ELIZA‣ Created1964-1966atMIT,heavilyscripted

‣ DOCTORscriptwasmostsuccessful:repeatsuser’sinput,asksinanequesGons

Weizenbaum(1966)

Page 11: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

ELIZA

(.*)you(.*)me

WhydoyouthinkI$2you?

‣ IdenGfykeyword,idenGfycontext,applytransformaGonrule

‣ Verylijleneedtogeneratenewcontent,butcanonlyhaveonetypeofconversaGon

My(.)(.*)

Whatelsecomestomindwhenyou thinkofyour$1?

Page 12: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Cleverbot‣ Carpenter(1986),onlinesystembuiltin2006

‣ “Nearestneighbors”:humansaysstatementA,findahumanresponseinhuman-humanorhuman-computerchatstostatementA,repeatthat

User:Hitherecleverbot.Cleverbot:Howareyou?User:Doingokay.whatplansdoyouhavetoday?Cleverbot:Idorevision.User:Whatareyourevisingfor?Cleverbot:Mathshistory.User:Howoldareyou?Cleverbot:That'snoneofyourbusiness.User:Whatismathshistory?Cleverbot:Idon’tknow,farmingmaybe

‣ Canooengivesensibleanswers,butthebotdoesn’treallyimposehigh-level discoursestructure

Page 13: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Data-DrivenApproaches‣ CantreatasamachinetranslaGonproblem:“translate”fromcurrentujerancetonextone

‣ Filterthedata,usestaGsGcalmeasurestopruneextractedphrasestogetbejerperformance

Rijeretal.(2011)

Page 14: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Data-DrivenApproaches

Rijeretal.(2011)

Page 15: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Seq2seqmodels

Whatareyoudoing

I

<s>

am going home [STOP]

‣ JustlikeconvenGonalMT,cantrainseq2seqmodelsforthistask

‣Whymightthismodelperformpoorly?Whatmightitbebadat?

‣ Hardtoevaluate:

Page 16: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

LackofDiversity

Lietal.(2016)

‣ Trainingtomaximizelikelihoodgivesasystemthatpreferscommonresponses:

Page 17: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

LackofDiversity

Lietal.(2016)

‣ SoluGon:mutualinformaGoncriterion;responseRshouldbepredicGveofuserujeranceUaswell

‣MutualinformaGon:

‣ StandardcondiGonallikelihood: logP (R|U)

log

P (R,U)

P (R)P (U)

= logP (R|U)� logP (R)

‣ logP(R)canreflectprobabiliGesunderalanguagemodel

Page 18: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

LackofDiversity

Lietal.(2016)

‣ OpenSubGtlesdata

Page 19: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Futureofchatbots

‣ XiaoIce:MicrosoochatbotinChinese,20Musers,averageuserinteracts60Gmes/month

‣ Peopledoseemtoliketalkingtothem…?

‣ HowdeepcanaconversaGonbewithoutmoresemanGcgrounding?Basicfactsaren’tevenconsistent…

‣ Canforcechatbotstogiveconsistentanswers,butsGllprobablynotveryinteresGng

Lietal.(2016)Persona…

Page 20: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Task-OrientedDialogue

Page 21: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Task-OrientedDialogue

Google,what’sthemostvaluable

Americancompany?

Apple

WhoisitsCEO?

TimCook

‣ QuesGonanswering/search:

Page 22: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Task-OrientedDialogue

Siri,findmeagoodsushi restaurantinChelsea

SushiSekiChelseaisasushirestaurantinChelseawith4.4stars

onGoogle

‣ Personalassistants/APIfront-ends:

Howexpensiveisit?

Entreesarearound$30each

Findmesomethingcheaper

Page 23: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Task-OrientedDialogue

HeyAlexa,whyisn’tmyAmazon orderhere?

Letmeretrieveyourorder. Yourorderwasscheduledtoarrive

at4pmtoday.

‣ Personalassistants/APIfront-ends:

Itnevercame

Okay,Icanputyouthroughtocustomerservice.

Page 24: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

AirTravelInformaGonService(ATIS)‣ Givenanujerance,predictadomain-specificsemanGcinterpretaGon

DARPA(early1990s),FigurefromTuretal.(2010)

‣ CanformulateassemanGcparsing,butsimpleslot-fillingsoluGons(classifiers)workwelltoo

Page 25: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

FullDialogueTask‣ Parsing/languageunderstandingisjustonepieceofasystem

Youngetal.(2013)

‣ Dialoguestate:reflectsanyinformaGonabouttheconversaGon(e.g.,searchhistory)

‣ Userujerance->updatedialoguestate->takeacGon(e.g.,querytherestaurantdatabase)->saysomething

‣Muchmorecomplexthanchatbots!

Page 26: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

FullDialogueTask

FindmeagoodsushirestaurantinChelsea

restaurant_type <- sushi

location <- Chelsea

SushiSekiChelseaisasushirestaurantinChelseawith4.4starsonGoogle

curr_result <- execute_search()

Howexpensiveisit?get_value(cost, curr_result)

Entreesarearound$30each

Page 27: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

POMDP-basedDialogueSystems

Youngetal.(2013)

‣ Dialoguemodel:canlooklikeaparseroranykindofencodermodel

‣ POMDP:useristhe“environment,”anujeranceisanoisysignalofstate

‣ Generator:usetemplatesorseq2seqmodel

‣Wheredorewardscomefrom?

Page 28: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

RewardforcompleGngtask?

FindmeagoodsushirestaurantinChelsea

restaurant_type <- sushi

location <- Chelsea

SushiSekiChelseaisasushirestaurantinChelseawith4.4starsonGoogle

make_reservation(curr_result)

Howexpensiveisit?

+1

…OkaymakemeareservaGon!

curr_result <- execute_search()

Veryindirectsignal ofwhatshould happenuphere

Page 29: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Usergivesreward?

FindmeagoodsushirestaurantinChelsea

restaurant_type <- sushi

location <- Chelsea

SushiSekiChelseaisasushirestaurantinChelseawith4.4starsonGoogle

curr_result <- execute_search()

Howexpensiveisit?get_value(cost, curr_result)

Entreesarearound$30each

+1

+1

Howdoestheuserknowtherightsearchhappened?

Page 30: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Wizard-of-Oz

Kelley(early1980s),FordandSmith(1982)

‣ LearningfromdemonstraGons:“wizard”pullstheleversandmakesthedialoguesystemupdateitsstateandtakeacGons

Page 31: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

FullDialogueTaskFindmeagoodsushirestaurantinChelsea

restaurant_type <- sushi

location <- Chelsea

curr_result <- execute_search(){wizardenters

these

SushiSekiChelseaisasushirestaurantinChelseawith4.4starsonGoogle{wizardtypesthis

outorinvokes templates

‣Wizardcanbeatrainedexpertandknowexactlywhatthedialoguesystemsissupposedtodo

Page 32: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

LearningfromStaGcTraces

Bordesetal.(2017)

‣ Usingeitherwizard-of-OzorotherannotaGons,cancollectstaGctracesandtrainfromthese

Page 33: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

FullDialogueTaskFindmeagoodsushirestaurantinChelsea

restaurant_type <- sushi

location <- Chelsea

curr_result <- execute_search()

‣ Useraskedfora“good”restaurant—doesthatmeanweshouldfilterbystarraGng?Whatdoes“good”mean?

‣ HardtochangesystembehavioriftrainingfromstaGctraces,especiallyifsystemcapabiliGesordesiredbehaviorchange

stars <- 4+

Page 34: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Goal-orientedDialogue

‣ BigCompanies:AppleSiri(VocalIQ),GoogleAllo,AmazonAlexa,MicrosooCortana,FacebookM,SamsungBixby,TencentWeChat

‣ Startups:

‣ Lotsofcoolworkthat’snotpublicyet

‣ Tonsofindustryinterest!

Page 35: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

OtherDialogueApplicaGons

Page 36: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Search/QAasDialogue

‣ “HasChrisPrajwonanOscar?”/“HashewonanOscar”

Page 37: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

QAasDialogue‣ DialogueisaverynaturalwaytofindinformaGonfromasearchengineoraQAsystem

Iyyeretal.(2017)

‣ QAishardenoughonitsown

‣ Usersmovethegoalposts

‣ Challenges:

Page 38: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

QAasDialogue‣ UWQuACdataset:QuesGonAnsweringinContext

Choietal.(2018)

Page 39: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

SearchasDialogue

‣ Googlecandealwithmisspellings,somoremisspellingshappen—Googlehastodomore!

Page 40: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

DialogueMissionCreep

System

Erroranalysis

Bejermodel

‣ FixeddistribuGon(e.g.,naturallanguagesentences),errorrate->0

Data

‣ Errorrate->???;“missioncreep”fromHCIelement

HarderData

MostNLPtasks

System

Erroranalysis

Bejermodel

Data

Dialogue/Search/QA

???

Page 41: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

DialogueMissionCreep

‣ Highvisibility—yourproducthastoworkreallywell!

Page 42: CS388: Natural Language Processing Lecture 21: Dialoguegdurrett/courses/fa2018/lectures/lec21-… · User: Doing okay. what plans do you have today? Cleverbot: I do revision. User:

Takeaways‣ Somedecentchatbots,butunclearhowtomakethesemoresophisGcatedthantheyarerightnow

‣ Task-orienteddialoguesystemsaregrowinginscopeandcomplexity—reallyexciGngsystemsontheway

‣Moreandmoreproblemsarebeingformulatedasdialogue—interesGngapplicaGonsbutchallengingtogetworkingwell