Skip to main content
QUICK REVIEW

[논문 리뷰] Explicit Sparse Transformer: Concentrated Attention Through Explicit Selection

Guangxiang Zhao, Junyang Lin|arXiv (Cornell University)|2019. 12. 25.
Multimodal Machine Learning Applications참고 문헌 52인용 수 77
한 줄 요약

본 논문은 Explicit Sparse Transformer를 도입하여 top-k 중 기여도가 가장 큰 위치를 선택함으로써 주의를 집중시키고, NLP 및 비전 태스크 전반에서 성능과 효율성을 향상시킨다.

ABSTRACT

Self-attention based Transformer has demonstrated the state-of-the-art performances in a number of natural language processing tasks. Self-attention is able to model long-term dependencies, but it may suffer from the extraction of irrelevant information in the context. To tackle the problem, we propose a novel model called extbf{Explicit Sparse Transformer}. Explicit Sparse Transformer is able to improve the concentration of attention on the global context through an explicit selection of the most relevant segments. Extensive experimental results on a series of natural language processing and computer vision tasks, including neural machine translation, image captioning, and language modeling, all demonstrate the advantages of Explicit Sparse Transformer in model performance. We also show that our proposed sparse attention method achieves comparable or better results than the previous sparse attention method, but significantly reduces training and testing time. For example, the inference speed is twice that of sparsemax in Transformer model. Code will be available at \url{https://github.com/lancopku/Explicit-Sparse-Transformer}

연구 동기 및 목표

  • Transformer 모델에서 불필요한 맥락으로부터의 주의 산만을 줄이기 위해 더 집중된 주의가 필요한 이유를 제시한다.
  • 전역 맥락 모델링을 강화하기 위해 top-k 선택적 주의를 갖춘 Explicit Sparse Transformer를 제안한다.
  • 신경망 기계 번역, 이미지 캡션 생성, 언어 모델링에서 vanilla Transformer에 비해 향상을 입증한다.
  • 희소 주의가 이전의 희소 주의 방법들보다 빠르면서 정확도를 유지하거나 향상시킬 수 있음을 보인다.

제안 방법

  • 표준 QK^T 주의 점수를 계산하고 각 쿼리 행마다 top-k 마스크를 적용하여 가장 큰 k 개의 점수만 남긴다.
  • softmax 이전에 top-k가 아닌 점수를 -infinity로 마스킹하여 집중된 주의 분포를 얻는다.
  • 마스킹된 점수에 대해 softmax로 정규화하여 주의 가중치를 생성한다.
  • 희소 주의 가중치 A와 값 V를 사용하여 C = AV로 컨텍스트를 계산한다.
  • 디코딩 상태에서 파생된 Q를 가진 컨텍스트 주의에 희소 메커니즘을 확장한다.
  • self-attention 및 context attention과 호환되는 간단하고 구현 친화적인 접근법을 제공한다.

실험 결과

연구 질문

  • RQ1명시적 top-k 선택 주의가 vanilla Transformer와 비교하여 모델의 집중도와 성능을 향상시키는가?
  • RQ2작업과 데이터셋 전반에서 하이퍼파라미터 k를 어떻게 선택해야 하는가?
  • RQ3다른 희소 주의 방법들과 비교했을 때 top-k 희소 주의의 학습 및 추론 효율성 이점은 무엇인가?
  • RQ4희소 주의가 모델 정렬(state alignment)에 도움이 되고 불필요한 맥락으로부터의 산만을 줄일 수 있는가?
  • RQ5명시적 희소 주의를 사용할 때 주의 분포에서 어떤 질적 차이가 나타나는가?

주요 결과

모델En-De BLEUEn-Vi BLEUDe-En BLEU
Transformer28.430.2-
Explicit Sparse Transformer29.431.135.6
  • Explicit Sparse Transformer는 En-De에서 BLEU를 더 높게 얻는다(29.4 대 Transformer의 28.4).
  • En-Vi에서 31.1 BLEU를 달성하며 Transformer의 30.2에 비해 높다.
  • De-En에서 35.6 BLEU를 달성한다(상위 라인이 보고됨).
  • 이미지 캡션 생성(COCO)에서 Transformer 베 baseline 대비 CIDEr 및 BLEU-4가 약간 향상된다.
  • 언어 모델링(enwiki8)에서 비슷한 파라미터 수로 Transformer-XL을 능가한다.
  • Top-k 희소 주의가 학습/추론 시간을 줄여 일부 설정에서 약 2배 빠른 학습/추론을 달성한다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.