Token Prepending: A Training-Free Approach for Eliciting Better Sentence Embeddings from LLMs
Not on the map. Why?
Abstract (arXiv)
Extracting sentence embeddings from large language models (LLMs) is a promising direction, as LLMs have demonstrated stronger semantic understanding capabilities. Previous studies typically focus on prompt engineering to elicit sentence embeddings from LLMs by prompting the model to encode sentence information into the embedding of the last token. However, LLMs are mostly decoder-only models with causal attention and the earlier tokens in the sentence cannot attend to the latter tokens, resulting in biased encoding of sentence information and cascading effects on the final decoded token. To this end, we propose a novel Token Prepending (TP) technique that prepends each layer's decoded sentence embedding to the beginning of the sentence in the next layer's input, allowing earlier tokens to attend to the complete sentence information under the causal attention mechanism. The proposed TP technique is a plug-and-play and training-free technique, which means it can be seamlessly integrated with various prompt-based sentence embedding methods and autoregressive LLMs. Extensive experiments on various Semantic Textual Similarity (STS) tasks and downstream classification tasks demonstrate that our proposed TP technique can significantly improve the performance of existing prompt-based sentence embedding methods across different LLMs, while incurring negligible additional inference cost.
Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). Builds on 20 of its 40 references that are in the map. First posted on arXiv 16 Dec 2024.
Builds on
20 of 40 references.
References · 20
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2024Qwen2 Technical Reportcited by 2,076
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2017SemEval-2017 Task 1: Semantic Textual Similarity - Multilingual and Cross-lingual Focused Evaluationcited by 998
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 770
- 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 466
- 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
8 more
- 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 396
- 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
- 2024Generative Representational Instruction Tuningcited by 227
- 2024Fantastic Semantics and Where to Find Them: Investigating Which Layers of Generative LLMs Reflect Lexical Semanticscited by 43
- 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
- 2024Simple Techniques for Enhancing Sentence Embeddings in Generative Language Modelscited by 26
- 2023Meaning Representations from Trajectories in Autoregressive Modelscited by 18
- 2023Composition-contrastive Learning for Sentence Embeddingscited by 14
Built on by
Citing papers per year: 2024: 1; 2025: 6; 2026: 11.
18 papers.
Sort:
By area:
- 2024LLMs are Also Effective Embedding Models: An In-depth Overviewcited by 32
- 2025Contrastive Prompting Enhances Sentence Embeddings in LLMs through Inference-Time Steeringcited by 13
- 2025Position: Text Embeddings Should Capture Implicit Semantics, Not Just Surface Meaningcited by 10
- 2025FreeRet: MLLMs as Training-Free Retrieverscited by 7
- 2025RegionMarker: A Region-Triggered Semantic Watermarking Framework for Embedding-as-a-Service Copyright Protectioncited by 4
- 2025Hierarchical Token Prepending: Enhancing Information Flow in Decoder-based LLM Embeddingscited by 3
- 2026Sparse Growing Transformer: Training-Time Sparse Depth Allocation via Progressive Attention Loopingcited by 3
- 2026The Truth Lies Somewhere in the Middle (of the Generated Tokens)cited by 2
- 2026SemPA: Improving Sentence Embeddings of Large Language Models through Semantic Preference Alignmentcited by 1
- 2025Causal2Vec: Improving Decoder-only LLMs as Embedding Models through a Contextual Tokencited by 0
- 2026KV-Embedding: Training-free Text Embedding via Internal KV Re-routing in Decoder-only LLMscited by 0
- 2026Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Modelscited by 0
6 more
- 2026Geometry-Aware Localized Watermarking for Copyright Protection in Embedding-as-a-Servicecited by 0
- 2026A Hormone-inspired Emotion Layer for Transformer language models (HELT)cited by 0
- 2026DySem: Uncovering Dynamic Semantic Components of Large Language Models for Calculating Semantic Textual Similaritycited by 0
- 2026ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMscited by 0
- 2026Focusing Condition: Inference-Time Self-Contrastive Steering Elicits Better Conditional Text Embeddings in LLMscited by 0
- 2026Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddingscited by 0
- 2026Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddings29 Sep 2026
- 2026Focusing Condition: Inference-Time Self-Contrastive Steering Elicits Better Conditional Text Embeddings in LLMs26 Sep 2026
- 2026ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMs4 Jun 2026
- 2026DySem: Uncovering Dynamic Semantic Components of Large Language Models for Calculating Semantic Textual Similarity28 May 2026
- 2026The Truth Lies Somewhere in the Middle (of the Generated Tokens)11 May 2026
- 2026A Hormone-inspired Emotion Layer for Transformer language models (HELT)13 Apr 2026
- 2026Geometry-Aware Localized Watermarking for Copyright Protection in Embedding-as-a-Service13 Apr 2026
- 2026Sparse Growing Transformer: Training-Time Sparse Depth Allocation via Progressive Attention Looping25 Mar 2026
- 2026Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Models24 Jan 2026
- 2026SemPA: Improving Sentence Embeddings of Large Language Models through Semantic Preference Alignment8 Jan 2026
- 2026KV-Embedding: Training-free Text Embedding via Internal KV Re-routing in Decoder-only LLMs3 Jan 2026
- 2025Hierarchical Token Prepending: Enhancing Information Flow in Decoder-based LLM Embeddings18 Nov 2025
6 more
- 2025RegionMarker: A Region-Triggered Semantic Watermarking Framework for Embedding-as-a-Service Copyright Protection17 Nov 2025
- 2025FreeRet: MLLMs as Training-Free Retrievers29 Sep 2025
- 2025Causal2Vec: Improving Decoder-only LLMs as Embedding Models through a Contextual Token31 Jul 2025
- 2025Position: Text Embeddings Should Capture Implicit Semantics, Not Just Surface Meaning10 Jun 2025
- 2025Contrastive Prompting Enhances Sentence Embeddings in LLMs through Inference-Time Steering19 May 2025
- 2024LLMs are Also Effective Embedding Models: An In-depth Overview17 Dec 2024
- 2025FreeRet: MLLMs as Training-Free Retrieverscited by 7
- 2025FreeRet: MLLMs as Training-Free Retrievers29 Sep 2025
- 2024LLMs are Also Effective Embedding Models: An In-depth Overviewcited by 32
- 2025Contrastive Prompting Enhances Sentence Embeddings in LLMs through Inference-Time Steeringcited by 13
- 2025Position: Text Embeddings Should Capture Implicit Semantics, Not Just Surface Meaningcited by 10
- 2025RegionMarker: A Region-Triggered Semantic Watermarking Framework for Embedding-as-a-Service Copyright Protectioncited by 4
- 2025Hierarchical Token Prepending: Enhancing Information Flow in Decoder-based LLM Embeddingscited by 3
- 2026Sparse Growing Transformer: Training-Time Sparse Depth Allocation via Progressive Attention Loopingcited by 3
- 2026The Truth Lies Somewhere in the Middle (of the Generated Tokens)cited by 2
- 2025Causal2Vec: Improving Decoder-only LLMs as Embedding Models through a Contextual Tokencited by 0
- 2026KV-Embedding: Training-free Text Embedding via Internal KV Re-routing in Decoder-only LLMscited by 0
- 2026Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Modelscited by 0
- 2026Geometry-Aware Localized Watermarking for Copyright Protection in Embedding-as-a-Servicecited by 0
- 2026A Hormone-inspired Emotion Layer for Transformer language models (HELT)cited by 0
12 most cited of 16 All 16 (JSON)
- 2026Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddings29 Sep 2026
- 2026Focusing Condition: Inference-Time Self-Contrastive Steering Elicits Better Conditional Text Embeddings in LLMs26 Sep 2026
- 2026ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMs4 Jun 2026
- 2026DySem: Uncovering Dynamic Semantic Components of Large Language Models for Calculating Semantic Textual Similarity28 May 2026
- 2026The Truth Lies Somewhere in the Middle (of the Generated Tokens)11 May 2026
- 2026A Hormone-inspired Emotion Layer for Transformer language models (HELT)13 Apr 2026
- 2026Geometry-Aware Localized Watermarking for Copyright Protection in Embedding-as-a-Service13 Apr 2026
- 2026Sparse Growing Transformer: Training-Time Sparse Depth Allocation via Progressive Attention Looping25 Mar 2026
- 2026Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Models24 Jan 2026
- 2026KV-Embedding: Training-free Text Embedding via Internal KV Re-routing in Decoder-only LLMs3 Jan 2026
- 2025Hierarchical Token Prepending: Enhancing Information Flow in Decoder-based LLM Embeddings18 Nov 2025
- 2025RegionMarker: A Region-Triggered Semantic Watermarking Framework for Embedding-as-a-Service Copyright Protection17 Nov 2025
12 newest of 16 All 16 (JSON)