arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.18671cs.AIcs.CL

大语言模型中的能量溢出

Spilled Energy in Large Language Models

Sapienza University of Rome(罗马第一大学);GLADIA

Adrian Robert Minut, Hazem Dewidar, Iacopo Masi

AI总结:

该研究提出了一种无需训练的基于能量的模型方法,用于检测大语言模型中的幻觉和错误。

摘要:

我们重新解释最终的大语言模型(LLM)softmax分类器为一个基于能量的模型(EBM),将序列到序列的概率链分解为多个相互作用的EBM,在推断过程中进行跟踪。这种系统的方法使我们能够追踪解码过程中的“能量溢出”,我们实证显示其与事实性错误、偏见和失败相关联。类似于Orgad等人(2025)的方法,我们的方法定位了确切答案的token,并随后测试幻觉。关键的是,我们实现了这一点而无需训练探测分类器或激活消融。相反,我们引入了两个完全无训练的指标,直接从输出logits中得出:溢出能量,它捕捉了连续生成步骤之间能量值的差异,这些值理论上应匹配;以及边际能量,它可以在单步中测量。在九个基准测试上评估了最先进的LLM(包括LLaMA、Mistral和Gemma)以及合成代数操作(Qwen3),我们的方法展示了稳健、具有竞争力的幻觉检测和跨任务泛化能力。值得注意的是,这些结果适用于预训练和指令微调变体,而无需引入任何训练开销。代码可在github.com/OmnAI-Lab/spilled-energy获得。

英文摘要:

We reinterpret the final Large Language Model (LLM) softmax classifier as an Energy-Based Model (EBM), decomposing the sequence-to-sequence probability chain into multiple interacting EBMs at inference. This principled approach allows us to track "energy spills" during decoding, which we empirically show correlate with factual errors, biases, and failures. Similar to Orgad et al. (2025), our method localizes the exact answer token and subsequently tests for hallucinations. Crucially, however, we achieve this without requiring trained probe classifiers or activation ablations. Instead, we introduce two completely training-free metrics derived directly from output logits: spilled energy, which captures the discrepancy between energy values across consecutive generation steps that should theoretically match, and marginalized energy, which is measurable at a single step. Evaluated on nine benchmarks across state-of-the-art LLMs (including LLaMA, Mistral, and Gemma) and on synthetic algebraic operations (Qwen3), our approach demonstrates robust, competitive hallucination detection and cross-task generalization. Notably, these results hold for both pretrained and instruction-tuned variants without introducing any training overhead. Code available at: github.com/OmnAI-Lab/spilled-energy

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

↑