Lune

ACL2023Top-tier venue

Contrastive Decoding: Open-ended Text Generation as Optimization

Xiang Lisa Li, Ari Holtzman, Daniel Fried, Percy Liang, Jason Eisner, Tatsunori Hashimoto, Luke Zettlemoyer, Mike Lewis

Abstract

Given a language model (LM), maximum probability is a poor decoding objective for open-ended generation, because it produces short and repetitive text. On the other hand, sampling can often produce incoherent text that drifts from the original topics. We propose contrastive decoding (CD), a reliable decoding approach that optimizes a contrastive objective subject to a plausibility constraint. The contrastive objective returns the difference between the likelihood under a large LM (called the expert, e.g. OPT-13B) and a small LM (called the amateur, e.g. OPT-125M), and the constraint ensures that the outputs are plausible. CD is inspired by the fact that the failures of larger LMs (e.g., repetition, incoherence) are even more prevalent in smaller LMs, and that this difference signals which texts should be preferred. CD requires zero additional training, and produces higher quality text than decoding from the larger LM alone. It also works across model scales (OPT-13B and GPT2-1.5B) and significantly outperforms four strong decoding algorithms (e.g., nucleus, top-k) in automatic and human evaluations across wikipedia, news and story domains. 1

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.

252 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Neural Text Generation With Unlikelihood Training cites The Curious Case of Neural Text Degeneration
  • The Curious Case of Neural Text Degeneration cites Neural Text Generation With Unlikelihood Training
  • MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers cites Neural Text Generation With Unlikelihood Training
  • MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers cites The Curious Case of Neural Text Degeneration
  • Chain-of-Thought Reasoning Without Prompting cites The Curious Case of Neural Text Degeneration
  • A Contrastive Framework for Neural Text Generation cites Neural Text Generation With Unlikelihood Training
  • A Contrastive Framework for Neural Text Generation cites MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers
  • A Contrastive Framework for Neural Text Generation cites The Curious Case of Neural Text Degeneration
  • On the Reliability of Watermarks for Large Language Models cites Neural Text Generation With Unlikelihood Training
  • On the Reliability of Watermarks for Large Language Models cites MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers
  • On the Reliability of Watermarks for Large Language Models cites A Contrastive Framework for Neural Text Generation
  • On the Reliability of Watermarks for Large Language Models cites The Curious Case of Neural Text Degeneration
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers252

  1. DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language ModelsYung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim et al.ICLR 2024 · 354 citations
  2. Guiding a Diffusion Model with a Bad Version of ItselfTero Karras, Miika Aittala, Tuomas Kynkäänniemi, Jaakko Lehtinen et al.NeurIPS 2024 · 338 citations
  3. Chain-of-Thought Reasoning Without PromptingXuezhi Wang, Denny ZhouNeurIPS 2024 · 305 citations
  4. Spotting LLMs With Binoculars: Zero-Shot Detection of Machine-Generated TextAbhimanyu Hans, Avi Schwarzschild, Valeriia Cherepanova, Hamid Kazemi et al.ICML 2024 · 262 citations
  5. On the Reliability of Watermarks for Large Language ModelsJohn Kirchenbauer, Jonas Geiping, Yuxin Wen, Manli Shu et al.ICLR 2024 · 202 citations

Builds on9

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  2. SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
  3. Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan et al.ICLR 2020 · 683 citations
  4. MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence FrontiersKrishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun et al.NeurIPS 2021 · 606 citations
  5. A Contrastive Framework for Neural Text GenerationYixuan Su, Tian Lan, Yan Wang, Dani Yogatama et al.NeurIPS 2022 · 349 citations

Related papers

  1. Explaining and Improving Contrastive Decoding by Extrapolating the Probabilities of a Huge and Hypothetical LMHaw-Shiuan Chang, Nanyun Peng, Mohit Bansal, Anil Ramakrishna et al.EMNLP 2024 · 1 citation
  2. Uncertainty-Aware Contrastive DecodingHakyung Lee, Subeen Park, Joowang Kim, Sungjun Lim et al.ACL Findings 2025
  3. Alleviating Hallucinations in Large Language Models through Multi-Model Contrastive Decoding and Dynamic Hallucination DetectionChenyu Zhu, Yefeng Liu, Hao Zhang, Aowen Wang et al.NeurIPS 2025 · 7 citations
  4. Mitigating Object Hallucinations in Large Vision-Language Models through Visual Contrastive DecodingSicong Leng, Hang Zhang, Guanzheng Chen, Xin Li et al.CVPR 2024
  5. Adaptive Contrastive Decoding in Retrieval-Augmented Generation for Handling Noisy ContextsYouna Kim, Hyuhng Joon Kim, Cheonbok Park, Choonghyun Park et al.EMNLP Findings 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines