Abstract
Sentence representations are a critical component in NLP applications such as retrieval, question answering, and text classification. They capture the meaning of a sentence, enabling machines to understand and reason over human language. In recent years, significant progress has been made in developing methods for learning sentence representations, including unsupervised, supervised, and transfer learning approaches. However, there is no literature review on sentence representations until now. In this paper, we provide an overview of the different methods for sentence representation learning, focusing mostly on deep learning models. We provide a systematic organization of the literature, highlighting the key contributions and challenges in this area. Overall, our review highlights the importance of this area in natural language processing, the progress made in sentence representation learning, and the challenges that remain. We conclude with directions for future research, suggesting potential avenues for improving the quality and efficiency of sentence representations.
Introduction: The Evolution of Sentence Embeddings
In the landscape of Natural Language Processing (NLP), words are often viewed as atoms, while sentences represent the complex molecules of meaning. While representing individual words (e.g., distinguishing "bank" in a financial context versus a geographical one) has become a solved problem, encoding an entire sentence into a fixed-length vector remains a significant challenge.
Early methods relied on simple averaging of word vectors, which often failed to capture the structural "glue" of grammar. Even with the advent of powerful models like BERT, "out-of-the-box" embeddings suffer from anisotropy—a geometric phenomenon where vectors occupy a narrow cone in the mathematical space, making distinct sentences appear deceptively similar. This survey explores the methodologies developed to "un-squash" this space and capture nuanced human meaning.
Methodological Taxonomy
The field is organized into a taxonomy based on four core components: Data, Model, Transform, and Loss. These elements define how a model learns to map text to vector space.
Supervised Learning
Supervised approaches primarily leverage Natural Language Inference (NLI) datasets. Models are trained to classify sentence pairs as entailing, contradicting, or neutral. This explicit labeling helps the model learn logical relationships between sentences.
Unsupervised Contrastive Learning
Currently the "gold standard," unsupervised contrastive learning (exemplified by SimCSE) uses a clever "dropout" trick. A single sentence is passed through a model twice with different random dropout masks. The model is then trained to minimize the distance between these two slightly different versions (positives) while maximizing the distance from other sentences in the batch (negatives).
LLM-Based Data Generation and Post-Processing
A rising trend involves using Large Language Models (LLMs) like GPT-3 or T5 to generate synthetic "silver data"—pairs of semantically similar sentences—to train smaller, more efficient bi-encoder models. Alternatively, post-processing techniques like "whitening" or "BERT-flow" apply mathematical transformations to the vector space after training to mitigate anisotropy without requiring additional data.
Key Insights and Innovations
- The Power of Dropout: Simple dropout has proven to be a more effective data augmentation tool for sentences than lexical changes like synonym replacement.
- Bi-Encoders vs. Cross-Encoders: While Cross-Encoders (which process two sentences together) offer higher accuracy, they are computationally expensive. This survey focuses on Bi-Encoders, which encode sentences into standalone vectors, enabling sub-millisecond retrieval in vector databases.
- Quality Over Scale: Contrastive training on high-quality, diverse datasets often outperforms simply increasing model parameter counts.
Evaluation and Results
Performance is primarily measured using Semantic Textual Similarity (STS) benchmarks, alongside SentEval for linguistic probing and the Massive Text Embedding Benchmark (MTEB).
State-of-the-art results are currently dominated by models using T5 backbones, achieving average STS scores exceeding 85.0. Notably, unsupervised methods like SimCSE (RoBERTa-large) achieve scores of 83.76 without any human-labeled pairs, demonstrating the extreme data efficiency of contrastive learning. While LLMs like ChatGPT and LLaMA are revolutionary for generation, they often require specific fine-tuning or specialized prompting to match the embedding quality of dedicated encoders.
Future Frontiers
Despite rapid progress, several challenges remain:
- Domain Adaptation: Models trained on general corpora (e.g., Wikipedia) often struggle with specialized medical or legal terminology.
- Cross-Lingual Alignment: Creating a unified vector space where translations in different languages occupy the same coordinates remains difficult, particularly for low-resource languages.
- Long-Form Context: Current methods are optimized for short text; representing entire documents in a single vector often leads to "information dilution."
- Task-Specific Universality: There is ongoing debate regarding whether a single "universal" vector can serve all tasks, or if specialized embeddings are required for similarity versus clustering.
Summary updated