replace ETC’s attention with rich attention
why not just use ETC?
Rich attention
Attention Score ( $S_{ij}$)
$S_{ij} = q^T_i + S^{o}{ij} (cross entropy) + S^d{dij} (L_2 losses)$
$q_i = affine^{(q)} (h_i), k_j = affine^{k} (h_j)$
each pair of token representation
단어i 와 단어j 의 attention score 계산: i < j → $S^{o}{ij} = o{ij}ln(p_{ij})$ → higher attention score → 자기 자신의 왼쪽에 있는 단어에 더 높은 attention score를 줌. (영어에서 형용사는 명사의 왼쪽에 있음, 따라서 <형용용사, 명사> 순으로 문장이 있을 때, 명사가 바로 전 형용사에 더 attend하게 됨.)
단어i 와 단어j 사이의 거리가 짧으면 $d_{ij}$ 의 값이 작아지고, $S^d_{ij}$ 의 값이 커지게 됨(절대값이 작아짐) → higher attention score → 자기 자신과 가까운 단어에 높은 attention score를 줌.
what does those bias terms do?