用知识图谱生成语义相似性评测数据,解决人工标注成本高问题。
Semantic-KG: Using Knowledge Graphs to Construct Benchmarks for Measuring Semantic Similarity
- 基于知识图谱自动构建语义相似/不相似句子对
- 在四个领域生成数据,发现方法表现受语义类型和领域影响
- 适合评估大模型生成内容的语义质量,尤其关注领域适配性
评估大语言模型(LLM)生成的开放文本响应通常需测量其与参考答案的语义相似性。然而现有方法可能更关注句法或词汇形式而非语义内容。现有语义等价基准存在生成成本高、依赖主观判断、领域覆盖有限及等价定义不清等问题。本文提出一种新方法,利用知识图谱生成语义相似或不相似的自然语言陈述对,其中不相似对分为四类子类型。我们在通用知识、生物医学、金融和生物学四个领域构建基准数据集,并对比传统NLP评分与大模型作为裁判者的预测性能。结果表明,语义变异类型和基准领域显著影响相似性方法的表现,无单一方法始终最优。研究对大模型作为语义裁判的应用具有重要启示。代码与数据集已开源。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。