In-Context Sharpness as Alerts: An Inner Representation Perspective for Hallucination Mitigation
Shiqi Chen, Miao Xiong, Junteng Liu, Zhengxuan Wu, Teng Xiao, Siyang Gao, Junxian He
Abstract
Large language models (LLMs) frequently hallucinate and produce factual errors, yet our understanding of why they make these errors remains limited. In this study, we delve into the underlying mechanisms of LLM hallucinations from the perspective of inner representations, and discover a salient pattern associated with hallucinations: correct generations tend to have sharper context activations in the hidden states of the in-context tokens, compared to the incorrect ones. Leveraging this insight, we propose an entropy-based metric to quantify the "sharpness" among the in-context hidden states and incorporate it into the decoding process to formulate a constrained decoding approach. Experiments on various knowledge-seeking and hallucination benchmarks demonstrate our approach's consistent effectiveness, for example, achieving up to an 8.6 point improvement on TruthfulQA. We believe this study can improve our understanding of hallucinations and serve as a practical solution for hallucination mitigation. Code is publicly available at https://github.com/hkust-nlp/Activation Decoding .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
10 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Integrative Decoding: Improving Factuality via Implicit Self-consistency cites Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs
- Integrative Decoding: Improving Factuality via Implicit Self-consistency cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
- Integrative Decoding: Improving Factuality via Implicit Self-consistency cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites Locating and Editing Factual Associations in GPT
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
- Investigating Hallucinations of Time Series Foundation Models through Signal Subspace Analysis cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
- Understanding and Mitigating Hallucinations in Multimodal Chain-of-Thought Models cites Look Twice Before You Answer: Memory-Space Visual Retracing for Hallucination Mitigation in Multimodal Large Language Models
Cited by top-tier papers10
- Beyond In-Domain Detection: SpikeScore for Cross-Domain Hallucination DetectionYongxin Deng, Zhen Fang, Sharon Li, Ling ChenICLR 2026 · 5 citations
- Understanding and Mitigating Hallucinations in Multimodal Chain-of-Thought ModelsJi Ma, Wei Suo, Peng Wang, Yanning ZhangCVPR 2026 · 3 citations
- Investigating Hallucinations of Time Series Foundation Models through Signal Subspace AnalysisYufeng Zou, Zijian Wang, Diego Klabjan, Han LiuNeurIPS 2025 · 2 citations
- Look Twice Before You Answer: Memory-Space Visual Retracing for Hallucination Mitigation in Multimodal Large Language ModelsXin Zou, Yizhou Wang, Yibo Yan, Yuanhuiyi Lyu et al.ICML 2025 · 1 citation
- Integrative Decoding: Improving Factuality via Implicit Self-consistencyYi Cheng, Xiao Liang, Yeyun Gong, Wen Xiao et al.ICLR 2025 · 1 citation
Builds on16
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 citations
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-ReflectionAkari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil et al.ICLR 2024 · 1,798 citations
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister et al.NeurIPS 2023 · 1,549 citations
- Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMsMiao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li et al.ICLR 2024 · 867 citations
Related papers
- SH2: Self-Highlighted Hesitation Helps You Decode More TruthfullyJushi Kai, Tianhang Zhang, Hai Hu, Zhouhan LinEMNLP Findings 2024 · 5 citations
- Mixture of Decoding: An Attention-Inspired Adaptive Decoding Strategy to Mitigate Hallucinations in Large Vision-Language ModelsXinlong Chen, Yuanxing Zhang, Qiang Liu, Junfei Wu et al.ACL Findings 2025 · 2 citations
- LLMs Know More Than They Show: On the Intrinsic Representation of LLM HallucinationsHadas Orgad, Michael Toker, Zorik Gekhman, Roi Reichart et al.ICLR 2025
- Attributive Reasoning for Hallucination Diagnosis of Large Language ModelsYuyan Chen, Zehao Li, Shuangjie You, Zhengyu Chen et al.AAAI 2025 · 33 citations
- Activation Steering Decoding: Mitigating Hallucination in Large Vision-Language Models through Bidirectional Hidden State InterventionJingran Su, Jingfan Chen, Hongxin Li, Yuntao Chen et al.ACL 2025 · 24 citations
