Skip to main content
QUICK REVIEW

[Paper Review] Correlation Coefficients and Semantic Textual Similarity

В. К. Железняк, Aleksandar Savkov|arXiv (Cornell University)|May 19, 2019
Topic ModelingComputer Science52 references7 citations
TL;DR

This paper demonstrates that cosine similarity is statistically equivalent to Pearson correlation coefficient for word embeddings, but shows it is inappropriate when embeddings deviate from normality—particularly for GloVe and averaged fastText vectors. It proposes using non-parametric rank correlation (Spearman's ρ, Kendall’s τ) instead, which significantly improves performance on semantic textual similarity benchmarks, with simple averaged word vectors and rank correlation rivaling state-of-the-art deep models using cosine similarity.

ABSTRACT

A large body of research into semantic textual similarity has focused on constructing state-of-the-art embeddings using sophisticated modelling, careful choice of learning signals and many clever tricks. By contrast, little attention has been devoted to similarity measures between these embeddings, with cosine similarity being used unquestionably in the majority of cases. In this work, we illustrate that for all common word vectors, cosine similarity is essentially equivalent to the Pearson correlation coefficient, which provides some justification for its use. We thoroughly characterise cases where Pearson correlation (and thus cosine similarity) is unfit as similarity measure. Importantly, we show that Pearson correlation is appropriate for some word vectors but not others. When it is not appropriate, we illustrate how common non-parametric rank correlation coefficients can be used instead to significantly improve performance. We support our analysis with a series of evaluations on word-level and sentence-level semantic textual similarity benchmarks. On the latter, we show that even the simplest averaged word vectors compared by rank correlation easily rival the strongest deep representations compared by cosine similarity.

Motivation & Objective

  • To investigate the statistical validity of cosine similarity as a similarity measure for textual embeddings.
  • To identify conditions under which Pearson correlation (and thus cosine similarity) fails due to non-normality in word vector distributions.
  • To propose and evaluate non-parametric rank correlation coefficients (Spearman’s ρ, Kendall’s τ) as robust alternatives for semantic textual similarity.
  • To demonstrate that simple averaged word vectors paired with rank correlation can match or exceed performance of complex deep models using cosine similarity.
  • To provide a statistical foundation for selecting appropriate similarity measures based on embedding distributional properties.

Proposed method

  • Treat each word or sentence embedding as a sample of 300 observations from a scalar random variable, enabling statistical analysis.
  • Establish that cosine similarity is mathematically equivalent to the Pearson correlation coefficient on paired embedding vectors.
  • Use normal Q-Q plots and statistical tests to assess normality of embedding distributions across different models (word2vec, fastText, GloVe).
  • Replace cosine similarity with Spearman’s rank correlation (ρ) and Kendall’s tau (τ) when normality assumptions are violated.
  • Evaluate similarity performance on standard STS benchmarks (STS12–STS16) using both cosine similarity and rank correlation on averaged word vectors.
  • Apply bias-corrected percentile bootstrap (BCa) confidence intervals to assess statistical significance of performance differences.

Experimental results

Research questions

  • RQ1Is cosine similarity statistically justified for all types of pre-trained word embeddings, or are there conditions under which it fails?
  • RQ2To what extent do embedding distributions deviate from normality, and how does this affect the validity of Pearson correlation as a similarity measure?
  • RQ3Can non-parametric rank correlation coefficients (Spearman’s ρ, Kendall’s τ) serve as more robust alternatives to cosine similarity when normality assumptions are violated?
  • RQ4Can simple sentence representations (e.g., averaged word vectors) combined with rank correlation outperform complex deep models using cosine similarity?
  • RQ5What statistical properties of word embeddings explain the observed performance differences between similarity measures?

Key findings

  • Cosine similarity is mathematically equivalent to the Pearson correlation coefficient, validating its use only when embedding distributions are approximately normal.
  • Pearson correlation (and thus cosine similarity) performs poorly for GloVe embeddings and averaged fastText vectors, where non-normality and outliers are pronounced.
  • Spearman’s ρ and Kendall’s τ significantly outperform cosine similarity on STS tasks when embeddings violate normality, with gains up to 13.98 points on the tweet-news subtask of STS15.
  • Even simple averaged word vectors compared via rank correlation achieve performance comparable to state-of-the-art deep models using cosine similarity, e.g., 76.46 vs. 75.12 on the plagiarism subtask of STS16.
  • The 95% BCa confidence intervals show statistically significant improvements with rank correlation on multiple subtasks, including 12.69–23.74 point gains for plagiarism in STS16.
  • The study reveals that the training procedure of word embeddings—particularly unsupervised objectives—may contribute to non-normality, though the exact causes remain to be fully understood.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.