atlas

Research map / Large language models / Language, safety and interpretability

In-Context Sharpness as Alerts: An Inner Representation Perspective for Hallucination Mitigation

ICML 2024 · Large language models › Language, safety and interpretability · approach: Task vectors and steering · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Activation Decoding, a constrained decoding method that penalizes next-token candidates whose activations over the in-context prompt tokens have high entropy (low "in-context sharpness"), to reduce hallucinations.

Problem

LLMs frequently hallucinate factual errors, and it is unclear what in their inner representations signals correctness; existing mitigation often needs external knowledge, fine-tuning, or labeled data.

Approach

Correct generations show sharper (lower-entropy) activations over in-context tokens in intermediate layers; the paper defines a contextual entropy metric by projecting hidden states to vocabulary via the LM head, normalizing over prompt positions, and uses it as a penalty term in decoding, with entropies precomputed per vocabulary token.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add contextual entropy penalty during decodingLLaMA2-chat models · TruthfulQA open-endedTruth*Info: 55.8 -> 59.1; 57.5 -> 62.3; 47.1 -> 55.7Helped
Add contextual entropy penalty during decodingLLaMA2-7B-chat · TriviaQAF1 score: 44.3 -> 46.4Helped
Add contextual entropy penalty during decodingLLaMA2-13B-chat · HotpotQAF1 score: 21.7 -> 26.4Helped
Add contextual entropy penalty during decodingLLaMA2-70B-chat · Natural QuestionsF1 score: 34.1 -> 37.8Helped
Combine Activation Decoding with DolaLLaMA2-chat · Knowledge-seeking datasetsF1 score: TriviaQA 7B: 46.4 -> 46.5; HotpotQA 13B: 26.4 -> 26.2; NQ 70B: 37.8 -> 37.6Mixed
Add Activation Decoding to LLaMA2-70B-chatLLaMA2-70B-chat · TruthfulQA open-ended%Truth: 68.8 -> 65.7Hurt
Add Activation Decoding to LLaMA2-70B-chatLLaMA2-70B-chat · TruthfulQA open-ended%Info: 78.3 -> 90.0Helped
Use entropy score alone for classification (ablation)LLaMa-2-7B · TruthfulQA multiple-choiceMC2: 43.4 -> 61.1Helped
Use entropy score alone for classification (ablation)LLaMa-2-7B · TruthfulQA multiple-choiceMC1: 28.5 -> 27.1Hurt
Use the 26th informative layer instead of the 24th (ablation)LLaMa-2-7B · TruthfulQA multiple-choiceMC2: 46.9 -> 45.3Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CounterFact TruthfulQA TriviaQA HotpotQA Natural Questions

Benchmarks: TruthfulQA TriviaQA HotpotQA Natural Questions CounterFact (GF-CFT, Raw-CFT for AUROC analysis)

Metrics: Truth*Info %Truth %Info %Reject MC1 MC2 MC3 Exact Match F1 AUROC

Baselines: Greedy decoding DoLa ITI Self-eval

Builds on: DoLa Inference-time Intervention (ITI) logit lens projection

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy