Research

[Research] A Persona-Based Neural Conversation Model 요약

eomiso(Aesop) 2021. 2. 25. 17:29

A Persona-Based Neural Conversation Model 요약

세 줄 요약

  • 대화형 에이전트(conversational agents)를 유저 인터페이스로 사용하기 위해서는 일관성(consistent) 있는 인물 정보(persona)가 필요하다.
  • 기존에 있던 vanila LSTM은 가장 확률이 높은 문장만 생성하다 보니 인물정보(persona)의 일관성이 떨어진다.
  • 그래서 유저의 정보를 임베딩 한 후, 이를 input senquence와 함께 seq2seq 모델에 학습시켜서 일관성 있는 대화형 에이전트(conversational agents)

[Abstract]

  1. 발화자의 일관성 문제를 해결하고자 2개의 persona-based model을 제시하고자 한다.
  2. Speaker model 은 인물정보를 엠베딩해서 response를 generating 하며, dyadic speaker-addressee model은 두 화자간의 대화에서 특징(property)들을 뽑아낸다


[1. Introduction]

  1. 기존의 baseline LSTM(Li et al., 2015) 으로는 대화 모델에서 인물 정보의 일관성이 부족한 현상이 나타났다.

  2. PERSONA 의 정의 : 논의의 편의를 위해 "composite of elements of identity(background facts or user profile), language behavior, interaction style" 로 정의한다.

  3. [1] Speaker model은 speaker-level vector representation을 seq2seq 모델의 target(Decoder?) 부분에 결합한다.
    [2] Speaker-Addressee model은 화자 각각의 엠베딩을 활용하여 interaction representation 을 만들어 seq2seq 모델에 넣는다(encoding).


[4. Personalized Response Generation]

[4.2 Speaker model]
Speaker model models the personality of the respondent.

Speaker Model은 기존의 LSTM 모델의 input에 $v_i$ 를 추가한다. $K$ 는 word embedding $e_t$ 의 dimension 크기이다. Speaker information 을 담고 있는 $v_i$ 는 각 time step에 모두 concatenate 되어 encoding 되고 이는 hidden state이 speaker information 정보를 고려해서 학습되는 효과가 있다. 그 결과 text generation에서 speaker information specific 한 텍스트가 생성될 수 있도록 한다. LSTM back propagation 과정에서 generated 된 text의 prediction error를 이용해서 $v_i$ 도 함께 학습된다.

이렇게 학습 시켰을 때, 비슷한 response를 생성하는 Speaker들은 embedding이 벡터 공간 상에서 비슷하게 분포된다. 이를 통해 실제로 학습되지 않은 문장들을 speaker 정보에 맞게 유추해서 생성할 수 있게 된다.

예를 들어 $i$, $j$ 라는 speaker 가 비슷한 공간에 위치할 때, training 데이터에 $i$ 가 "Where do you live" 라는 질문에 대해 "in UK" 라는 답을 한 적이 있다면, $j$ 가 생성하는 답 또한 "I live in UK"가 될 수 있는 것이다.


[4.3 Speaker-Addressee Model]
Speaker-Addressee Model models the way the respondent adapts their speech to a given addressee.

이 모델에서는 $v_i$ 대신에 $v_{i,j}$ 를 사용한다.
$$ V_{i,j} = \tanh (W_1\cdot v_i + W_2 \cdot v_j)
\ V_{i,j} \in \mathbb{R}^{K \times 1} \space\space W_1,W_2 \in \mathbb{R}^{K \times K} $$
$v_i$, $v_j$ 각각 speaker와 addressee의 vector represenation이다. LSTM model은 동일하다.
결과적으로 speaker와 addressee의 정보가 모두 model에 encoding될 수 있다.
이 역시 $i$ 와 $j$ 가 실제로 대화를 한 적이 없더라도, 각각 비슷한 벡터 공간 상의 $i'$, $j'$ 간의 대화를 참고해 response를 생성할 수 있다.


[4.4 Decoding and Reranking]

본 논문에서는 Beam size를 200으로 지정.
seq2seq 모델의 전형적인 문제인(Transformer도 이런 문제가 있을까?) generic and commonplace response 생성 문제를 해결하기 위해 Reranking(Li et al. 2016) 을 적용했다.

Reranking에 사용하는 scoring function :
$$\log P(R|M,v) + \lambda \log P(M|R) + \gamma |R|$$

-$P(R|M,v)$ denotes the probability of the generated response given the message M and the respondent’s speaker ID.
-$|R|$ denotes the length of the target
-$\gamma$ denotes the associated penalty weight.

MERT : Mininal Error Rate Training → SMT에 사용되던 parameter optimizing의 방법 중 하나


[5. Dataset]
[Twitter]
최소한 3번 이상의 댓글이 달린 thread에 참가한 회수가 60회가 넘는 사용자들의 Twitter data 사용 → Speaker model 에만 학습 (twitter에서 speaker ID 외의 정보를 확인할 수 없기 때문에? - 왜 사용자 정보가 없으면 Speaker-addressee가 안되는 것인지?)

[Friends, The Big Bang Theory + OSDb]
두 드라마의 코퍼스 데이터가 작기 때문에 OSDb로 먼저 학습을 시킨 후, 여기서 학습된 embedding과 LSTM parameter를 초기값으로 해서 두 드라마의 코퍼스를 학습 시킨다..


[6. conclusion]

-기존의 LSTM 모델보다 BLEU scores 10% 가량 성능이 개선
-질적으로 분석하였을 때 consistency는 확실히 늘어나는 것을 확인할 수 있음.
-수치상 크게 개선된 모습을 보이지는 않았지만, user embedding을 encoding함으로써 personal information이 가미된 sentence generation이 가능하다는 점을 확인

Written with StackEdit.