プロンプトエンジニアリングとコントラスティブファインチューニングによるテキスト埋め込みのための、リソース効率の良い大規模言語モデルの適応

プロンプトエンジニアリングとコントラスティブファインチューニングによるテキスト埋め込みのための、リソース効率の良い大規模言語モデルの適応

なぜ重要か: 企業や社会への影響が見込まれ、一般メディアにも波及する可能性があります。

ソースを読む(export.arxiv.org)

arXiv:2507.22729v2 発表種別: 置換

要旨: 大規模言語モデル (LLM) は自然言語処理 (NLP) の礎石となり、テキスト生成において目覚ましい性能を達成している。そのトークンレベル表現は、人間と整合する豊かな意味情報を捉えている。しかし、これらのベクトルをテキスト埋め込みにプールすると、重要な情報が失われる。それにもかかわらず、クラスタリング、分類、検索などの多くの非生成的な下流タスクは、正確で制御可能な文レベルまたは文書レベルの埋め込みに依存している。本研究では、事前学習済みのデコーダーのみのLLMに対するいくつかの適応戦略を探求する。(i) トークン埋め込みに対する様々な集約手法、(ii) タスク固有のプロンプトエンジニアリング、(iii) コントラスティブファインチューニングによるテキストレベルの拡張。これらの要素を組み合わせることで、Massive Text Embedding Benchmark (MTEB) の英語クラスタリングトラックにおいて競争力のある性能を実現した。アテンションマップの分析から、ファインチューニングにより、プロンプトトークンから意味的に関連する単語への焦点が移行し、最終隠れ状態への意味の圧縮がより効果的になることが示された。実験により、LLMは、合成的に生成された正例ペアに対するプロンプトエンジニアリングとリソース効率の良いコントラスティブファインチューニングを組み合わせることで、テキスト埋め込みモデルとして効果的に適応できることが示された。

原文(英語)を表示

Title (EN): Resource-Efficient Adaptation of Large Language Models for Text Embeddings via Prompt Engineering and Contrastive Fine-tuning

arXiv:2507.22729v2 Announce Type: replace
Abstract: Large Language Models (LLMs) have become a cornerstone in Natural Language Processing (NLP), achieving impressive performance in text generation. Their token-level representations capture rich, human-aligned semantics. However, pooling these vectors into a text embedding discards crucial information. Nevertheless, many non-generative downstream tasks, such as clustering, classification, or retrieval, still depend on accurate and controllable sentence- or document-level embeddings. We explore several adaptation strategies for pre-trained, decoder-only LLMs: (i) various aggregation techniques for token embeddings, (ii) task-specific prompt engineering, and (iii) text-level augmentation via contrastive fine-tuning. Combining these components yields competitive performance on the English clustering track of the Massive Text Embedding Benchmark (MTEB). An analysis of the attention map further shows that fine-tuning shifts focus from prompt tokens to semantically relevant words, indicating more effective compression of meaning into the final hidden state. Our experiments demonstrate that LLMs can be effectively adapted as text embedding models through a combination of prompt engineering and resource-efficient contrastive fine-tuning on synthetically generated positive pairs.

Published: 2025-09-24 19:00 UTC


コメントする