Skip to main content
QUICK REVIEW

[論文レビュー] LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders

Parishad BehnamGhader, Vaibhav Adlakha|arXiv (Cornell University)|Apr 9, 2024
Adversarial Robustness in Machine LearningComputer Science被引用数 20
ひとこと要約

LLM2Vec は、デコーダー専用 LLM を 3 段階で強力なテキストエンコーダへ変換する—双方向アテンション、マスク済み次トークン予測、非監視コントラスト学習—で、MTEB における最先端の非監視結果と、公開データを用いた監視設定での高性能を達成します。

ABSTRACT

Large decoder-only language models (LLMs) are the state-of-the-art models on most of today's NLP tasks and benchmarks. Yet, the community is only slowly adopting these models for text embedding tasks, which require rich contextualized representations. In this work, we introduce LLM2Vec, a simple unsupervised approach that can transform any decoder-only LLM into a strong text encoder. LLM2Vec consists of three simple steps: 1) enabling bidirectional attention, 2) masked next token prediction, and 3) unsupervised contrastive learning. We demonstrate the effectiveness of LLM2Vec by applying it to 4 popular LLMs ranging from 1.3B to 8B parameters and evaluate the transformed models on English word- and sequence-level tasks. We outperform encoder-only models by a large margin on word-level tasks and reach a new unsupervised state-of-the-art performance on the Massive Text Embeddings Benchmark (MTEB). Moreover, when combining LLM2Vec with supervised contrastive learning, we achieve state-of-the-art performance on MTEB among models that train only on publicly available data (as of May 24, 2024). Our strong empirical results and extensive analysis demonstrate that LLMs can be effectively transformed into universal text encoders in a parameter-efficient manner without the need for expensive adaptation or synthetic GPT-4 generated data.

研究の動機と目的

  • 因果的アテンションの制約にもかかわらず、テキスト埋め込みのためにデコーダー専用 LLM の利用を動機づける。
  • デコーダー専用 LLM をユニバーサルなテキストエンコーダに変換する、データ効率・パラメータ効率の高いはシンプルな変換を提案する。
  • 双方向アテンションとターゲットを絞った訓練が強いトークンレベル表現を生み出すことを示す。
  • MTEB における最先端の非監督性能と、公開データを用いた競争力のある監督付き結果を示す。

提案手法

  • デコーダー専用 LLM で因果的アテンションを双方向アテンションに置換する( Bi )。
  • 双方向文脈に適応させるためマスク済み次トークン予測でファインチューニングする( MNTP )。
  • ドロップアウトベースの positives を用いた非監視コントラスト学習(SimCSE)を適用してシーケンス表現を学習する。
  • トークン表現をプールして、標準的評価タスクと互換性のあるシーケンス埋め込みを得る。
  • 英語版 Wikipedia のデータと標準ベンチマークで訓練する(MNTP は Wikitext-103、SimCSE は Wikipedia の一部)。
  • パラメータを低く抑えつつ効率的な訓練を可能にする LoRA でファインチューニングする(各ステージ 1000 ステップ)。
LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders

実験結果

リサーチクエスチョン

  • RQ1デコーダー専用 LLM は最小限の適応でユニバーサルなテキストエンコーダとして効果的に再利用できるか?
  • RQ2双方向アテンション、MNTP、SimCSE が単語レベル・シーケンスレベルの埋め込みに個別に・総合的にどのような影響を与えるか?
  • RQ3MTEB などの標準埋め込みベンチマークで、エンコーダー専用モデルおよび既存の非監視法と比較して、LLM2Vec 変換モデルの性能はどうか?
  • RQ4公開データ制約下で、LLM2Vec と監督付き対照学習を組み合わせると最先端の結果を得られるか?
  • RQ5LLM2Vec は低リソースや計算制約下でパラメータ・データ効率が高いか?

主な発見

  • LLM2Vec の変換によりデコーダー専用 LLM が語彙レベルのタスクでエンコーダー専用のベースラインを上回る。
  • 雙方向アテンション単独は多くの場合性能を落とす;MNTP が改善し、MNTP と SimCSE の組み合わせは強力なシーケンス表現を生む。
  • MTEB では、MNTP と SimCSE を組み合わせた LLM2Vec が新しい非監視の SOTA スコアを達成(最良モデル:Mistral-7B with LLM2Vec が 56.80)。
  • 公開データでの監督付き対照学習を用いると、公開学習モデルの中で MTEB のカテゴリ全体で最先端の結果を達成。
  • このアプローチは計算資源とデータの効率性が高く、各ステージ 1000 ステップ、ハードウェアは控えめ(1 台の 80GB A100)で済む。
  • Mistral-7B は双方向アテンションでの興味深いアウト・オブ・ザ・ボックス挙動を示し、事前学習の特性についてさらなる研究が妥当であることを示唆している。
LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders

この論文を読む

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

Nubintでこの論文を読む

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