mlsanityData to 7 Oct 2026

LayerCake: Token-Aware Contrastive Decoding within Large Language Model Layers

arXiv 2507.04404 ↗First posted 6 Jul 2025cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) excel at natural language understanding and generation but remain vulnerable to factual errors, limiting their reliability in knowledge-intensive tasks. While decoding-time strategies provide a promising efficient solution without training, existing methods typically treat token-level and layer-level signals in isolation, overlooking the joint dynamics between them. In this work, we introduce a token-aware, layer-localized contrastive decoding method that aligns specific token types with their most influential transformer layers to improve factual generation. Through empirical attention analysis, we identify two key patterns: punctuation tokens receive dominant attention in early layers, while conceptual tokens govern semantic reasoning in intermediate layers. By selectively suppressing attention to these token types at their respective depths, we achieve the induction of controlled factual degradation and derive contrastive signals to guide the final factual decoding. Our method requires no additional training or model modification, and experiments demonstrate that our method consistently improves factuality across multiple LLMs and various benchmarks.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 50 of its 52 references that are in the map. First posted on arXiv 6 Jul 2025.

Builds on

50 of 52 references.

References · 50

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  6. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  7. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  8. 2023Qwen Technical Reportcited by 3,273
  9. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
  10. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  11. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
  12. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
38 more
  1. 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,582
  2. 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
  3. 2023PaLM 2 Technical Reportcited by 1,154
  4. 2021Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategiescited by 736
  5. 2023Siren's Song in the AI Ocean: A Survey on Hallucination in Large Language Modelscited by 695
  6. 2023The Internal State of an LLM Knows When It's Lyingcited by 644
  7. 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 598
  8. 2023Textbooks Are All You Needcited by 561
  9. 2022Memory-Based Model Editing at Scalecited by 443
  10. 2023DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Modelscited by 367
  11. 2023HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Modelscited by 329
  12. 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 317
  13. 2023SemDeDup: Data-efficient learning at web-scale through semantic deduplicationcited by 295
  14. 2025Layer by Layer: Uncovering Hidden Representations in Language Modelscited by 293
  15. 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 200
  16. 2023Transformer-Patcher: One Mistake worth One Neuroncited by 196
  17. 2024Rho-1: Not All Tokens Are What You Needcited by 132
  18. 2025Why do LLMs attend to the first token?cited by 122
  19. 2023Generating Benchmarks for Factuality Evaluation of Language Modelscited by 103
  20. 2022Calibrating Factual Knowledge in Pretrained Language Modelscited by 92
  21. 2023Alleviating Hallucinations of Large Language Models through Induced Hallucinationscited by 78
  22. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
  23. 2023Improving Activation Steering in Language Models with Mean-Centringcited by 64
  24. 2024Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMscited by 50
  25. 2024Fantastic Semantics and Where to Find Them: Investigating Which Layers of Generative LLMs Reflect Lexical Semanticscited by 43
  26. 2024In-Context Sharpness as Alerts: An Inner Representation Perspective for Hallucination Mitigationcited by 43
  27. 2023BatGPT: A Bidirectional Autoregessive Talker from Generative Pre-trained Transformercited by 23
  28. 2024InfuserKI: Enhancing Large Language Models with Knowledge Graphs via Infuser-Guided Knowledge Integrationcited by 19
  29. 2025SelfElicit: Your Language Model Secretly Knows Where is the Relevant Evidencecited by 18
  30. 2022Neural Knowledge Bank for Pretrained Transformerscited by 16
  31. 2024SLED: Self Logits Evolution Decoding for Improving Factuality in Large Language Modelscited by 16
  32. 2024SH2: Self-Highlighted Hesitation Helps You Decode More Truthfullycited by 15
  33. 2025TruthFlow: Truthful LLM Generation via Representation Flow Correctioncited by 14
  34. 2023Unsupervised Contrast-Consistent Ranking with Language Modelscited by 13
  35. 2024SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Maskscited by 9
  36. 2025Improve Decoding Factuality by Token-wise Cross Layer Entropy of Large Language Modelscited by 7
  37. 2025HICD: Hallucination-Inducing via Attention Dispersion for Contrastive Decoding to Mitigate Hallucinations in Large Language Modelscited by 7
  38. 2025Looking beyond the next tokencited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.