
Attention ๊ณต๋ถํ๋ฉด์ ๋ด์ง์ค Attention ๋ฃ๋ ์ฌ๋ ๋์ผ ๋~
์ ๋ฆฌํ๋ฉด์ ํ๋ฃจ์ข
์ผ ๊ฝํ์ ๋ด์ง์ค ๋
ธ๋ ๋ฐ๋ณต์ฌ์ ํ๋ค~๐ต๐(tmi)
๐ก
์ด๋ฒ ์ฃผ๋ถํฐ ๋ฒ์จ Transformer๋ฅผ ๋ฐฐ์ธ ์ค์...
ํ๋ถ ์ฐ๊ตฌ์ ์์ (?)์ Attention Is All You Need๋ฅผ ์๋ํ ์ ์ด ์๋๋ฐ Q, K, V์ ๋ํ ๊ฐ๋ ์ด ์ ์กํ์ง ์์ ์ ๋งคํ๊ฒ ์ดํดํ๊ณ ๋๊ฒผ๋ ๊ธฐ์ต์ด ์๋ค.
๊ฐ์๋ฅผ ๋ค์ผ๋ฉฐ '๊ทธ๋ผ ์ด๊ฑด?', '์ค์ ์ ๊ฑด?๐' ํ๋ ๋ถ๋ถ๋ค์ ๋ง์น ์์ํ์ จ๋ค๋ ๋ฏ์ด ์ค๋ช ํด์ฃผ์ ์ ์ ๊ธฐํ๊ณ ๊ฐ์ฌํ๋ค. ๋๋ ์ผ๋ง๋ ๊ณต๋ถํด์ผ ์ ๋ฐ ๊ฑธ ์์ํ ์ ๋๊ฐ ๋ ๊ฒ์ธ์ง...ใ ใ ..ใ
๊ทธ๋๋ ์๋ก์ด ๊ฑธ ์๋ ๊ฒ์ ๋ ์ฆ๊ฒ๊ธฐ์ ์ฌ๋ฐ๋ค!
๋ค์์ฃผ์ ํ์๋ค๊ณผ ๋ ผ๋ฌธ ๋ฆฌ๋ทฐ๋ฅผ ํ๊ธฐ๋ก ํ์ผ๋ ๊ฐ์๋ก ๋ค์ง ๊ฐ๋ ์ ๋ ผ๋ฌธ์ผ๋ก ๊ณต๋ถํ๋ฉฐ ์ ๋๋ก ์ตํ์ผ๊ฒ ๋ค. ์ด๋ฒ์ ๋ฐ๋์ Attention ๊ฐ๋ ์ ์ ๋๋ก ์ฑ๊ฒจ๊ฐ ๊ฒ์ด๋ค!!๐ฅ
์์ํ๊ธฐ ์ ์!!! ์ ํ์ฑ, ๋
๋ฆฝ์ฑ, ๋ฑ๋ถ์ฐ์ฑ, ์ ๊ท์ฑ์ ๋ํ ๋ด์ฉ์ ๐Week 1์ ์ถ๊ฐํ์ผ๋ ๋งํฌ ํ๊ณ ๊ฐ์ ํ์ธํ๊ธฐ!
์ค๋ ๋ด์ฉ์์ ์ค์ํ ๊ฒ์ ์๋๊ณ ๋ฐฐ์ด ๋ด์ฉ์ ๋ค์ ์ ๋ฆฌํ ๊ฒธ ์ ๋ฒ ์ฃผ ํฌ์คํธ์ ์ฐ๊ฒฐํด๋์๋ค.
๋ด ๊ธฐ๋ก์ฉ์ด๋ฏ๋ก ๋ฌด์ํด๋ ๋ฌด๋ฐฉ!
โญAttention Is All You Needโญ ๋
ผ๋ฌธ์์ ๋ฑ์ฅํ Transformer ๋ชจ๋ธ์ encoder์ decoder ๊ตฌ์กฐ๋ก, ๋ฌธ์ฅ๊ณผ ๊ฐ์ ์์ฐจ์ ๋ฐ์ดํฐ์์ ๊ฐ ๋จ์ด์ ๊ด๊ณ๋ฅผ ์ถ์ถํ์ฌ ๋งฅ๋ฝ๊ณผ ์๋ฏธ๋ฅผ ํ์
ํ๋ ๋ชจ๋ธ์ด๋ค. ๊ธฐ์กด์ ์๊ณ์ด ๋ฐ์ดํฐ ์ฒ๋ฆฌ๋ฅผ ์ํ ๋ชจ๋ธ์ RNN ๊ธฐ๋ฐ(LSTM, GRU ๋ฑ)์ด๊ฑฐ๋ Convolution์ ์ฌ์ฉํ์๋๋ฐ, Transformer ๋ชจ๋ธ์ ์ด ๊ตฌ์กฐ์์ ๋ฒ์ด๋ ์์ ํ self-attention์ ๊ธฐ๋ฐํ ๋ชจ๋ธ์ด๋ค.
Transformer ๋ชจ๋ธ์ ์ ํํ ์๊ธฐ ์ํด ํ์๋ค๊ณผ Attention Is All You Need ๋
ผ๋ฌธ ๋ฆฌ๋ทฐ๋ฅผ ํ๊ธฐ๋ก ํ๋๋ฐ, ๊ทธ ์ ์ Transformer ๋ชจ๋ธ์ด ๋ฑ์ฅํ๊ฒ ๋ ๋ฐฐ๊ฒฝ๋ถํฐ ์ฐจ๊ทผํ ์ ๋ฆฌํด๋ณด๊ณ ์ ํ๋ค.
sequentialํ ๋ฐ์ดํฐ ์ฒ๋ฆฌ์ ์์กฐ๋ผ๊ณ ํ ์ ์๋ ๋ชจ๋ธ์ด๋ค.

๊ทธ๋ฆผ์์ ์ฒซ ๋ฒ์งธ ์
์ ๋ณด๋ฉด, input x๊ฐ hidden state์ ์
๋ ฅ๋ ๊ฒฐ๊ณผ๊ฐ ๋ค์ hidden state๋ก ์ ๋ฌ๋๋ค. ์ด ๊ณผ์ ์ด ๋ฐ๋ก Recurrentํ ๊ณผ์ ์ด๋ค.
์ด์ ๋จ๊ณ t-1์ hidden state๋ฅผ ๋ค์ ๋จ๊ณ t์ hidden state๋ก ์ ๋ฌํ๋ฉฐ, ์ด๋ ๊ณผ๊ฑฐ์ ์ ๋ณด๊ฐ ์ดํ์ timestep๊น์ง ์ ํด์ง๊ธฐ ๋๋ฌธ์ squencetialํ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ ์ ์๋ ๊ฒ์ด๋ค.
์ด๋ ๊ฒ input x๊ฐ hidden state์ ์
๋ ฅ๋ ๋, hidden state์์ hidden state๋ก ์ ๋ฌ๋ ๋, hidden state์์ ์ถ๋ ฅ์ ๋ผ ๋ ๊ฐ๊ฐ ์๋์ ๊ฐ์ ๊ฐ์ค์น๋ฅผ ์ฌ์ฉํ๋ค.
๊ฐ ๊ณ์ธต(, , )๋ผ๋ฆฌ๋ ๊ฐ์ค์น๋ฅผ ๊ณต์ ํ์ง๋ง, ์๋ก ๋ค๋ฅธ ๊ณ์ธต๋ผ๋ฆฌ๋ ๊ฐ์ค์น๋ฅผ ๊ณต์ ํ์ง ์๋๋ค.
RNN์ ๋ฌธ์ ๋ ์ฌ๊ธฐ์ ๋ฐ์ํ๋ค. ์
๋ ฅ์ sequence ๊ธธ์ด๋ ๋ชจ๋ธ์ depth์ฒ๋ผ ์์ฉํ๊ธฐ ๋๋ฌธ์ sequence๊ฐ ๋์ด๊ฐ ๋๋ง๋ค hidden state๋ฅผ ํต๊ณผํ ๋ ๊ฐ ๋ฐ๋ณต์ ์ผ๋ก ๊ณฑํด์ง๋ค. ๋ฐ๋ผ์ Back Propagation์ ํ ๋ ์ด ๊ฐ ๋ฐ๋ณต์ ์ผ๋ก ๊ณฑํด์ง๊ธฐ ๋๋ฌธ์ ํด๋น ๊ฐ์ ํฌ๊ธฐ์ ๋ฐ๋ผ Vanishing/Exploding Gradient Problem์ด ๋ฐ์ํ๋ค.
๋จผ์ , Vanishing Gradient Problem์ ๊ฒฝ์ฐ, ๊ฐ 0์ ๊ฐ๊น์ด ๊ฐ์ ๊ฐ์ง ๋ ๋ฐ์ํ๋ค. ๋ง์ง๋ง timestep t์์ ์ฒซ ๋ฒ์งธ timestep์ผ๋ก ๊ฐ๋ ๋์ ๊ฐ ์ด t-1๋ฒ ๊ณฑํด์ง๋๋ฐ, ์ด๋ ์ ๋จ์ layer์ ๊ฐ์ด ์ ์ ์์์ง๊ธฐ ๋๋ฌธ์ ์ ๋๋ก ๋ ์ ๋ณด ์ ๋ฌ์ด ์ด๋ฃจ์ด์ง์ง ์๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก ๊ณผ๊ฑฐ ์ ๋ณด์ ์์ค์ด ๋ฐ์ํ๋ค.
๋ฐ๋๋ก, Exploding Gradient Problem์ ์ ๊ฐ์ด ๋งค์ฐ ํด ๋ ๋ฐ์ํ๋ค. Back Propagation์ ์ํํ ๋ ๋ฐ๋ณต์ ์ผ๋ก ํฐ ๊ฐ์ด ๊ณฑํด์ง๊ธฐ ๋๋ฌธ์ ๊ฐ์ค์น๊ฐ ๋งค์ฐ ํฐ ๊ฐ์ผ๋ก ๊ฐฑ์ ๋์ด ํ์ต ๊ณผ์ ์ด ๋ถ์์ ํด์ง๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก ๋ชจ๋ธ์ด ๋ฐ์ฐํ๋ค.
RNN์ Vanishing/Exploding Gradient Problem์ ๋ฐฉ์งํ๊ธฐ ์ํด LSTM์ด ๋ฑ์ฅํ๋ค. LSTM์ ๊ธฐ๋ณธ์ ์ผ๋ก RNN์ ๊ตฌ์กฐ์ ๊ฐ์ผ๋, ์ฅ๊ธฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ํ cell state์ ์ธ ๊ฐ์ง์ gate๊ฐ ์ถ๊ฐ๋์๋ค.

Cell State
ํ์ฌ์ timestep์ t๋ผ๊ณ ํ์ ๋ ๊ณผ๊ฑฐ๋ก๋ถํฐ ํ์ฌ๊น์ง ์ ๋ฌ๋๋ ์ ๋ณด์ด๋ค.
์๋ ์ค๋ช
ํ ์ธ ๊ฐ์ง์ gate๋ฅผ ํตํด cell state๋ฅผ ๊ฒฐ์ ํ ์ ์๋ค.
Forget Gate
๊ณผ๊ฑฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ผ๋ง๋ ์์์ง๋ฅผ ๊ฒฐ์ ํ๋ ๊ฒ์ดํธ์ด๋ค.
์ฆ, ์ ๋ก ์ ๋ฌํ ๋ ๊ณผ๊ฑฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ผ๋ง๋ ๋ฐ์ํ ๊ฒ์ธ์ง๋ฅผ ๊ฒฐ์ ํ๋ค.
์ด ๊ฐ์ด ํด์๋ก ๊ณผ๊ฑฐ ์ ๋ณด๊ฐ ์ค์ํ๋ฉฐ, ๋ฏธ๋๋ก ์ ๋ฌ๋์ด์ผ ํ๋ค๋ ์๋ฏธ์ด๋ค.
Input Gate
ํ์ฌ ์ ๋ณด๋ฅผ cell state์ ์ผ๋ง๋ ๋ฐ์ํ ์ง๋ฅผ ๊ฒฐ์ ํ๋ ๊ฒ์ดํธ์ด๋ค.
์ด ๊ฐ์ด ํด์๋ก ํ์ฌ ์ ๋ณด๊ฐ ์ฅ๊ธฐ์ ์ผ๋ก ๊ธฐ์ต๋๊ณ , ์ ๋ฌ๋์ด์ผ ํ๋ค๋ ์๋ฏธ์ด๋ค.
Output Gate
ํ์ฌ ์ํ์์์ ์ถ๋ ฅ์ ๊ฒฐ์ ํ๋ ๊ฒ์ดํธ์ด๋ค.
์ถ๋ ฅ์ ๋ํด ๋ก ๊ณผ๊ฑฐ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ผ๋ง๋ ๋ฐ์ํ ์ง ๊ฒฐ์ ํ๊ณ , ๋ก ํ์ฌ์ input์ธ ๋ฅผ ์ผ๋ง๋ ๋ฐ์ํ ์ง ๊ฒฐ์ ํ๋ค.
๊ฒฐ๊ณผ์ ์ผ๋ก RNN๋ณด๋ค ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฅ๊ธฐ์ ์ผ๋ก ๋ณด์กดํ ์ ์๋ค๋ ์ฅ์ ์ด ์๋ค. ์ด๋ , ์ด๋ผ๋ฉด ๊ณผ๊ฑฐ ์ ๋ณด๋ ์ ๋ถ ๋ฏธ๋๋ก ์ ๋ฌํ๊ณ , ํ์ฌ ์ ๋ณด๋ ์ ํ ๋ฐ์ํ์ง ์์ cell state๊ฐ ๋ฌดํํ ๋ณด์ฅ๋๋ค. (๊ทธ๋ผ ์ด๋ฉด LSTM์ด RNN์ฒ๋ผ ๋์ํ๋?)
ํ์ง๋ง LSTM๋ cell state์ ์ ์ธ ๊ฐ์ง gate๋ฅผ ํฌํจํ๊ธฐ ๋๋ฌธ์ ์ฐ์ฐ๋์ด ๋ง์์ ธ ๋นํจ์จ์ ์ด๋ผ๋ ๋จ์ ์ด ์กด์ฌํ๋ค. GRU๋ ์ด๋ฅผ ๊ฐ์ ํ ๋ชจ๋ธ์ด๋ค!

๊ทธ๋ฆผ์ ์๋จ์ ๋ถํฐ ๊น์ง ์ด์ด์ง๋ ๋ผ์ธ์ด LSTM์ cell state ์ญํ ์ ํ๋ค. ๋ํ LSTM๊ณผ ๋ฌ๋ฆฌ GRU์๋ ๋ ๊ฐ์ง gate๊ฐ ์กด์ฌํ๋ค.
Reset Gate
LSTM์์์ Forget Gate์ ๊ฐ์ ์ญํ ์ ํ๋ค.
Update Gate
ํ์ฌ timestep ์์์ input ๋ฅผ ์ฅ๊ธฐ ๋ฉ๋ชจ๋ฆฌ์ ์ผ๋ง๋ ์ ๋ฌํ ์ง๋ฅผ ๊ฒฐ์ ํ๋ค. LSTM์์์ Input Gate์ ๊ฐ์ ๊ณผ์ ์ด๋ค.
์ด๋ ๊ทธ๋ฆผ์์ ์ ์ ์๋ฏ์ด ์ฆ, ๊ณผ๊ฑฐ ์ ๋ณด๊ฐ ๋ ๊ฐ๋๋ก ๋๋์ด์ง๋ ๊ฒ์ ์ ์ ์๋ค. ํ๋๋ Reset Gate๋ฅผ ํต๊ณผํ์ฌ ๋ฏธ๋ ์ ๋ณด์ ๋ฐ์๋๊ณ , ๋ค๋ฅธ ํ๋๋ ํ์ฌ timestep ์์์ input ์ ๊ฒฐํฉํ์ฌ output์ ๊ฒฐ์ ํ๋ค.
๊ฒฐ๊ณผ์ ์ผ๋ก GRU๋ ๊ฐ LSTM์ cell state์ hidden state์ ์ญํ ์ ๋์์ ์ํํ์ฌ ๋ณด๋ค ๊ฐ๋ณ๊ณ , ํจ์จ์ ์ธ ๋ชจ๋ธ์ด๋ผ๊ณ ํ ์ ์๋ค.
์์ ๊ณต๋ถํ RNN ๊ธฐ๋ฐ์ ๋ชจ๋ธ๋ค์ one-to-many, many-to-one, many-to-many ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ๋๋ผ๋ ๊ฐ ์
๋ ฅ์ ์ถ๋ ฅ์ด ์์๋๋ก ๋์๋๊ฒ ๋๋ค. ์ด๋ Sequentialํ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ๋ ๋ชจ๋ธ๋ก ๋ฒ์ญ์ ์ํํ๋ค๊ณ ํด๋ณด์.
I love you๋ผ๋ ๋ฌธ์ฅ์ ๋๋ ๋๋ฅผ ์ฌ๋ํด๋ผ๋ ๋ฌธ์ฅ์ผ๋ก ๋ฒ์ญ๋ ๊ฒ์ด๋ค. ๋จ์ด์ ์์์ ์ํ๋ฉด I=๋๋, love=๋๋ฅผ, you=์ฌ๋ํด๋ผ๋ ๊ตฌ์กฐ๊ฐ ๋๋ค๋ ๊ฒ์ธ๋ฐ, ํ๊ตญ์ด์๋ '์(๋)', '์(๋ฅผ)'๊ณผ ๊ฐ์ ์กฐ์ฌ๊ฐ ์์ ๋ฟ ์๋๋ผ ๋จ์ด์ ๋ฐฐ์ด ์ฆ, ๋ฌธ์ฅ์ ๊ตฌ์กฐ๊ฐ ์์ด๋ ๋ค๋ฅด๊ธฐ ๋๋ฌธ์ ๋จ์ด๋ผ๋ฆฌ ์ผ๋์ผ ๋์์ ํ๋ ๋ฒ์ญ์ ์ฌ๋ฐ๋ฅด์ง ์๋ค๋ ๊ฒ์ ์ ์ ์๋ค. ํ๊ตญ์ด์ ์์ด ์ธ์๋ ๋ค์ํ ์ธ์ด์ ์ด์ ๊ฐ์ ๋ณ์๊ฐ ์กด์ฌํ ๊ฒ์ด๋ค.
๋ฐ๋ผ์ Seq2Seq ๋ชจ๋ธ์ ์์ ๊ณต๋ถํ RNN ๊ธฐ๋ฐ์ ๋ชจ๋ธ๋ค์ ํน์ ํ ๋ฐฉ์์ผ๋ก ์กฐํฉํ์ฌ ๋ง๋ค ์ ์๋ค.
Encoder & Decoder

Seq2Seq ๋ชจ๋ธ์ ์ ๋ ฅ ๋จ์ ์ ๊ณผ ์ถ๋ ฅ์ด ๋์๋๋ค๋ ํ์์ ๋ฒ์ด๋๋ค. ๋ฐ๋ผ์ ํ ๋จ์ด, ํน์ ํ์ฌ๋ถํฐ ์ด์ ๊น์ง์ ๋จ์ด๋ค๋ง ๋ณด๊ณ ๋ฒ์ญ์ ์ํํ๋ ๊ฒ์ด ์๋๋ผ input sequence๋ฅผ ์ ๋ถ ํ์ธํ ํ ๋ฒ์ญ์ ํ ์ ์๋ ๊ฒ์ด๋ค. ์ฌ๋์ด ๋ฌธ์ฅ ์ ์ฒด๋ฅผ ๋ณด๊ณ ๋ฒ์ญ์ ์ํํ๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฐฉ์์ด๋ค. ์ด๋ ๋ฌธ์ฅ ์ ์ฒด๋ฅผ ์ฝ๊ณ ์๋ฏธ๋ฅผ ํ์ ํ๋ ๊ฒ์ Encoder๊ฐ ์ํํ๊ณ , ํ์ ํ ์๋ฏธ๋ฅผ ๋ฒ์ญ๋ ์ํ๋ก ์ถ๋ ฅํ๋ ๊ฒ์ Decoder๊ฐ ์ํํ๋ค.
Encoder
์ ๊ทธ๋ฆผ์์ ์ผ์ชฝ์ Encoder ๋ถ๋ถ์ ๋ณด๋ฉด ๊ฐ ์
๋ง๋ค ์ถ๋ ฅ์ ๋ด๋ ๊ฒ์ด ์๋๋ผ ์ ๋ณด๊ฐ ๊ณ์ ๋ค์ timestep์ผ๋ก ์ ๋ฌ๋๊ณ ์๋ ๊ฒ์ ์ ์ ์๋ค. ๋ฐ๋ผ์ ์ฒซ ๋ฒ์งธ timestep=์ด๋ผ๊ณ ํ๋ค๋ฉด, ์ I๋ผ๋ ๋จ์ด๋ฅผ ์ธ์ฝ๋ฉํ ์ ๋ณด๋ฅผ ๊ฐ๊ณ , ๋ I am์ ์ธ์ฝ๋ฉํ ์ ๋ณด๋ฅผ ๊ฐ์ง๋ฉฐ, ์ต์ข
์ ์ผ๋ก ๋ ์ ์ฒด ๋ฌธ์ฅ์ ์ธ์ฝ๋ฉ๋ ์ ๋ณด๋ฅผ ๊ฐ๋๋ค. ์ด๋ ์ธ์ฝ๋ฉํ ์ ๋ณด๋ฅผ input์ ๋ํ embedding vector๋ผ๊ณ ํ๋ฉฐ, ์ต์ข
์ถ๋ ฅ๋ ๋ฒกํฐ๋ ์ ์ฒด ๋ฌธ์ฅ์ ๋ํ embedding vector๊ฐ ๋๋ค.
Decoder
Decoder์์๋ Encoder์์ ์ถ๋ ฅํ embedding vector๋ฅผ ๋ฐํ์ผ๋ก ๊ฒฐ๊ณผ๋ฅผ ์ถ๋ ฅํ๋ค. ์ด๋ Auto-Regressive Generation์ ์ํํ๋ค. Auto-Regressive Generation์ด๋ timestep=์ ์ถ๋ ฅ ๋ฅผ ๊ณ์ฐํ๊ธฐ ์ํด ์ด์ ๋จ๊ณ์ ๊ณผ ํจ๊ป ์ ์ฌ์ฉํ๋ ๊ฒ์ด๋ค. ์ด ๊ณผ์ ์ ํตํด ๋ชจ๋ธ์ด ์์ ์ด ์ถ๋ ฅํ๋ ๋จ์ด๋ฅผ ๊ธฐ์ตํ๋ฉฐ ๋ค์์ ์ถ๋ ฅํ ์ ์ ํ ๋จ์ด๋ฅผ ์ ํํ ์ ์๊ธฐ ๋๋ฌธ์ ์ ์ฒด ๋ฌธ์ฅ์ ๋ํ inference ์ฑ๋ฅ์ด ์ข์์ง๋ค.
RNN์ recurrentํ ๊ตฌ์กฐ
timestep=์ ์ด์ ๋จ๊ณ์์ ๊ณ์ฐํ ๊ณผ ํ์ฌ์ input์ธ ๋ฅผ ์ฌ์ฉAuto-Regressive Generation
๊ณผ ์ด์ ๋จ๊ณ์ ์ถ๋ ฅ์ธ ์ ์ฌ์ฉ์๋ฏธ์ ์ฐจ์ด
RNN์ recurrentํ ๊ตฌ์กฐ๋ ์ ์ฒด sequence๋ฅผ ์๊ฐ์ ๋ฐ๋ผ ์ฐ์์ ์ผ๋ก ์ฒ๋ฆฌํ๋ ๊ตฌ์กฐ์ธ ๊ฒ์ด๊ณ , Auto-Regressive Generation์ ๋ค์ ์ถ๋ ฅ์ ์์ฑํ๊ธฐ ์ํ ๋จ๊ณ์ ์ธ ๊ณผ์ ์ธ ๊ฒ์ด๋ค.
์ฐธ๊ณ ๋ก ํ์ตํ ๋๋ ์ด์ ๋จ๊ณ์ ์ถ๋ ฅ ๋์ ์ด์ ๋จ๊ณ์ ์ ๋ต์ด ์ฌ์ฉ๋๋ฉฐ, ์ด๋ฅผ Teacher Forcing์ด๋ผ๊ณ ํ๋ค.
์ด์ Transformer์ ๊ฑฐ์ ๋ค ์๋ค!
์์ RNN, LSTM, GRU๋ ๊ฐ๊ฐ ๊ธฐ์กด์ ๋ชจ๋ธ์ ๋จ์ ์ ๊ฐ์ ํ ๋ชจ๋ธ์ด๊ณ , ์ด๋ฅผ ์ฌ์ฉํ์ฌ ํจ๊ณผ์ ์ผ๋ก Sequentialํ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ๊ธฐ ์ํด Seq2Seq ๋ชจ๋ธ์ด ๊ฐ๋ฐ๋์๋ค๊ณ ํ๋ค.
ํ์ง๋ง Seq2Seq ๋ํ
1. RNN์ ๊ธฐ๋ณธ์ ์ธ ๋ฌธ์ ์ธ Vanishing Gradient ๋ฌธ์
2. ํ๋์ embedding vector์ ๋ชจ๋ ์ ๋ณด๋ฅผ ์ ์ฅํ๋ ค๊ณ ํ ๋ ๊ธด sequence์ ๊ฒฝ์ฐ ์ ๋ณด์ ์์ค ๋ฐ์ ๋ฌธ์
๊ฐ ์๊ธฐ ๋๋ฌธ์ ์ด๋ฅผ ๊ฐ์ ํ๊ธฐ ์ํด โญAttention ๊ฐ๋
โญ์ด ๋์
๋์๋ค.
Seq2Seq์ Decoder์์ ์ถ๋ ฅ์ ๋ผ ๋ input์ ๋ชจ๋ ์ ๋ณด๋ฅผ ์์ถํ์ฌ ํฌํจํ๋ embedding vector๋ฟ ์๋๋ผ Encoder์ ๋ชจ๋ input์ ๊ฐ ๋จ๊ณ์์ ๊ณ์ฐ๋ hidden state๋ฅผ ์ฌ์ฉํ๋๋ก ํ๋ค. ํ์ง๋ง ์ด๋ ๋ชจ๋ step์ด ๋ฌธ์ฅ ๋ด์์ ๊ฐ์ ์ ๋์ ์ค์๋๋ฅผ ์ฐจ์งํ์ง ์์ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ Attention score๋ฅผ ๊ณ์ฐํ๊ธฐ ์ํ mechanism์ด ํ์ํ๋ค.
Attention์ Query, Key, Value๋ก ๊ตฌ์ฑ๋์ด ์๋ค.
Decoder์ ํ์ฌ ์ํ์ hidden state๊ฐ ๋น๊ต์๊ฐ ๋์ด Encoder์ ๋ชจ๋ hidden state๋ค์ ๋น๊ต ๋์์ผ๋ก ํ์ฌ ์ผ๋งํผ ์ ์ฌํ์ง๋ฅผ ๊ณ์ฐํ๋ค. ๋ฐ๋ผ์ Query, Key, Value๋ ๊ฐ์ shape์ ๊ฐ์ ธ์ผ ํ๋ค.
Attention์ ํจ์๋ก ํํํ๋ฉด ์๋์ ๊ฐ๋ค.
Queryt ์์ ์ Decoder ์ ์์์ hidden state
Key๋ชจ๋ ์์ ์ Encoder ์ ์ hidden states
Value๋ชจ๋ ์์ ์ Encoder ์ ์ hidden states
Seq2Seq ๋ชจ๋ธ์์ ์ฌ์ฉ๋๋ Dot Product Attention์ ๋จผ์ ์ดํด๋ณด์.

๊ทธ๋ฆผ์์ Decoder์ ์ํ๋ฅผ ๋ณด๋ฉด ์ด๋ฏธ Attention Mechanism์ ํตํด ์ธ ๊ฐ์ token๋ค์ ์ถ์ถํ ๊ฒ์ ์ ์ ์๋ค. 'suis'๋ฅผ ์ถ๋ ฅํ ์ธ ๋ฒ์งธ LSTM ์ ์ ๋ค์ ๋จ์ด๋ฅผ ์ถ๋ ฅํ๊ธฐ ์ํด Encoder์ ๋ชจ๋ hidden state๋ค์ ์ดํด๋ณผ ๊ฒ์ด๋ค.
1. Attention Score ๊ณ์ฐ
Encoder์ ๋ชจ๋ hidden state: (๊ทธ๋ฆผ์ ๊ธฐ์ค์ผ๋ก T=4)
Decoder์ hidden state: (๊ทธ๋ฆผ์ ๊ธฐ์ค์ผ๋ก t=3)
์ด๋ ์ ์ shape์ ๋์ผํ๋ค.
Attention Score:
๋ ๋ฒกํฐ๋ฅผ ๋ด์ ํ๊ธฐ ๋๋ฌธ์ ์ ์ฌ๋๋ฅผ ๊ณ์ฐํ๋ ๊ฒ๊ณผ ๊ฐ๋ค. ์ฆ, ํ์ฌ Decoder์ LSTM์ hidden state์ ๊ฐ์ฅ ์ ์ฌํ Encoder์ hidden state๋ฅผ ์ฐพ๋ ๊ฒ์ด๋ผ๊ณ ๋ด๋ ๋ฌด๋ฐฉํ๋ค.
2. Softmax ํจ์๋ก Attention Distribution ๊ตฌํ๊ธฐ
Softmax ํจ์๋ Multi-class Classification์์ ์์ฃผ ์ฌ์ฉ๋๋ ํ์ฑํ ํจ์์ด๋ฉฐ, ๋ชจ๋ ๊ฐ์ 0๊ณผ 1์ฌ์ด์ ๋ถํฌํ๊ฒ ํ๋ฉฐ, ๊ทธ ๊ฐ๋ค์ ์ดํฉ์ด 1์ด ๋๋ ํน์ฑ์ด ์๋ค. ๋ฐ๋ผ์ ์ด๋ฅผ ์ ์ ์ฉํ๋ฉด ๊ฐ ๊ฐ๋ค์ด ์ด๋ค ๋ถํฌ๋ก ๊ตฌ์ฑ๋์ด ์๋์ง๋ฅผ ์ ์ ์๋ค. ์ด ๊ฐ์ Attention Distribution ๋๋ Attention Coefficient๋ผ๊ณ ํ๋ฉฐ, ๊ฐ๊ฐ์ ๊ฐ์ Attention Weight๋ผ๊ณ ํ๋ค.
3. Attention Value ๊ณ์ฐ
๊ฐ Encoder์ Attention Weight ๊ณผ hidden state ๋ฅผ ๊ณฑํ๋ค. ์์ ๊ณ์ฐํ Attention Score๊ฐ Decoder์ ํ์ฌ ์ํ(t)์ hidden state์์ ์ ์ฌ๋๋ผ๊ณ ํ์ผ๋ฏ๋ก, ์ด ๊ฐ์ Encoder์ hidden state์ ๊ณฑํจ์ผ๋ก์จ ๊ฐ์ฅ ์ ์ฌํ token์ ์ํฅ๋ ฅ์ ๊ฐ์ฅ ํฌ๊ฒ ๋ง๋ค๊ฒ ๋ค๋ ์๋ฏธ๊ฐ ๋๋ค. ์ด์ ๊ณ์ฐํ ๊ฐ๋ค์ ๋ชจ๋ ๋ํ๋ค.
์ด ๊ฐ์ด Attention Value์ด๋ค!!
4. Concatenate &
์ด๋ ๊ฒ ๊ณ์ฐํ Attention Value๋ฅผ ๋ค์ Decoder์ hidden state ์ concatenateํ์ฌ ๋ฅผ ๋ง๋ ๋ค. ๋ง์ง๋ง์ผ๋ก ์ถ๋ ฅ์ธต์ ์
๋ ฅ์ด ๋๋ ๋ฅผ ๊ณ์ฐํ๊ธฐ ์ํด Linear ์ฐ์ฐ์ ์ํํ๊ณ ๋ฅผ ํต๊ณผ์ํจ๋ค.
5. Prediction
๋ฅผ ์ถ๋ ฅ์ธต์ ์
๋ ฅ์ผ๋ก ์ฌ์ฉํ์ฌ ์ต์ข
์ถ๋ ฅ์ ๊ณ์ฐํ๋ค.
์์ด๊ณ ๋ณต์กํ๋ค.. ์ ๋ฆฌํ์๋ฉด!
1. Decoder์ ํ์ฌ ๋จ๊ณ์์ ์ถ๋ ฅ์ ๋ด๊ธฐ ์ํด Encoder์ ๋ชจ๋ hidden state๋ค์ ํ์ ํ๋ค.
2. Encoder์ hidden state๋ค ๊ฐ๊ฐ์ ์ถ๋ ฅ์ ์ผ๋ง๋ ๋ฐ์ํ ์ง ๊ฒฐ์ ํ๊ธฐ ์ํด Attention Value๋ฅผ ์ถ์ถํ๋ค.
3. Attention Value๋ฅผ ์ฌ์ฉํ์ฌ Decoder์์ ์ถ๋ ฅ์ ๊ณ์ฐํ๋ค.
Attention์ ๊ณ์ฐํ๋ ์ข ๋ฅ๋ ์ด๊ฒ ๋ง๊ณ ๋ ๋ค์ํ๋ค๊ณ ํ์ง๋ง, Transformer๋ฅผ ์ดํดํ๊ธฐ ์ํ ๊ธฐ๋ณธ์ ์ธ, Seq2Seq์์ ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ฉ๋๋ mechanism์ ์ดํด๋ณธ ๊ฒ์ด๋ค.
์ด์ Transformer๋ฅผ ๋ง์ดํ ์ค๋น๊ฐ ๋ค ๋๋ฌ๋ค... ๋๋์ด...
Keyword๋ง์ผ๋ก ๋ณต์ตํด๋ณด์!
RNN > LSTM, GRU > Seq2Seq > Dot-Product Attention
๋ค ๊ธฐ์ต๋์ง์?
๊ธฐ์กด์ RNN ๊ธฐ๋ฐ์ ๋ชจ๋ธ๋ค์ Vanishing Gradient Problem์ด ์์๋ค. ์ด๋ฅผ ๊ฐ์ ํ๊ธฐ ์ํด Attention mechanism์ด ์ฌ์ฉ๋์๋๋ฐ, RNN์ ๋ณด์ ํ๋ ๊ธฐ๋ฅ์ด ์๋, Attention ์์ฒด๋ง์ผ๋ก sequentialํ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ๋ ๋ชจ๋ธ์ด ๋ฐ๋ก Transformer์ด๋ค.
Transformer๋ RNN ๊ธฐ๋ฐ์ ๋ชจ๋ธ๋ค์ ์ฌ์ฉํ์ง ์์ง๋ง, Seq2Seq์ Encoder Decoder ๊ตฌ์กฐ๋ ์ ์งํ๋ค. Attention mechanism ๋ํ Seq2Seq์ ์ด์ง ๋ค๋ฅธ๋ฐ, ์ฌ๊ธฐ์๋ Transformer๋ Self-Attention์ด๋ผ๋ mechanism์ ์ฌ์ฉํ๋ค.

๊ธฐ์กด์ Seq2Seq์์๋ Decoder์ hidden state์์ Encoder์ ๋ชจ๋ hidden state๋ค๊ณผ ๊ฒฐํฉ๋์๋ค. ๋ฐ๋ผ์ ํ์ฌ ๋จ๊ณ์์ ์ถ๋ ฅ์ ๋ด๊ธฐ ์ํด ์ ๋ ฅ sequence์ ๋ชจ๋ ๊ด๊ณ๋ฅผ ์ดํด๋ณธ ๊ฒ์ด๋ค. ๊ตฌ์กฐ ๋ํ ์ ๋ ฅ sequence์ ๋ง์ถฐ token ๋น ํ๋์ RNN ๊ธฐ๋ฐ์ cell์ด ์ฌ์ฉ๋์๋๋ฐ, Transformer์์๋ sequence data๊ฐ ํ๋์ Encoder์ ํต์งธ๋ก ์ ๋ ฅ๋๋ค.
Transformer๋ ํ์ฌ์ ํ๊ฒ token๊ณผ ์์ ์ ํฌํจํ ์ ๋ ฅ์ ๋ชจ๋ token์ ๋น๊ตํ ๊ฐ์ Attention์ผ๋ก ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ ๋ ฅ ๋ฐ์ดํฐ๊ฐ sequentialํจ์๋ ์์ ์ ๋ณด๊ฐ ๋ฌด์๋๋ค. ๋ฐ๋ผ์ ์์ ์ ๋ณด๋ฅผ ์ธ์์ ์ผ๋ก ๋ถ์ฌํ๊ธฐ ์ํด Positional Encoding์ด ์ ์ฉ๋๋ค. ์ด ๋ฐฉ์์ Encoder์ Decoder์ ๋์ผํ๊ฒ ์ ์ฉ๋๋ค.
Sinusoidal Encoding
๊ณผ ํจ์๋ฅผ ์ฌ์ฉํ Positional Encoding ๋ฐฉ์์ด๋ค.
์์์์ ๋ณผ ์ ์๋ฏ์ด sin, cos ํจ์์ ์์น๊ฐ์ด ์
๋ ฅ๋์์ ๋ ๊ทธ ์ฃผ๊ธฐ๋ฅผ ๋๋ ค sequence ์ ๋ณด์ ์ฃผ๊ธฐ์ฑ์ด ์๊ฒ ํ๋ค. ๋ฐ๋ผ์ ๊ธด sequence ๋ฐ์ดํฐ์ ๋ํด์ ์๋ก ๋ค๋ฅธ ์์น์ token์ ๋์ผํ ๊ฐ์ด ํ ๋น๋์ง ์๋๋ค.
๋ํ ์์น๊ฐ ์ง์()์ธ์ง ํ์()์ธ์ง์ ๋ฐ๋ผ ๊ณผ ํจ์๋ฅผ ๋ค๋ฅด๊ฒ ์ ์ฉํ๋๋ฐ, ๊ฐ ํจ์์ ๋์ผํ๊ฒ ์ด ์ ์ฉ๋๊ธฐ ๋๋ฌธ์ ์ ์ฌํ์ง๋ง ์๋ก ๋ค๋ฅธ ๊ฐ์ ์ฌ์ฉํ๊ธฐ ์ํด์๋ผ๋ ๊ฒ์ ์ ์ ์๋ค.
Transformer์ self-attention์ ํ์ฌ ๊ธฐ์ค์ด ๋๋ ๋จ์ด์ธ Query๋ฅผ ์๊ธฐ ์์ ์ ํฌํจํ context์ธ Key๋ค๊ณผ ๋น๊ตํ๋ค. ์ด ๊ณผ์ ์ ํตํด ์๊ธฐ ์์ ์ด context ๋ด์์ ์ด๋ค ์๋ฏธ๋ฅผ ๊ฐ๋์ง ์ ์ ์๊ธฐ ๋๋ฌธ์ self-attention์ด๋ผ๋ ์ด๋ฆ์ด ๋ถ์๋ค. ์ด๋ Value๋ context์ ๋จ์ด๋ค์ด๋ค.

1. Query, Key, Value ๋ง๋ค๊ธฐ
๊ฐ input์ ํ ํฐ๋ค์ , , ์ ๋ด์ ํ์ฌ Query, Key, Value๋ฅผ ๋ง๋ค๊ณ , ํ์ฌ์ timestep ์ ํ๊ฒ์ ํด๋นํ๋ ์ Query์ ๊ณฑํ๋ฉด ์ด์ ์ Dot-Product Attention๊ณผ ๋์ผํ๊ฒ ์ ์ฌ๋๋ฅผ ๊ตฌํ ์ ์๋ค.
์ด๋!!!
๊ฐ ๊ฐ์ค์น๋ค์ ๊ฐ์ ๊ณ์ธต(Q, K, V)์ ๋ํด์๋ ๊ทธ ๊ฐ์ ๊ณต์ ํ์ง๋ง ์๋ก ๋ค๋ฅธ ๊ณ์ธต๊ณผ๋ ๊ณต์ ๋์ง ์๋๋ค. ๋ฐ๋ผ์Query๋Query๋ผ๋ฆฌ,Key๋Key๋ผ๋ฆฌ,Value๋Value๋ผ๋ฆฌ๋ง ํ์ต๋๋ค.
2. Scaled-Dot Product Attention
์ ๋จ๊ณ์์ ๊ณ์ฐํ ์ ์ฌ๋๋ฅผ Query์ Key์ ๊ธธ์ด์ธ ๋ก ๋๋์ด scaling์ ์ํํ๋ค. Transformer๋ ํ๋์ encoder์์ ์ฌ๋ฌ ๋ฒ์ Attention์ ์ํํ๋ multi-head attention์ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๊ฐ๊ฐ์ head์์ ๊ฐ์ ์์ token์ ์ฌ์ฉํ๊ธฐ ์ํด ์๋์ ๊ฐ์ ๊ฐ์ scaling์ ์ฌ์ฉํ๋ค.
scaling์ ํ๋ ์ด์
Query์Key์ ๊ธธ์ด๊ฐ ๊ธธ์ด์ง ์๋ก ํ๋์ token์ ๋ํ ๋ด์ ๊ฐ์ด ์ปค์ง๋ฉฐ, ๋ชจ๋ token๋ค์ ๊ฒฐ๊ณผ๊ฐ ๋์ ๋ถํฌ๋ฅผ ๊ฐ์ง๊ฒ ๋๋ค. ๋ฐ๋ผ์ ๋ชจ๋ Softmax๋ฅผ ํต๊ณผํ๋ฉด ๊ฐ ๊ฐ๋ค์ด 0์ ๊ฐ๊น์ด ๊ฐ์ผ๋ก ๋ณํ๋ ์ ์๊ธฐ ๋๋ฌธ์ ์ด๋ฅผ ๋ฐฉ์งํ๊ณ ์ scaling์ ์ํํ๋ค.
3. Attention Value ๊ณ์ฐ
scaling๊น์ง ์ํํ ํ ๊ฐ token๋ค์ ๋ํ ๊ฐ์ ๊ตฌํ๋ค๋ฉด, ์ ์ฒด์ ๋ถํฌ๋ฅผ 0๊ณผ 1์ฌ์ด์ ๊ฐ์ผ๋ก ์ ์ ํ ๊ตฌ์ฑํ๊ธฐ ์ํด ํจ์๋ฅผ ๊ฑฐ์น๋ค. ๊ทธ ๋ค์ ํ๊ฒ token์ธ ์ Value์ ๊ณฑํ ๋ค concatenationํ๋ค.
์ถ๋ ฅ๋ ๊ฒฐ๊ณผ๊ฐ ๋ฐ๋ก Attention Score์ด๋ค.
4. FFNN(Feed Forward Neural Network)
3๋ฒ์์ ๊ตฌํ Attention Score๋ ๋ชจ๋ multi-head์ token๋ค์ concatํ ๊ฐ์ด๊ธฐ ๋๋ฌธ์ ()์ shape์ ๊ฐ์ง๋ค. ๋ฐ๋ผ์ ์ด๋ฅผ ์๋์ input ๋ชจ์์ผ๋ก ๋๋๋ฆฌ๊ธฐ ์ํด ํ ๋ฒ ๋ ์ ํ ๋ณํ์ ์ํํ๋ค. ์ด๋ ์ ์ฒด ์ ๋ณด๋ฅผ ์์ถํ๋ฉฐ ํน์ง ์ถ์ถ์ ํ ๋ฒ ๋ ํ๋ ํจ๊ณผ๊ฐ ์๋ค.
5. Multi-head Self Attention
์์ ์ ๊น ์ธ๊ธํ์ง๋ง Transformer๋ multi-head๋ฅผ ์ฌ์ฉํ๋ค. ํ๋์ Encoder์ ์
๋ ฅ๋๋ token๋ค์ ๋ํ์ฌ, ๋ชจ๋ธ์ ๋น๋ํ ๋ ๋ฏธ๋ฆฌ ์ ์๋ ๊ฐ์๋งํผ ๊ตฌ๋ถํ์ฌ ๋ณ๋ ฌ๋ก Attention Score ์ฐ์ฐ์ ์ํํ๊ณ ์ต์ข
์ ์ผ๋ก concatํ๋ค. ์ฆ, 2, 3๋ฒ์ ๊ณผ์ ์ Encoder ๋ด์์ ๋ณ๋ ฌ๋ก ๋งํผ ์ํํ๊ณ 4๋ฒ์ FFNN์ ๊ฑฐ์น๋ค.
๋ํ Attention Is All You Need์์๋ Encoder์ Decoder๋ฅผ ๊ฐ๊ฐ 6๊ฐ์ฉ ์์๊ธฐ ๋๋ฌธ์ 2-4๋ฒ ๊ณผ์ ์ 6๋ฒ ์ํ ํ Decoder๋ก ์ ๋ฌ๋๋ค!
Decoder๋ ๋ ๊ฐ์ Sub-layer๋ก ๊ตฌ์ฑ๋์ด ์๋ค. ํ๋๋ Masked Multi-head Self Attention์ ์ํํ๊ณ , ๋ ๋ฒ์งธ๋ Multi-head Self Attention์ ์ํํ๋ค.
1. Masked Multi-head Self Attention
Decoder์ ์
๋ ฅ์ Encoder ๋๋ ์ด์ ๋จ๊ณ์ Decoder์์ ์ถ๋ ฅ๋ sequence ๋ฐ์ดํฐ๋ฅผ Positional Encodingํ ๊ฐ์ด๋ค. ์ฆ, ๋ฐ๋ก ์ ๋จ๊ณ์ block์์ ์ถ๋ ฅ๋ ๊ฐ์ ์ฌ์ฉํ๋ค. ํ์ง๋ง ์ค์ ์ถ๋ก ์ Decoder๊ฐ ์ถ๋ ฅ์ ๋ผ ๋ ํ์ฌ ๋จ๊ณ ์ดํ์ ์ ๋ณด๋ ์ ์ ์๊ธฐ ๋๋ฌธ์ Input๋ค ์ค ํ์ฌ์ timestep ์ดํ์ ์ ๋ณด๋ค์ maskingํ๋ค. ์ดํ Decoder ๋ด์์ ์ํํ๋ self-attention ์ฐ์ฐ์ Encoder์์ ์ฌ์ฉํ ๋ฐฉ์๊ณผ ๋์ผํ๋ค.
2. Encoder-Decoder Multi-head Self Attention
Decoder์ ์ฒซ ๋ฒ์งธ Sub-layer์ ์
๋ ฅ์ ๋ฐ๋ก ์ ๋จ๊ณ์ ์ถ๋ ฅ์ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๊ฐ๊ฐ์ Query, Key, Value์ ์ถ์ฒ๊ฐ ๋์ผํ์ง๋ง, ๋ ๋ฒ์งธ Sub-layer๋ถํฐ๋ Query๋ง Decoder์์ ์ถ๋ ฅํ ๊ฐ์ ์ฌ์ฉํ๊ณ , Key, Value๋ ๋ง์ง๋ง Encoder์ ๊ฒ์ ์ฌ์ฉํ๋ค.
Encoder์ ๊ฐ์ ์ฌ์ฉํ๋ ์ด์
Decoder์ ์ฒซ ๋ฒ์งธ Sub-layer์์ ์ถ๋ ฅํQuery๋ฅผ Encoder์Key,Value์ ๋น๊ตํจ์ผ๋ก์จ Decoder๊ฐ ํ์ฌ ์ถ๋ ฅํ token์ด ์ต์ด ์ ๋ ฅ๊ณผ ์ด๋ค ๊ด๊ณ๋ฅผ ๊ฐ๋์ง๋ฅผ ํ์ ํ ์ ์๋ค.
์ฆ, Encoder-Decoder ๊ฐ์ ์ํธ์์ฉ์ ํตํด ์ ๋ ฅ ๋ฌธ์ฅ๊ณผ ์ถ๋ ฅ ๋ฌธ์ฅ ๊ฐ์ ๊ด๊ณ๋ฅผ ๋ชจ๋ธ๋งํ๋ค.
์ด์ Attention Is All You Need๋ฅผ ์ฝ์ผ๋ฉฐ ๋์น ๊ฐ๋ , ์ ์ฐ๊ฒฐ์ด ๋์ง ์์ ๊ฐ๋ ๋ค์ ๋ ์ฑ๊ธฐ๋๋ก ํ๊ฒ ๋ค!