<aside>
💡 References
</aside>
<aside>
💡 Summary
</aside>
Background
- Seq2seq 모델에서 인코더가 입력 시퀀스를 고정된 크기의 벡터로 압축하고, 디코더는 이 벡터를 통해 출력 시퀀스를 생성


출처: https://jalammar.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/
- 그로 인해, 아래의 단점이 존재함
- RNN의 고질적인 문제점인 ***Vanishing Gradient(=Long-term problem)***가 발생
- 모든 정보를 고정된 크기의 벡터로 압축하기 때문에 정보 손실 이 발생
- 결국은, 입력 시퀀스(입력 문장)이 길어질수록 성능이 떨어지는 현상으로 막고자, 본 기법 사용
IDEA
- Encoder의 마지막 hidden state만 Decoder에 전달하는 것이 아닌, Encoder의 모든 hidden state들을 Decoder에 모두 전달

출처: https://jalammar.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/
Inference Flow

Encoder & Decoder

Eecoder 구조

Decoder 구조 (출처: https://bigdaheta.tistory.com/67)