Gamma Mixture Modeling for Cosine Similarity in Small Language Models

Kevin Player
10/6/2025
cs.LG

No confident code implementation found for this paper.

Abstract

We study the cosine similarity of sentence transformer embeddings and observe that they are well modeled by gamma mixtures. From a fixed corpus, we measure similarities between all document embeddings and a reference query embedding. Empirically we find that these distributions are often well captured by a gamma distribution shifted and truncated to [-1,1], and in many cases, by a gamma mixture. We propose a heuristic model in which a hierarchical clustering of topics naturally leads to a gamma-mixture structure in the similarity scores. Finally, we outline an expectation-maximization algorithm for fitting shifted gamma mixtures, which provides a practical tool for modeling similarity distributions.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{player2025gamma,
  title  = {Gamma Mixture Modeling for Cosine Similarity in Small Language Models},
  author = {Kevin Player},
  year   = {2025},
  eprint = {2510.05309},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.05309v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.05309.svg)](https://codeofpaper.com/paper/2510.05309)

Discussion