machine reading comprehension - ccftcci.ccf.org.cn/summit/2017/dlinfo/003.pdf · machine reading...

39
Machine Reading Comprehension Furu Wei, Lead Researcher Natural Language Computing Group, MSRA July 2017 Joint work with Nan Yang, Lei Cui, Ming Zhou, Wenhui Wang, Chaunqi Tan, Qingyu Zhou

Upload: duongtram

Post on 03-Sep-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Machine Reading Comprehension

Furu Wei, Lead Researcher Natural Language Computing Group, MSRA

July 2017

Joint work with Nan Yang, Lei Cui, Ming Zhou, Wenhui Wang, Chaunqi Tan, Qingyu Zhou

Answer  ques*ons  Ask  ques(ons  

Summarize  the  key  points   Reply  and  comment  

Machine Reading Comprehension  

1   2  

Source:  Visualizing  the  Corpus  of  ACL  2017  Paper  Titles  

*  Our  paper  on  machine  reading  comprehension  for  SQuAD  (R-­‐NET)  has  been  accepted  by  ACL  2017  as  a  long  paper  

Source  

Machine  Reading:  

Synthesis  &  Genera(on  

Machine  Reading:  Reasoning  &  Inference  

Machine  Reading:  Extrac(on  

The  Rhine  (Romansh:  Rein,  German:  Rhein,  French:   le  Rhin,  Dutch:  Rijn)   is  a  European  river   that   begins   in   the   Swiss   canton   of   Graubünden   in   the   southeastern   Swiss   Alps,  forms   part   of   the   Swiss-­‐Austrian,   Swiss-­‐Liechtenstein   border,   Swiss-­‐German   and   then  the  Franco-­‐German  border,   then  flows   through   the  Rhineland  and  eventually  emp(es  into   the  North  Sea   in   the  Netherlands.  The  biggest   city  on   the   river  Rhine   is  Cologne,  Germany  with   a   popula(on   of  more   than   1,050,000   people.   It   is   the   second-­‐longest  river   in  Central  and  Western  Europe  (a<er  the  Danube),  at  about  1,230  km  (760  mi),  with  an  average  discharge  of  about  2,900  m3/s  (100,000  cu  a/s).    

Passage  

What  river  is  larger  than  the  Rhine?    Ques*on  

Danube  Answer  

Answer  Extrac(on  

*  Example  from  the  SQuAD  dataset  

P1:  Impact  on  Japan's  Economy.  The  Triple  Disaster  devastated  Japan's  economy  in  four  ways.  First,   it  destroyed  138,000  buildings  and  cost  $360  billion  in  economic  damage.  This  is  more  than  the  $250  billion  cost  es(mate  for  Hurricane  Katrina.    P2:  apan’s  2011  Earthquake  and  Tsunami:  Economic  Effects  and  Implica(ons  for  the  U.S.  Congressional  Research  Service  3   construc(on   supplies.   If   imports  of   certain  products  from   Japan  become   scarce,   China,   South  Korea,   or   other   na(ons  may   gain   at   Japan’s  expense.  

Passage  

What  is  the  economic  impact  of  the  Japan  earthquake  Ques*on  

Japan  have  $360  billion  economic  damage  because  of  earthquake.  Answer  

Answer  Synthesis  &  Genera(on  

*  Example  from  the  MS  MARCO  dataset  

During   the   construc(on   of   the  Quebec   Bridge   in   1907,   the   bridge’s   designer,   Theodore   Cooper,  received  word  that  the  suspended  span  being  built  out  from  the  bridge’s  can(lever  was  deflec(ng  downward   by   a   frac(on   of   an   inch   (2.54   cen(meters).   Before   he   could   telegraph   to   freeze   the  project,  the  whole  can(lever  arm  broke  off  and  plunged,  along  with  seven  dozen  workers,  into  the  St.  Lawrence  River.  It  was  the  worst  bridge  construc(on  disaster  in  history.  As  a  direct  result  of  the  inquiry  that   followed,  the  engineering  “rules  of  thumb”  by  which  thousands  of  bridges  had  been  built   around   the  world  went  down  with   the  Quebec  Bridge.   Twen(eth-­‐century  bridge  engineers  would  thereaaer  depend  on  far  more  rigorous  applica(ons  of  mathema(cal  analysis.  

Passage  

Which  one  of  the  following  statements  can  be  properly  inferred  from  the  passage?  Ques*on  (A):  Bridges  built  before  about  1907  were  built  without  thorough  mathema(cal  analysis  and,  therefore,  were  unsafe  for  the  public  to  use.  (B):  Cooper’s  absence  from  the  Quebec  Bridge  construc(on  site  resulted  in  the  breaking  off  of  the  can(lever.  (C):  Nineteenth-­‐century  bridge  engineers  relied  on  their  rules  of  thumb  because  analy(cal  methods  were   inadequate  to  solve  their  design  problems.  (D):  Only  a  more  rigorous  applica(on  of  mathema(cal  analysis  to  the  design  of  the  Quebec  Bridge  could  have  prevented  its  collapse.  (E):  Prior  to  1907  the  mathema*cal  analysis  incorporated  in  engineering  rules  of  thumb  was  insufficient  to  completely  assure  the  safety  of  bridges  under  construc*on.  

Answer  

Reasoning  &  Inference  

*  Example  from  the  LSAT  dataset  (Logical  Reasoning  &  Reading  Comprehension)  

Machine Reading: Extraction

Dataset

Dataset  

*  Source:  “Towards  the  Machine  Comprehension  of  Text”  by  Danqi  Chen,  2017.  

query  answer  

passage  

Dataset   #  of  ques*ons  

Training   87,599  

Dev   10,570  

Test  (not  available  for  par(cipants)  

~10K  

ImageNet-­‐style  compe((on  for  machine  reading  comprehension  

Best  Resource  Paper  in  EMNLP  2016  

Method

*  Source:  “Towards  the  Machine  Comprehension  of  Text”  by  Danqi  Chen,  2017.  

Sachan  et  al.,  ACL  2015  

Wang  et  al.,  ACL  2015    

Chen  et  al.,  ACL  2016  

Deep  Learning  for  Machine  Reading

Match-­‐LSTM    (Wang  &  Jiang  ICLR  2017)  

BiDAF  (Seo  et  al.  ICLR  2017)  

Dynamic  Co-­‐aren(on  (Xiong  et  al.  ICLR  2017)  

ReasoNet  (Shen  et  al.  KDD  2017)  

S-­‐Net  (Tan  et  al.  arXiv  2017)  

SQuAD  

Aren(ve  Reader    (Hermann  et  al.  NIPS  2015)  

CNN/Daily  Mail   MARCO  

R-­‐Net  (Wang  et  al.  ACL  2017)  

Memory  Networks    (Hill  et  al.  ICLR  2016)  

CBTest  

Aren(on-­‐over-­‐Aren(on  (Cui  et  al.  ACL  2017)  

EpiReader  (Trischler  et  al.  EMNLP  2016)  

Machine  Reading:  Extrac8on

When did Castilian border change after Ferdinand III’s death?

Ferdinand III had started out as a contested king of Castile. By the time of his death in 1252, Ferdinand III

had delivered to his son and heir, Alfonso X, a massively expanded kingdom. The boundaries of the new

Castilian state established by Ferdinand III would remain nearly unchanged until the late 15th century.

Span  vs.  Boundary  

Embedding Encoding Feature  Learning  (Engineering) Ranking

Span  Predic8on  /  Ranking

Mul(-­‐layer  RNN   CNN,  RNN   Regression,  classifica(on  

Challenges    •  Span  detec(on  (answer  candidate  genera(on)  (n*(n-­‐1)/2)  •  Span/Ngram-­‐level  feature  engineering  or  learning  

Embedding Encoding Matching Predic8on

Boundary  Predic8on  /  Ranking

Mul(-­‐layer  RNN   Match-­‐LSTM,  Co-­‐aren(on  

Pointer  Networks  

Challenges    •  Matching  &  passage-­‐level  evidence  aggrega(on  •  Prior  knowledge  &  reasoning  

R-NET

Read  the  ques(on  and  passage  

Align  and  match  ques(on  and  passage  to  find  and  suppor(ng  evidence  (clues)  and  answer  candidates  

Determine  the  answer  boundary    

When did Castilian border change after Ferdinand III’s death?

Ferdinand III had started out as a contested king of Castile. By the time of his

death in 1252, Ferdinand III had delivered to his son and heir, Alfonso X, a

massively expanded kingdom. The boundaries of the new Castilian state

established by Ferdinand III would remain nearly unchanged until the late 15th

century.

Answer  candidates  

Suppor(ng  Evidence  

1   2   3  

Answer:  late  15th  century  

Read  the  ques(on  and  passage  

Align  and  match  ques(on  and  passage  to  find  and  suppor(ng  evidence  (clues)  and  answer  candidates  

Aggregate  evidence  and  compare  different  candidates  across  the  passage  

Determine  the  answer  boundary    

When did Castilian border change after Ferdinand III’s death?

Ferdinand III had started out as a contested king of Castile. By the time of his

death in 1252, Ferdinand III had delivered to his son and heir, Alfonso X, a

massively expanded kingdom. The boundaries of the new Castilian state

established by Ferdinand III would remain nearly unchanged until the late 15th

century.

Answer  candidates  

Suppor(ng  Evidence  

1   2   3   4  

Answer:  late  15th  century  

…  

…  

…  

…  

…  

…  

Probability  of  each  word  as  start  of  the  answer  

Matching  Networks  

Self-­‐Matching  Networks  

Representa(on  Networks  

Passage  

Ques(on  

…  

…  

…  

…  

…  

…  

Probability  of  each  word  as  end  of  the  answer  Answer  Pointer  Networks  

Matching  Networks  

Self-­‐Matching  Networks  

Representa(on  Networks  

R-­‐Net  Technical  Report  

Skip  

Representa(on  Networks:  3-­‐layer  bidirec(onal  RNN  over  ques(on  and  passage  

Pretrained word embeddings (Glove) and are fixed in training (300d) Updated word embeddings from char embedding and composition with RNN (Bi-GRU) (200d)

When did Castilian … … …

death d                  …                    h  

75*6  =  450d  

For  each  word    

Castilian fell in … earth … <

\s>

When did Castilian … death

…  

Ques(on  

Passage  

0.6  

…  

Deep   …  

…   …  

…   …  

…  

…  

Matching  Networks:  2-­‐layer  bidirec(onal  RNN  over  ques(on  and  passage  

Castilian fell in … earth … <

\s>

…  

Passage  

Passage  

…  

Deep  

…  

…   …  

…   …  

…  

…  

Castilian fell in … earth … <

\s>

0.4  

Self-­‐Matching  Networks:  2-­‐layer  bidirec(onal  RNN  over  passage  

Police in San vape smoking device

0.9 0 0 0 0.1 0

Pointer  

Answer  Pointer  Networks  

Police in San vape smoking device

0.9 0 0 0 0.1 0

Pointer  

Answer  Pointer  Networks  

Abla8on  Results Dev  Set  

EM   F1  R-­‐NET  (06/02/2017)   71.1   79.5  -­‐  Char  embedding   70.3   78.9  -­‐  Ga(ng   67.9   77.1  -­‐  Self-­‐Matching   66.9   76.4  -­‐  Ga(ng,  Self-­‐Matching   65.2   74.7  

Major  improvements  •  Self-­‐Matching  ~3  points  •  Gated  aren(on  ~3  points  •  New  network  structures  •  Deep,  training  strategy,  system  tricks  etc.  

Posi8ve  Cases Type

Boundary  (readable)

Evidence  aggrega8on

Lexical  approxima8on  &  variance

*  Source:  Rajpurkar  et  al.  EMNLP  2016  

Coreference  (strict)  

World/Common  Knowledge  

Reasoning  (e.g.  superla(ve,  compara(ve,  quan(fica(on,  ordinal,  etc.)    

Mul(ple  confusing  candidates  

Opportuni8es

Paraphrasing  

Knowledge Encoding

Knowledge Representation

World Knowledge Common Knowledge

Future Work

Synthesis & Generation Reasoning & Inference

S-NET L-NET

听 说 读 写 译

问 答

THANKS