LLMs Know More Than They Show: On the Intrinsic Representation of LLM Hallucinations

Hadas Orgad, Michael Toker, Zorik Gekhman, Roi Reichart, Idan Szpektor, Hadas Kotek, Yonatan Belinkov

arXiv:2410.02707 · 2026-07-27 공개 · arXiv · PDF

error-detection internal-representations representation-analysis llm-hallucinations llm-errors truthfulness-encoding error-types model-mitigation

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.

한국어 요약

한 줄 요약

LLMs는 내부 표현에 사실성 정보를 다량 포함하고 있으나, 이 정보는 특정 토큰에 집중되어 있으며, 태스크별로 일반화되지 않는다.

핵심 기여도

핵심 아이디어

LLMs는 내부 표현에 오류에 대한 정보를 풍부하게 포함하고 있지만, 이 정보는 단순히 전체 표현에 퍼져 있는 것이 아니라 특정 토큰(예: 정답 토큰)에 집중되어 있다는 점이 핵심 발견이다. 이는 기존의 오류 탐지 연구가 전체 표현을 사용한 반면, 본 연구는 정답 토큰에 집중함으로써 성능을 크게 향상시켰다. 또한, 오류 탐지기는 특정 태스크(예: 사실 추출)에서만 효과적이며, 다른 태스크(예: 감성 분석)에서는 일반화되지 않는다는 점에서, 사실성 인코딩이 "스킬-특이적(skill-specific)"임을 밝혔다. 이는 LLMs가 단일한 "보편적 사실성(universal truthfulness)"을 인코딩하지 않고, 다양한 태스크마다 다른 사실성 개념을 갖는다는 의미이다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 LLMs의 내부 표현을 통해 오류를 이해하고 완화할 수 있음을 보여, 오류 분석의 새로운 접근법을 제시한다. 특히, 오류 유형을 예측함으로써 태스크별 맞춤형 완화 전략을 개발할 수 있다는 점에서 실용적 가치가 있다. 그러나, 오류 탐지기는 태스크 간 일반화되지 않으며, 이는 사실성 인코딩이 다면적임을 의미한다. 또한, 연구는 QA 태스크에 초점을 맞추었으며, open-ended 생성 작업에는 적용 범위가 제한된다. 이는 추후 연구에서 보완할 필요가 있다.

실용적 활용

의료, 법률 등 오류 감지가 중요한 분야에서, probing classifier를 활용해 오류 유형을 예측하고, 재샘플링된 응답 중 정답을 선택하는 방식으로 신뢰도를 높일 수 있다. 또한, 내부 표현 분석을 통해 LLMs의 내재된 지식을 활용한 오류 완화 전략을 개발할 수 있다.