[Submitted on 3 Oct 2024 (v1), last revised 28 Oct 2024 (this version, v3)]
View PDF
HTML (experimental)
Abstract:Large language models (LLMs) often produce errors, including factual inaccuracies, biases, and reasoning failures, collectively referred to as “hallucinations”. Recent studies have demonstrated that LLMs’ internal states encode information regarding the truthfulness of their outputs, and that this information can be utilized to detect errors. In this work, we show that the internal representations of LLMs encode much more information about truthfulness than previously recognized. We first discover that the truthfulness information is concentrated in specific tokens, and leveraging this property significantly enhances error detection performance. Yet, we show that such error detectors fail to generalize across datasets, implying that — contrary to prior claims — truthfulness encoding is not universal but rather multifaceted. Next, we show that internal representations can also be used for predicting the types of errors the model is likely to make, facilitating the development of tailored mitigation strategies. Lastly, we reveal a discrepancy between LLMs’ internal encoding and external behavior: they may encode the correct answer, yet consistently generate an incorrect one. Taken together, these insights deepen our understanding of LLM errors from the model’s internal perspective, which can guide future research on enhancing error analysis and mitigation.
Submission history
From: Hadas Orgad [view email]
[v1]
Thu, 3 Oct 2024 17:31:31 UTC (2,525 KB)
[v2]
Mon, 7 Oct 2024 14:46:11 UTC (2,530 KB)
[v3]
Mon, 28 Oct 2024 12:33:44 UTC (2,360 KB)