arXiv:2509.19323cs.CLcs.AI2025-09被引 2

提出新型向量相似度度量,更好融合向量大小与方向信息。

Magnitude Matters: a Superior Class of Similarity Metrics for Holistic Semantic Understanding

  • 设计两种无需参数的幅度感知相似度函数:重叠相似度与双曲正切相似度。
  • 在8个基准上验证,对语义理解任务误差显著低于点积与余弦相似度。
  • 适合需要整体语义理解的任务,如句子改写与推理判断。

高维向量比较是自然语言处理中的基础任务,当前主要依赖点积(无界且敏感于向量范数)和余弦相似度(完全忽略幅度信息)。本文提出并严格评估一类无需参数、能感知幅度的新相似度度量。引入两种函数:重叠相似度(OS)与双曲正切相似度(HTS),更合理地融合向量大小与对齐关系。使用四种先进句向量模型(all-MiniLM-L6-v2、all-mpnet-base-v2、paraphrase-mpnet-base-v2、BAAI/bge-large-en-v1.5),在八个标准NLP基准(包括STS-B、SICK、Quora、PAWS)上进行全面评估。通过威尔科xon符号秩检验确认统计显著性:在需要整体语义理解的任务(如改写与推理)中,OS与HTS在均方误差上显著优于点积与余弦相似度,且不依赖具体嵌入模型。关键发现是:该优势仅出现在整体语义理解任务,而组合语义精细任务(如SICK、STS-B)未见提升,表明组合文本建模是未来重要研究方向。

原文摘要 · Abstract (English)

Vector comparison in high dimensions is a fundamental task in NLP, yet it is dominated by two baselines: the raw dot product, which is unbounded and sensitive to vector norms, and the cosine similarity, which discards magnitude information entirely. This paper challenges both standards by proposing and rigorously evaluating a new class of parameter-free, magnitude-aware similarity metrics. I introduce two such functions, Overlap Similarity (OS) and Hyperbolic Tangent Similarity (HTS), designed to integrate vector magnitude and alignment in a more principled manner. To ensure that my findings are robust and generalizable, I conducted a comprehensive evaluation using four state-of-the-art sentence embedding models (all-MiniLM-L6-v2, all-mpnet-base-v2, paraphrase-mpnet-base-v2, and BAAI/bge-large-en-v1.5) across a diverse suite of eight standard NLP benchmarks, including STS-B, SICK, Quora, and PAWS. Using the Wilcoxon signed-rank test for statistical significance, my results are definitive: on the tasks requiring holistic semantic understanding (paraphrase and inference), both OS and HTS provide a statistically significant improvement in Mean Squared Error over both the raw dot product and cosine similarity, regardless of the underlying embedding model.Crucially, my findings delineate the specific domain of advantage for these metrics: for tasks requiring holistic semantic understanding like paraphrase and inference, my magnitude-aware metrics offer a statistically superior alternative. This significant improvement was not observed on benchmarks designed to test highly nuanced compositional semantics (SICK, STS-B), identifying the challenge of representing compositional text as a distinct and important direction for future work.

相似度度量语义理解向量表示

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。