Large language models (LLMs) generate fluent and complex outputs but often fail to recognize their own mistakes and hallucinations. Existing approaches typically rely on external judges, multi-sample consistency, or text-based self-critique, which incur additional compute or correlate weakly with true correctness. We ask: can LLMs predict their own failures by inspecting internal states during inference? We introduce Gnosis, a lightweight self-awareness mechanism that enables frozen LLMs to perform intrinsic self-verification by decoding signals from hidden states and attention patterns. Gnosis passively observes internal traces, compresses them into fixed-budget descriptors, and predicts correctness with negligible inference cost, adding only ~5M parameters and operating independently of sequence length. Across math reasoning, open-domain question answering, and academic knowledge benchmarks, and over frozen backbones ranging from 1.7B to 20B parameters, Gnosis consistently outperforms strong internal baselines and large external judges in both accuracy and calibration. Moreover, it generalizes zero-shot to partial generations, enabling early detection of failing trajectories and compute-aware control. These results show that reliable correctness cues are intrinsic to generation process and can be extracted efficiently without external supervision.
翻译:大型语言模型(LLMs)能够生成流畅且复杂的输出,但往往无法识别自身的错误与幻觉。现有方法通常依赖外部评判器、多样本一致性检验或基于文本的自我批判,这些方法要么需要额外计算资源,要么与真实正确性的关联较弱。本文提出核心问题:LLMs能否通过推理过程中检视内部状态来预测自身失败?我们提出Gnosis——一种轻量级自感知机制,使冻结的LLMs能够通过解码隐藏状态与注意力模式的信号进行内在自我验证。Gnosis被动观测内部轨迹,将其压缩为固定预算的描述符,并以可忽略的推理成本预测正确性,仅增加约500万个参数且独立于序列长度运行。在数学推理、开放域问答和学术知识基准测试中,在1.7B至20B参数的冻结骨干模型上,Gnosis在准确率与校准度方面均持续优于强内部基线及大型外部评判器。此外,该机制能零样本泛化至部分生成过程,实现对失败轨迹的早期检测及计算感知控制。这些结果表明:可靠的正确性线索内生于生成过程,且无需外部监督即可高效提取。