일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- namedtuple
- Array operations
- type hints
- Python
- seaborn
- subplot
- ndarray
- dtype
- 최대가능도 추정법
- pivot table
- 표집분포
- unstack
- linalg
- 정규분포 MLE
- 부스트캠프 AI테크
- VSCode
- scatter
- groupby
- Python 특징
- boolean & fancy index
- Numpy
- Python 유래
- 가능도
- BOXPLOT
- python 문법
- Numpy data I/O
- Operation function
- 딥러닝
- 카테고리분포 MLE
- Comparisons
- Today
- Total
또르르's 개발 Story
[Stage 3 - 논문 리뷰] SOM-DST 논문 리뷰 본문
문제 정의
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
rjt∈O={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
- ; At와 Ut를 구분하기 위한 스페셜 토큰
- [SEP] dialogue turn이 끝났다는 것을 표시하기 위한 스페셜 토큰
Bjt=[SLOT]j⊕Sj⊕−⊕Vjt : 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]⊕Dt−1⊕Dt⊕Bt−1
segment id: 0 1 1
⇒ Input : Sum(Xt embedding, segment id embedding, positional embedding)
dialogue history로 이전 턴의 dialogue utterances Dt−1을 사용한다. dialogue history의 size: 1
모델이 입력으로 들어오는 dialogue 간의 Markov property를 가정
이전 turn dialogue state Bt−1은 전체 dialogue history를 압축적으로 표현하는 역할
Encoder Output
Ht∈R|Xt|×d : hXt (t=1...t) 까지 집합
h[CLS]t,h[SLOT]jt∈Rd
- [CLS],[SLOT]j에 대응하는 output
hXt=tanh(Wpoolh[CLS]t)
- hXt: 전체 input Xt를 sequence로 aggregate
- Wpool∈Rd×d: feed-forward layer with a learnable parameter
State Operation Prediction
Pjopr,t=softmax(Woprh[SLOT]jt)
- Wopr∈R|O|×d : learnable parameter
- Pjopr,t∈R|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 J′t=|Ut|
Slot Value Generator (Decoder)
- Encoder에서 나온 Operation의 결과가 Update 인 경우 해당 slot의 value를 예측
- SOM-DST의 generator는 value를 J개가 아닌 J′t개의 slot에 대해서만 만들어준다.
- 대부분의 경우에서 J′t≪J이기 때문에 더 효율적이라고 주장
- 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,k−1t,ej,kt)
- ej,kt가 [EOS] 토큰이 나올때까지 진행
- hidden state gj,kt는 k-th decoding step을 거치면서 vocabulary 와 user utterance의 단어에 대한 확률 분포로 변함
- E∈Rdvcb×d: Encoder와 Decoder가 서로 공유하는 word embedding matrix
- dvcb: vocabulary size
- user utterance의 단어에 대한 확률 분포
- α=sigmoid(W1[gj,kt;ej,kt;cj,kt])
- W1∈R1×(3d): learnable parameter
- cj,kt=Pj,kctx,tHt∈Rd: context vector
- E∈Rdvcb×d: Encoder와 Decoder가 서로 공유하는 word embedding matrix
- 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)
- Wdom∈Rddom×d: learnable parameter
- Pdom,t∈Rddom: turn t에서 domain에 대한 확률 분포
- ddom: # of domains defined in the dataset
Average of the negative log-likelihood
Lopr,t=−1J∑Jj=1(Yjopr,t)⊤log(Pjopr,t)
Ldom,t=−(Ydom,t)⊤log(Pdom,t)
- Ydom,t∈Rddom: one-hot vector for the ground truth domain
- Yjopr,t∈R|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|∑j∈Ut[1Kjt∑Kjtk=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,t∈Rdvcb: 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

Domain-specific Accuracy

Latency

평가
- JGA, Domain-specific Accuracy 에서 SOTA 혹은 비슷한 수준의 성능을 보여줌
- inferecnce 타임이 매우 짧음에도 불구하고 좋은 성능을 보여줌
'[P Stage 3] DST > 논문리뷰' 카테고리의 다른 글
[Stage 3 - 논문 리뷰] Transformer-DST 논문 리뷰 (0) | 2021.05.20 |
---|---|
[Stage 3 - 논문 리뷰] CHAN-DST 논문 리뷰 (0) | 2021.05.20 |
[Stage 3 - 논문 리뷰] TRADE 논문 리뷰 (0) | 2021.05.20 |