Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model Generation

Hongxiang Zhang, Hao Chen, Muhao Chen, Tianyi Zhang
5/29/2025
cs.CLcs.AIcs.LG

No official code found. Best implementation: actlcd/ActLCD (7 stars, last commit 2026-01-27). 1 more below.

Abstract

Recent decoding methods improve the factuality of large language models (LLMs) by refining how the next token is selected during generation. These methods typically operate at the token level, leveraging internal representations to suppress superficial patterns. Nevertheless, LLMs remain prone to hallucinations, especially over longer contexts. In this paper, we propose Active Layer-Contrastive Decoding (ActLCD), a novel decoding strategy that actively decides when to apply contrasting layers during generation. By casting decoding as a sequential decision-making problem, ActLCD employs a reinforcement learning policy guided by a reward-aware classifier to optimize factuality beyond the token level. Our experiments demonstrate that ActLCD surpasses state-of-the-art methods across five benchmarks, showcasing its effectiveness in mitigating hallucinations in diverse generation scenarios.

View on arXivView PDF

Code Implementations(2)

This is the official repo for Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model Generation

00CSS, HTMLAug 26, 20251 years ago
actlcd/ActLCDCommunity58%

This is the official repo for Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model Generation

71C, C++Aug 28, 20258 months ago

Similar Papers

Cite this paper

@article{zhang2025active,
  title  = {Active Layer-Contrastive Decoding Reduces Hallucination in Large Language Model Generation},
  author = {Hongxiang Zhang and Hao Chen and Muhao Chen and Tianyi Zhang},
  year   = {2025},
  eprint = {2505.23657},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.23657v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.23657.svg)](https://codeofpaper.com/paper/2505.23657)

Discussion