Cosine similarity doesn’t always make sense

Harald Stecks’s paper “Is cosine similarity of embeddings really about similarity”[1] states and mathematically proves that cosine similarity (CS) doesn’t always make sense when calculating similarity in recommender systems.

For example, it might not work if normalization is performed incorrectly during model training or if used to compare vectors from different latent spaces. The paper doesn’t say it never makes sense, only that you can get into situations where it doesn’t.

Therefore, it doesn’t mean you should stop using Cosine similarity altogether; it is only a reminder that you should always test and evaluate your assumptions. This is valid for cosine similarity and anything else you base your system on.

[1] https://research.netflix.com/publication/is-cosine-similarity-of-embeddings-really-about-similarity

Leave a comment