NDAD: Negative-Direction Aware Decoding for Large Language Models via Controllable Hallucination Signal Injection

Panjia Qiu, Mingyuan Fan, Cen Chen, Daixin WangICLR 2026

Introduction

Despite their impressive capabilities in knowledge-intensive and reasoning tasks, Large Language Models (LLMs) frequently "hallucinate"—generating factually incorrect information with high confidence. This tendency remains a fundamental hurdle for their practical deployment. Current solutions generally fall into two camps: Retrieval-Augmented Generation (RAG), which requires complex external databases, and Training-based methods, which are computationally expensive and often fail to generalize.

A third, emerging path is intervention-based decoding, which modifies the model's output distribution during generation. While previous methods (like DoLA) try to find "truthful" signals in early layers, Negative-Direction Aware Decoding (NDAD) takes a novel approach. It argues that it is more effective to identify the specific "hallucination-prone" trajectories the model is tempted to follow and treat them as repulsive directions to be avoided. By doing so, NDAD offers a training-free method to significantly improve factual accuracy across diverse reasoning and knowledge tasks.

Methodology

NDAD operates on the principle of "Negative Awareness," steering the model away from its own worst tendencies. The process follows three main steps:

  1. Hallucination Signal Injection: The authors identify "influential" attention heads using importance scores and layer-level entropy. By selectively masking these critical heads, they intentionally weaken the model’s factual grounding. This forces the model to produce a "hallucination-leaning" distribution ($logits^{mask}$), exposing the unstable hypotheses it might otherwise amplify.
  2. Dynamic Weighting: To ensure the intervention is precise, NDAD calculates two complementary weights:
  3. Global Consistency ($W^{global}$): Measures how well the induced hallucination signal aligns with the original layer activations, quantifying its referential utility.
  4. Local Divergence ($W^{local}$): Analyzes "tail tokens" (low-probability outputs in the masked distribution) to estimate whether they are likely to evolve into hallucinations.
  5. Negative-Direction Aware Decoding: These weights are used to form a latent hallucination distribution ($P_{NDAD}$). A lightweight gradient-descent step then subtracts probability mass from the hallucination-prone regions of the output distribution. Essentially, it penalizes the KL divergence between the model's original distribution and this "negative" distribution, adjusting the final logits while preserving high-confidence, factual predictions.
Overview of the NDAD pipeline

Experimental Setup

The researchers evaluated NDAD across a wide array of benchmarks to test different types of factuality:

  • Multiple-Choice: TruthfulQA (short-answer factuality) and FACTOR (Wiki) (long-paragraph consistency).
  • Open-Ended Generation: TriviaQA, PopQA, and NQ-Open (general knowledge).
  • Reasoning-Intensive (CoT): StrategyQA and GSM8K (math and logical reasoning).

The method was tested on several model families, including Llama 2 (7B, 13B, 70B), Llama 3 (8B), Qwen 2.5 (7B), and Mistral (7B).

Key Insights and Results

NDAD introduces several conceptual breakthroughs. It posits that hallucinations aren't just random noise; they are specific, encoded paths the model "wants" to take when its factual anchors are removed. Furthermore, masking the most important attention heads proves to be a more reliable way to elicit this "bad advice" than simply looking at earlier, "immature" layers of the network. By "subtracting the negative," NDAD is highly robust and preserves linguistic quality, avoiding the repetitive or nonsensical text sometimes caused by other intervention methods.

Empirically, NDAD consistently outperformed baselines like Greedy Decoding, DoLA, and SLED:

  • Consistent Improvements: On TruthfulQA, Llama2-7B-base improved its average score from 29.14% to 43.00%.
  • Scaling Success: On the massive Llama2-70B, NDAD achieved a relative gain of 58% over the second-best baseline on the FACTOR dataset.
  • Reasoning Gains: The most significant jumps were seen in Chain-of-Thought tasks. On GSM8K, NDAD helped Llama3-8B-instruct reach 77.18% accuracy, compared to 75.97% for greedy decoding.
Performance of NDAD on TruthfulQA, FACTOR, and reasoning tasks

Importantly, the computational overhead is modest. NDAD adds roughly 20% to runtime and 30% to memory usage compared to standard greedy decoding—a small price to pay for a training-free factuality boost.

Limitations and Future Work

While highly effective, NDAD has a few areas for future refinement:

  • Hyperparameter Tuning: The "Evolution Rate" ($\alpha$) and the specific number of heads/layers to mask (found to be optimal between 6 and 13) may require some per-model adjustment for peak performance.
  • Greedy Masking Strategy: The current method for selecting which heads to mask is based on static importance scores. A more dynamic, context-aware masking strategy could further improve results.
  • Latency: While lightweight compared to RAG, the extra forward passes required to generate the hallucination signal do introduce a latency penalty that might be a concern for ultra-high-throughput applications.

Summary updated

BibTeX
@inproceedings{qiu2026ndad,
  author = {Panjia Qiu and Mingyuan Fan and Cen Chen and Daixin Wang},
  title = {{NDAD: Negative-Direction Aware Decoding for Large Language Models via Controllable Hallucination Signal Injection}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fCZf20wK6p},
}
Figure