q-bio.QMDec 9, 2025

Understanding temperature tuning in energy-based models

Authors: Peter W Fields, Vudtiwat Ngampruetikorn, David J Schwab, Stephanie E Palmer

Organizations: Department of Physics, University of Chicago, Chicago, Illinois 60637, USA · School of Physics, University of Sydney, Sydney, NSW 2006, Australia · Initiative for the Theoretical Sciences and CUNY–Princeton Center for the Physics of Biological Function, The Graduate Center, CUNY, New York, NY 10016 · Department of Organismal Biology and Anatomy, University of Chicago, Chicago, Illinois 60637, USA

Abstract

Generative models of complex systems often require post hoc parameter adjustments to produce useful outputs. For example, energy-based models for protein design are sampled at an artificially low "temperature" to generate novel, functional sequences. This temperature tuning is a common yet poorly understood heuristic used across machine learning contexts to control the trade-off between generative fidelity and diversity. Here, we develop an interpretable, physically motivated framework to explain this phenomenon. We demonstrate that in systems with a large "energy gap" separating a small fraction of meaningful states from a vast space of unrealistic states, learning from sparse data causes models to systematically overestimate high-energy state probabilities, a bias that lowering the sampling temperature corrects. More generally, we characterize how the optimal sampling temperature depends on the interplay between data size and the system's underlying energy landscape, and that this interplay is sufficient to elicit the tuning phenomenon; regularizing while training can contribute, but is not necessary. Crucially, our results show that lowering the sampling temperature is not always desirable. We identify the conditions under which raising it results in better generative performance. Our framework reveals that post hoc temperature tuning is indicative of both specific properties of the true data distribution and the limits of the learned model due to insufficient data availability.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Spherical Boltzmann machines: a solvable theory of learning and generation in energy-based models

    May 9, 2026Thomas Tulinski, Simona Cocco, Rémi Monasson +1Statistical Physics of LearningPhase Transitions

  2. One Temperature to Rule Them All?

    Nov 9, 2026Aviv Orly, Ori Shem-Ur, Yaron OzLLM InferenceDiversity-Aware Sampling

  3. Equilibrium Training of Energy-Based Models with Parallel Trajectory Tempering

    Jul 29, 2026Nicolas Béreux, Aurélien Decelle, Cyril Furtlehner +1Markov Chain Monte CarloEnergy-Based Models