Pitfalls in the Evaluation of Sentence Embeddings

Steffen Eger, Andreas Rücklé, Iryna Gurevych

Introduction

Sentence embeddings—vector representations that capture the semantic meaning of entire sentences—have become a cornerstone of modern Natural Language Processing (NLP). However, the rapid pace of development has led to a lack of standardized evaluation practices. This paper argues that many reported performance gains may be artifacts of evaluation design rather than true architectural improvements. By identifying several critical "pitfalls," the authors call for a more rigorous and fair approach to benchmarking sentence encoders.

Methodology

The researchers conducted a systematic "stress test" of current evaluation practices using the SentEval toolkit. They compared complex models, such as InferSent and the Universal Sentence Encoder (USE), against simpler baselines like averaged Word2Vec/GloVe and SIF (Smooth Inverse Frequency). The study specifically examined the impact of three variables: embedding dimensionality, vector normalization (z-norm), and the choice of downstream classifier (Logistic Regression vs. Multi-Layer Perceptrons).

Key Pitfalls in Sentence Embedding Evaluation

1. The Hidden Impact of Embedding Size

A primary finding is that performance is a concave function of embedding size. Higher-dimensional vectors provide a larger space that makes it easier for linear classifiers to separate data, regardless of the model's underlying semantic understanding. Consequently, a "simple" model with 4096 dimensions can often outperform a "complex" model with only 300 dimensions simply due to this dimensionality advantage.

Performance scores as a function of embedding size, showing the concave relationship and the boost from normalization.

2. The Normalization Effect

Applying basic z-score normalization (centering and scaling vectors) can drastically improve scores, particularly for simpler baseline models. In many cases, this simple pre-processing step nearly closes the performance gap between baselines and state-of-the-art models, suggesting that much of the perceived superiority of certain encoders stems from better internal scaling rather than better representations.

3. Classifier Bias

Most evaluations rely on a simple Logistic Regression head to measure transfer task performance. However, the authors found that different models respond differently to classifier complexity. For instance, models like InferSent show significant gains when moving from a linear head to a non-linear Multi-Layer Perceptron (MLP), while others do not. Reporting results from only one type of classifier provides an incomplete picture of the information accessible within the embedding.

4. Disconnect Between Probing and Transfer Tasks

"Probing tasks" designed to detect specific linguistic features (e.g., sentence length or word content) often show low or diverging correlations with actual "transfer tasks" (e.g., sentiment analysis). A model might excel at identifying linguistic properties without necessarily capturing the semantic utility required for downstream applications.

Key Results and Evidence

The study's empirical results underscore the magnitude of these pitfalls:

  • Normalization Gains: On the STSBenchmark, normalization reduced the performance spread among nine different systems from 29% to just 9%. As shown in the table below, basic GloVe embeddings saw a correlation jump from 0.41 to 0.62 through normalization alone.
  • Dimensionality Parity: When Word2Vec embeddings were scaled to match the dimensionality of more complex encoders, the perceived advantage of the complex models diminished significantly.
Comparison of standard and normalized performance across various sentence encoders on the STSBenchmark, highlighting the impact of normalization (Δ).

Conclusion and Best Practices

To ensure a level playing field in future NLP research, the authors recommend several standardizations:

  1. Compare at Equal Sizes: Always evaluate new models against baselines of the same dimensionality.
  2. Standardize Normalization: Treat normalization as a critical hyperparameter and report its impact.
  3. Use Multiple Classifiers: Report performance using both linear and non-linear heads to fully characterize the embedding's utility.
  4. Develop Harder Benchmarks: As simple bag-of-words models continue to perform well on current tasks, the community needs more challenging benchmarks that require deep semantic reasoning to differentiate between model architectures.

Summary updated

BibTeX
@inproceedings{eger2019pitfalls,
  author = {Steffen Eger and Andreas Rücklé and Iryna Gurevych},
  title = {{Pitfalls in the Evaluation of Sentence Embeddings}},
  booktitle = {RepL4NLP @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-4308},
}
Figure