atlas

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

Nearest Neighbor Speculative Decoding for LLM Generation and Attribution

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Parallel and early-exit decoding · 1 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 NEST, a training-free semi-parametric LM decoding method that combines two-stage kNN token retrieval, relative retrieval confidence interpolation, and relaxed speculative span acceptance to improve factuality, attribution, and speed of Llama-2-Chat.

Problem

LLMs hallucinate and lack attribution; existing kNN-LM is slow and produces non-fluent text, while in-context retrieval augmentation does not reliably ensure faithful attribution.

Approach

Performs token-level kNN retrieval over an on-the-fly token index built from retrieved passages, uses a relative retrieval confidence score to set the interpolation weight, extends confident tokens into corpus n-gram spans, and accepts span prefixes via a relaxed speculative decoding rule so that generated spans are verbatim corpus text with source attribution.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add Relative Retrieval Confidence to two-stage kNN-LM (ablation)Llama-2-Chat 7B · WikiText-103 validationROUGE-1: 20.1 -> 24.7Helped
Add Relative Retrieval Confidence to two-stage kNN-LM (ablation)Llama-2-Chat 7B · NQ validationanswer-level recall: 40.8 -> 44.4Helped
Add Relative Retrieval Confidence to two-stage kNN-LM (ablation)Llama-2-Chat 7B · Biography validationFActScore: 34.8 -> 41.6Helped
Add dynamic span selection after Relative Retrieval Confidence (ablation)Llama-2-Chat 7B · WikiText-103 validationROUGE-1: 24.7 -> 24.5No clear effect
Add dynamic span selection after Relative Retrieval Confidence (ablation)Llama-2-Chat 7B · NQ validationanswer-level recall: 44.4 -> 44.6No clear effect
Add relaxed speculative decoding after dynamic span selection (ablation)Llama-2-Chat 7B · Biography validationFActScore: 41.6 -> 46.8Helped
Add relaxed speculative decoding after dynamic span selection (ablation)Llama-2-Chat 7B · WikiText-103 validationROUGE-1: 24.5 -> 26.8Helped
Add Nest to the base modelLlama-2-Chat 70B · TruthfulQAΔBLEU: 0.14 -> 0.17Helped
Add Nest to the base modelLlama-2-Chat 70B · BiographyFActScore: 34.2 -> 41.6Helped
Add in-context retrieval augmentation to NestLlama-2-Chat 70B · BiographyFActScore: 41.6 -> 59.2Helped
Add Nest to Llama-2-Chat 70BLlama-2-Chat 70B · Inferencespeedup: 1.8× speedupHelped

Surprising findings

Limitations

Experimental setup

Datasets: Wikipedia 2021 dump (~33M passages) Pile of Law (~15M passages) WikiText-103 Natural Questions TriviaQA HotpotQA MedMCQA Biography (FActScore) TruthfulQA MMLU

Benchmarks: WikiText-103 Pile of Law Natural Questions TriviaQA HotpotQA MedMCQA Biography TruthfulQA MMLU

Metrics: perplexity MAUVE ROUGE-1 ROUGE-2 ROUGE-L answer-level recall FActScore delta BLEU delta ROUGE-1 macro accuracy

Baselines: Llama-2-Chat kNN-LM (two-stage) in-context retrieval augmentation (RA) REST

Builds on: kNN-LM speculative decoding Copy Generator RA-DIT

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