기존의 RNN 구조는 connection이 시간차만 있을뿐 동일하게 취급

예를 들어 This is delicious restaurant 라는 문장이 있을 때 delicious에 더 강조해서 볼 필요가 있음

Attention mechanism

RNN 상황과 기계 번역에서 파생됨

spread to image captioning, object detection, recommendation, etc.

Untitled

given x = (x1, x2,,,,, xT), and we encode x into c by

c=q({h_1,,,,,h_T) and hi = f(x_i, h_i-1)

h의 부담이 큼, f()는 RNN units

h_t의 역할 두가지

  1. x_t의 embedding으로서의 h_t
  2. h_1,,,,,h_p를 포괄하는 c로서의 h_t

decoding part

g(y_t-1, s1, c)

이전에서 전달되는게 c, 이전 hidden이 s1, y_t-1은 input

그냥 이어져서 전달되면 s와 c의 구분이 의미가 있나?

그럼 구분을 하자! → attention mechanism

Untitled

c가 h_t면 좋지 않을 것!

다른 점 c → c_t