Engagement on LinkedIn, as of 2026-10-19

Reactions
15

Source: LinkedIn activity page (reactions, comments, reposts).

Is Cosine Similarity Really About Similarity? 🤔

Cosine similarity is often used to measure semantic similarity in learned embeddings, but this new paper by Netflix researchers raises some important concerns.

Here are the key takeaways:

1. Cosine Similarity can give arbitrary or meaningless results in some cases, especially with learned embeddings.

2. Scaling Freedom: The flexibility in how embeddings are scaled during training can lead to non-unique, misleading cosine similarities.

3. Regularization Effects: Different regularization techniques can significantly affect the learned embeddings and distort cosine similarity.

4. Dot Product vs. Cosine: The unnormalized dot product often yields more stable and reliable results compared to cosine similarity.

5. Matrix Factorization Models: In linear models, cosine similarity can be particularly problematic due to scaling issues.

6. Deep Learning Impact: These issues may be even worse in deep models where multiple layers and different regularizations are applied.

7. Proposed Remedies: Train models specifically for cosine similarity or avoid using embedding spaces altogether to improve reliability.

8. Caution: The authors recommend carefully considering how embeddings are learned and normalized before applying cosine similarity.

Full paper here: arXiv:2403.05440v1

#seo
#Cosinesimilarity
#netflix

First published on LinkedIn on Oct 22, 2024, 2:50 PM UTC (original). Kept here in full so it stays available.

More posts on these topics