HackerPapers

arXiv:2304.13734cs.CL

The Internal State of an LLM Knows When It's Lying

Amos Azaria, Tom Mitchell

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 7 identifiable commenters in 10 comments across 10 threads, from Jun 2023 to Feb 2026. Found in 3 HN submissions from May 2023 to Nov 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments10 threads

    • https://arxiv.org/abs/2304.13734 LLMs have an inner/internal state. Deep neural networks are weird and there is a lot going on in them that makes them very different from the state machines we're used to in binary programs.

      pixl97View on HNParent context

    • Related: GPT-4 logits calibration pre RLHF - https://imgur.com/a/3gYel9r Language Models (Mostly) Know What They Know - https://arxiv.org/abs/2207.05221 The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasets…

      famouswafflesView on HNParent context

  1. GPTs and Hallucination 1 comment
    • Pretty much all research (and there's a fair few with different methodologies) on this converge on the same conclusion: LLMs internally know a lot more about the uncertainty and factualness of their predictions than they say. "LLMs are always hallucinating" is a popular stance…

      famouswafflesView on HNParent context

    • That would be a huge result it if works. The paper: "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…

      AnimatsView on HNParent context

    • That's not true. There's been several papers probing this with different methodologies and the conclusion is pretty clear. LLMs know a whole lot more about the uncertainty of their predictions than they say. GPT-4 logits calibration pre RLHF - https://imgur.com/a/3gYel9r…

      famouswafflesView on HNParent context

    • I believe the paper to be cited is "The Internal State of an LLM Knows When It's Lying", published last year: https://arxiv.org/abs/2304.13734

      sanxiynView on HNParent context

    • There are multiple papers and efforts that have inspected the internal state of LLMs. One could even see the word2vec analysis along these lines, as evidence that the model is specializing neurons One such example: The Internal State of an LLM Knows When It's Lying…

      verdvermView on HNParent context

    • The drafts have to be evaluated either by a human or llm. Doing that for every request does not scale when you have millions of users. >Just do the comparison on the user’s machine if the LLM provider is that cheap. This is not possible. Users don't have the resources to run…

      famouswafflesView on HNParent context

    • Well it does have concept of right and wrong, as evidenced here https://chat.openai.com/share/e117e800-f579-4eec-9192-e9912f... you can ask it wrong answers only and it will oblige. Correctness is something it learns. I've read a few papers about hallucinations, and the jury is…

      avereveardView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.