arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.29488cs.LG
收藏

标签表示的余弦相似度能告诉我们什么,不能告诉我们什么

What Cosine Similarity of Label Representations Can and Cannot Tell us

IT University of Copenhagen(丹麦哥本哈根技术大学);School of Mathematics, University of Edinburgh(爱丁堡大学数学学院)

Beatrix M. G. Nielsen, Andreas Grivas

AI总结:

本文证明对于softmax分类器,标签表示(称为unembedding)之间的余弦相似度不提供模型概率的任何信息,而对于sigmoid分类器,所有成对余弦相似度定义了可能的标签组合集。

摘要:

余弦相似度常用于衡量神经网络模型向量表示的相似性。然而,表示的余弦相似度并不能保证告诉我们关于模型概率的任何信息。在本文中,我们证明对于softmax分类器,无论是图像分类器还是自回归语言模型,标签表示(在论文中称为unembedding)之间的余弦相似度不提供模型分配的概率的任何信息。具体地,我们证明给定两个unembedding,可以创建另一个模型,该模型对所有输入分配相同的概率,但表示之间的余弦相似度现在要么是1要么是-1。我们还证明对于sigmoid分类器(其中每个输入可以被分配多个标签),unembedding之间的所有成对余弦相似度定义了可能的标签组合集。然而,对于softmax分类器(其中每个输入被分配从最可能到最不可能的标签排序),我们需要所有unembedding差异之间的所有成对余弦相似度才能知道模型可以预测哪些排序。我们得出结论,在没有参考产生它们的分类器的情况下解释unembedding之间的余弦相似度是具有误导性的。

英文摘要:

Cosine similarity is often used to measure the similarity of vector representations of neural network models. However, the cosine similarity of representations is not guaranteed to tell us anything about model probabilities. In this paper we show that for a softmax classifier, be it an image classifier or an autoregressive language model, the cosine similarity between label representations (called unembeddings in the paper) does not give any information on the probabilities assigned by the model. Specifically, we prove that given two unembeddings, it is possible to create another model which assigns the same probabilities for all inputs, but where the cosine similarity between the representations is now either 1 or -1. We also show that for a sigmoid classifier (where each input can be assigned multiple labels), all pairwise cosine similarities between the unembeddings define the set of possible label combinations. However, for softmax classifiers (where each input is assigned a ranking of the labels from most to least likely), we need all pairwise cosine similarities between all differences of unembeddings to know which rankings the model can predict. We conclude that it is misleading to interpret the cosine similarity between unembeddings without reference to the classifier that produced them.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑