-
Transformer 모형에 있는 Attention이 해소하고자 한 문제Data miner 2019. 7. 15. 14:18728x90
하단의 내용은
http://mlexplained.com/2017/12/29/attention-is-all-you-need-explained/의 주요 내용을 요약하고자 한 것입니다.
Paper Dissected: “Attention is All You Need” Explained
“Attention is All You Need”, is an influential paper with a catchy title that fundamentally changed the field of machine translation. Previously, RNNs were regarded as the go-to archite…
mlexplained.com
초기의 attention모델 또한 RNN구조에서 적용되었다가, RNN의 구조에서의 한계를 느끼고 이에서 탈피하고자 하였다.
RNN의 구조의 잘 알려진 단점은 다음과 같다.
- 1) 정보를 순차적으로 처리하는 것은 GPU로 문제를 해결하는 데 있어서 비효율적이다. 모델의 크기가 상당히 크다. 들어가는 행렬들의 크기가 크다.
- 2) LSTM이 완전히 해소하지 못하는 Long-term memory 문제가 있었다. 또한 문맥에 따라서 단어가 가지는 다양한 의미를 효과적으로 반영하지 못한다.
'문맥에 따라서 단어가 가지는 다양한 의미'는 종류에 따라서 세 가지로 나뉠 수 있다.
- 2-1) input 토큰들과 output 토큰들과의 관계, 2-2) input 토큰들 내부에서의 관계, 2-3) output 토큰들 내부에서의 관계
- 2-1)의 경우, 전통적인 attention 모델에서 decoder가 input sentence에 접근 가능하도록 함으로써 해소했고
- 2-2)의 경우, transformer 모델에서 input/output 내부에서 끼리의 토큰 관계를 반영하고자 하였다.
'Data miner' 카테고리의 다른 글
#Dynaminc_programming #코딩공부 (1) 2019.09.11 #BERT_논문정리 (0) 2019.07.18 #논문공부 #Attention is all you need #NLP (3) 2019.07.12 #합병정렬에 대해 알아보자. #merge_sort #정렬 (0) 2019.07.12 #퀵정렬 #Quick_sort_1단계 #Divide하기 (0) 2019.07.11