校准相似性:用于嵌入空间几何分析的可靠方法
What Does a Cosine of 0.8 Mean? Monotone Calibration of Embedding Similarity
AI总结:
通过单调校准恢复嵌入空间中余弦相似度绝对值的可解释性,同时保持排名相关性和稳定性。
摘要:
尽管预训练嵌入空间中的原始余弦相似性在与人类判断的相关性上表现强劲,但各向异性导致了绝对值的系统性不校准:分数集中在狭窄的高相似性带中,无论实际语义相关性如何,这限制了其作为定量度量的可解释性。先前的工作通过修改嵌入空间(白化、对比度微调)来解决这个问题,但此类变换会改变几何结构,并需要重新计算所有嵌入。利用在人类相似性判断上训练的等比回归,我们构建了一个单调变换,实现了近完美的校准,同时保持了排名相关性和局部稳定性(七种扰动类型中98%)。我们的贡献不是替代余弦相似性,而是通过单调校准恢复其绝对值的可解释性,而不会改变其排名属性。我们把等比校准描述为一种顺序保持的再参数化,并证明了所有基于顺序的构造(角度排序、最近邻、阈值图和分位数决策)在此变换下都是不变的。
英文摘要:
Text embedding models turn sentences into vectors, and the cosine between two vectors is the usual measure of their similarity. Search, semantic caching and deduplication often accept a pair when this cosine reaches a fixed threshold. When people judge one pair of sentences more similar than another, the cosine usually agrees, but its value means different things for different models, because each model packs its scores into its own narrow range. The same threshold can therefore keep most pairs with one model and few with another. We propose to calibrate the score instead of changing the model. An increasing function fitted on sentence pairs rated by people translates the cosine of each model into the human rating scale and never reverses the order of two pairs. We fit three such functions for six models, ranging from a simple S-shaped curve to a free step function. On new pairs, calibrated scores agree with human ratings and the models agree with one another. One threshold selects pairs of similar quality whatever the model. The scale obtained belongs to the human ratings used to fit it, so its values shift on two datasets rated differently while the models stay comparable.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。