mlsanityData to 7 Oct 2026

Token Prepending: A Training-Free Approach for Eliciting Better Sentence Embeddings from LLMs

arXiv 2412.11556 ↗First posted 16 Dec 2024cs.CL cs.AIcited by 18

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2024The Llama 3 Herd of Modelscited by 14,192
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  6. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  7. 2024Qwen2 Technical Reportcited by 2,076
  8. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  9. 2017SemEval-2017 Task 1: Semantic Textual Similarity - Multilingual and Cross-lingual Focused Evaluationcited by 998
  10. 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 770
  11. 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 466
  12. 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
8 more
  1. 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 396
  2. 2022One Embedder, Any Task: Instruction-Finetuned Text Embeddingscited by 329
  3. 2024Generative Representational Instruction Tuningcited by 227
  4. 2024Fantastic Semantics and Where to Find Them: Investigating Which Layers of Generative LLMs Reflect Lexical Semanticscited by 43
  5. 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
  6. 2024Simple Techniques for Enhancing Sentence Embeddings in Generative Language Modelscited by 26
  7. 2023Meaning Representations from Trajectories in Autoregressive Modelscited by 18
  8. 2023Composition-contrastive Learning for Sentence Embeddingscited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 6; 2026: 11.

18 papers.

Sort:

By area:

  1. 2024LLMs are Also Effective Embedding Models: An In-depth Overviewcited by 32
  2. 2025Contrastive Prompting Enhances Sentence Embeddings in LLMs through Inference-Time Steeringcited by 13
  3. 2025Position: Text Embeddings Should Capture Implicit Semantics, Not Just Surface Meaningcited by 10
  4. 2025FreeRet: MLLMs as Training-Free Retrieverscited by 7
  5. 2025RegionMarker: A Region-Triggered Semantic Watermarking Framework for Embedding-as-a-Service Copyright Protectioncited by 4
  6. 2025Hierarchical Token Prepending: Enhancing Information Flow in Decoder-based LLM Embeddingscited by 3
  7. 2026Sparse Growing Transformer: Training-Time Sparse Depth Allocation via Progressive Attention Loopingcited by 3
  8. 2026The Truth Lies Somewhere in the Middle (of the Generated Tokens)cited by 2
  9. 2026SemPA: Improving Sentence Embeddings of Large Language Models through Semantic Preference Alignmentcited by 1
  10. 2025Causal2Vec: Improving Decoder-only LLMs as Embedding Models through a Contextual Tokencited by 0
  11. 2026KV-Embedding: Training-free Text Embedding via Internal KV Re-routing in Decoder-only LLMscited by 0
  12. 2026Sequence Repetition Enhances Token Embeddings and Improves Sequence Labeling with Decoder-only Language Modelscited by 0
6 more
  1. 2026Geometry-Aware Localized Watermarking for Copyright Protection in Embedding-as-a-Servicecited by 0
  2. 2026A Hormone-inspired Emotion Layer for Transformer language models (HELT)cited by 0
  3. 2026DySem: Uncovering Dynamic Semantic Components of Large Language Models for Calculating Semantic Textual Similaritycited by 0
  4. 2026ReverseEOL: Improving Training-free Text Embeddings via Text Reversal in Decoder-only LLMscited by 0
  5. 2026Focusing Condition: Inference-Time Self-Contrastive Steering Elicits Better Conditional Text Embeddings in LLMscited by 0
  6. 2026Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddingscited by 0