arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.19925cs.AI
收藏

基于知识图谱构建衡量语义相似度的基准

Semantic-KG: Using Knowledge Graphs to Construct Benchmarks for Measuring Semantic Similarity

University of Cambridge(剑桥大学)

Qiyao Wei, Edward Morrell, Lea Goetz, Mihaela van der Schaar

AI总结:

本文提出利用知识图谱构建语义相似度基准,通过生成不同领域的语义相似和不相似陈述对,评估多种语义相似度方法的性能,揭示领域和语义变化类型对方法效果的影响。

摘要:

评估大型语言模型(LLM)生成的开放式文本响应通常需要测量响应与人类生成参考的语义相似度。然而,有证据表明,当前的语义相似度方法可能更关注语法或词汇形式而非语义内容。尽管已有用于语义等价性的基准,但它们通常因依赖主观人类判断、领域特定应用的可用性有限以及等价定义不明确而面临高生成成本。本文介绍了一种生成基准的方法,用于评估语义相似度方法在LLM输出中的表现,特别针对这些限制。我们的方法利用知识图谱(KGs)生成语义相似或不相似的自然语言陈述对,不相似对被分为四种子类型之一。我们在四个不同领域(一般知识、生物医学、金融、生物学)生成基准数据集,并对包括传统自然语言处理得分和LLM作为判断者的预测在内的语义相似度方法进行了比较研究。我们发现,语义变化的子类型以及基准的领域会影响语义相似度方法的性能,没有方法始终优于其他方法。我们的结果对使用LLM作为判断者检测文本的语义内容具有重要意义。代码可在https://github.com/QiyaoWei/semantic-kg上获得,数据集可在https://huggingface.co/datasets/QiyaoWei/Semantic-KG上获得。

英文摘要:

Evaluating the open-form textual responses generated by Large Language Models (LLMs) typically requires measuring the semantic similarity of the response to a (human generated) reference. However, there is evidence that current semantic similarity methods may capture syntactic or lexical forms over semantic content. While benchmarks exist for semantic equivalence, they often suffer from high generation costs due to reliance on subjective human judgment, limited availability for domain-specific applications, and unclear definitions of equivalence. This paper introduces a novel method for generating benchmarks to evaluate semantic similarity methods for LLM outputs, specifically addressing these limitations. Our approach leverages knowledge graphs (KGs) to generate pairs of natural-language statements that are semantically similar or dissimilar, with dissimilar pairs categorized into one of four sub-types. We generate benchmark datasets in four different domains (general knowledge, biomedicine, finance, biology), and conduct a comparative study of semantic similarity methods including traditional natural language processing scores and LLM-as-a-judge predictions. We observe that the sub-type of semantic variation, as well as the domain of the benchmark impact the performance of semantic similarity methods, with no method being consistently superior. Our results present important implications for the use of LLM-as-a-judge in detecting the semantic content of text. Code is available at https://github.com/QiyaoWei/semantic-kg and the dataset is available at https://huggingface.co/datasets/QiyaoWei/Semantic-KG.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑