paper: https://arxiv.org/abs/2004.13637
Blender: 지난 2년동안 Facebook AI Research(FAIR)에서 발표한 많은 작업을 융합한 것
Introduction
- 개성, 공감, 지식과 같은 데이터셋에 Fine-tuning한 모델은 챗봇이 더 사람다운 대화를 하도록 한다.(심지어 데이터가 적을지라도)
- decoding 전략을 잘 사용하고 retrieve-and-refine 모델을 통해 지식에 대해 반복적이고 어눌하며 구체적이지 않은 답변을 피할 수 있다.
1. Model
1-1. Retriever
We employ the poly-encoder architecture of (Humeau et al., 2019). Poly-encoders encode global features of the context using multiple representations (n codes, where n is a hyperparameter), which are attended to by each possible candidate response
Idea
- 입력으로 대화 context가 주어지면, candidate response군에서 가장 높은 점수의 응답을 출력하는, Multi-Sentence Scoring을 Poly-Encoder를 통해 수행하여 다음 next dialogue utterance를 선택
Bi-Encoder
input과 candidate들 각각에 self-attention이 진행되고 top layer에서 나온 ouput을 dot product로 similarity를 학습
$y_{ctxt} = red(T_1(ctxt))$
$y_{cand} = red(T_2(cand))$
- T1과 T2는 pre-trained BERT
- input과 candidate들에 각각 self-attention이 진행된다.
- 각각 self-attention을 통해 hidden state가 나왔으면 이를 reduce 시킨다 reduce 시키는 방법은 세가지가 있다
- 첫번째 special 토큰의 representation을 사용
- 두번째 weighted sum
- 세번째 m길이 만큼만 weighted sum ⇒ 논문에서 사용
- 그 후 각각의 context aggregation에 대한 similarity를 구한다(dot product)