Extracting Sentence Embeddings from Pretrained Transformer Models
Not on the map. Why?
Abstract (arXiv)
Pre-trained transformer models shine in many natural language processing tasks and therefore are expected to bear the representation of the input sentence or text meaning. These sentence-level embeddings are also important in retrieval-augmented generation. But do commonly used plain averaging or prompt templates sufficiently capture and represent the underlying meaning? After providing a comprehensive review of existing sentence embedding extraction and refinement methods, we thoroughly test different combinations and our original extensions of the most promising ones on pretrained models. Namely, given 110 M parameters, BERT's hidden representations from multiple layers, and many tokens, we try diverse ways to extract optimal sentence embeddings. We test various token aggregation and representation post-processing techniques. We also test multiple ways of using a general Wikitext dataset to complement BERT's sentence embeddings. All methods are tested on eight Semantic Textual Similarity (STS), six short text clustering, and twelve classification tasks. We also evaluate our representation-shaping techniques on other static models, including random token representations. Proposed representation extraction methods improve the performance on STS and clustering tasks for all models considered. Very high improvements for static token-based models, especially random embeddings for STS tasks, almost reach the performance of BERT-derived representations. Our work shows that the representation-shaping techniques significantly improve sentence embeddings extracted from BERT-based and simple baseline models.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 47 of its 95 references that are in the map. First posted on arXiv 15 Aug 2024.
Builds on
47 of 95 references.
References · 47
- 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2020A Primer in BERTology: What we know about how BERT workscited by 807
- 2021Sentence-T5: Scalable Sentence Encoders from Pre-trained Text-to-Text Modelscited by 462
- 2018Massively Multilingual Sentence Embeddings for Zero-Shot Cross-Lingual Transfer and Beyondcited by 434
- 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
- 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
- 2021ConSERT: A Contrastive Framework for Self-Supervised Sentence Representation Transfercited by 231
- 2021All Bark and No Bite: Rogue Dimensions in Transformer Language Models Obscure Representational Qualitycited by 150
- 2021BERT Busters: Outlier Dimensions that Disrupt Transformerscited by 110
- 2021Self-Guided Contrastive Learning for BERT Sentence Representationscited by 103
- 2021Fast, Effective, and Self-Supervised: Transforming Masked Language Models into Universal Lexical and Sentence Encoderscited by 88
35 more
- 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
- 2020On the Sentence Embeddings from Pre-trained Language Modelscited by 83
- 2022PromptBERT: Improving BERT Sentence Embeddings with Promptscited by 75
- 2021WhiteningBERT: An Easy Unsupervised Sentence Embedding Approachcited by 68
- 2021First Align, then Predict: Understanding the Cross-Lingual Ability of Multilingual BERTcited by 64
- 2020SBERT-WK: A Sentence Embedding Method by Dissecting BERT-based Word Modelscited by 55
- 2021IsoScore: Measuring the Uniformity of Embedding Space Utilizationcited by 52
- 2019Rare Words: A Major Problem for Contextualized Embeddings And How to Fix it by Attentive Mimickingcited by 40
- 2020Language Through a Prism: A Spectral Approach for Multiscale Language Representationscited by 39
- 2017Self-Taught Convolutional Neural Networks for Short Text Clusteringcited by 34
- 2020Asking without Telling: Exploring Latent Ontologies in Contextual Representationscited by 34
- 2020Positional Artefacts Propagate Through Masked Language Model Embeddingscited by 34
- 2015Learning to Understand Phrases by Embedding the Dictionarycited by 33
- 2020Word Rotator's Distancecited by 32
- 2021Pairwise Supervised Contrastive Learning of Sentence Representationscited by 31
- 2022PCL: Peer-Contrastive Learning with Diverse Augmentations for Unsupervised Sentence Embeddingscited by 29
- 2021A Cluster-based Approach for Improving Isotropy in Contextual Embedding Spacecited by 27
- 2021An Isotropy Analysis in the Multilingual BERT Embedding Spacecited by 25
- 2022Exploring the Impact of Negative Samples of Contrastive Learning: A Case Study of Sentence Embeddingcited by 25
- 2022InfoCSE: Information-aggregated Contrastive Learning of Sentence Embeddingscited by 25
- 2021How Does Fine-tuning Affect the Geometry of Embedding Space: A Case Study on Isotropycited by 23
- 2020A Cross-Task Analysis of Text Span Representationscited by 21
- 2022Just Rank: Rethinking Evaluation with Word and Sentence Similaritiescited by 20
- 2022SCD: Self-Contrastive Decorrelation for Sentence Embeddingscited by 19
- 2021Obtaining Better Static Word Embeddings Using Contextual Embedding Modelscited by 18
- 2021What Makes Sentences Semantically Related: A Textual Relatedness Dataset and Empirical Studycited by 15
- 2022Using Context-to-Vector with Graph Retrofitting to Improve Word Embeddingscited by 11
- 2021Improving BERT Model Using Contrastive Learning for Biomedical Relation Extractioncited by 10
- 2022Combining Static and Contextualised Multilingual Embeddingscited by 8
- 2020Why Overfitting Isn't Always Bad: Retrofitting Cross-Lingual Word Embeddings to Dictionariescited by 7
- 2021PAUSE: Positive and Annealed Unlabeled Sentence Embeddingcited by 5
- 2020P-SIF: Document Embeddings Using Partition Averagingcited by 4
- 2021Unsupervised Sentence-embeddings by Manifold Approximation and Projectioncited by 4
- 2021Discrete Cosine Transform as Universal Sentence Encodercited by 2
- 2021Unsupervised Contextualized Document Representationcited by 1
Built on by
Citing papers per year: 2025: 4; 2026: 3.
7 papers.
- 2025HT-Transformer: Event Sequences Classification by Accumulating Prefix Information with History Tokenscited by 3
- 2025MaxPoolBERT: Enhancing BERT Classification via Layer- and Token-Wise Aggregationcited by 2
- 2025Resource-Efficient Adaptation of Large Language Models for Text Embeddings via Prompt Engineering and Contrastive Fine-tuningcited by 1
- 2026LLM-based Embeddings: Attention Values Encode Sentence Semantics Better Than Hidden Statescited by 1
- 2025A multimodal multiplex of the mental lexicon for multilingual individualscited by 0
- 2026PEARL: Prototype-Enhanced Alignment for Label-Efficient Representation Learning with Deployment-Driven Insights from Digital Governance Communication Systemscited by 0
- 2026Operationalising Cyber Risk Management Using AI: Connecting Cyber Incidents to MITRE ATT&CK Techniques, Security Controls, and Metricscited by 0
- 2026Operationalising Cyber Risk Management Using AI: Connecting Cyber Incidents to MITRE ATT&CK Techniques, Security Controls, and Metrics12 Mar 2026
- 2026LLM-based Embeddings: Attention Values Encode Sentence Semantics Better Than Hidden States2 Feb 2026
- 2026PEARL: Prototype-Enhanced Alignment for Label-Efficient Representation Learning with Deployment-Driven Insights from Digital Governance Communication Systems24 Jan 2026
- 2025A multimodal multiplex of the mental lexicon for multilingual individuals7 Nov 2025
- 2025HT-Transformer: Event Sequences Classification by Accumulating Prefix Information with History Tokens2 Aug 2025
- 2025Resource-Efficient Adaptation of Large Language Models for Text Embeddings via Prompt Engineering and Contrastive Fine-tuning30 Jul 2025
- 2025MaxPoolBERT: Enhancing BERT Classification via Layer- and Token-Wise Aggregation21 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024Simple Techniques for Enhancing Sentence Embeddings in Generative Language Models
- 2026Adapting Multilingual Embedding Models to Turkish via Cross-Lingual Tokenizer Surgery and Offline Distillation
- 2024Recent advances in text embedding: A Comprehensive Review of Top-Performing Methods on the MTEB Benchmark
- 2024GASE: Generatively Augmented Sentence Encoding
- 2023CoT-BERT: Enhancing Unsupervised Sentence Representation through Chain-of-Thought
- 2026Giga-Embeddings: Mixture-of-Experts Encoders for High-Throughput Text Embeddings
- 2025Diffusion vs. Autoregressive Language Models: A Text Embedding Perspective
- 2025Training Sparse Mixture Of Experts Text Embedding Models