Is Cosine-Similarity of Embeddings Really About Similarity?

相似性(几何) 余弦相似度 计算机科学 三角函数 人工智能 数学 模式识别(心理学) 几何学 图像(数学)
作者
Harald Steck,Chaitanya Ekanadham,Nathan Kallus
标识
DOI:10.1145/3589335.3651526
摘要

Cosine-similarity is the cosine of the angle between two vectors, or equivalently the dot product between their normalizations. A popular application is to quantify semantic similarity between high-dimensional objects by applying cosine-similarity to a learned low-dimensional feature embedding. This can work better but sometimes also worse than the unnormalized dot-product between embedded vectors in practice. To gain insight into this empirical observation, we study embeddings derived from regularized linear models, where closed-form solutions facilitate analytical insights. We derive analytically how cosine-similarity can yield arbitrary and therefore meaningless 'similarities.' For some linear models the similarities are not even unique, while for others they are implicitly controlled by the regularization. We discuss implications beyond linear models: a combination of different regularizations are employed when learning deep models; these have implicit and unintended effects when taking cosine-similarities of the resulting embeddings, rendering results opaque and possibly arbitrary. Based on these insights, we caution against blindly using cosine-similarity and outline alternatives.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
1秒前
ddd完成签到,获得积分10
1秒前
1秒前
2秒前
顺顺利利完成签到,获得积分10
3秒前
4秒前
奶黄包发布了新的文献求助10
4秒前
5秒前
5秒前
小二郎应助淡淡尔烟采纳,获得10
5秒前
直率半双完成签到,获得积分10
6秒前
6秒前
7秒前
玙玙完成签到,获得积分10
7秒前
7秒前
Singularity应助年年年年采纳,获得10
7秒前
8秒前
9秒前
NexusExplorer应助Qwepo8采纳,获得10
9秒前
9秒前
Twonej应助1111111采纳,获得30
9秒前
秋qiu发布了新的文献求助10
10秒前
菜菜发布了新的文献求助10
10秒前
10秒前
犹豫的世倌完成签到,获得积分10
11秒前
tiptip应助Hazellee采纳,获得10
12秒前
che完成签到,获得积分10
13秒前
付加硕发布了新的文献求助10
13秒前
璀璨发布了新的文献求助10
13秒前
脑洞疼应助风向玫瑰采纳,获得10
13秒前
13秒前
14秒前
14秒前
14秒前
14秒前
14秒前
打打应助悲伤土豆丝采纳,获得10
14秒前
14秒前
15秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
No Good Deed Goes Unpunished 1100
Bioseparations Science and Engineering Third Edition 1000
Lloyd's Register of Shipping's Approach to the Control of Incidents of Brittle Fracture in Ship Structures 1000
BRITTLE FRACTURE IN WELDED SHIPS 1000
Entre Praga y Madrid: los contactos checoslovaco-españoles (1948-1977) 1000
Polymorphism and polytypism in crystals 1000
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 纳米技术 有机化学 物理 生物化学 化学工程 计算机科学 复合材料 内科学 催化作用 光电子学 物理化学 电极 冶金 遗传学 细胞生物学
热门帖子
关注 科研通微信公众号,转发送积分 6100194
求助须知:如何正确求助?哪些是违规求助? 7929894
关于积分的说明 16425091
捐赠科研通 5229885
什么是DOI,文献DOI怎么找? 2795005
邀请新用户注册赠送积分活动 1777357
关于科研通互助平台的介绍 1651116