Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Maps
Yung-Sung Chuang, Linlu Qiu, Cheng-Yu Hsieh, Ranjay Krishna, Yoon Kim,, James Glass

TL;DR
This paper introduces Lookback Lens, a simple attention-based method to detect and reduce contextual hallucinations in large language models, improving answer accuracy without extensive retraining.
Contribution
It proposes a novel, efficient hallucination detection method using attention ratios that transfer across models and tasks, and demonstrates its effectiveness in reducing hallucinations.
Findings
Linear classifier using attention ratios matches complex detectors in accuracy.
Lookback Lens transfers across models without retraining.
Decoding guided by the detector reduces hallucinations by 9.6% in summarization.
Abstract
When asked to summarize articles or answer questions given a passage, large language models (LLMs) can hallucinate details and respond with unsubstantiated answers that are inaccurate with respect to the input context. This paper describes a simple approach for detecting such contextual hallucinations. We hypothesize that contextual hallucinations are related to the extent to which an LLM attends to information in the provided context versus its own generations. Based on this intuition, we propose a simple hallucination detection model whose input features are given by the ratio of attention weights on the context versus newly generated tokens (for each attention head). We find that a linear classifier based on these lookback ratio features is as effective as a richer detector that utilizes the entire hidden states of an LLM or a text-based entailment model. The lookback ratio-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsMental Health via Writing · Mental Health Research Topics
MethodsSoftmax · Attention Is All You Need
