Abstract
Bayesian Thermodynamic Integration (BTI) is a novel framework designed to reconstruct the thermodynamic properties of complex systems—such as free energy and phase boundaries—directly from observed data samples and their associated parameters. By bypassing the need for an explicit Hamiltonian, BTI enables the application of statistical mechanics to modern machine learning models. This study validates BTI on the 2D Ising model and the Totally Asymmetric Simple Exclusion Process (TASEP), and further applies it to StyleGAN v3. The results reveal that the concept of "identity" in generated human faces exhibits behavior analogous to second-order phase transitions, with the model's mapping network acting as the primary driver of these phase boundaries.
Introduction
In classical statistical physics, characterizing a system's behavior requires knowledge of its Hamiltonian, which defines the energy of various states. From the Hamiltonian, one can derive the partition function and free energy to identify phase transitions, such as the shift from liquid to solid. However, in many complex modern systems, particularly deep generative models, the underlying "rules" or Hamiltonian are unknown. While machine learning excels at finding boundaries in data, it often lacks a connection to fundamental physical quantities.
This paper addresses this gap by introducing Bayesian Thermodynamic Integration (BTI). BTI allows researchers to calculate thermodynamic functions directly from microstates (data) and external parameters (settings), effectively treating generative models as physical systems to uncover hidden structural transitions.
Methods
The BTI workflow integrates several advanced techniques to bridge the gap between data science and thermodynamics:
- Probabilistic Thermometer: A neural network (specifically a U2-Net) is trained to predict the parameters $t$ that generated a specific microstate $s$. This provides the posterior distribution $P(t|s)$.
- Fisher Information Metric: The authors demonstrate that the Fisher information metric—a measure of how much a probability distribution changes as parameters are tweaked—can be expressed using the derivatives of this posterior distribution.
- Input Convex Neural Networks (ICNN): In physics, the log-partition function (free energy) must be convex. To ensure the model obeys these physical laws, the Fisher metric is approximated using the Hessian of a function learned by an ICNN.
- Bundle Augmentation: To prevent overfitting and improve the accuracy of phase boundary reconstruction, the network is trained on "bundles" of microstates generated under identical parameters.
Datasets and Experimental Setup
The authors evaluated BTI across three distinct domains:
- 2D Ising Model: A foundational model in statistical mechanics used to study phase transitions. The dataset comprised 540,000 simulated spin configurations.
- TASEP (Totally Asymmetric Simple Exclusion Process): A non-equilibrium model for traffic and molecular transport, using 150,000 configurations.
- StyleGAN v3 (FFHQ): A high-fidelity face generator. The authors created a two-parameter "face space" by interpolating between three base latent vectors, generating 500,000 images.
Key Results and Insights
Unsupervised Phase Discovery
BTI successfully identified phase transition lines in all three models without prior knowledge of the microscopic rules. In the Ising and TASEP models, the reconstructed free energy accurately pinpointed known transition points, such as the first-order transition in the Ising model and the three density-based phases in TASEP.
The Thermodynamics of Faces
Applying BTI to StyleGAN revealed sharp "second-order phase transitions" in the parameter space. These lines correspond to abrupt changes in the perceived identity of the generated person. Interestingly, the authors found that the "Mapping Network" in StyleGAN is almost entirely responsible for defining these identity boundaries, while the "Synthesis Network" primarily handles the rendering of the result.
Physics-Informed Machine Learning
By constraining the neural network architecture to be convex via ICNNs, the authors successfully embedded physical laws into the learning process. This constraint led to more stable and interpretable results compared to standard unconstrained models.
Conclusion and Future Work
While BTI proves powerful for 2D parameter spaces, its current reliance on discretization limits its scalability to the high-dimensional latent spaces common in modern GANs. Future research may explore tensor-train density estimation or other advanced parameterization methods to handle higher dimensions. Furthermore, the deep mathematical origin of "identity phases" in generative models remains an open question, suggesting a profound link between information theory and human perception.
Summary updated