用内部状态检测大模型幻觉,低延迟保障可靠性
The Cognitive Circuit Breaker: A Systems Engineering Framework for Intrinsic AI Reliability
- 通过前向传播提取隐藏状态,计算内外一致性差异
- 可显著检测认知失调,误报率低于5%
- 适合高实时性场景,如金融、医疗系统
随着大语言模型在关键软件系统中的广泛应用,检测幻觉和‘虚假真实感’已成为核心工程挑战。现有可靠性架构依赖生成后的黑箱机制,如RAG交叉验证或以LLM为裁判的评估器,带来不可接受的延迟、高计算开销及对外部API的依赖,常违反标准软件工程服务等级协议(SLA)。本文提出认知断路器(Cognitive Circuit Breaker),一种新型系统工程框架,实现近乎零延迟的内在可靠性监控。通过在模型前向传播中提取隐藏状态,计算‘认知失调差值’——即大模型外在语义置信度(softmax概率)与内在潜在确定性(由线性探测推导)之间的数学差距。实验表明该方法能统计显著地检测认知失调,揭示架构相关的分布外(OOD)泛化特性,并证明其对活跃推理流程的计算开销可忽略不计。
原文摘要 · Abstract (English)
As Large Language Models (LLMs) are increasingly deployed in mission-critical software systems, detecting hallucinations and ``faked truthfulness'' has become a paramount engineering challenge. Current reliability architectures rely heavily on post-generation, black-box mechanisms, such as Retrieval-Augmented Generation (RAG) cross-checking or LLM-as-a-judge evaluators. These extrinsic methods introduce unacceptable latency, high computational overhead, and reliance on secondary external API calls, frequently violating standard software engineering Service Level Agreements (SLAs). In this paper, we propose the Cognitive Circuit Breaker, a novel systems engineering framework that provides intrinsic reliability monitoring with minimal latency overhead. By extracting hidden states during a model's forward pass, we calculate the ``Cognitive Dissonance Delta'' -- the mathematical gap between an LLM's outward semantic confidence (softmax probabilities) and its internal latent certainty (derived via linear probes). We demonstrate statistically significant detection of cognitive dissonance, highlight architecture-dependent Out-of-Distribution (OOD) generalization, and show that this framework adds negligible computational overhead to the active inference pipeline.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。