13. LSA
Latent Semantic Analysis (Deerwester et al., 1988)
• Bag of words (sparse) à dense vector via SVD
• 각 단어에 추상적인 “태그”를 달아줌
• 추상적인 ”태그”를 통해 다른 단어끼리도 비교할 수 있게 됨.
• “폐업” ~ “망하다” ~ “몰락”
24. Generative Model 의 문제점
서비스 퀄리티가 안나온다.
• 엉뚱한 답을 내는 경우가 너무 많음.
• 데이터 퀄리티 컨트롤이 어려움. (예: MS MARCO1)
1 Nguyen et al. MS MARCO: A human generated machine reading
comprehension dataset. 2016.
평가 (Evaluation) 도 어렵다.
• BLEU 가 있기는 하지만…
29. 1. Sentence-level QA
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Yang et al. WikiQA: A Challenge Dataset for Open-domain
Question Answering. EMNLP 2015.
30. 1. Sentence-level QA
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is
at Corinth, with all the saints which are in
all Achaia”.
Who wrote second
Corinthians?
Yang et al. WikiQA: A Challenge Dataset for Open-domain
Question Answering. EMNLP 2015.
33. 2. Phrase-level QA
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Rajpurkar et al. SQuAD: 100,000+ Questions for Machine
Comprehension of Text. EMNLP 2016
34. 2. Phrase-level QA
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Rajpurkar et al. SQuAD: 100,000+ Questions for Machine
Comprehension of Text. EMNLP 2016
38. 2. Cross-attention
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
40. 2. Cross-attention
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Seo et al. Bi-directional attention flow for machine
comprehension. ICLR 2017.
41.
42. 2. Self-attention
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Clark & Gardner. Simple and effective multi-paragraph reading
comprehension. 2017
44. 2. Self-attention
Second Epistle to the Corinthians The
Second Epistle to the Corinthians, often
referred to as Second Corinthians (and
written as 2 Corinthians), is the eighth book
of the New Testament of the Bible. Paul the
Apostle and “Timothy our brother” wrote
this epistle to “the church of God which is at
Corinth, with all the saints which are in all
Achaia”.
Who wrote second
Corinthians?
Clark & Gardner. Simple and effective multi-paragraph reading
comprehension. 2017
47. 4. Transfer learning
3 billion words, unlabeled 2 million words, labeled
Language
model
Peters et al. Deep contextualized word representations.
NAACL 2018.
51. 5. Super-human level
• Ensemble
• NLP tools (POS, parser, etc.)
• Data Augmentation
• A lot of layers
Hi, Nice to
meet you!
MT 안녕, 반가워! MT
Hello, great
to see you!
• 이….
• 것…
• 저…
• 것…
Yu et al. QANet: Combining local convolution with global self-
attention for reading comprehension. ICLR 2018.
82. Super Bowl 50 !"
American football game !#
National Football League !$
Denver Broncos !%
…
Which NFL team
represented the
AFC at
Super Bowl 50?
&
MIPS
83. 수식으로 보는 기존과 비교
• 문서 d 와 쿼리 q 가 주어졌을 때:
!" = argmax
)
*+("|.; 0)
*+("|.; 0) ∝ exp(5+ ", ., 0 )
*+("|.; 0) ∝ exp(7+(.) 8 9+(", 0))
where
기존: 매 새로운 질문마다 F
를 재계산 해야 함.
제안: H 는 미리 계산 될 수
있고 index (hash) 될 수도
있음
Decomposition
86. 5분간 듣는 PIQA 1년 삽질기
1. Baseline 은 그리 어렵지 않았다
2. Duality의 활용
3. Multimodality…
4. Sparsity: 단번에 9% 업!
5. Scalability: 가능은 하지만 만만치 않은…
작년 6월부터
87. Baseline 1: LSTM
… water transforms into steam within a boiler … What does water turn into when heated?
Document Question
Bi-LSTM Bi-LSTM
!" !# !$ !% !& !' !(
Weighted Sum
)
Nearest Neighbor
88. Baseline 2: Self-Attention
… water transforms into steam within a boiler … What does water turn into when heated?
Document Question
!" !# !$ !% !& !' !(
“steam” “water” + “transform” + “boiler” “What” “water” + “turn” + “heated”
type clue type clue
)% *
dot
89. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
Seo et al. Phrase-indexed question answering: a new challenge
toward scalable document comprehension. EMNLP 2018.
93. Duality: Question Reconstruction
What does water turn into when heated?
Question
Bi-LSTM
!" !# !$ !% !& !' !(
Weighted Sum
)
Nearest Neighbor
Generation
seq2seq decoder
(without attention)
94. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
95. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
LSTM+SA+Dual 63.2 52.0
99. Barack Obama was 44th president from 2009 to 2017.
Q1: Who was president in 2009?
Q2: Who was the 44th president?
Latent Variable 을 사용하면 된다?
!, #
$
$(!, &1, #)
$(!, z2, #)
100. 그래서 (1년동안!) 시도해 본 것들
1. Multiple identical models (ensemble)
2. Orthogonality regularization
3. Sequential decoding
4. Latent variable from Gaussian distribution
5. Latent variable from surrounding words
101. 그래서 (1년동안!) 시도해 본 것들
1. Multiple identical models (ensemble)
2. Orthogonality regularization
3. Sequential decoding
4. Latent variable from Gaussian distribution
5. Latent variable from surrounding words
정확성을 좀 올려주지만,
30배 이상의 storage가 필요.
안됨…
102. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
LSTM+SA+Dual 63.2 52.0
103. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
LSTM+SA+Dual 63.2 52.0
LSTM+SA+Multi-mode 66.5 55.1
106. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
LSTM+SA+Dual 63.2 52.0
LSTM+SA+Multi-mode 66.5 55.1
107. SQuAD F1 (%) EM (%)
First Baseline 40.0 51.0
SOTA 91.2 85.4
PI-SQuAD F1 EM
LSTM 57.2 46.8
LSTM+SA 59.8 49.0
LSTM+SA+Dual 63.2 52.0
LSTM+SA+Multi-mode 66.5 55.1
LSTM+SA+Sparse+ELMo 69.3 58.7
To be on arXiv soon
108. Scalability 고려사항 1
• SQuAD 는 문서 하나만 보는 것. à 벤치마크의 성격이 강함
• 실제 QA 시나리오가 아님.
• End-to-end 가 Pipeline보다 더 나을거라는 보장?
추가 실험들이 필요!
109. Scalability 고려사항 2
• 영어 위키피디아 단어수: 30억개
• 단어당 구문수: 평균 7개
• 구문당 vector dimension: 1024
• Float32: 4 Byte
약 90 TB (210억개의 구문)
110. Scalability 고려사항 2
• 영어 위키피디아 단어수: 30억개
• 단어당 구문수: 평균 7개
• 구문당 vector dimension: 1024
• Float32: 4 Byte
최적화 가능
약 90 TB (210억개의 구문)
112. Super Bowl 50 !"
American football game !#
National Football League !$
Denver Broncos !%
…
Which NFL team
represented the
AFC at
Super Bowl 50?
&
MIPS
113. According to the American Library
Association, this makes …
… tasked with drafting a European
Charter of Human Rights, …
비슷한 타입의 고유명사 (lexical)
114. The LM engines were successfully test-
fired and restarted, …
Steam turbines were extensively
applied …
비슷한 semantic (의미) 및 syntactic (문법) 구조
115. … primarily accomplished through the
ductile stretching and thinning.
… directly derived from the
homogeneity or symmetry of space …
비슷한 syntactic (문법) 구조
116. 그러니까 결론이 뭐야?
검색과 NLP의 아름다운 조화
아직 갈길은 멀지만, 같이 연구하고
고민해 보자구요!
나는 당장 잘되는게
필요하다구
둘 다 할게요 ㅜㅜ