Skip to main content
QUICK REVIEW

[論文レビュー] Get more for less: Principled Data Selection for Warming Up Fine-Tuning in LLMs

Feiyang Kang, Hoang Anh Just|arXiv (Cornell University)|May 5, 2024
Natural Language Processing TechniquesComputer Science被引用数 3
ひとこと要約

本稿では、最適輸送を用いて分布の乖離を測定することで、事前学習分布をターゲット分布に近づけるサンプルを選択する、原理的で効果的なデータ選択手法GOT-Dを提案する。この手法は、2.7Bまでのモデルを用いた自然言語理解(NLU)、自然言語生成(NLG)、ゼロショットタスクにおいて優れた性能を発揮し、ベースラインを上回るが、1つのGPU時間で数百万件のサンプルにスケーリング可能である。

ABSTRACT

This work focuses on leveraging and selecting from vast, unlabeled, open data to pre-fine-tune a pre-trained language model. The goal is to minimize the need for costly domain-specific data for subsequent fine-tuning while achieving desired performance levels. While many data selection algorithms have been designed for small-scale applications, rendering them unsuitable for our context, some emerging methods do cater to language data scales. However, they often prioritize data that aligns with the target distribution. While this strategy may be effective when training a model from scratch, it can yield limited results when the model has already been pre-trained on a different distribution. Differing from prior work, our key idea is to select data that nudges the pre-training distribution closer to the target distribution. We show the optimality of this approach for fine-tuning tasks under certain conditions. We demonstrate the efficacy of our methodology across a diverse array of tasks (NLU, NLG, zero-shot) with models up to 2.7B, showing that it consistently surpasses other selection methods. Moreover, our proposed method is significantly faster than existing techniques, scaling to millions of samples within a single GPU hour. Our code is open-sourced (Code repository: https://anonymous.4open.science/r/DV4LLM-D761/ ). While fine-tuning offers significant potential for enhancing performance across diverse tasks, its associated costs often limit its widespread adoption; with this work, we hope to lay the groundwork for cost-effective fine-tuning, making its benefits more accessible.

研究の動機と目的

  • 限られたタスク固有のデータセットに対して、大規模言語モデルの微調整にかかる高コストと低いデータ効率を解決すること。
  • オープンでラベルなしのデータの選択されたサブセットを用いた事前微調整により、ターゲット微調整の性能を向上させること。
  • 低コスト環境下でもスケーラブルで汎用的かつ効果的なデータ選択戦略を設計すること。
  • 既存手法がターゲット分布に近いデータを優先する傾向にあり、事前学習で既に多く含まれているサンプルを選択してしまうという限界を克服すること。
  • 2段階微調整におけるデータ選択に対して理論的根拠があり、計算効率の良い手法を確立すること。

提案手法

  • 最適輸送距離が最小化されるようにデータを選択するGOT-D(最適輸送の勾配を用いたデータ選択)を提案。これは、事前学習分布とターゲット分布の間の分布の乖離を最小化する。
  • 事前学習分布を表すために、代理の事前学習データ(例えば、一般的なオープンソースデータセット)を用い、分布シフトを計算する。
  • 効率的なOT距離計算のため、文の埋め込み(例:sentence-transformer、distilled-BERT)を活用してデータポイントを埋め込む。
  • 予算制約下での多様性とカバレッジを保証するため、データ選択を部分モジュラー最適化問題として定式化する。
  • 最適輸送目的関数の勾配に基づく近似を適用することで、数百万件のサンプルに対してスケーラブルでGPU加速された選択を可能にする。
  • 選択されたデータを2段階微調整パイプラインに統合する:まず選択されたオープンデータで事前微調整を行い、その後限られたラベル付きデータでターゲット微調整を実施する。
Figure 2: Data Selection Setting. Given a pretrained model trained on pretraining data (red), we select additional data (blue) to fine-tune the model for a target task. We divide fine-tuning into two parts: I. Pre-Fine-Tuning and II. Targeted Fine-Tuning. Since labeled target data (green) can be exp
Figure 2: Data Selection Setting. Given a pretrained model trained on pretraining data (red), we select additional data (blue) to fine-tune the model for a target task. We divide fine-tuning into two parts: I. Pre-Fine-Tuning and II. Targeted Fine-Tuning. Since labeled target data (green) can be exp

実験結果

リサーチクエスチョン

  • RQ1事前学習データとターゲットデータの間の分布ギャップを最小化するデータ選択が、その後の微調整性能を向上させることができるか?
  • RQ2GOT-Dは、分布マッチングベースライン(例:DSIR、TAPT/c)と比較して、データ効率と性能向上の両面で優れているか?
  • RQ3GOT-Dは大規模なオープンデータセットにどの程度スケーリング可能であり、計算コストを低く保てるか?
  • RQ4埋め込み空間の選択がデータ選択パイプラインの性能に顕著に影響を与えるか?
  • RQ5GOT-Dは、NLU、NLG、ゼロショット設定を含む多様な自然言語処理タスクに一般化可能か?

主な発見

  • GPT-2 XLを用いたAGNewsデータセットでは、GOT-Dが20,000件の事前微調整サンプルで61.4%の精度を達成し、ベースライン(53.1%)を11.9%上回り、DSIR(53.1%)やTAPT/c(57.0%)をも凌駆した。
  • gpt-neo(2.7B)を用いたBoolQデータセットでは、GOT-Dが40,000件のサンプルで57.7%の精度を達成し、ベースライン(51.1%)を6.6%上回り、DSIR(53.3%)やTAPT/c(51.2%)を上回った。
  • GOT-Dは、ゼロショット評価を含む多様なタスクで最先端の性能を達成し、タスクの種別やモデルサイズに関わらず一貫した向上を示した。
  • 本手法は1つのGPU時間で数百万件のサンプルにスケーリング可能であり、計算効率の観点で、既存の勾配ベースや再訓練ベースの手法を顕著に上回った。
  • アブレーションスタディの結果、sentence-transformerの埋め込みとdistilled-BERTの埋め込みは同等の性能を示し、埋め込み空間の選択が重要ではないことが示された(ただし、意味的構造を捉える能力は必須)。
  • LDAワードクラウドによる可視化により、GOT-Dが候補セットにあまり存在しなかったがターゲットタスクに重要である形式のビジネスニュースコンテンツ(例:'bank', 'market')を適切に選択していることが確認された。
Figure 3: Consider an LLM pre-trained on a large corpus of $99$ % cat examples and $1$ % dog examples. The target task consists of 50% cat examples and 50% dog examples. The model’s relative lack of knowledge of dogs will be its performance bottleneck on the target task. Before deploying the LLM on
Figure 3: Consider an LLM pre-trained on a large corpus of $99$ % cat examples and $1$ % dog examples. The target task consists of 50% cat examples and 50% dog examples. The model’s relative lack of knowledge of dogs will be its performance bottleneck on the target task. Before deploying the LLM on

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。