arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.12830cs.CLcs.AIcs.LG
收藏

大语言模型基于知识的一致性测试

Knowledge-based Consistency Testing of Large Language Models

Singapore University of Technology and Design, Singapore(新加坡科技设计大学);Royal Holloway, University of London, UK(伦敦大学皇家霍洛威学院)

Sai Sathiesh Rajan, Ezekiel Soremekun, Sudipta Chattopadhyay

AI总结:

本文提出自动化测试框架KonTest,利用知识图谱构建测试用例,通过语义等价查询和测试预言机探测大语言模型的不一致性,并采用加权模型集成缓解知识差距,实验证明其能有效发现并降低模型的错误与知识差距。

摘要:

在这项工作中,我们系统地揭示并测量了大语言模型(LLMs)的不一致性和知识差距。具体而言,我们提出了一个自动化测试框架(称为KonTest),该框架利用知识图谱来构建测试用例。KonTest通过结合语义等价查询和测试预言机(蜕变预言机或本体预言机),探测并测量LLM在世界知识中的不一致性。KonTest进一步通过加权LLM模型集成来缓解知识差距。使用四个最先进的LLMs(Falcon、Gemini、GPT3.5和Llama2),我们展示了KonTest生成了19.2%的诱发错误的输入(从9979个测试输入中产生1917个错误)。它还揭示了所有测试LLMs中存在16.5%的知识差距。由KonTest测试套件指导的缓解方法将LLM知识差距降低了32.48%。我们的消融研究进一步表明,GPT3.5不适用于基于知识的一致性测试,因为其在知识构建方面仅有60%-68%的有效性。

英文摘要:

In this work, we systematically expose and measure the inconsistency and knowledge gaps of Large Language Models (LLMs). Specifically, we propose an automated testing framework (called KonTest) which leverages a knowledge graph to construct test cases. KonTest probes and measures the inconsistencies in the LLM's knowledge of the world via a combination of semantically-equivalent queries and test oracles (metamorphic or ontological oracle). KonTest further mitigates knowledge gaps via a weighted LLM model ensemble. Using four state-of-the-art LLMs (Falcon, Gemini, GPT3.5, and Llama2), we show that KonTest generates 19.2% error inducing inputs (1917 errors from 9979 test inputs). It also reveals a 16.5% knowledge gap across all tested LLMs. A mitigation method informed by KonTest's test suite reduces LLM knowledge gap by 32.48%. Our ablation study further shows that GPT3.5 is not suitable for knowledge-based consistency testing because it is only 60%-68% effective in knowledge construction.

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

↑