This paper explores the statistical mechanics of neural network training, specifically focusing on networks with scale-invariant components (like those using Batch Normalization). While previous research suggested that learning dynamics could be described using an "ideal-gas" analogy, this work demonstrates that many thermodynamic-like properties arise from scale symmetry rather than thermal equilibrium. The author introduces exact identities to quantify how real-world learning deviates from simple models, providing a rigorous framework for "non-ideal" learning.
TL;DR
Neural network learning is often compared to an ideal gas, but real-world noise and momentum break this analogy. This paper proves that thermodynamic relations like entropy scaling are actually consequences of scale symmetry, and it introduces a "curvature-transport" identity to precisely measure how training dynamics deviate from equilibrium.
What Problem Does This Paper Address?
In deep learning, we often observe "thermodynamic" behaviors—for example, certain scaling relations between entropy, learning rates, and weight decay resemble Maxwell relations in physics. Earlier work proposed an "ideal-gas" model to explain this, but that model relies on highly restrictive assumptions: isotropic noise, fixed noise strength, and thermal equilibrium.
Real neural networks don't play by these rules. Their noise is anisotropic, they use momentum (memory), and they are often far from equilibrium. This paper asks:
- Which thermodynamic relations are "protected" by symmetry and hold even when the ideal-gas assumptions fail?
- How can we precisely quantify the "non-ideality" of learning dynamics?
- Can we detect a "direction" or "arrow of time" in the way parameters evolve during training?
Methods
The author employs a mix of theoretical derivations and numerical experiments:
- Exact Rescaling: The paper proves a "Scaling Symmetry" theorem showing that trajectories with different hyperparameters can be exactly mapped to one another. This explains why entropy relations remain robust even without thermal equilibrium.
- Spectral Equation of State: Within a local harmonic approximation, the author derives a relation for weight norms where "virial coefficients" are determined by the moments of the curvature spectrum.
- Curvature-Transport Identity: This is the paper's central theoretical contribution. It’s an exact mathematical identity that decomposes the "update-curvature deficit"—the difference between predicted and actual curvature during a step—into measurable terms like curvature changes, gradient-memory correlations, and finite-step remainders.
- Time-Reversal Diagnostic: The author introduces a displacement-weighted curvature change ($A$) to measure irreversibility. If the mean of $A$ is non-zero, it proves the training process has a distinct "arrow of time."
The notation used throughout these derivations is summarized in the table below:
Datasets
The theories were tested across three types of systems:
- Sphere Models: Synthetic, low-dimensional models used to isolate geometric effects and test harmonic predictions.
- Teacher-Student Networks: Normalized "soft committee machines" with analytic population losses, allowing for exact derivative evaluation without Monte Carlo error.
- Convolutional Networks: Practical ResNet-18 and simpler ConvNets trained on CIFAR-10 and CIFAR-100.
Key Insights and Ideas
- Symmetry Over Equilibrium: You don't need a Gibbs distribution for thermodynamics to appear in learning. Scale symmetry alone fixes the change in entropy when hyperparameters are rescaled.
- The Curvature Deficit: In networks with momentum, the curvature seen by an update is usually less than the linear prediction. The "curvature-transport" identity explains this as a result of the landscape's curvature changing as the weights move along the update direction.
- ReLU vs. Softplus: The "remainder" (the error in a quadratic model of the loss) behaves differently for different activations. ReLU units create a "plateau" in the remainder due to activation boundary crossings, while smooth activations like Softplus show cubic/quartic scaling.
- Irreversibility is Measurable: By measuring curvature at both ends of a training step, one can lower-bound the "relative entropy" between forward and reversed parameter trajectories, providing a local measure of how irreversible the optimizer is.
Key Results
The paper validates its theoretical identities with high precision:
- Norm Balance: The predicted stationary weight norms (Theorem 1) were confirmed in practical ResNets with a median ratio of 1.004, as shown in Figure 1(a).
- Transport vs. Deficit: In Softplus networks, the curvature transport term almost perfectly accounts for the update-curvature deficit (Figure 1(b)).
- Spectral Accuracy: In sphere models, the "spectral equation of state" predicted the stationary radius to within 0.03%.
- Arrow of Time: Time-reversal asymmetry was resolved in every experimental run, often by dozens or hundreds of standard errors, confirming that learning trajectories are fundamentally irreversible.
Limitations and Future Work
- Network Scale: The experiments focused on relatively small networks (up to ~176k parameters). Scaling these exact measurements to billion-parameter models remains a challenge.
- Optimizer Scope: The identities were derived primarily for SGD and EMA momentum. While AdamW was tested, it was treated under a "frozen-preconditioner" approximation.
- The "Sign" Mystery: Curvature transport was consistently negative in convolutional networks but positive in some teacher-student settings. The author notes that the architectural or statistical features that determine this sign are still an open question.
- Edge of Stability: The harmonic theory loses accuracy when fluctuations are large enough to explore highly non-linear regions of the loss landscape. Future work could investigate the "saturation" of these modes.
Summary updated