[論文レビュー] Scaling Sentence Embeddings with Large Language Models
この論文は PromptEOL を用いたイン-context 学習により、ファインチューニングなしで LLM から高品質な文埋め込みを生成でき、規模拡大が STS 転移タスクを助長する一方で STS の利益を最終的には損なう可能性があることを示す。効率的なファインチューニングと組み合わせると最先端の結果を得られる。
Large language models (LLMs) have recently garnered significant interest. With in-context learning, LLMs achieve impressive results in various natural language tasks. However, the application of LLMs to sentence embeddings remains an area of ongoing research. In this work, we propose an in-context learning-based method aimed at improving sentence embeddings performance. Our approach involves adapting the previous prompt-based representation method for autoregressive models, constructing a demonstration set that enables LLMs to perform in-context learning, and scaling up the LLMs to different model sizes. Through extensive experiments, in-context learning enables LLMs to generate high-quality sentence embeddings without any fine-tuning. It helps LLMs achieve performance comparable to current contrastive learning methods. By scaling model size, we find scaling to more than tens of billion parameters harms the performance on semantic textual similarity (STS) tasks. However, the largest model outperforms other counterparts and achieves the new state-of-the-art result on transfer tasks. We also fine-tune LLMs with current contrastive learning approach, and the 2.7B OPT model, incorporating our prompt-based method, surpasses the performance of 4.8B ST5, achieving the new state-of-the-art results on STS tasks. Our code is available at https://github.com/kongds/scaling_sentemb.
研究の動機と目的
- 従来のエンコーダベースの手法を超える文埋め込みのための LLM の活用を動機づける。
- 自己回帰型 LLM に特化した prompt ベースの表現を調査する。
- STS と転移タスクに対するモデル規模の影響を評価する。
- 全体的なファインチューニングなしで埋め込みを改善する道として、イン-context 学習と効率的なファインチューニングを探る。
提案手法
- autoregressive LLM に対して1語制限を明示的に設け、文埋め込みを生成する PromptEOL を提案する。
- デモンストレーションセットを構築し、効果的なデモを選択して LLM が意味情報をエンコードするよう導くことで、イン-context 学習を活用する。
- 数百万から百億パラメータ規模のモデルを横断的に評価し、LLM の表現を検証する(OPT および LLaMA 系列)。
- ファインチューニング設定では、4ビット量子化を用いたメモリ効率的な対照学習を可能にする QLoRA を適用する。
- プロンプトベースの表現を平均化や従来のプロンプト法と比較し、設定を問わず PromptEOL の優位性を示す。
- イン-context 学習のデモ(word labels via ChatGPT and dictionary-based pairs)を自動生成するフレームワークを提供する。)
実験結果
リサーチクエスチョン
- RQ1ファインチューニングなしでプロンプト設計を通じて LLM は効果的な文埋め込みを生成できるか?
- RQ2イン-context 学習はモデル規模を横断して LLM ベースの文埋め込みの質を向上させるか?
- RQ3百万人レベルから百億パラメータ規模へのスケーリングはSTSと転移タスクにどう影響するか?
- RQ4効率的なファインチューニングを用いた対照学習は LLM ベースの文埋め込みをさらに強化できるか?
主な発見
| 手法 | パラメータ | STS12 | STS13 | STS14 | STS15 | STS16 | STS-B | SICK-R | Avg |
|---|---|---|---|---|---|---|---|---|---|
| SimCSE-BERT | 110M | 68.40 | 82.41 | 74.38 | 80.91 | 78.56 | 76.85 | 72.23 | 76.25 |
| SimCSE-RoBERTa | 123M | 70.16 | 81.77 | 73.24 | 81.36 | 80.65 | 80.22 | 68.56 | 76.57 |
| PromptBERT | 110M | 71.56 | 84.58 | 76.98 | 84.47 | 80.60 | 81.60 | 69.87 | 78.54 |
| PromptRoBERTa | 123M | 73.94 | 84.74 | 77.28 | 84.99 | 81.74 | 81.88 | 69.50 | 79.15 |
| BERT avg. | 110M | 30.87 | 59.89 | 47.73 | 60.29 | 63.73 | 47.29 | 58.22 | 52.57 |
| BERT prompt | 110M | 60.96 | 73.83 | 62.18 | 71.54 | 68.68 | 70.60 | 67.16 | 67.85 |
| ST5-Enc | 4.8B | 34.97 | 60.19 | 47.59 | 66.40 | 70.62 | 62.83 | 63.57 | 58.02 |
| PromptEOL OPT | 125M | 59.90 | 71.55 | 60.93 | 70.76 | 72.83 | 67.89 | 65.14 | 67.00 |
| 350M | 350M | 54.70 | 71.52 | 59.99 | 64.51 | 71.39 | 66.55 | 66.58 | 65.03 |
| 1.3B | 1.3B | 64.59 | 79.06 | 68.46 | 78.88 | 78.64 | 73.22 | 69.41 | 73.18 |
| 2.7B | 2.7B | 60.03 | 75.51 | 64.30 | 74.56 | 77.62 | 67.73 | 65.35 | 69.30 |
| 6.7B | 6.7B | 60.91 | 80.05 | 67.65 | 75.49 | 80.11 | 72.91 | 67.57 | 72.10 |
| 13B | 13B | 60.21 | 81.36 | 69.69 | 75.46 | 79.58 | 70.73 | 65.99 | 71.86 |
| 30B | 30B | 59.99 | 80.52 | 69.80 | 75.20 | 78.03 | 73.57 | 69.87 | 72.43 |
| 66B | 66B | 55.66 | 74.62 | 64.90 | 72.34 | 75.21 | 71.72 | 67.43 | 68.84 |
| PromptEOL+ICL OPT | 125M | 62.22 | 73.10 | 61.84 | 71.09 | 72.08 | 67.80 | 64.10 | 67.46 |
| 350M | 350M | 63.87 | 73.85 | 63.41 | 72.45 | 73.13 | 70.84 | 65.61 | 69.02 |
| 1.3B | 1.3B | 72.78 | 83.77 | 73.61 | 83.42 | 80.60 | 78.80 | 69.69 | 77.52 |
| 2.7B | 2.7B | 68.49 | 84.72 | 75.15 | 83.62 | 81.34 | 80.94 | 72.97 | 78.18 |
| 6.7B | 6.7B | 70.65 | 84.51 | 75.01 | 83.51 | 82.00 | 81.12 | 76.77 | 79.08 |
| 13B | 13B | 71.99 | 85.22 | 76.04 | 82.23 | 81.38 | 81.42 | 75.00 | 79.04 |
| 30B | 30B | 69.93 | 83.29 | 74.88 | 80.10 | 81.11 | 81.76 | 76.26 | 78.19 |
| 66B | 66B | 69.93 | 83.29 | 74.88 | 80.10 | 81.11 | 81.76 | 76.26 | 78.19 |
- イン-context 学習はファインチューニングなしで LLMS から高品質な文埋め込みを生み出し、対照学習法と同程度の性能を達成する。
- tens of billions scale のモデルは STS 結果を一貫せず向上させるが、転移タスクでは最大モデルが他を上回る一方、STS はさらに大規模化が必ずしも改善されない。
- PromptEOL は一般に他の表現法(平均化、基本的なプロンプト)を上回る。
- QLoRA と 4-bit 量子化を用いた効率的なファインチューニングは、中程度の計算量で STS の state-of-the-art を達成。例: 2.7B OPT が 4.8B ST5 を STS タスクで上回る。
- ファインチューニングを行うと、より大きなモデル(13B OPT、13B LLaMA)が最良の STS 結果を達成する一方で、非常に大きなモデルは転移タスクの性能を引き続き改善する。
- PromptEOL+ICL は小型モデルでも STS の利得を強く示し、より大きなモデルではデモンストレーションからの利益が拡大する。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。