๐ง Paper Summary
๐ 1. ์ฐ๊ตฌ ๋ชฉ์ (Motivation)
- ๊ธฐ์กด RNN, LSTM ๊ธฐ๋ฐ ์ํ์ค ๋ชจ๋ธ์ ์์ฐจ์ ์ฐ์ฐ ๊ตฌ์กฐ ๋๋ฌธ์ ๋ณ๋ ฌํ๊ฐ ์ด๋ ต๊ณ , ๊ธด ๋ฌธ์ฅ ์์กด ๊ด๊ณ(Long-range dependency)๋ฅผ ํ์ตํ๊ธฐ ์ด๋ ต๋ค.
- ๋
ผ๋ฌธ์ ์ด๋ฌํ ํ๊ณ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด, ์์ ํ Attention ๋ฉ์ปค๋์ฆ๋ง์ผ๋ก ๊ตฌ์ฑ๋ ๋ชจ๋ธ์ ์ ์ํ๋ค.
- ์ฆ, โRecurrent ๊ตฌ์กฐ ์์ด๋ ์ํ์ค ๋ฐ์ดํฐ๋ฅผ ์ ์ฒ๋ฆฌํ ์ ์๋๊ฐ?โ์ ๋ํ ๋ต์ ์ ์ํ๋ค.
โ๏ธ 2. ์ฃผ์ ๊ธฐ์ฌ (Contributions)
- โ ์์ ํ Attention ๊ธฐ๋ฐ ๊ตฌ์กฐ ์ ์: RNN๊ณผ CNN์ ์ ๊ฑฐํ๊ณ ์ค์ง Attention์ผ๋ก ๊ตฌ์ฑ๋ Transformer๋ฅผ ์ฒ์์ผ๋ก ์ ์.
- โก Scaled Dot-Product Attention / Multi-Head Attention ๋์
: ๋จ์ผ attention์ ํ๊ณ๋ฅผ ๊ทน๋ณตํ๊ธฐ ์ํด ์ฌ๋ฌ attention head๋ฅผ ๋ณ๋ ฌ ํ์ต.
- โข Positional Encoding ์ ์: ์์๋ฅผ ์์ attention ๊ตฌ์กฐ์์ ๋จ์ด ๊ฐ ์์๋ฅผ ํํํ๊ธฐ ์ํด sin/cos ๊ธฐ๋ฐ ์์น ์ธ์ฝ๋ฉ ์ฌ์ฉ.
- โฃ ๋ณ๋ ฌํ์ ํจ์จ์ ํ์ต: GPU ๋ณ๋ ฌ ์ฒ๋ฆฌ์ ์ต์ ํ๋์ด ํ์ต ์๋๋ฅผ ๋ํญ ํฅ์.
- โค BLEU ์ ์ ํฅ์: WMT 2014 EnglishโGerman ๋ฒ์ญ์์ ๊ธฐ์กด SOTA๋ณด๋ค ๋์ BLEU ์ฑ๋ฅ์ ๋ฌ์ฑ.
๐งฉ 3. ๋ชจ๋ธ ๊ตฌ์กฐ / ๋ฐฉ๋ฒ๋ก (Method)
๐ ์ ์ฒด ๊ตฌ์กฐ
- Encoder-Decoder ์ํคํ
์ฒ
- ๊ฐ ๋ถ๋ถ์ Multi-Head Self-Attention + Position-wise Feed Forward Network (FFN) ๋ก ๊ตฌ์ฑ.
- Encoder 6์ธต, Decoder 6์ธต ์์ ํํ๋ก ๊ตฌ์ฑ.
โ๏ธ ํต์ฌ ๊ตฌ์ฑ ์์
(1) Scaled Dot-Product Attention
- Query Q, Key K, Value V ๋ฅผ ์ด์ฉํด attention ๊ณ์ฐ:
$$
Attention(Q,K,V)=softmax(dkQKT)V
$$