Skip to main content
QUICK REVIEW

[论文解读] Surpassing Cosine Similarity for Multidimensional Comparisons: Dimension Insensitive Euclidean Metric

Federico Tessari, Yao, Kunpeng|arXiv (Cornell University)|Jul 11, 2024
Face and Expression Recognition被引用 4
一句话总结

本文提出了维度无关欧几里得度量(DIEM),这是一种新颖的相似性度量方法,通过以保持高维空间可解释性的方式对向量长度和方向进行归一化,克服了余弦相似性中固有的维度偏差。DIEM在多维比较中表现出更优的鲁棒性和一致性,在理论分析以及在大语言模型中的应用中均优于余弦相似性。

ABSTRACT

Advances in computational power and hardware efficiency have enabled tackling increasingly complex, high-dimensional problems. While artificial intelligence (AI) achieves remarkable results, the interpretability of high-dimensional solutions remains challenging. A critical issue is the comparison of multidimensional quantities, essential in techniques like Principal Component Analysis. Metrics such as cosine similarity are often used, for example in the development of natural language processing algorithms or recommender systems. However, the interpretability of such metrics diminishes as dimensions increase. This paper analyzes the effects of dimensionality, revealing significant limitations of cosine similarity, particularly its dependency on the dimension of vectors, leading to biased and poorly interpretable outcomes. To address this, we introduce a Dimension Insensitive Euclidean Metric (DIEM) which demonstrates superior robustness and generalizability across dimensions. DIEM maintains consistent variability and eliminates the biases observed in traditional metrics, making it a reliable tool for high-dimensional comparisons. An example of the advantages of DIEM over cosine similarity is reported for a large language model application. This novel metric has the potential to replace cosine similarity, providing a more accurate and insightful method to analyze multidimensional data in fields ranging from neuromotor control to machine learning.

研究动机与目标

  • 为解决机器学习和人工智能应用中高维数据解释日益增长的挑战。
  • 识别并解决传统相似性度量(如余弦相似性)中的维度偏差问题。
  • 开发一种稳健且可泛化的度量方法,无论向量维度如何变化,均能保持一致的可解释性。
  • 为主成分分析、自然语言处理和推荐系统提供余弦相似性的可靠替代方案。
  • 通过理论分析和在大语言模型中的实际应用验证新度量方法。

提出的方法

  • DIEM 度量通过使用与维度无关的缩放因子对向量之间的欧几里得距离进行归一化而推导得出,该因子考虑了高维空间中随机向量的期望长度。
  • 通过结合归一化的向量模长和角度差异,重新定义相似性,确保该度量在不同维度下保持稳定。
  • 该方法引入了一个基于卡方分布的校正项,用于建模标准正态向量在 d 个维度下的期望范数,从而消除维度相关的偏差。
  • DIEM 设计为计算高效,并与现有机器学习流程兼容,集成时仅需极少修改。
  • 该度量通过理论边界的分析和在合成数据集与真实数据集上的实证比较进行了分析推导与验证。
  • 该方法通过大语言模型应用进行评估,展示了在嵌入比较中更高的稳定性和可解释性。

实验结果

研究问题

  • RQ1随着向量维度的增加,余弦相似性的性能如何退化?
  • RQ2能否设计一种相似性度量方法,使其在不同维度下均保持一致的可解释性?
  • RQ3何种数学变换可消除向量相似性度量中的维度偏差?
  • RQ4在高维嵌入空间中,特别是自然语言处理任务中,DIEM 与余弦相似性相比表现如何?
  • RQ5DIEM 在真实机器学习应用中,对多维比较的可靠性提升程度如何?

主要发现

  • DIEM 消除了余弦相似性中固有的维度偏差,该偏差在高维空间中系统性地低估了相似性。
  • 该度量在不同维度下保持一致的变异性,确保无论向量长度或维度数量如何,相似性评分均稳定且可解释。
  • 在大语言模型应用中,DIEM 表现出比余弦相似性更可靠、更一致的嵌入比较结果。
  • 理论分析证实,DIEM 的期望值在维度变化下保持不变,而余弦相似性则不然。
  • 在合成实验和真实世界自然语言处理任务中,DIEM 均优于余弦相似性,表现出更高的鲁棒性和泛化能力。
  • 基于卡方分布的校正因子有效归一化了向量范数,消除了高维相似性度量中主要的偏差来源。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。