atlas

Research map / Large language models / Retrieval and knowledge

DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models

ICLR 2024 · Large language models › Retrieval and knowledge · approach: Knowledge editing in LLMs · 22 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 DoLa, a training-free decoding method that contrasts logits from a dynamically selected early layer against the final layer to reduce hallucinations in LLaMA models.

Problem

LLMs hallucinate, generating content that deviates from facts learned during pretraining; existing mitigations rely on retrieval, fine-tuning, or human labels.

Approach

Factual knowledge emerges in higher layers, so the next-token distribution is obtained by contrasting log-probabilities of the final (mature) layer against a premature layer chosen per step by maximum Jensen-Shannon divergence within layer buckets, with an adaptive plausibility constraint. It needs no retrieval or fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply DoLa decodingLLaMA-7B · TruthfulQA MCMC2: 40.6 -> 63.8Helped
Apply DoLa decodingLLaMA-7B · FACTOR Newsaccuracy: 58.3 -> 62.0Helped
Apply DoLa decodingLLaMA-7B · TruthfulQA open-ended%Truth: 30.4 -> 42.1Helped
Apply DoLa decodingLLaMA-7B · StrategyQAaccuracy: 60.1 -> 64.1Helped
Apply DoLa decodingLLaMA-7B · GSM8Kaccuracy: 10.8 -> 10.5Hurt
Use fixed premature-layer selection rather than dynamic selection (ablation)DoLa on LLaMA-7B · TruthfulQA MCMC2: 63.8 -> 68.3Helped
Replace JSD-based selection with random layer selection (ablation)DoLa on LLaMA-7B · FACTOR Newsaccuracy: 58.3 -> 60.0, compared with DoLa 62.0Hurt
Apply post-softmax to the contrast distribution (ablation)DoLa on LLaMA-7B · TruthfulQA MCMC2: 63.8 -> 52.2Hurt
Contrast only with the word embedding layer (ablation)DoLa on LLaMA-7B · TruthfulQA MCMC2: 63.8 -> 61.7Hurt
Select dynamically from all early even-numbered layers (ablation)DoLa on LLaMA-7B · TruthfulQA MCMC2: 63.8 -> 63.9No clear effect
Apply DoLa decoding (ablation)GPT2-Medium · TruthfulQA MCMC1: 23.5 -> 22.9Hurt
Apply a repetition penalty (ablation)DoLa · StrategyQA and GSM8KaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: TruthfulQA FACTOR StrategyQA GSM8K Vicuna QA CoNLL-2003

Benchmarks: TruthfulQA FACTOR StrategyQA GSM8K Vicuna QA

Metrics: MC1 MC2 MC3 %Truth %Info %Truth*Info %Reject accuracy GPT-4 pairwise score

Baselines: Original greedy decoding Contrastive Decoding (CD) Inference Time Intervention (ITI) DoLa-static

Builds on: Contrastive Decoding early exit adaptive plausibility constraint Inference Time Intervention

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