[論文レビュー] Longformer: The Long-Document Transformer
Longformerは、局所窓+グローバルトークンという疎な線形時間の注意機構を導入し、長文文書の処理を可能にする。事前学習済みで、文書レベルのNLPタスクに渡ってファインチューニングされ、要約などの長文 seq2seq タスクのためのエンコーダ-デコーダ変種(LED)を提供する。
Transformer-based models are unable to process long sequences due to their self-attention operation, which scales quadratically with the sequence length. To address this limitation, we introduce the Longformer with an attention mechanism that scales linearly with sequence length, making it easy to process documents of thousands of tokens or longer. Longformer's attention mechanism is a drop-in replacement for the standard self-attention and combines a local windowed attention with a task motivated global attention. Following prior work on long-sequence transformers, we evaluate Longformer on character-level language modeling and achieve state-of-the-art results on text8 and enwik8. In contrast to most prior work, we also pretrain Longformer and finetune it on a variety of downstream tasks. Our pretrained Longformer consistently outperforms RoBERTa on long document tasks and sets new state-of-the-art results on WikiHop and TriviaQA. We finally introduce the Longformer-Encoder-Decoder (LED), a Longformer variant for supporting long document generative sequence-to-sequence tasks, and demonstrate its effectiveness on the arXiv summarization dataset.
研究の動機と目的
- 長いシーケンスに対する標準の自己注意の二次資源ボトルネックを解消する。
- 局所窓密集型とグローバル注意を組み合わせたドロップインの注意パターンを提案し、長文コンテキストのモデリングを可能にする。
- RoBERTa互換のベースラインと比較して、文書レベルタスクでの事前学習とファインチューニングの利点を示す。
- 長文文書の要約などの長文 seq2seq タスクのための Longformer-Encoder-Decoder(LED)を導入する。
- 長文文書のベンチマーク(WikiHop、TriviaQA、arXiv要約)で最先端または高い性能を示す。
提案手法
- Longformer注意を、スライディングウィンドウ(局所)注意とタスク志向のグローバル注意の組み合わせとして定義する。
- 線形時間のメモリスケーリングを持つ3つの実行戦略(Longformer-loop、Longformer-chunks、Longformer-cuda)を実装する。
- RoBERTaの重みからの連続的な MLMでLongformerを事前学習し、長いシーケンスをサポートするよう位置埋め込みを拡張する。
- グローバル注意をタスク関連トークンへ注入する RoBERTa型フレームワークを用いて、文書レベルタスク(QA、コアファレンス、分類)でLongformerをファインチューニングする。
- 長文要約のためのエンコーダ-デコーダアーキテクチャにLongformer風の注意を適用してLEDを開発する。
- 窓サイズ、拡張、グローバル注意に関するアブレーションを実施し、設計 choicesを検証する。
実験結果
リサーチクエスチョン
- RQ1 sparseで線形時間の注意パターン(局所窓+グローバルトークン)は、長文に対する完全な自己注意の性能に匹敵するか、それを超えるか。
- RQ2Longformerを事前学習し、文書レベルタスクでファインチューニングすると、分類、QA、コアファレンスの各タスクでRoBERTaベースのベースラインより改善されるか。
- RQ3LEDは長文要約のためのエンコーダ-デコーダ変種として長いシーケンスを扱えるか。
- RQ4窓サイズ、拡張、グローバル注意は長文コンテキストのベンチマークでの性能にどう影響するか。
- RQ5Longformerは同等の事前学習・微調整スキーム下で、Transformer-XL、Reformer、Sparse Transformerなどの現代的な長文モデルと比べてどうか。
主な発見
| モデル | データセット | #Param | Dev | Test |
|---|---|---|---|---|
| T12 AlRfou2018CharacterLevelLM | text8 | 44M | - | 1.18 |
| Adaptive Span | text8 | 38M | 1.05 | 1.11 |
| BP-Transformer | text8 | 39M | - | 1.11 |
| Our Longformer | text8 | 41M | 1.04 | 1.10 |
| T12 AlRfou2018CharacterLevelLM | enwik8 | 44M | - | 1.11 |
| Transformer-XL | enwik8 | 41M | - | 1.06 |
| Reformer | enwik8 | - | - | 1.05 |
| Adaptive Span | enwik8 | 39M | 1.04 | 1.02 |
| BP-Transformer | enwik8 | 38M | - | 1.02 |
| Our Longformer | enwik8 | 41M | 1.02 | 1.00 |
- Longformerは、QA、コアファレンス、分類の長文タスクの範囲でRoBERTaベースラインを一貫して上回る。
- 長い文脈は、長文QAおよび文書レベルデータセット(WikiHop、Hyperpartisan)で、短文脈タスクよりも大きな利得を生む傾向がある。
- Longformer-largeは、長文コンテキスト設定でWikiHopとTriviaQAで最先端の結果を達成し、HotpotQAでも競争力のある性能を示す。
- RoBERTaからの MLMでの事前学習と位置埋め込みを4,096ポジションへ拡張することで、コピー初期化された位置埋め込みを用いた場合、長文文書モデリングが効果的かつ迅速に収束する。
- LEDは、長文文書要約のためのエンコーダ-デコーダアーキテクチャにLongformer風の注意を適用する有効性を示す(arXivデータセット)。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。