또르르's 개발 Story

[Stage 3 - 논문 리뷰] SOM-DST 논문 리뷰 본문

[P Stage 3] DST/논문리뷰

[Stage 3 - 논문 리뷰] SOM-DST 논문 리뷰

또르르21 2021. 5. 20. 02:02

문제 정의

Open-vocab 기반 DST 중, SOM-DST 가 속도와 성능에 있어 좋은 성능을 보이므로 적용해보기 위함


참고 자료


기존 모델의 문제점

Ontology-based DST 문제점

  • 실제 시나리오에 잘 대응하지 못함
  • unseen value를 처리할 수 없음
  • ontology가 많으면 처리 시간이 오래 걸림

TRADE 문제점

  • turn 마다 slot 의 모든 value를 생성해야해서 비효율적임

SOM-DST

Definition

t : turn

Sj: slot

Vjt: corresponding slot value

J: total number of such slots

rjtO={CARRYOVER, DELETE, DONTCARE, UPDATE}

At: System response

Ut: User utterance


State Operation Predictor (Encoder)

Encoder 모델로 pretrained BERT encoder 사용

Encoder Input을 만들기 위한 준비물

Dt=At;Ut[SEP]: dialogue utterances at turn t

  • ; AtUt를 구분하기 위한 스페셜 토큰
  • [SEP] dialogue turn이 끝났다는 것을 표시하기 위한 스페셜 토큰

Bjt=[SLOT]jSjVjt : representation of the j-th slot-value pair

  • j-th slot-value pair를 하나의 벡터로 aggregate
  • [SLOT]jBERT의 [CLS] 토큰과 같은 역할
  • [SLOT] 이라는 스페셜 토큰을 사용
  • Vjt

Bt=B1t...BJt : representation of the dialogue state at turn t

Encoder Input

Xt=[CLS]Dt1DtBt1

segment id: 0 1 1

Input : Sum(Xt embedding, segment id embedding, positional embedding)

dialogue history로 이전 턴의 dialogue utterances Dt1을 사용한다. dialogue history의 size: 1

모델이 입력으로 들어오는 dialogue 간의 Markov property를 가정

이전 turn dialogue state Bt1은 전체 dialogue history를 압축적으로 표현하는 역할

Encoder Output

HtR|Xt|×d : hXt (t=1...t) 까지 집합

h[CLS]t,h[SLOT]jtRd

  • [CLS],[SLOT]j에 대응하는 output

hXt=tanh(Wpoolh[CLS]t)

  • hXt: 전체 input Xt를 sequence로 aggregate
  • WpoolRd×d: feed-forward layer with a learnable parameter

State Operation Prediction

Pjopr,t=softmax(Woprh[SLOT]jt)

  • WoprR|O|×d : learnable parameter
  • Pjopr,tR|O| : j-th slot의 turn t에서의 연산에 대한 확률 분포
  • SOM-DST에서는 |O|=4,
  • O={CARRYOVER,DELETE,DONTCARE,UPDATE}

rjt=argmax(Pjopr,t)

→ slot의 Operation의 결과가 UPDATE 일 때 slot value를 generation

  • Encoder에서 나온 Operation의 결과가 Update인 경우를 집합으로 표현하면
  • Recab for 

  • Ut={j|rjt=UPDATE}, and its size as Jt=|Ut|

 


Slot Value Generator (Decoder)

  • Encoder에서 나온 Operation의 결과가 Update 인 경우 해당 slot의 value를 예측
  • SOM-DST의 generator는 value를 J개가 아닌 Jt개의 slot에 대해서만 만들어준다.
  • 대부분의 경우에서 JtJ이기 때문에 더 효율적이라고 주장
  • Decoder 모델로 GRU 사용
    • 입력으로 word embedding vector ej,kt를 받으면서 GRU의 hidden state vector gj,kt를 recurrent하게 업데이트
    • gj,0t=hxt, ej,0t=h[slot]jt: GRU에 들어가는 초기값
    • gj,kt=GRU(gj,k1t,ej,kt)
    • ej,kt가 [EOS] 토큰이 나올때까지 진행
    • hidden state gj,kt는 k-th decoding step을 거치면서 vocabulary 와 user utterance의 단어에 대한 확률 분포로 변함
      • ERdvcb×d: Encoder와 Decoder가 서로 공유하는 word embedding matrix
        • dvcb: vocabulary size
      Pj,kctx,t=softmax(Htgj,kt)R|Xt|
      • user utterance의 단어에 대한 확률 분포
      Pj,kval,t=αPj,kvcb,t+(1α)Pj,kctx,t : final output distribution
      • α=sigmoid(W1[gj,kt;ej,kt;cj,kt])
        • W1R1×(3d): learnable parameter
        • cj,kt=Pj,kctx,tHtRd: context vector
    • Pj,kvcb,t=softmax(Egj,kt)Rdvcb

Objective Function

State operation predictor

Main Task

state operation classification

Auxiliary Task

domain classification

state operation classification 외에도 domain classification을 보조 task로 사용하여 모델이 dialogue turn 간의 slot operation과 domain transition의 상관 관계를 학습하도록 함

Pdom,t=softmax(WdomhXt)

  • WdomRddom×d: learnable parameter
  • Pdom,tRddom: turn t에서 domain에 대한 확률 분포
    • ddom: # of domains defined in the dataset

Average of the negative log-likelihood

Lopr,t=1JJj=1(Yjopr,t)log(Pjopr,t)

Ldom,t=(Ydom,t)log(Pdom,t)

  • Ydom,tRddom: one-hot vector for the ground truth domain
  • Yjopr,tR|O|: one-hot vector for the ground truth operation for the j-th slot

Slot value generator

Average of the negative log-likelihood

Lsvg,t=1|Ut|jUt[1KjtKjtk=1(Yj,kval,t)log(Pj,kval,t)]

  • Kjt: # of tokens of the ground truth value that needs to be generated for the j-th slot
  • Yj,kval,tRdvcb: one-hot vector for the ground truth token that needs to be generated for the j-th slot at the k-th decoding step

Final Loss

to minimized Ljoint,t=Lopr,t+Ldom,t+Lsvg,t


Experimental Setup

Datasets

MultiWOZ 2.0 and MultiWOZ 2.1

Training

  • Encoder : Bert-base-uncased
  • Decoder : GRU
  • Hidden size : 768
  • Optimizer : BertAdam
  • Encoder LR and warmup : 4e-5, 0.1
  • Decoder LR and warmup : 1e-4, 0.1
  • Batch size : 32
  • Dropout : 0.1
  • Word Dropout 적용, 0.1확률로 word 를 [UNK] 로 바꿈
  • Input max length : 256
  • Training Epoch : 30

결과

Joint Goal Accuracy

† indicates the case where BERT-large is used for our model

 

Domain-specific Accuracy

Latency


평가

  • JGA, Domain-specific Accuracy 에서 SOTA 혹은 비슷한 수준의 성능을 보여줌
  • inferecnce 타임이 매우 짧음에도 불구하고 좋은 성능을 보여줌
Comments