Hallucinations as Orthogonal Noise: Inference-Time Manifold Alignment via Dynamic Contextual Orthogonalization

Mingkuan Zhao, Wentao Hu, Tianchen Huang, Yuheng Min, Suquan Chen, Yide Gao, Yanbo Zhai, Shuangyong Song, Xuelong Li

TL;DR

Hallucinations in Large Language Models (LLMs) can be geometrically understood as "orthogonal noise" that steers internal representations away from the factual context manifold. To combat this, the authors introduce Dynamic Contextual Orthogonalization (DCO), a training-free, inference-time intervention that dynamically filters out these divergent vector components. DCO significantly improves contextual faithfulness across major benchmarks without sacrificing the model's core parametric knowledge.

What Problem Does This Paper Address?

Despite their impressive capabilities, LLMs frequently hallucinate—generating content that is factually incorrect or inconsistent with the provided context. While popular mitigation strategies like Retrieval-Augmented Generation (RAG) or logit-level contrastive decoding help, they treat the model as a black box, altering output probabilities without addressing internal representation mechanics. Furthermore, aggressive interventions often trigger a nasty trade-off: suppressing hallucinations frequently degrades the model's general knowledge and reasoning capabilities.

This paper tackles the problem from a mechanistic and geometric perspective. Grounded in the Linear Representation Hypothesis (the idea that semantic concepts are encoded as linear directions in high-dimensional space), the authors investigate how hallucinations physically manifest within the model's internal hidden states—specifically the residual stream—and how to intercept them in real time.

Figure 2: Mechanistic comparison of intervention paradigms. (A) Static Intervention (ITI): Injects a fixed steering vector derived from offline probing, applying indiscriminate directionality to the residual stream regardless of context. (B) Logit Contrast (DoLa/CAD): Operates at the output layer by subtracting premature/amateur logits from mature layer logits, enhancing sharpness but failing to correct internal representation dynamics. (C) Geometric Alignment (DCO, Ours): Performs dynamic intervention within the latent space. It treats hallucination as an orthogonal noise component oh⊥diverging from the context manifold M and projects the attention output oh to align with the valid semantic subspace oh∥.

Methods

The authors propose Dynamic Contextual Orthogonalization (DCO), a training-free intervention applied during inference. DCO operates directly on the residual stream in three main phases:

  1. Context Anchor Construction: At any given layer, the input residual stream vector is normalized (using RMSNorm) to serve as a "context anchor" ($\mathbf{c}$). This unit vector represents the cumulative factual consensus established by the context up to that point.
  2. Subspace-based Orthogonal Decomposition: The output vector of each individual attention head ($\mathbf{o}_h$) is mathematically split into two components: a parallel component aligned with the context anchor (the "resonance" component) and a perpendicular component (the "orthogonal noise").
  3. Z-Score Based Dynamic Suppression: Rather than applying a rigid, hard threshold to eliminate all orthogonal components (which would destroy necessary semantic diversity and formatting), DCO calculates the mean and standard deviation of this orthogonality across all heads within the layer. Heads that introduce an unusually high ratio of orthogonal noise show up as statistical outliers (high Z-scores).

Using a soft Sigmoid gating function, DCO selectively attenuates these outlier components before recombining the head outputs. This effectively projects the model's latent trajectory back onto the safe context manifold. DCO is applied selectively to middle-to-late layers, where factual retrieval and integration primarily occur.

Datasets

The authors evaluated DCO using Llama-3-8B-Instruct and Llama-3-70B-Instruct across a diverse suite of standard benchmarks:

  • Contextual Faithfulness & Instruction Following: IFEval (strict prompt and instruction adherence), XSum (abstractive summarization), and NQ-Swap (a counterfactual question-answering dataset designed to test context vs. parametric memory conflict).
  • Factuality & Knowledge Retention: TruthfulQA, TriviaQA, and NQ-Open (Natural Questions evaluated in both open-book and closed-book settings).
  • Complex Reasoning: MuSiQue (a demanding multi-hop reasoning dataset).

Key Insights and Ideas

  • Hallucination as Geometric Drift: The core "aha moment" is that hallucinations are not just surface-level statistical anomalies; they are caused by specific attention heads injecting vectors orthogonal to the established context subspace. This causes the model's latent state to drift away from factual reality over time.
Figure 5: Visualization of latent manifold dynam- ics. The blue ribbon represents the Context Manifold M. Without intervention, the generative trajectory (Red dashed line) suffers from orthogonal drift, diverging into hallucination. DCO (Blue solid line) applies contin- uous orthogonal projection (Green arrow) at each step t, constraining the latent state evolution within the safe semantic subspace.
  • Outliers vs. Semantic Diversity: Not all orthogonal vector components are harmful; some are necessary for introducing creative vocabulary or handling syntax. By using layer-wise Z-scores, DCO dynamically adapts to the model's state, recognizing that true hallucinations live in the statistical "long tail" of the orthogonality distribution.
  • Defeating the Pareto Trade-off: Unlike static steering methods (like Inference-Time Intervention), which apply fixed corrections regardless of context and often break standard factual retrieval pathways, DCO's dynamic nature allows it to suppress contextual drift while leaving the model's internal knowledge base intact.

Key Results

  • State-of-the-Art Faithfulness: On the IFEval benchmark with Llama-3-70B, DCO boosted prompt-level strict accuracy from 77.45% (greedy baseline) to 85.77%, outperforming existing intervention methods like DeCoRe.
  • Robust Summarization: On XSum, DCO achieved the highest ROUGE-L score (20.39 on the 8B model). Crucially, while static intervention baselines suffered severe linguistic degradation, DCO maintained high text quality.
  • Knowledge Preservation: On closed-book tasks like TriviaQA and NQ-Open, DCO maintained or even improved performance (e.g., achieving 76.12% on TriviaQA for the 70B model), proving that it successfully mitigates hallucinations without eroding the model's underlying knowledge.
  • High Efficiency: DCO introduces negligible computational overhead ($O(L \cdot H \cdot d_{model})$). Because it operates within a single forward pass, it avoids the dual-decoding latency penalties common to logit-contrastive decoding methods.

Limitations and Future Work

  • Context Dependency: DCO relies on extracting a clear context anchor from the input residual stream. Consequently, it is highly optimized for context-grounded generation (RAG, summarization). In entirely open-ended, closed-book generation where no external reference context exists, defining the "correct" semantic manifold becomes significantly more challenging.
  • Linear Simplification: The framework is predicated on the Linear Representation Hypothesis. While linear approximations prove highly effective for manipulating high-level features, they simplify the underlying non-linear activation dynamics of Transformer architectures, which might miss more complex hallucinatory behaviors.
  • Future Directions: The authors plan to explore meta-learning frameworks to automate the calibration of these geometric constraints, allowing for self-adaptive manifold control across varying semantic densities.

Summary updated

Abstract

Hallucination in Large Language Models (LLMs), characterized by the generation of content inconsistent with contextual facts or logical constraints -- remains a persistent challenge for reliable deployment. In this work, we address this issue through a geometric framework rooted in the linear representation hypothesis. We propose that hallucinations manifest as orthogonal noise relative to the semantic manifold of the residual stream. Specifically, we hypothesize that while attention heads ideally propagate information congruent with the context subspace, hallucinations arise when specific heads introduce components orthogonal to this subspace, disrupting the coherence of the latent representation. Based on this formulation, we introduce Dynamic Contextual Orthogonalization (DCO), an inference-time intervention method. DCO utilizes the input residual stream as a dynamic context anchor to perform orthogonal decomposition on attention head outputs. To distinguish between context-aligned semantic updates and divergent noise, DCO employs a layer-wise Z-score suppression mechanism that selectively attenuates outlier orthogonal components based on statistical distributions. Evaluations on Llama-3-8B and 70B across benchmarks such as XSum, NQ-Swap, and IFEval demonstrate that DCO achieves superior contextual faithfulness compared to state-of-the-art intervention baselines. Furthermore, DCO maintains high performance on knowledge-intensive tasks like TriviaQA and TruthfulQA, effectively mitigating the trade-off between hallucination suppression and parametric knowledge retention often observed in existing methods. Our findings validate the geometric interpretation of hallucinations and establish DCO as a computationally efficient approach for enforcing manifold alignment.Our code is available at https://github.com/Harry-Miral/DCO
BibTeX
@inproceedings{zhao2026hallucinations,
  author = {Mingkuan Zhao and Wentao Hu and Tianchen Huang and Yuheng Min and Suquan Chen and Yide Gao and Yanbo Zhai and Shuangyong Song and Xuelong Li},
  title = {{Hallucinations as Orthogonal Noise: Inference-Time Manifold Alignment via Dynamic Contextual Orthogonalization}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1822},
}
Figure