arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.03022cs.CLcs.AI
收藏

幻觉作为正交噪声:通过动态上下文正交化实现推理时流形对齐

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

Xi’an Jiaotong University(西安交通大学);Xingchen AGI Lab(星辰AGI实验室);China Telecom AI Technology (Beijing) Co., Ltd.(中国电信人工智能技术(北京)有限公司);Institute of Artificial Intelligence, China Telecom(中国电信人工智能研究院);University of Science and Technology of China(中国科学技术大学);Tsinghua University(清华大学)

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

AI总结:

提出一种基于线性表示假设的几何框架,将大语言模型幻觉解释为残差流语义流形的正交噪声,并引入推理时干预方法动态上下文正交化(DCO),通过层间Z分数抑制机制选择性地衰减异常正交分量,在保持知识记忆的同时提升上下文忠实度。

摘要:

大语言模型(LLMs)中的幻觉——即生成与上下文事实或逻辑约束不一致的内容——仍然是可靠部署面临的持续挑战。在这项工作中,我们通过基于线性表示假设的几何框架来解决这个问题。我们提出,幻觉表现为相对于残差流语义流形的正交噪声。具体来说,我们假设虽然注意力头理想地传播与上下文子空间一致的信息,但当特定头引入与该子空间正交的分量时,就会产生幻觉,破坏潜在表示的一致性。基于这一表述,我们引入了动态上下文正交化(DCO),一种推理时干预方法。DCO利用输入残差流作为动态上下文锚点,对注意力头输出进行正交分解。为了区分上下文对齐的语义更新和发散噪声,DCO采用层间Z分数抑制机制,根据统计分布选择性地衰减异常正交分量。在XSum、NQ-Swap和IFEval等基准上对Llama-3-8B和70B的评估表明,与最先进的干预基线相比,DCO实现了更优的上下文忠实度。此外,DCO在TriviaQA和TruthfulQA等知识密集型任务上保持高性能,有效缓解了现有方法中常见的幻觉抑制与参数知识保留之间的权衡。我们的发现验证了幻觉的几何解释,并将DCO确立为一种计算高效的流形对齐方法。代码可在https://this https URL获取。

英文摘要:

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

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑