Separation of scales and a thermodynamic description of feature learning in some CNNs

Inbar Seroussi, Zohar RingelarXiv 2021

Introduction

In the study of deep learning theory, the "Neural Network Gaussian Process" (NNGP) limit has emerged as a powerful mathematical framework. It posits that infinitely wide networks behave as Gaussian Processes, offering a tractable description of their behavior. However, this limit introduces a significant discrepancy with real-world performance: infinite-width networks are "lazy," meaning their internal representations (kernels) remain static during training. In contrast, finite-width networks actively perform feature learning, adapting their internal structures to the data.

This paper bridges the gap between static infinite-width theories and adaptive finite-width networks by introducing a "thermodynamic" framework. By treating the neural network as a large-scale non-linear system, the authors derive equations that predict how internal representations evolve while maintaining a surprising degree of simplicity.

Theoretical Framework: A Thermodynamic Approach

The authors adopt a physics-inspired viewpoint, describing the network's equilibrium state—reached after training with noise and weight decay—using a partition function and an action ($S$). This approach identifies "slow variables," specifically the second moments or kernels of activations, which capture the collective behavior of neurons while averaging out individual erratic fluctuations.

The Persistence of Gaussianity

A central discovery of this work is that internal pre-activations remain nearly Gaussian even as the network undergoes significant feature learning. This suggests that feature learning primarily "stretches and shifts" internal representations rather than introducing complex non-Gaussian distortions. This observation justifies the use of a Variational Gaussian Approximation (VGA) to derive closed-form Equations of State (EoS) for the network's internal kernels.

Empirical vs. theoretical distributions of pre-activations, demonstrating the persistence of Gaussianity during feature learning across different network configurations.

The Feature Learning Scale $\chi$

The theory identifies a new emergent scale, $\chi \propto (n^2 \cdot \text{MSE}) / \text{Width}$, where $n$ is the dataset size. This scale acts as a phase-transition marker: when $\chi \ll 1$, the network resides in the "lazy" GP regime; when $\chi \gtrsim 1$, feature learning becomes dominant. Crucially, this shows that feature learning is not solely a function of width but depends on the ratio of data complexity to network capacity.

The feature learning scale $\chi$ as a function of dataset size, illustrating the transition from strong inter-layer correlations to the mean-field decoupling region.

Experimental Validation

The framework was validated using both synthetic student-teacher tasks and real-world data (a subset of CIFAR-10). The derived Equations of State accurately predicted training loss and kernel shifts for both Fully Connected Networks (FCNs) and Convolutional Neural Networks (CNNs). Unlike previous perturbative theories (e.g., $1/\text{width}$ expansions), this thermodynamic description remains accurate even when the network's performance significantly exceeds that of its corresponding Gaussian Process.

Key Insights and Implications

  • Kernels as Thermodynamic Variables: Instead of tracking billions of individual weights, the network's state can be effectively described by layer-wise kernels. These act as the thermodynamic variables of the system.
  • Layer-wise Decoupling: The analysis reveals that layers in a deep network are effectively decoupled in the mean-field limit, interacting primarily through these width-averaged kernels. This justifies a modular, layer-by-layer analysis of deep learning architectures.
  • Non-Perturbative Accuracy: The theory captures strong feature-learning effects that were previously inaccessible to mathematical analysis, providing a more realistic model for finite-width deep learning.

Limitations and Future Work

While the theory provides a robust description of the training equilibrium, several avenues for future research remain. The current derivation focuses on anti-symmetric activation functions (like erf); extending this to ReLU requires tracking activation means. Additionally, the framework describes the final state of training rather than the dynamic trajectory of Stochastic Gradient Descent (SGD). Future work will also explore how these data-aware kernels translate to improved generalization on unseen test data.

Summary updated

BibTeX
@misc{seroussi2021separation,
  author = {Inbar Seroussi and Zohar Ringel},
  title = {{Separation of scales and a thermodynamic description of feature learning in some CNNs}},
  year = {2021},
  eprint = {2112.15383},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.15383},
}
Figure