Abstract Machine learning influences numerous aspects of modern society, empowers new technologies, from Alphago to ChatGPT, and increasingly materializes in consumer products such as smartphones and self-driving cars. Despite the vital role and broad applications of artificial neural networks, we lack systematic approaches, such as network science, to understand their underlying mechanism. The difficulty is rooted in many possible model configurations, each with different hyper-parameters and weighted architectures determined by noisy data. We bridge the gap by developing a mathematical framework that maps the neural network's performance to the network characters of the line graph governed by the edge dynamics of stochastic gradient descent differential equations. This framework enables us to derive a neural capacitance metric to universally capture a model's generalization capability on a downstream task and predict model performance using only early training results. The numerical results on 17 pre-trained ImageNet models across five benchmark datasets and one NAS benchmark indicate that our neural capacitance metric is a powerful indicator for model selection based only on early training results and is more efficient than state-of-the-art methods.
Introduction
Deep Neural Networks (DNNs) are often criticized as "black boxes" because we lack systematic ways to understand why certain architectures perform better than others. This is particularly problematic in transfer learning, where engineers must choose the best pre-trained model (like ResNet or MobileNet) for a specific downstream task. Currently, the most reliable way to pick a model is to train several candidates to completion, which is incredibly expensive and time-consuming. Existing predictive metrics often look at macroscopic behavior but ignore the microscopic interactions between individual trainable weights. This research aims to bridge this gap by using network science to map internal weight dynamics to overall performance.
Methodology: Mapping Networks to Line Graphs
The proposed framework maps a neural network ($G_A$) to an associated line graph ($G_B$). In this line graph, the nodes represent the synaptic connections (weights) of the original network, and the edges represent how those weights interact during Stochastic Gradient Descent (SGD).
Key components of this methodology include:
- Edge Dynamics: The training process is modeled as a set of differential equations governing the evolution of weights.
- Neural Capacitance ($\beta_{eff}$): Using a technique called GBB reduction, the complex weight-interaction system is simplified into a single topological metric called "neural capacitance." This metric captures the model's inherent generalization capability.
- Neural Capacitance Probe (NCP): To handle massive networks, a lightweight "probe" unit is attached to the frozen layers of a pre-trained model. Calculating capacitance for this small probe acts as a proxy for the entire model's potential.
- Performance Prediction: Bayesian ridge regression correlates early-stage $\beta_{eff}$ values and validation accuracy with the final expected accuracy at the end of training.
Key Results
The study evaluated 17 pre-trained ImageNet models across five benchmark downstream datasets (CIFAR10, CIFAR100, SVHN, Fashion MNIST, and Birds). The proposed neural capacitance metric significantly outperformed state-of-the-art baselines in predicting model rankings.
Major findings include:
- Ranking Accuracy: The framework improved the relative ranking prediction of pre-trained models by 9.1% to 65.3% compared to existing methods.
- Early Prediction: High Spearman rank correlations ($\rho > 0.9$) were achieved using statistics from as few as five training epochs.
- Efficiency: On average, the total time required to predict final performance was only 13% of the time required for full training.
- Structural Generalization: Generalization capability is encoded in the network's structural properties very early on, suggesting that convergence is not necessary to identify the best model for a task.
Conclusion
By treating a DNN as a dynamical system on a graph, this framework applies established physics and network science tools to deep learning. The results demonstrate that the structural topology of weight interactions during training—not just the final weight values—determines performance. Future work will extend this framework to Neural Architecture Search (NAS) and the development of optimization algorithms that directly maximize a network's "capacitance" during training.
Summary updated