Abstract
Transfer learning (TL) is becoming a powerful tool in scientific applications of neural networks (NNs), such as weather/climate prediction and turbulence modeling. TL enables out-of-distribution generalization (e.g., extrapolation in parameters) and effective blending of disparate training sets (e.g., simulations and observations). In TL, selected layers of a NN, already trained for a base system, are re-trained using a small dataset from a target system. For effective TL, we need to know 1) what are the best layers to re-train? and 2) what physics are learned during TL? Here, we present novel analyses and a new framework to address (1)-(2) for a broad range of multi-scale, nonlinear systems. Our approach combines spectral analyses of the systems' data with spectral analyses of convolutional NN's activations and kernels, explaining the inner-workings of TL in terms of the system's nonlinear physics. Using subgrid-scale modeling of several setups of 2D turbulence as test cases, we show that the learned kernels are combinations of low-, band-, and high-pass filters, and that TL learns new filters whose nature is consistent with the spectral differences of base and target systems. We also find the shallowest layers are the best to re-train in these cases, which is against the common wisdom guiding TL in machine learning literature. Our framework identifies the best layer(s) to re-train beforehand, based on physics and NN theory. Together, these analyses explain the physics learned in TL and provide a framework to guide TL for wide-ranging applications in science and engineering, such as climate change modeling.
Introduction
Deep neural networks (NNs) are increasingly utilized as "closures" for Large-Eddy Simulations (LES), representing complex, small-scale turbulence that is computationally prohibitive to simulate directly. However, these models are often brittle; a model trained on a specific flow regime (e.g., low Reynolds number) frequently fails when applied to another (e.g., high Reynolds number).
Transfer learning (TL) offers a solution by re-training a subset of layers from a pre-trained "Base NN" using a limited amount of data from a new "Target" system. This study investigates two critical questions: which layers are most effective to re-train, and what physical features does the network actually learn during this process?
Experimental Setup and Datasets
The researchers focused on CNN-based subgrid-scale (SGS) closures for 2D turbulence across three challenging transfer scenarios:
- Case 1: Decaying turbulence (Base) $\rightarrow$ Forced turbulence (Target).
- Case 2: A 100-fold increase in Reynolds number ($Re=10^3 \rightarrow 10^5$).
- Case 3: A shift in forcing scale (Small-scale forcing $\rightarrow$ Large-scale forcing).
In each case, the "Base" models were trained on 2,000 samples, while the TL models utilized only 200 samples (10%) from the target system to adapt the weights.
The "Shallow" Surprise
A major finding of this work contradicts standard machine learning wisdom. In computer vision, the rule of thumb is to re-train the deepest layers of a network to adapt to new tasks. However, for multi-scale turbulent flows, the authors found that re-training the shallowest layers (e.g., Layer 2) consistently outperformed re-training the deepest ones (e.g., Layer 10).
This phenomenon occurs because the primary differences between physical systems often reside in large-scale structures. Shallow layers are better suited to capture these broad spatial changes, whereas deeper layers often become "locked" into specific small-scale features during initial training. By re-training shallow layers, the network can effectively "swap" physical filters—for instance, modifying kernels to act as clearer low-pass filters if the target system contains more large-scale energy.
Key Insights and Physical Interpretation
By performing Fourier transforms on the network’s activations and convolution kernels, the researchers interpreted the NN's internal operations as physical filters (low-pass, band-pass, etc.). This spectral analysis revealed that TL successfully closes the "generalization gap." For example, in the $100\times$ $Re$ jump (Case 2), the TL-enhanced model matched the true kinetic energy spectrum almost perfectly, whereas the base model failed significantly at high wavenumbers.
Furthermore, the study utilized loss landscape analysis to visualize the "optimization surface" of different layers. Shallow layers exhibited smoother, lower-magnitude landscapes, indicating they are more "receptive" to new data and easier to re-train effectively. This provides a non-intrusive method to identify the best layers for transfer before beginning the training process.
Conclusion
This framework explains the physics learned during transfer learning and provides a robust guide for applying TL to complex scientific problems. While currently demonstrated on 2D turbulence, these insights into spectral filtering and layer receptivity offer a path forward for more complex 3D flows and climate modeling applications.
Summary updated