Don't use cosine similarity carelessly
p.migdal.pl · 3,131 words · saved by 1 readers
Cosine similarity - the duct tape of AI. Convenient but often misused. Let's find out how to use it better.
Don't use cosine similarity carelessly 14 Jan 2025 | by Piotr Migdał see Hacker News for the discussion Midas turned everything he touched into gold. Data scientists turn everything into vectors. We do it for a reason — as gold is the language of merchants, vectors are the language of AI. Just as Midas discovered that turning everything to gold wasn’t always helpful, we’ll see that blindly applying cosine similarity to vectors can lead us astray. While embeddings do capture similarities, they often reflect the wrong kind - matching questions to questions rather than questions to answers, or ge
related reading
- The Illustrated Word2vec – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- Embeddings: What they are and why they mattersimonwillison.net
- Comparison of different Word Embeddings on Text Similarity — A use case in NLP | by Intellica.AI | Mediumintellica-ai.medium.com
- Vector Similarity Explained | Pineconepinecone.io
- Semantic Word Embeddingsoffconvex.org
- Not All Vector Databases Are Made Equal | Towards Data Sciencetowardsdatascience.com
- Attention Is Off By One – Evan Millerevanmiller.org
- Self-Fulfilling Misalignment Data Might Be Poisoning Our AI Modelsturntrout.com
- Sentence Embeddings. Introduction to Sentence Embeddings – hackerllamaosanseviero.github.io
- The Illustrated Word2vec – Jay Alammar – Visualizing machine learning one concept at a time.jalammar.github.io
- 1301.3781arxiv.org
- Non_Interactive – Software & MLnonint.com