You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steck, Harald, et al. “Is Cosine-Similarity of Embeddings Really About Similarity?” arXiv [cs.IR], 8 Mar. 2024, http://arxiv.org/abs/2403.05440. arXiv.
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.
R. Jin, D. Li, J. Gao, Z. Liu, L. Chen, and Y. Zhou. Towards a better understanding of linear models for recommendation. In ACM Conference on Knowledge Discovery and Data Mining (KDD), 2021.
目的関数(1)の由来
S. Zheng, C. Ding, and F. Nie. Regularized singular value decomposition and application to recommender system, 2018. arXiv:1804.05090.
目的関数(2)の由来
The text was updated successfully, but these errors were encountered:
Steck, Harald, et al. “Is Cosine-Similarity of Embeddings Really About Similarity?” arXiv [cs.IR], 8 Mar. 2024, http://arxiv.org/abs/2403.05440. arXiv.
Abstract
(DeepL翻訳)
コサイン類似度とは、2つのベクトル間の角度の余弦、または等価的にそれらの正規化間のドット積である。よく使われるアプリケーションは、学習された低次元の特徴埋め込みにコサイン類似度を適用することで、高次元のオブジェクト間の意味的類似性を定量化することである。この方法は、埋め込みベクトル間の正規化されていないドット積よりもうまくいくこともあるが、時には悪くなることもある。この経験的観察に対する洞察を得るために、我々は、閉形式解が解析的洞察を容易にする正則化線形モデルから得られる埋め込みを研究する。コサイン類似度がどのように任意の、したがって無意味な「類似度」をもたらすかを解析的に導出する。ある線形モデルでは、類似度は一意でさえなく、他のモデルでは正則化によって暗黙のうちに制御される。ディープモデルを学習する際には、様々な正則化の組み合わせが採用されるが、これらの正則化は、結果として得られる埋め込みデータの余弦類似度を取る際に、暗黙的かつ意図しない効果をもたらし、結果を不透明で恣意的なものにする。これらの洞察に基づき、我々はコサイン類似度を盲目的に使用することに注意を促し、代替案を概説する。
解決した課題/先行研究との比較
結果
線形行列分解 Matrix Factorization のモデルを学習
元の行列と、分解された行列から再構成された行列との間の誤差を定量化する目的関数を2種類用意。
正則化手法が異なる。
解析解を求めると、正則化手法がスケーリングに異なる影響を与えていることが分かった。
シミュレーションを行うと、コサイン類似度がアイテム間の真の類似度を表現できていないケースが示された (Fig.1 )。
- スケーリングが一意に定まる式2でも、コサイン類似度は真の類似度と大きく異なっている。
- (正則化項などの影響により、ベクトル間のコサイン類似度が元のデータの類似度を反映しているとは限らない、ということ?ここの原因(の考察)は明記されていないように見える)
これらの結果より、低次元の特徴埋め込みにおけるコサイン類似度はベクトルのスケーリング、正則化手法に大きく依存する。
議論・残された課題
重要な引用
The text was updated successfully, but these errors were encountered: