Building a Smart Question Answering System from Scratch Minjoon - - PowerPoint PPT Presentation

building a smart question answering system from scratch
SMART_READER_LITE
LIVE PREVIEW

Building a Smart Question Answering System from Scratch Minjoon - - PowerPoint PPT Presentation

Building a Smart Question Answering System from Scratch Minjoon Seo PhD Student University of Washington UWNLP What is Question Answering System? Q: Which airports are in New York City? There are four airports in NYC: JFK, LeGuardia,


slide-1
SLIDE 1

Building a Smart Question Answering System from Scratch

Minjoon Seo PhD Student University of Washington

UWNLP

slide-2
SLIDE 2

What is “Question Answering System”?

slide-3
SLIDE 3

Q: Which airports are in New York City?

There are four airports in NYC: JFK, LeGuardia, Newark, and Stewart.

slide-4
SLIDE 4

Why do you care about it?

slide-5
SLIDE 5

“If you got a billion dollars to spend on a huge research project, what would you like to do?” “I'd use the billion dollars to build a NASA-size program focusing on natural language processing (NLP), in all of its glory (semantics, pragmatics, etc).”

Michael Jordan Professor of Computer Science UC Berkeley

slide-6
SLIDE 6

Towards Artificial General Intelligence…

Natural language is the best tool to describe and communicate “thoughts” Asking and answering questions is the best way to develop deeper “thoughts”

slide-7
SLIDE 7

QA in Our Lives

  • Amazon Alexa
  • Apple Siri
  • Facebook M
  • Google Now
  • IBM Watson
  • Microsoft Cortana
  • Etc.
slide-8
SLIDE 8

Limitations of industrial QA systems

  • Carefully engineered modules, rules and features by humans
  • Can machines learn end-to-end, and learn new things

easily?

  • Little capability for reasoning
  • Can machines perform reasoning: induction, deduction,

conditional expression, etc.?

slide-9
SLIDE 9

Limitations of industrial QA systems

  • Carefully engineered modules, rules and features by humans
  • Can machines learn end-to-end, and learn new things

easily?

  • Little capability for reasoning
  • Can machines perform reasoning: induction, deduction,

conditional expression, etc.?

slide-10
SLIDE 10

End-to-end learning (minimal supervision)

  • Machines are learning from question-answer pairs only (supervised

by answers only)

  • No supervision of how-to, prior knowledge, etc. Latently learn these

things instead.

Question Answer Which airports are in New York City? JFK, LeGuardia, Newark, and Stewart Which NFL team represented the AFC .. Denver Broncos Who wrote Harry Potter?

  • J. K. Rowling

… …

slide-11
SLIDE 11

Q: Which NFL team represented the AFC at Super Bowl 50?

slide-12
SLIDE 12

Context-aware Question Answering

Q: Which NFL team represented the AFC at Super Bowl 50? A: Denver Broncos

Super Bowl 50

  • Document is given.
  • User asks a document-specific question
slide-13
SLIDE 13

Our Model: Bi-directional Attention Flow (BiDAF)

Attention Modeling MLP + softmax 𝑗" = 0 𝑗% = 1 Donald Trump is the president of the U.S. Who leads the United States? Attention

slide-14
SLIDE 14

VGG-16

Modeling Layer Output Layer Attention Flow Layer Phrase Embed Layer Word Embed Layer

x1 x2 x3 xT q1 qJ

LSTM LSTM LSTM LSTM

Start End

h1 h2 hT u1 uJ

LSTM + Softmax Dense + Softmax

Context Query

Query2Context and Context2Query Attention Character Embed Layer

g1 g2 gT m1 m2 mT

BiDAF (ours)

slide-15
SLIDE 15

SQuAD Leaderboard (stanford-qa.com) as of 12pm, 2 Dec 2017

slide-16
SLIDE 16

Leaderboard as of 24 Mar 2017

  • BiDAF still third!
  • 23 Submissions
  • Microsoft, IBM, Salesforce,

Facebook, Google, …

slide-17
SLIDE 17

Context-aware Question Answering

Q: Which NFL team represented the AFC at Super Bowl 50?

Super Bowl 50

slide-18
SLIDE 18

Q: Which NFL team represented the AFC at Super Bowl 50?

slide-19
SLIDE 19

Pipelined Approach

“Where was Barack Obama born?” Search Alg. Document 1 Document 2 Document n QA System “Hawaii, USA” …

slide-20
SLIDE 20

Op Open-do domain ain QA QA D Demo mo

(prototype) 400 lines of code!

slide-21
SLIDE 21

Isn’t Google doing this already?

  • Requires Structured Knowledge Base
slide-22
SLIDE 22

Isn’t Google doing this already?

  • Carefully engineered and not specifically giving you the answer
slide-23
SLIDE 23

What the model can and can’t do…

  • You can ask any question that is directly answerable

by a document

  • You can’t ask reasoning questions
slide-24
SLIDE 24

Reasoning questions

“If frogs eats insects and flies are insects, do frogs eat flies?” “If John has an apple and John went to bathroom, where is the apple?”

slide-25
SLIDE 25

New Assumption: We make the syntax of sentences and question simple

slide-26
SLIDE 26

Reasoning Question Answering

slide-27
SLIDE 27

Our approach: Query-Reduction

<START> Sandra got the apple there. Sandra dropped the apple. Daniel took the apple there. Sandra went to the hallway. Daniel journeyed to the garden. Q: Where is the apple? Reduced query: Where is the apple? Where is Sandra? Where is Sandra? Where is Daniel? Where is Daniel? Where is Daniel? à garden A: garden

slide-28
SLIDE 28

Query-Reduction Networks

  • Reduce the query into an easier-to-answer query over the sequence
  • f state-changing triggers (sentences), in vector space

Sandra got the apple there.

!" !" #"

"

#"

$

%"

"

%"

$

Where is Sandra?

Sandra dropped the apple

!$ !$ #$

"

#$

$

%"

"

%$

$

Daniel took the apple there.

!& !& #&

"

#&

$

%"

"

%&

$

Where is Daniel?

Sandra went to the hallway.

!' !' #'

"

#'

$

%"

"

%'

$

Where is Daniel?

Daniel journeyed to the garden.

!( !( #(

"

#(

$

%"

"

%(

$ → *

+

Where is Daniel?

Where is the apple?

#

garden Where is Sandra?

∅ ∅ ∅ ∅

slide-29
SLIDE 29

bAbI QA Results (10k)

0.5 1 1.5 2 2.5 3 3.5 4 4.5 MemN2N (FAIR) DNC (DeepMind) GMemN2N DMN+ (MetaMind) QRN (Ours)

Avg Error (%)

Avg Error (%)

slide-30
SLIDE 30

Conclusion

  • Real question answering system with minimal supervision
  • Machines that are able to reason with minimal supervision
  • Reasoning for real, complex questions is still hard, but not far away
slide-31
SLIDE 31

Industrial Impacts on QA Systems

  • Models will become simpler and more elegant
  • Easier maintenance
  • Less man-hours needed
  • Model behaviors are determined by data, not humans
  • Learns new things and improve performance with more data
  • Models will be able to perform reasoning
  • Soon!
slide-32
SLIDE 32

Thank you!

Minjoon Seo PhD Student of Computer Science University of Washington seominjoon@gmail.com seominjoon.github.io

slide-33
SLIDE 33

Attention Visualizations

Where did Super Bowl 50 take place ?

Super%Bowl%50%was%an%American%football%gam e% to%determine%the%champion%of%the%National% Football%League%(%NFL%)%for%the%2015%season%.% The%American%Football%Conference%(%AFC%)% champion%Denver%Broncos%defeated%the% National%Football%Conference%(%NFC%)%champion% Carolina%Panthers%24–10%to%earn%their%third% Super%Bowl%title%.%The%game%was%played%on% February%7%,%2016%,%at at%Levi% i%'s%Stad adium%in in%the% Sa San%Francisco%Bay%Area%at%Sa Santa%Clara%,% Ca California .%As%this%was%the%50th%Super%Bowl%,% the%league%emphasized%the%"%golden% anniversary%"%with%various%goldZthemed% initiatives%,%as%well%as%temporarily%suspending% the%tradition%of%naming%each%Super%Bowl%gam e% with%Roman%numerals%(%under%which%the%game% would%have%been%known%as%"%Super%Bowl%L%"%)%,% so%that%the%logo%could%prominently%feature%the% Arabic%numerals%50%.

at, the, at, Stadium, Levi, in, Santa, Ana [] Super, Super, Super, Super, Super Bowl, Bowl, Bowl, Bowl, Bowl 50 initiatives

slide-34
SLIDE 34

Embedding Visualization at Word vs Phrase Layers

January September August July May may

effect and may result in the state may not aid

  • f these may be more

Opening in May 1852 at debut on May 5 , from 28 January to 25 but by September had been