What Cosine Similarity of Label Representations Can and Cannot Tell us
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 13 of its 22 references that are in the map. First posted on arXiv 31 Mar 2026.
Builds on
13 of 22 references.
References · 13
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2020On Linear Identifiability of Learned Representationscited by 103
- 2024Is Cosine-Similarity of Embeddings Really About Similarity?cited by 89
- 2024Fishing for Magikarp: Automatically Detecting Under-trained Tokens in Large Language Modelscited by 45
- 2025Shared Global and Local Geometry of Language Model Embeddingscited by 34
- 2022Low-Rank Softmax Can Have Unargmaxable Classes in Theory but Rarely in Practicecited by 14
- 2023Taming the Sigmoid Bottleneck: Provably Argmaxable Sparse Multi-Label Classificationcited by 11
1 more
Built on by
Citing papers per year: 2026: 1.
1 paper.