arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.02603cs.CLcs.AIstat.ML

FactTest:具有有限样本和无分布保证的大语言模型事实性测试

FactTest: Factuality Testing in Large Language Models with Finite-Sample and Distribution-Free Guarantees

Stanford University(斯坦福大学);Rutgers University(罗格斯大学);UNC-Chapel Hill(北卡罗来纳大学教堂山分校)

Fan Nie, Xiaotian Hou, Shuhang Lin, James Zou, Huaxiu Yao, Linjun Zhang

AI总结:

FactTest框架通过假设检验为LLM事实性提供有限样本无分布保证,控制第一类错误并改善弃权(不执行)行为,在QA和多项选择基准上实现超40%准确率提升。

摘要:

大语言模型(LLM)产生幻觉和非事实内容的倾向削弱了其在高风险领域的可靠性,在这些领域中,对第一类错误(错误地将幻觉分类为真实内容的条件概率)进行严格控制至关重要。尽管其重要性不言而喻,但具有此类保证的LLM事实性的形式化验证在很大程度上仍未得到探索。在本文中,我们引入了FactTest,这是一种新颖的框架,用于统计评估LLM是否能够以高概率的正确性保证自信地为给定问题提供正确答案。我们将事实性测试表述为假设检验问题,以在用户指定的显著性水平上强制实施第一类错误的上界。值得注意的是,我们证明了我们的框架在温和条件下还能确保强第二类错误控制,并且可以扩展以在存在协变量偏移时保持其有效性。我们的方法是无分布的,适用于任意数量的人工标注样本。它是模型无关的,适用于任何黑盒或白盒语言模型。在问答(QA)和多项选择基准上的大量实验表明,FactTest能有效检测幻觉,并提高模型对未知问题弃权(不执行)回答的能力,从而带来超过40%的准确率提升。

英文摘要:

The propensity of Large Language Models (LLMs) to generate hallucinations and non-factual content undermines their reliability in high-stakes domains, where rigorous control over Type I errors (the conditional probability of incorrectly classifying hallucinations as truthful content) is essential. Despite its importance, formal verification of LLM factuality with such guarantees remains largely unexplored. In this paper, we introduce FactTest, a novel framework that statistically assesses whether a LLM can confidently provide correct answers to given questions with high-probability correctness guarantees. We formulate factuality testing as hypothesis testing problem to enforce an upper bound of Type I errors at user-specified significance levels. Notably, we prove that our framework also ensures strong Type II error control under mild conditions and can be extended to maintain its effectiveness when covariate shifts exist. Our approach is distribution-free and works for any number of human-annotated samples. It is model-agnostic and applies to any black-box or white-box LM. Extensive experiments on question-answering (QA) and multiple-choice benchmarks demonstrate that FactTest effectively detects hallucinations and improves the model's ability to abstain from answering unknown questions, leading to an over 40% accuracy improvement.

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

↑