用于LLM中自我检查和细化的内部流签名
Internal Flow Signatures for Self-Checking and Refinement in LLMs
AI总结:
本文提出内部流签名用于LLM的自我检查和细化,通过深度动态审计和正交运输实现低开销的自我验证和精准定位。
摘要:
大型语言模型可以生成流畅但与提供的上下文不一致的答案,而许多安全措施依赖于生成后的外部验证或单独的裁判。我们引入了内部流签名,通过在固定块间监控边界处的深度动态审计决策形成。该方法通过以偏见为中心的监控稳定令牌运动,然后在每个深度窗口中从顶部令牌及其近邻竞争者构建的紧凑移动读取对齐子空间中总结轨迹。通过正交运输对相邻窗口框架进行对齐,产生深度可比的运输步长、转弯角度和子空间漂移摘要,这些结果对窗口内基底选择具有不变性。一个轻量级的GRU验证器在这些签名上进行训练,能够在不修改基础模型的情况下进行自我检查。除了检测之外,验证器还能定位罪魁祸首的深度事件,并启用有针对性的细化:模型回滚到罪魁祸首令牌,并在识别的块中限制异常运输步长,同时保留正交残差。所得到的流水线从内部决策动态中提供可操作的定位和低开销的自我检查。代码可在github.com/EavnJeong/Internal-Flow-Signatures-for-Self-Checking-and-Refinement-in-LLMs上获取。
英文摘要:
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}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。