大语言模型的内部状态知道它何时在撒谎
The Internal State of an LLM Knows When It's Lying
AI总结:
本研究利用LLM内部隐藏层状态训练分类器,以高准确率检测陈述真伪,较基于概率的方法更可靠,可提升生成内容可信度。
摘要:
尽管大型语言模型(LLM)在各种任务中表现出卓越的性能,但其中一个最突出的缺点是它们以自信的语气生成不准确或虚假的信息。在本文中,我们提供了证据表明,LLM的内部状态可用于揭示陈述的真实性。这包括提供给LLM的陈述,以及LLM自身生成的陈述。我们的方法是训练一个分类器,该分类器基于LLM在阅读或生成陈述时的隐藏层激活,输出该陈述为真实的概率。实验表明,给定一组测试句子,其中一半为真、一半为假,我们训练的分类器根据LLM基础模型的不同,平均能达到71%至83%的准确率来标记哪些句子为真、哪些为假。此外,我们探讨了我们的分类器性能与基于LLM分配给句子概率的方法之间的关系。我们表明,虽然LLM分配的句子概率与句子真实性相关,但该概率也依赖于句子长度和句子中单词的频率,导致我们训练的分类器提供了一种更可靠的检测真实性的方法,突显了其在增强LLM生成内容可靠性方面的潜力及其在现实场景中的实际适用性。
英文摘要:
While Large Language Models (LLMs) have shown exceptional performance in various tasks, one of their most prominent drawbacks is generating inaccurate or false information with a confident tone. In this paper, we provide evidence that the LLM's internal state can be used to reveal the truthfulness of statements. This includes both statements provided to the LLM, and statements that the LLM itself generates. Our approach is to train a classifier that outputs the probability that a statement is truthful, based on the hidden layer activations of the LLM as it reads or generates the statement. Experiments demonstrate that given a set of test sentences, of which half are true and half false, our trained classifier achieves an average of 71\% to 83\% accuracy labeling which sentences are true versus false, depending on the LLM base model. Furthermore, we explore the relationship between our classifier's performance and approaches based on the probability assigned to the sentence by the LLM. We show that while LLM-assigned sentence probability is related to sentence truthfulness, this probability is also dependent on sentence length and the frequencies of words in the sentence, resulting in our trained classifier providing a more reliable approach to detecting truthfulness, highlighting its potential to enhance the reliability of LLM-generated content and its practical applicability in real-world scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。