
paper , code problem : ํธ๋์คํฌ๋จธ๋ ๋ฌธ์ฅ์ ๊ธธ์ด์ quadraticํ๊ฒ ๋ณต์ก๋๊ฐ ๋์ด๋๋ค. solution : sliding window(+dilated)๋ก attention์ ๊ตฌํ๊ณ ์ด๋ฅผ stack์ ์๋๋ค. ํน์ ํ์คํฌ์ ๋ง๋ ์์น์ token๋ค์ ๋ํด global attention์ ์ถ๊ฐํ๋ค. result : text8, enwik8์์ SOTA, ๊ธด ๋ฌธ์ task์ธ WikiHop์ด๋ TriviaQA์์ RoBERTa๋ณด๋ค ์ฑ๋ฅ์ด ์ข์ผ๋ฉฐ SOTA . ์ธ์ฝ๋ ๋์ฝ๋ ๋ชจ๋ธ์ arXiv ์์ฝ ๋ฐ์ดํฐ์ ์์ ํจ๊ณผ์ ์์ ํ์ธ. details :
windowed local-context self-attention์ ๋ฌธ๋งฅ์ ์ธ ํํ์ ํ์ตํ๊ธฐ ์ํด ์ฌ์ฉ๋๊ณ , global attention์ ์์ธก์ ์ํด ์ ์ฒด ์ํ์ค์ ํํ์ ๋ง๋๋๋ฐ ์ฌ์ฉ๋๋ค.
auto-regressive ํ์คํฌ๋ก ํ๊ฐํ์ ๋ฟ ์๋๋ผ, MLM ๊ฐ์ objective๋ก ํ์ตํ๊ณ SOTA์์ ํ์ธํ๋ค.
encoder-decoder ๋ชจ๋ธ์ธ LED ๋ชจ๋ธ๋ ์ ์ํ๋ค.
long-document transformers ์ ๊ทผ๋ก ์ผ๋ก 1) left-to-right ์ ๊ทผ๋ฒ์ด ์๋๋ฐ, ์ผ์ชฝ์์ ์ค๋ฅธ์ชฝ์ผ๋ก ์์ง์ด๋ฉด์ chunk๋ก ํ์ตํ๋ ๊ฒ. ์ด๊ฑด ๋ค๋ฅธ ํ์คํฌ์ ์ ์ฉํ ๋ ์ฑ๋ฅ์ด ๋ถ์์ ํจ. 2) sparse attention์ ํ๋ ์ ๊ทผ๋ฒ์ด ์๋๋ฐ, Sparse Transformer๊ฐ ๋ํ์ .

๊ธด ๋ฌธ์ฅ์ ๋ค๋ฃจ๋ ๋ํ์ ์ธ ๋ฐฉ๋ฒ์ ๋ฌธ์๋ฅผ ์ต๋ ํ ํฐ ๊ฐ์์ธ 512๋ก ์๋ฅด๊ฑฐ๋, ์๋ฅธ ๋ค ๊ฒฐํฉํ๋ ๋ฐฉ๋ฒ์ด ์๋ค. ๋๋ multihop์ด๋ open QA์์ ์ฌ์ฉ๋๋ ๋ฐฉ๋ฒ์ธ๋ฐ, ๋จผ์ ๊ด๋ จ์๋ ๋ฌธ์๋ฅผ retrieveํ๊ณ ๊ทธ ๋ค์ answer extraction์ ์ํด ์ ๋ฌํ๋ ๋ฐฉ๋ฒ์ด๋ค.
Attention Pattern
- Sliding Window : local context๊ฐ ์ค์ํ๊ธฐ ๋๋ฌธ์ ๊ณ ์ ๋ ํฌ๊ธฐ์ window attention์ ์ฌ์ฉํ๊ณ , ์ด๋ฅผ stackํ์ฌ (๋ง์น CNN์ฒ๋ผ) ๋ ํฐ receptive field์์ ๋ณผ ์ ์๊ฒ ํ๋ค. ์ ์ฒด ๋ชจ๋ธ์ receptive field๋ window size(=w) * # of layers(=l)๊ฐ ๋๊ฒ ๋๋ค.
- Dilated Sliding Window : ๊ณ์ฐ์ ์ฆ๊ฐ ์์ด ๋ receptive field๋ฅผ ๋๋ฆฌ๊ธฐ ์ํด์, (๋ง์น dilated CNN ์ฒ๋ผ) sliding window๊ฐ dilated ๋ ์ ์๋ค. dilated๋ฅผ ํตํด ๋ชจ๋ธ์ receptive field๋ w * l * d ๊ฐ ๋๊ฒ ๋๋ค. multi-head attention์์ ๊ฐ head๋ณ๋ก dilated size d๋ฅผ ๋ค๋ฅด๊ฒ ํ๋๊ฒ ์ฑ๋ฅ์ ํจ๊ณผ์ ์์ ํ์ธํ๋ค.
- Global Attention : task์ ๋ฐ๋ผ ์ด๋ค input์ด ๋ค์ด๊ฐ์ผ ์ต์ ์ธ์ง๊ฐ ๋ค๋ฅธ๋ฐ (๋ถ๋ฅ์์
[CLS]ํ ํฐ, QA์์๋ question + docuemnt concatํ ํํ ๋ฑ) ์์ ์ดํ ์ ๋ค์ด ๋ค์ํ task์ ์๋ง๋ ํํ์ด ์๋๊ธฐ ๋๋ฌธ์ ํน์ ํ์คํฌ์ ๋ง๋ ์์น์ ์๋ token๋ค์ ๋ํด global attention์ ์ถ๊ฐํ์๋ค. - Linear Projecton for Global Attention : sliding window์ linear projection๊ณผ global attention์ linear projection์ ๋ค๋ฅด๊ฒ ๊ฐ์ ธ๊ฐ๋ ๊ฒ์ด ์ฑ๋ฅ ํฅ์์ ๋์์ด ๋์๋ค. global projection์ sliding window์ projection์ผ๋ก ์ด๊ธฐํ ๋์๋ค.