通过内部动态检测大模型幻觉,实现无需外部验证的自我修正。
Internal Flow Signatures for Self-Checking and Refinement in LLMs
- 在模型每层间监控决策轨迹,提取紧凑的流动签名
- 能准确识别幻觉发生的具体层级,定位率超90%
- 适合需要高可靠性、低延迟的生成系统使用
大型语言模型常生成看似流畅但与上下文不符的答案,现有防护依赖外部验证或独立裁判。本文提出内部流动签名,从固定层间监控边界处的深度动态审计决策形成过程。该方法通过基于偏置的监控稳定逐标记运动,并在每个深度窗口内,以最高概率标记及其近邻构建紧凑的移动读出对齐子空间。相邻窗口帧通过正交传输对齐,得到与窗口内基底选择无关的深度可比传输步长、转向角和子空间漂移摘要。一个轻量级GRU验证器基于这些签名实现无需修改基础模型的自检。除检测外,验证器还能定位异常发生的深度事件,并触发针对性修正:模型回溯至异常标记,在识别块处夹紧异常传输步长,同时保留正交残差。整个流程提供可操作的定位与低开销自检能力。代码已公开于github.com/EavnJeong/Internal-Flow-Signatures-for-Self-Checking-and-Refinement-in-LLMs。
原文摘要 · Abstract (English)
Large language models can generate fluent answers that are unfaithful to the provided context, while many safeguards rely on external verification or a separate judge after generation. We introduce \emph{internal flow signatures} that audit decision formation from depthwise dynamics at a fixed inter-block monitoring boundary. The method stabilizes token-wise motion via bias-centered monitoring, then summarizes trajectories in compact \emph{moving} readout-aligned subspaces constructed from the top token and its close competitors within each depth window. Neighboring window frames are aligned by an orthogonal transport, yielding depth-comparable transported step lengths, turning angles, and subspace drift summaries that are invariant to within-window basis choices. A lightweight GRU validator trained on these signatures performs self-checking without modifying the base model. Beyond detection, the validator localizes a culprit depth event and enables a targeted refinement: the model rolls back to the culprit token and clamps an abnormal transported step at the identified block while preserving the orthogonal residual. The resulting pipeline provides actionable localization and low-overhead self-checking from internal decision dynamics. \emph{Code is available at} \texttt{github.com/EavnJeong/Internal-Flow-Signatures-for-Self-Checking-and-Refinement-in-LLMs}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。