SlideShare a Scribd company logo
1 of 14
1
DEEP LEARNING JP
[DL Papers]
http://deeplearning.jp/
Don’t Stop Pretraining: Adapt Language Models
to Domains andTasks (ACL, 2020)
Kazuki Fujikawa
サマリ
• 書誌情報
– Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks
• ACL 2020 Best Paper (honorable mention)
• Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy,
Doug Downey, Noah A. Smith.
• 概要
– 広範で膨大なリソースで事前学習されたモデルを、対象タスクのドメインに合わせて
再事前学習することの有用性を調査
– ドメイン間の距離が大きいほどパフォーマンス改善することを確認(DAPT)
– 大規模な計算資源が利用できない環境でも、単純なデータ選択戦略によるデータ拡張で
パフォーマンス向上可能であることを確認(TAPT, knn-TAPT)
2
アウトライン
• 背景
• 関連研究
• 実験・結果
3
アウトライン
• 背景
• 関連研究
• 実験・結果
4
背景
• BERT, RoBERTaのような大規模な事前学習済みモデルは様々なNLPタスクに有効
– 英語の百科事典・ニュース記事・webコンテンツなど、幅広いテキストを事前学習している
– 上記と本タスクのドメインにギャップがある場合、再事前学習の必要性が考えられるが、
どのドメインで、どの程度有効なのか自明ではない
• 巨大な計算資源を要する事前学習は実施できる環境が限られている
– リソースが限られている場合でも、リソースが潤沢にある場合に近い事前学習効果を
得たい
5
アウトライン
• 背景
• 関連研究
• 実験・結果
6
関連研究
• ドメイン適応のための転移学習
– タスクのドメインで再事前学習する有効性は、一部の分野で確認されている
• Publicly Available Clinical BERT Embeddings [Alsentzer+], BioBERT [Lee+]
• 転移学習のためのデータ選択
– NMTの学習に利用するデータをDistilBERTの埋め込み空間から選択 [Aharoni+]
• 本研究の貢献: 多様な実験設定に対する再事前学習の有効性との関係を調査
– 事前学習ドメインとタスクドメインとの差分の大小関係
– 再事前学習に利用するデータ数の大小
– 再事前学習に利用するデータの選択方法
7
アウトライン
• 背景
• 関連研究
• 実験・結果
8
実験1: Domain-Adaptive Pretraining (DAPT)
• ターゲットドメインのデータを使ってRoBERTaを再事前学習
– 4ドメイン x 2タスクに対して同様の実験を実施
– ドメインのデータが必要なのか、単にデータが必要なのかを切り分ける実験も実施
9
https://virtual.acl2020.org/paper_main.740.html
実験1: Domain-Adaptive Pretraining (DAPT)
• 予備調査: ドメインギャップの大きさを定量化
– 各コーパスの語彙上位1万件の重複割合をドメインギャップの大きさと定義
• 4ドメイン x 2タスクに対するFinetuneの性能を、Pretrain種別に比較
– RoBERTaのドメインから離れているタスクほど性能改善があることを確認
– ドメイン間の距離 (下図2): 各データ上位の語彙上位1万件の重複割合で比較
– 無関係のドメインでの再Pretrain(¬DAPT)よりも一貫して良い結果
10
実験2: Task-Adaptive Pretraining (TAPT)
• ターゲットタスクのデータを使ってRoBERTaを再事前学習
– DAPTとの組み合わせ(DAPT+TAPT)についても実験を実施
11
https://virtual.acl2020.org/paper_main.740.html
実験2: Task-Adaptive Pretraining (TAPT)
• 4ドメイン x 2タスクに対するFinetuneの性能を、Pretrain種別に比較
– DAPTと比べて小規模データであるものの、性能改善に寄与することを確認
– DAPT→TAPT→Finetuneの順で訓練したものがベストであった
– 同ドメイン別タスクによるTransfer-TAPTはTAPTと比べて性能劣化
→ TAPTの有効性を確認
12
実験3: TAPT + Data Augmentation (kNN-TAPT)
• TAPTで使用したターゲットタスクの各サンプルに対し、DAPTで使用した
ドメインデータからk件の類似データをMLMの訓練データに追加
• TAPTとDAPTの中間的な位置づけ、小規模な計算資源で実施可能
• DAPT, TAPT, kNN-TAPT, RAND-TAPTで比較
– TAPT < kNN-TAPT < DAPTという結果、kを増加するほどDAPTに近づく
– 計算資源が限られた環境下での有用性を示唆
13
結論
• 大規模な事前学習済みモデルを、様々なドメイン・タスクに適応させるための
いくつかのバリエーションを調査
– ドメイン間の距離が大きいほどパフォーマンス改善することを確認(DAPT)
– 大規模な計算資源が利用できない環境でも、単純なデータ選択戦略によるデータ拡張で
パフォーマンス向上可能であることを確認(TAPT, knn-TAPT)
• 以下に示す点が将来の方向性として検討できる
– TAPTのための良いデータ選択
– 事前学習済みモデルの遠いドメインへの効率的な適応法
14

More Related Content

More from Deep Learning JP

【DL輪読会】Can Neural Network Memorization Be Localized?
【DL輪読会】Can Neural Network Memorization Be Localized?【DL輪読会】Can Neural Network Memorization Be Localized?
【DL輪読会】Can Neural Network Memorization Be Localized?Deep Learning JP
 
【DL輪読会】Hopfield network 関連研究について
【DL輪読会】Hopfield network 関連研究について【DL輪読会】Hopfield network 関連研究について
【DL輪読会】Hopfield network 関連研究についてDeep Learning JP
 
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )Deep Learning JP
 
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...Deep Learning JP
 
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"Deep Learning JP
 
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "
【DL輪読会】"Language Instructed Reinforcement Learning  for Human-AI Coordination "【DL輪読会】"Language Instructed Reinforcement Learning  for Human-AI Coordination "
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "Deep Learning JP
 
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat ModelsDeep Learning JP
 
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"Deep Learning JP
 
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...Deep Learning JP
 
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...Deep Learning JP
 
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...Deep Learning JP
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...Deep Learning JP
 
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...Deep Learning JP
 
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...Deep Learning JP
 
【DL輪読会】マルチモーダル 基盤モデル
【DL輪読会】マルチモーダル 基盤モデル【DL輪読会】マルチモーダル 基盤モデル
【DL輪読会】マルチモーダル 基盤モデルDeep Learning JP
 
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...Deep Learning JP
 
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...Deep Learning JP
 
【DL輪読会】大量API・ツールの扱いに特化したLLM
【DL輪読会】大量API・ツールの扱いに特化したLLM【DL輪読会】大量API・ツールの扱いに特化したLLM
【DL輪読会】大量API・ツールの扱いに特化したLLMDeep Learning JP
 
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
【DL輪読会】DINOv2: Learning Robust Visual Features without SupervisionDeep Learning JP
 
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...Deep Learning JP
 

More from Deep Learning JP (20)

【DL輪読会】Can Neural Network Memorization Be Localized?
【DL輪読会】Can Neural Network Memorization Be Localized?【DL輪読会】Can Neural Network Memorization Be Localized?
【DL輪読会】Can Neural Network Memorization Be Localized?
 
【DL輪読会】Hopfield network 関連研究について
【DL輪読会】Hopfield network 関連研究について【DL輪読会】Hopfield network 関連研究について
【DL輪読会】Hopfield network 関連研究について
 
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
【DL輪読会】SimPer: Simple self-supervised learning of periodic targets( ICLR 2023 )
 
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
【DL輪読会】RLCD: Reinforcement Learning from Contrast Distillation for Language M...
 
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
【DL輪読会】"Secrets of RLHF in Large Language Models Part I: PPO"
 
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "
【DL輪読会】"Language Instructed Reinforcement Learning  for Human-AI Coordination "【DL輪読会】"Language Instructed Reinforcement Learning  for Human-AI Coordination "
【DL輪読会】"Language Instructed Reinforcement Learning for Human-AI Coordination "
 
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
【DL輪読会】Llama 2: Open Foundation and Fine-Tuned Chat Models
 
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
【DL輪読会】"Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware"
 
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
【DL輪読会】Parameter is Not All You Need:Starting from Non-Parametric Networks fo...
 
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
【DL輪読会】Drag Your GAN: Interactive Point-based Manipulation on the Generative ...
 
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
【DL輪読会】Self-Supervised Learning from Images with a Joint-Embedding Predictive...
 
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
【DL輪読会】Towards Understanding Ensemble, Knowledge Distillation and Self-Distil...
 
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
【DL輪読会】VIP: Towards Universal Visual Reward and Representation via Value-Impl...
 
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...
【DL輪読会】Deep Transformers without Shortcuts: Modifying Self-attention for Fait...
 
【DL輪読会】マルチモーダル 基盤モデル
【DL輪読会】マルチモーダル 基盤モデル【DL輪読会】マルチモーダル 基盤モデル
【DL輪読会】マルチモーダル 基盤モデル
 
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...
【DL輪読会】TrOCR: Transformer-based Optical Character Recognition with Pre-traine...
 
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...
【DL輪読会】HyperDiffusion: Generating Implicit Neural Fields withWeight-Space Dif...
 
【DL輪読会】大量API・ツールの扱いに特化したLLM
【DL輪読会】大量API・ツールの扱いに特化したLLM【DL輪読会】大量API・ツールの扱いに特化したLLM
【DL輪読会】大量API・ツールの扱いに特化したLLM
 
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
【DL輪読会】DINOv2: Learning Robust Visual Features without Supervision
 
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...
【DL輪読会】Poisoning Language Models During Instruction Tuning Instruction Tuning...
 

[DL輪読会]Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks (ACL, 2020)

  • 1. 1 DEEP LEARNING JP [DL Papers] http://deeplearning.jp/ Don’t Stop Pretraining: Adapt Language Models to Domains andTasks (ACL, 2020) Kazuki Fujikawa
  • 2. サマリ • 書誌情報 – Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks • ACL 2020 Best Paper (honorable mention) • Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, Noah A. Smith. • 概要 – 広範で膨大なリソースで事前学習されたモデルを、対象タスクのドメインに合わせて 再事前学習することの有用性を調査 – ドメイン間の距離が大きいほどパフォーマンス改善することを確認(DAPT) – 大規模な計算資源が利用できない環境でも、単純なデータ選択戦略によるデータ拡張で パフォーマンス向上可能であることを確認(TAPT, knn-TAPT) 2
  • 5. 背景 • BERT, RoBERTaのような大規模な事前学習済みモデルは様々なNLPタスクに有効 – 英語の百科事典・ニュース記事・webコンテンツなど、幅広いテキストを事前学習している – 上記と本タスクのドメインにギャップがある場合、再事前学習の必要性が考えられるが、 どのドメインで、どの程度有効なのか自明ではない • 巨大な計算資源を要する事前学習は実施できる環境が限られている – リソースが限られている場合でも、リソースが潤沢にある場合に近い事前学習効果を 得たい 5
  • 7. 関連研究 • ドメイン適応のための転移学習 – タスクのドメインで再事前学習する有効性は、一部の分野で確認されている • Publicly Available Clinical BERT Embeddings [Alsentzer+], BioBERT [Lee+] • 転移学習のためのデータ選択 – NMTの学習に利用するデータをDistilBERTの埋め込み空間から選択 [Aharoni+] • 本研究の貢献: 多様な実験設定に対する再事前学習の有効性との関係を調査 – 事前学習ドメインとタスクドメインとの差分の大小関係 – 再事前学習に利用するデータ数の大小 – 再事前学習に利用するデータの選択方法 7
  • 9. 実験1: Domain-Adaptive Pretraining (DAPT) • ターゲットドメインのデータを使ってRoBERTaを再事前学習 – 4ドメイン x 2タスクに対して同様の実験を実施 – ドメインのデータが必要なのか、単にデータが必要なのかを切り分ける実験も実施 9 https://virtual.acl2020.org/paper_main.740.html
  • 10. 実験1: Domain-Adaptive Pretraining (DAPT) • 予備調査: ドメインギャップの大きさを定量化 – 各コーパスの語彙上位1万件の重複割合をドメインギャップの大きさと定義 • 4ドメイン x 2タスクに対するFinetuneの性能を、Pretrain種別に比較 – RoBERTaのドメインから離れているタスクほど性能改善があることを確認 – ドメイン間の距離 (下図2): 各データ上位の語彙上位1万件の重複割合で比較 – 無関係のドメインでの再Pretrain(¬DAPT)よりも一貫して良い結果 10
  • 11. 実験2: Task-Adaptive Pretraining (TAPT) • ターゲットタスクのデータを使ってRoBERTaを再事前学習 – DAPTとの組み合わせ(DAPT+TAPT)についても実験を実施 11 https://virtual.acl2020.org/paper_main.740.html
  • 12. 実験2: Task-Adaptive Pretraining (TAPT) • 4ドメイン x 2タスクに対するFinetuneの性能を、Pretrain種別に比較 – DAPTと比べて小規模データであるものの、性能改善に寄与することを確認 – DAPT→TAPT→Finetuneの順で訓練したものがベストであった – 同ドメイン別タスクによるTransfer-TAPTはTAPTと比べて性能劣化 → TAPTの有効性を確認 12
  • 13. 実験3: TAPT + Data Augmentation (kNN-TAPT) • TAPTで使用したターゲットタスクの各サンプルに対し、DAPTで使用した ドメインデータからk件の類似データをMLMの訓練データに追加 • TAPTとDAPTの中間的な位置づけ、小規模な計算資源で実施可能 • DAPT, TAPT, kNN-TAPT, RAND-TAPTで比較 – TAPT < kNN-TAPT < DAPTという結果、kを増加するほどDAPTに近づく – 計算資源が限られた環境下での有用性を示唆 13
  • 14. 結論 • 大規模な事前学習済みモデルを、様々なドメイン・タスクに適応させるための いくつかのバリエーションを調査 – ドメイン間の距離が大きいほどパフォーマンス改善することを確認(DAPT) – 大規模な計算資源が利用できない環境でも、単純なデータ選択戦略によるデータ拡張で パフォーマンス向上可能であることを確認(TAPT, knn-TAPT) • 以下に示す点が将来の方向性として検討できる – TAPTのための良いデータ選択 – 事前学習済みモデルの遠いドメインへの効率的な適応法 14