Lune

ACL2023Top-tier venue

The Benefits of Bad Advice: Autocontrastive Decoding across Model Layers

Ariel Gera, Roni Friedman, Ofir Arviv, R. Chulaka Gunasekara, Benjamin Sznajder, Noam Slonim, Eyal Shnarch

Abstract

Applying language models to natural language processing tasks typically relies on the representations in the final model layer, as intermediate hidden layer representations are presumed to be less informative. In this work, we argue that due to the gradual improvement across model layers, additional information can be gleaned from the contrast between higher and lower layers during inference. Specifically, in choosing between the probable next token predictions of a generative model, the predictions of lower layers can be used to highlight which candidates are best avoided. We propose a novel approach that utilizes the contrast between layers to improve text generation outputs, and show that it mitigates degenerative behaviors of the model in open-ended generation, significantly improving the quality of generated texts. Furthermore, our results indicate that contrasting between model layers at inference time can yield substantial benefits to certain aspects of general language model capabilities, more effectively extracting knowledge during inference from a given set of model parameters.

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.

15 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

  • DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models cites Depth-Adaptive Transformer
  • DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models cites Confident Adaptive Language Modeling
  • EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism cites Depth-Adaptive Transformer
  • EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism cites Confident Adaptive Language Modeling
  • Confident Adaptive Language Modeling cites Depth-Adaptive Transformer
  • A Contrastive Framework for Neural Text Generation cites The Curious Case of Neural Text Degeneration
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  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. HALC: Object Hallucination Reduction via Adaptive Focal-Contrast DecodingZhaorun Chen, Zhuokai Zhao, Hongyin Luo, Huaxiu Yao et al.ICML 2024 · 164 citations
  3. EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D ParallelismYanxi Chen, Xuchen Pan, Yaliang Li, Bolin Ding et al.ICML 2024 · 73 citations
  4. When One LLM Drools, Multi-LLM Collaboration RulesShangbin Feng, Wenxuan Ding, Alisa Liu, Zifeng Wang et al.ACL 2026 · 27 citations
  5. Linear Alignment: A Closed-form Solution for Aligning Human Preferences without Tuning and FeedbackSongyang Gao, Qiming Ge, Wei Shen, Shihan Dou et al.ICML 2024 · 24 citations

Builds on11

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  2. Unsupervised Cross-lingual Representation Learning at ScaleAlexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary et al.ACL 2020 · 539 citations
  3. Confident Adaptive Language ModelingTal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani et al.NeurIPS 2022 · 394 citations
  4. A Contrastive Framework for Neural Text GenerationYixuan Su, Tian Lan, Yan Wang, Dani Yogatama et al.NeurIPS 2022 · 349 citations
  5. Depth-Adaptive TransformerMaha Elbayad, Jiatao Gu, Edouard Grave, Michael AuliICLR 2020 · 264 citations

Related papers

  1. Layer by Layer: Uncovering Hidden Representations in Language ModelsOscar Skean, Md Rifat Arefin, Dan Zhao, Niket Patel et al.ICML 2025
  2. Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model GenerationHongxiang Zhang, Hao Chen, Muhao Chen, Tianyi ZhangEMNLP 2025 · 10 citations
  3. SELF-[IN]CORRECT: LLMs Struggle with Discriminating Self-Generated ResponsesDongwei Jiang, Jingyu Zhang, Orion Weller, Nathaniel Weir et al.AAAI 2025 · 8 citations
  4. Fantastic Semantics and Where to Find Them: Investigating Which Layers of Generative LLMs Reflect Lexical SemanticsZhu Liu, Cunliang Kong, Ying Liu, Maosong SunACL Findings 2024 · 13 citations
  5. SH2: Self-Highlighted Hesitation Helps You Decode More TruthfullyJushi Kai, Tianhang Zhang, Hai Hu, Zhouhan LinEMNLP Findings 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines