AI summary · arXiv: 2404.05961v1 · cs.CL
LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders
The essentials
- Text embedding models are crucial in NLP for encoding semantic content into vector representations
- Bidirectional encoders like BERT and T5 have traditionally been used for text embedding tasks
- Decoder-only large language models (LLMs) are emerging as powerful alternatives for text embedding tasks
- LLM2Vec enables bidirectional attention, masked next token prediction, and unsupervised contrastive learning to transform decoder-only LLMs into robust text encoders
- Significant advancements have been made in English word- and sequence-level tasks using LLM2Vec with parameters ranging from 1.3B to 7B
- LLM2Vec outperforms traditional encoder-only models on word-level tasks and achieves new unsupervised state-of-the-art performance on the Massive Text Embeddings Benchmark (MTEB)
- Combining LLM2Vec with supervised contrastive learning techniques leads to state-of-the-art results on MTEB among models trained solely on publicly available data
- The study by Parishad BehnamGhader et al. showcases the efficacy of transforming large language models into powerful text encoders without costly adaptations or synthetic data generation
Key points written by AI: they may contain errors, check them against the paper.
Ask questions about this paper to our AI assistant
How to chat with this paper? Illustrated guide
You can also chat with multiple papers at once here.
Keep this conversation — a free account saves your questions and answers, your collections of papers and your alerts.
Continue with Google Create a free accountTools for this paper
Advanced tools Premium
For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium
Among the 31 papers around this one, the name that comes back most: Ailiang Lin (3 papers)
9 more people sign several of them. The full map adds their institutions and approaches, from the papers of the last years.
Papers around this one
See them on a mapRanked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
LLM2Vec-Gen: Generative Embeddings from Large Language ModelsParishad BehnamGhader, Vaibhav Adlakha, Fabian David Schmidt et al. · 2026 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet
Abstract
Fine-tuning LLM-based text embedders via contrastive learning maps inputs and outputs into a new representational space, discarding the LLM's output semantics. We propose LLM2Vec-Gen, a self-supervised alternative that instead produces embeddings directly in the LLM's output space by learning to represent the model's potential response. Specifically, trainable special tokens are appended to the input and optimized to compress the LLM's own response into a fixed-length embedding, guided by an unsupervised embedding teacher and a reconstruction objective. Crucially, the LLM backbone remains frozen and training requires only unlabeled queries. LLM2Vec-Gen achieves state-of-the-art self-supervis…
-
LLMs are Also Effective Embedding Models: An In-depth OverviewChongyang Tao, Tao Shen, Shen Gao et al. · 2024 · Computation and Language · cited 60 times · AI summary available
Abstract
Large language models (LLMs) have revolutionized natural language processing by achieving state-of-the-art performance across various tasks. Recently, their effectiveness as embedding models has gained attention, marking a paradigm shift from traditional encoder-only models like ELMo and BERT to decoder-only, large-scale LLMs such as GPT, LLaMA, and Mistral. This survey provides an in-depth overview of this transition, beginning with foundational techniques before the LLM era, followed by LLM-based embedding models through two main strategies to derive embeddings from LLMs. 1) Direct prompting: We mainly discuss the prompt designs and the underlying rationale for deriving competitive embeddi…
-
Enhancing Lexicon-Based Text Embeddings with Large Language ModelsYibin Lei, Tao Shen, Yu Cao et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 10 times · Not summarized yet
Abstract
Recent large language models (LLMs) have demonstrated exceptional performance on general-purpose text embedding tasks. While dense embeddings have dominated related research, we introduce the first lexicon-based embeddings (LENS) leveraging LLMs that achieve competitive performance on these tasks. LENS consolidates the vocabulary space through token embedding clustering to handle the issue of token redundancy in LLM vocabularies. To further improve performance, we investigate bidirectional attention and various pooling strategies. Specifically, LENS simplifies lexical matching with redundant vocabularies by assigning each dimension to a specific token cluster, where semantically similar toke…
-
Causal2Vec: Improving Decoder-only LLMs as Embedding Models through a Contextual TokenAiliang Lin, Zhuo-Yun Li, Yu-Song Wang et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 1 time · Not summarized yet
Abstract
Decoder-only large language models (LLMs) have been increasingly adopted to build embedding models for diverse tasks. To overcome the inherent limitations of causal attention in representation learning, many existing methods modify the attention mechanism to be bidirectional, potentially undermining LLMs'ability to extract semantic information acquired during pre-training. Meanwhile, leading unidirectional approaches often rely on extra input text to generate contextualized embeddings, inevitably increasing computational costs. In this work, we propose Causal2Vec, a general-purpose embedding model tailored to enhance the performance of decoder-only LLMs without altering their original archit…
-
Improving Text Embeddings with Large Language ModelsLiang Wang, Nan Yang, Xiaolong Huang et al. · 2023 · Computation and Language · cited 473 times · AI summary available
Abstract
In this paper, we introduce a novel and simple method for obtaining high-quality text embeddings using only synthetic data and less than 1k training steps. Unlike existing methods that often depend on multi-stage intermediate pre-training with billions of weakly-supervised text pairs, followed by fine-tuning with a few labeled datasets, our method does not require building complex training pipelines or relying on manually collected datasets that are often constrained by task diversity and language coverage. We leverage proprietary LLMs to generate diverse synthetic data for hundreds of thousands of text embedding tasks across nearly 100 languages. We then fine-tune open-source decoder-only L…
-
Learning to Compress: Unlocking the Potential of Large Language Models for Text RepresentationYeqin Zhang, Yizheng Zhao, Chen Hu et al. · 2025 · AAAI Conference on Artificial Intelligence · cited 3 times · Not summarized yet
Abstract
Text representation plays a critical role in tasks like clustering, retrieval, and other downstream applications. With the emergence of large language models (LLMs), there is increasing interest in harnessing their capabilities for this purpose. However, most of the LLMs are inherently causal and optimized for next-token prediction, making them suboptimal for producing holistic representations. To address this, recent studies introduced pretext tasks to adapt LLMs for text representation. Most of these tasks, however, rely on token-level prediction objectives, such as the masked next-token prediction (MNTP) used in LLM2Vec. In this work, we explore the untapped potential of context compressi…
-
Causal2Vec: Improving Decoder-only LLMs as Versatile Embedding ModelsAiliang Lin, Zhuoyu Li, Kotaro Funakoshi · 2025 · arXiv.org · preprint, not peer reviewed · cited 11 times · Not summarized yet
-
NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding ModelsChankyu Lee, Rajarshi Roy, Meng-Yao Xu et al. · 2024 · International Conference on Learning Representations · cited 637 times · Not summarized yet
Abstract
Decoder-only LLM-based embedding models are beginning to outperform BERT or T5-based embedding models in general-purpose text embedding tasks, including dense vector-based retrieval. In this work, we introduce NV-Embed, incorporating architectural designs, training procedures, and curated datasets to significantly enhance the performance of LLM as a versatile embedding model, while maintaining its simplicity and reproducibility. For model architecture, we propose a latent attention layer to obtain pooled embeddings, which consistently improves retrieval and downstream task accuracy compared to mean pooling or using the lasttoken embedding from LLMs. To enhance representation learning, we rem…
Prior work it builds on
-
BeLLM: Backward Dependency Enhanced Large Language Model for Sentence EmbeddingsXianming Li, Jing Li · 2023 · North American Chapter of the Association for Computational Linguistics · cited 42 times · Not summarized yet
Abstract
Sentence embeddings are crucial in measuring semantic similarity. Most recent studies employed large language models (LLMs) to learn sentence embeddings. Existing LLMs mainly adopted autoregressive architecture without explicit backward dependency modeling. Therefore, we examined the effects of backward dependencies in LLMs for semantic similarity measurements. Concretely, we propose a novel model: backward dependency enhanced large language model (BeLLM). It learns sentence embeddings via transforming specific attention layers from uni- to bi-directional. We extensively experiment across various semantic textual similarity (STS) tasks and downstream applications. BeLLM achieves state-of-the…
-
Repetition Improves Language Model EmbeddingsJacob Mitchell Springer, Suhas Kotha, Daniel Fried et al. · 2024 · International Conference on Learning Representations · cited 86 times · Not summarized yet
Abstract
Bidirectional models are considered essential for strong text embeddings. Recent approaches to adapt autoregressive language models (LMs) into strong text embedding models have largely had the requirement to modify the LM architecture to be bidirectional. We challenge this premise by introducing"echo embeddings"which converts autoregressive LMs into high quality text embedding models without changing the architecture or requiring fine-tuning. By repeating the input and extracting embeddings from the repeated tokens -- which have access to all original tokens -- echo embeddings improve over classical LM embeddings by over 5% in zero-shot settings. Our zero-shot embeddings nearly match those o…
-
SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi Chen · 2021 · Conference on Empirical Methods in Natural Language Processing · cited 4,952 times · Not summarized yet
Abstract
This paper presents SimCSE, a simple contrastive learning framework that greatly advances the state-of-the-art sentence embeddings. We first describe an unsupervised approach, which takes an input sentence and predicts itself in a contrastive objective, with only standard dropout used as noise. This simple method works surprisingly well, performing on par with previous supervised counterparts. We find that dropout acts as minimal data augmentation and removing it leads to a representation collapse. Then, we propose a supervised approach, which incorporates annotated pairs from natural language inference datasets into our contrastive learning framework, by using “entailment” pairs as positive…
-
Looking Right is Sometimes Right: Investigating the Capabilities of Decoder-only LLMs for Sequence LabelingDavid Duki'c, Jan Šnajder · 2024 · Annual Meeting of the Association for Computational Linguistics · cited 42 times · Not summarized yet
Abstract
Pre-trained language models based on masked language modeling (MLM) excel in natural language understanding (NLU) tasks. While fine-tuned MLM-based encoders consistently outperform causal language modeling decoders of comparable size, recent decoder-only large language models (LLMs) perform on par with smaller MLM-based encoders. Although their performance improves with scale, LLMs fall short of achieving state-of-the-art results in information extraction (IE) tasks, many of which are formulated as sequence labeling (SL). We hypothesize that LLMs' poor SL performance stems from causal masking, which prevents the model from attending to tokens on the right of the current token. Yet, how exact…
-
Meta-Task Prompting Elicits Embeddings from Large Language ModelsYibin Lei, Di Wu, Tian-Yi Zhou et al. · 2024 · Annual Meeting of the Association for Computational Linguistics · cited 23 times · Not summarized yet
Abstract
We introduce a new unsupervised text embedding method, Meta-Task Prompting with Explicit One-Word Limitation (MetaEOL), for generating high-quality sentence embeddings from Large Language Models (LLMs) without the need for model fine-tuning. Leveraging meta-task prompting, MetaEOL guides LLMs to produce embeddings through a series of carefully designed prompts that address multiple representational aspects. Our comprehensive experiments demonstrate that embeddings averaged from various meta-tasks are versatile embeddings that yield competitive performance on Semantic Textual Similarity (STS) benchmarks and excel in downstream tasks, surpassing contrastive-trained models. Our findings suggest…
Papers that cite it
-
Seq vs Seq: An Open Suite of Paired Encoders and DecodersOrion Weller, Kathryn Ricci, Marc Marone et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 62 times · Not summarized yet
Abstract
The large language model (LLM) community focuses almost exclusively on decoder-only language models, since they are easier to use for text generation. However, a large subset of the community still uses encoder-only models for tasks such as classification or retrieval. Previous work has attempted to compare these architectures, but is forced to make comparisons with models that have different numbers of parameters, training techniques, and datasets. We introduce the SOTA open-data Ettin suite of models: paired encoder-only and decoder-only models ranging from 17 million parameters to 1 billion, trained on up to 2 trillion tokens. Using the same recipe for both encoder-only and decoder-only m…
-
LLM-based Embeddings: Attention Values Encode Sentence Semantics Better Than Hidden StatesYeqin Zhang, Yunfei Wang, Jiaxuan Chen et al. · 2026 · arXiv.org · preprint, not peer reviewed · cited 5 times · Not summarized yet
Abstract
Sentence representations are foundational to many Natural Language Processing (NLP) applications. While recent methods leverage Large Language Models (LLMs) to derive sentence representations, most rely on final-layer hidden states, which are optimized for next-token prediction and thus often fail to capture global, sentence-level semantics. This paper introduces a novel perspective, demonstrating that attention value vectors capture sentence semantics more effectively than hidden states. We propose Value Aggregation (VA), a simple method that pools token values across multiple layers and token indices. In a training-free setting, VA outperforms other LLM-based embeddings, even matches or su…
-
Learning to Look at the Other Side: A Semantic Probing Study of Word Embeddings in LLMs with Enabled Bidirectional AttentionZhao-Xin Feng, Jianfei Ma, E. Chersoni et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 5 times · Not summarized yet
Abstract
Autoregressive Large Language Models (LLMs) demonstrate exceptional performance in language understanding and generation. However, their application in text embedding tasks has been relatively slow, along with the analysis of their semantic representation in probing tasks, due to the constraints of the unidirectional attention mechanism. This paper aims to explore whether such constraints can be overcome by enabling bidirectional attention in LLMs. We tested different variants of the Llama architecture through additional training steps, progressively enabling bidirectional attention and unsupervised/supervised contrastive learning.
-
GRACE: Generative Representation Learning via Contrastive Policy OptimizationJiashuo Sun, Shi-Xuan Liu, Zhao-yu Su et al. · 2025 · International Conference on Learning Representations · cited 9 times · Not summarized yet
Abstract
Prevailing methods for training Large Language Models (LLMs) as text encoders rely on contrastive losses that treat the model as a black box function, discarding its generative and reasoning capabilities in favor of static embeddings. We introduce GRACE (Generative Representation Learning via Contrastive Policy Optimization), a novel framework that reimagines contrastive signals not as losses to be minimized, but as rewards that guide a generative policy. In GRACE, the LLM acts as a policy that produces explicit, human-interpretable rationales--structured natural language explanations of its semantic understanding. These rationales are then encoded into high-quality embeddings via mean pooli…
-
Embedding-based In-Context Prompt Training for Enhancing LLMs as Text EncodersAiliang Lin, Zhuo-Yun Li, Ke-Yu Mao et al. · 2026 · Annual Meeting of the Association for Computational Linguistics · cited 1 time · Not summarized yet
Abstract
Large language models (LLMs) have been widely explored for embedding generation. While recent studies show that in-context learning (ICL) effectively enhances the representational capability of LLMs by prepending a few task-related demonstrations, it causes substantial token overhead due to the increased sequence length. In this work, we propose EPIC, a novel embedding-based in-context prompt training strategy that leverages ICL to generate high-quality embeddings while reducing computational burden during both training and inference. This approach replaces discrete text demonstrations with their corresponding continuous embeddings, which not only encourages the LLM to align semantically-rel…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 3 November 2026.
The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.
Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.