Big Bird: Transformers for Longer Sequences
2022.01.신재영
Introduction
Architecture
1
2
3
4
5
CONTENTS
Theoretical Results
Experiments
Conclusion
Big Bird
Big Bird: Transformers for Longer Sequences
Introduction
Big Bird
Big Bird: Transformers for Longer Sequences
Introduction
Big Bird
Architecture
Big Bird: Transformers for Longer Sequences
Generalized attention mechanism (sparse attention mechanism)
[그림] Big Bird의 Attention 구조
Big Bird
Architecture
Big Bird: Transformers for Longer Sequences
sparse random graph for attention mechanism 에 반영한 특징
random graph의 크기를 키우고 sparse하게 만들어도 최단 경로가 기하급수적으로 급격히 증가하는 것이 아니고 매우 완만하게 변화
본 논문에서는 각 query가 r개의 random key를 attend하는 구조로 반영
Erdos-renyi model 기반으로 연구
2. Notion of locality
token의 정보는 대부분 주변 token의 정보에서 얻어지고,
멀리 떨어진 token에서 얻게 되는 정보량은 적음
본 논문에서는 각 node(token)이 window size w 으로 양 옆 단어를 attend하는 구조 적용
Clustering coefficient를 기반으로 이웃 토큰간의 인접성을 지키는 것의 중요성 연구
Big Bird
Architecture
Big Bird: Transformers for Longer Sequences
Random, window를 적용한 self-attention으로는 기존 BERT의 성능만큼 나오지 않았고, 실험과 이론 분석을 통해 global token의 중요성을 파악하고 적용
(Internal Transformer Construction)
이미 언어 corpus에 존재하는 token 중 특정 몇개를 global token으로 지정하여 모든 token들에 대해 attention 계산
2. BigBird-ETC
(Extended Transformer Construction)
sequence에 g개의 global token을 추가하여 모든 token들과 연결하여 계산
Big Bird
Architecture
Big Bird: Transformers for Longer Sequences
Big Bird에서 self-attention이 적용되는 구조
i번째 token에 대한 generalized attention mechanism
output vector
Big Bird
Theoretical Results
about Sparse
Attention Mechanism
Big Bird: Transformers for Longer Sequences
sparse attention mechanism이 full-attention mechanism의 성능이 나올 수 있음을 이론적으로 탐색하고 증명함
Sparse attention mechanism 기반의 encoder가 Universal Approximator
Turing Complete한 sparse
encoder-decoder transformer
Big Bird
Theoretical Results
about Sparse
Attention Mechanism
Big Bird: Transformers for Longer Sequences
Limitations
sparse attetion을 적용할 시 한 레이어당 dimension^3 연산량이 요구되어 모델의 크기가 증가
Worst case의 경우 입력 시퀀스 길이만큼의 layer가 필요
Transformer의 한계를 완전히 극복한 것은 아니고, 한계를 극복하기 위해 진행된 연구 중 하나
Big Bird
Experiments
Big Bird: Transformers for Longer Sequences
Pretraining and MLM
문서의 최대 길이 4096 token
16GB 메모리에서 batch size 32~64로 실험
Big Bird
Experiments
Big Bird: Transformers for Longer Sequences
Question Answering (QA)
RoBERTa, Longformer보다
좋은 성능
Big Bird
Experiments
Big Bird: Transformers for Longer Sequences
Classification
문서 분류 task를 위해 GLUE 뿐만 아니라 다양한 길이와 내용을 담고 있는 데이터셋에 대해서 실험
길이가 더 길면서 학습 데이터가 적은 경우에 큰 성능 향상 보임(Arxiv dataset에서 5%)
Big Bird
Experiments
Big Bird: Transformers for Longer Sequences
abstractive summarization 데이터셋에서 long document, short document 모두에 대해 성능측정
본 연구에서는 encoder에만 sparse
attention을 적용하고 decoder는 원래 모델처럼 full attention을 사용함
실험 결과 모든 데이터셋에서 SOTA 달성
Summarization
Big Bird: Transformers for Longer Sequences
Big Bird
Conclusion