Spilled Energy in Large Language Models
Organizations: Sapienza University of Rome, Italy · OmnAI Lab GLADIA
Abstract
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
Figures & tables
| Pool | HotpotQA | HotpotQA-WC | IMDB | Math | MNLI | Movies | TriviaQA | Winobias | Winogrande | Average | |
| LLaMA-Instruct Dubey et al. (2024) | |||||||||||
| — | 58.31 | 51.66 | 50.72 | 49.53 | 52.33 | 59.30 | 45.99 | 45.47 | 48.33 | 51.29 | |
| Orgad et al. | Mean | 66.56 | 59.00 | 69.78 | 66.56 | 60.56 | 66.44 | 63.22 | 67.33 | 58.00 | 64.16 |
| Logit | Max | 72.85 | 91.11 | 42.08 | 57.81 | 25.52 | 43.97 | 68.89 | 39.95 | 49.40 | 54.62 |
| Marginal | Max | 76.72 | 30.74 | 85.63 | 27.08 | 89.90 | 96.17 | 80.13 | 57.67 | 47.47 | 65.72 |
| Marginal | Min | 75.91 | 97.57 | 14.37 | 70.55 | 61.21 | 72.21 | 73.38 | 47.19 | 53.98 | 62.93 |
| Pool | Average % | Exact | |
| w/ exact | answer | ||
| answer | increase | ||
| Logit | Max | 56.12 | +9.23 |
| Orgad et al. | Mean | 63.67 | – |
| Marginal | Min | 67.23 | +20,02 |
| Marginal | Max | 63.34 | +3,62 |
| Pool | IMBD | Movies | TriviaQA | Winogrande | Winobias | MNLI | Math | HotpotQA | HotpotQA-WC | Average | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Gemma-Instruct 4B Kamath et al. (2025) | |||||||||||
| Logit | Max | 50.09 | 60.88 | 53.95 | 49.77 | 54.43 | 27.00 | 78.64 | 62.84 | 64.49 | 55.79 |
| Marginal | Max | 49.14 | 83.02 | 84.14 | 51.49 | 47.97 | 100.00 | 74.57 | 83.70 | 85.95 | 73.33 |
| Marginal | Min | 50.86 | 51.29 | 55.33 | 48.12 | 51.91 | 99.01 | 76.03 | 62.59 | 71.84 | 63.00 |
| Spilled | Max | 50.89 | 50.77 | 56.08 | 50.59 | 53.53 | 95.61 | 43.94 | 50.87 | 51.21 | 55.94 |
| Spilled | Min | 50.89 | 86.13 | 89.01 | 50.18 | 53.10 | 99.66 | 82.29 | 89.10 | 8 2.70 | 75.89 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Success Rate (%) |
|---|---|
| TriviaQA | 90.29 |
| HotpotQA | 87.37 |
| Movies | 93.61 |
| MNLI | 92.99 |
| Math | 87.59 |
| HotpotQA-WC | 92.38 |
| Pool | HotpotQA | HotpotQA-WC | IMDB | Math | MNLI | Movies | TriviaQA | Winobias | Winogrande | Average | |
| LLaMA-Instruct | |||||||||||
| Orgad et al. (2025) | Mean | 66.56 | 59.00 | 69.78 | 66.56 | 60.56 | 66.44 | 63.22 | 67.33 | 58.00 | 64.16 |
| Spilled | Min | 85.98 | 93.00 | 47.66 | 65.58 | 73.95 | 89.34 | 87.07 | 60.72 | 55.11 | 73.16 |
| Marginal | Max | 76.72 | 30.74 | 85.63 | 27.08 | 89.90 | 96.17 | 80.13 | 57.67 | 47.47 | 65.72 |
| Marginal | Min | 75.91 | 97.57 | 14.37 | 70.55 | 61.21 | 72.21 | 73.38 | 47.19 | 53.98 | 62.93 |
| Logit | Max | 72.85 | 91.11 | 42.08 | 57.81 | 25.52 | 43.97 | 68.89 | 39.95 | 49.40 | 54.62 |
LLM Reliability
Large language model reliability studies whether outputs remain correct, calibrated, robust, and controllable across prompts, contexts, and deployment conditions.
See all 787 papers