본문 바로가기

attention4

Transformer (2) 이번 포스팅에서는 Transformer을 이어서 살펴보도록 하겠습니다. Transfromer를 이해하기 위해선 6개의 모듈을 이해해야 됩니다. (Input Layer, Positional Encoding, Multi-Head Attention, Masked Multi-Head Attention, Add. & Norm. Layer, Feed Forward Layer) 이전 포스팅에서는 Input Layer, Positional Encoding을 살펴보았고, 이번 포스팅에서는 나머지 모듈을 살펴보려고 합니다. Transformer Self-Attention? Input에 Positional Encoding을 더해준 후 Attention Layer에 진입하게 됩니다. 예전 포스팅에서 언급된 것 처럼 Atten.. 2022. 2. 21.
Transformer (1) 이번 포스팅에서는 2017에 발표된 논문인 "Attention is all you need"에 수록된 Transformer를 살펴보겠습니다. Transformer Background Transformer의 등장 배경은 두 가지의 장점을 계승하고, 한 가지의 단점을 보완하는데 있습니다. 직전 포스팅에서 살펴본 Bahdanau Attention, Luong Attention과 같은 Attention Mechanism이 잘 작동하고 있고, self-attention (Query, Key, Value의 출처가 같은 Attention)도 마찬가지로 Neural Translation Machine 영역에서 효과적이 었습니다. 또한 Seq2seq을 시작으로 Encoder-Decoder 구조로 Encoder로 Cont.. 2022. 1. 19.
Luong Attention 이번 포스팅에서는 지난 Bahdanau Attention에 이어서 Luong Attention을 살펴보겠습니다. Luong Attention 2014 Bahdanau et al.이 Neural Machine Translation (NMT)영역에 처음으로 Attention Mechanism을 적용하였습니다. Luong et al.은 "Effective Approaches to Attention-based Neural Machine Translation"에서 Bahdanau가 진행한 연구를 제외하면 NMT 영역에 Attention Mechanism 연구가 적다며, simplicity와 effectiveness를 염두한 방법을 제안합니다.Luong et al.의 출발점이 간단명료한 방향성을 갖고 있는 만큼 이.. 2021. 12. 9.
Bahdanau Attention 이번 포스팅에서는 Neural Machine Translation 영역에서 Attention Mechanism의 효시가된 Bahdanau Attention에 대해서 다뤄보겠습니다. Bahdanau Attention은 2014에 처음 등장한 이후, Attetion이라는 새로운 접근법 아래 활발한 연구와 발전을 이루며 기계 번역이 크게 성장했습니다. Why Attention? 지난 포스팅에서 Seq2Seq을 살펴봤습니다. 고정된 크기의 input과 output을 처리하던 전통적인 Recurrent Neural Networks에서 가변적 길이의 input, output을 처리할 수 있는 방법이었습니다. Seq2seq은 크게 Encoder Part와 Decoder Part로 구분되어 있습니다. Encoder에서.. 2021. 11. 24.