Abstract: Neural networks, a central tool in machine learning, have demonstrated remarkable, high-fidelity performance on image recognition and classification tasks. These successes evince an ability to accurately represent high-dimensional functions, but rigorous results about the approximation error of neural networks after training are few. Here we establish conditions for global convergence of the standard optimization algorithm used in machine learning applications, stochastic gradient descent (SGD), and quantify the scaling of its error with the size of the network. This is done by reinterpreting SGD as the evolution of a particle system with interactions governed by a potential related to the objective or "loss" function used to train the network. We show that, when the number $n$ of units is large, the empirical distribution of the particles descends on a convex landscape towards the global minimum at a rate independent of $n$, with a resulting approximation error that universally scales as $O(n^{-1})$. These properties are established in the form of a Law of Large Numbers and a Central Limit Theorem for the empirical distribution. Our analysis also quantifies the scale and nature of the noise introduced by SGD and provides guidelines for the step size and batch size to use when training a neural network. We illustrate our findings on examples in which we train neural networks to learn the energy function of the continuous 3-spin model on the sphere. The approximation error scales as our analysis predicts in as high a dimension as $d=25$.
1. Introduction
Deep learning's success is often viewed as a mystery of optimization. While Universal Approximation Theorems guarantee that a sufficiently wide neural network can represent almost any function, they do not explain why simple algorithms like Stochastic Gradient Descent (SGD) consistently find these solutions. Standard optimization theory struggles because the loss function is typically highly non-convex, theoretically trapping training in local minima or "glassy" regions. Furthermore, the precise relationship between network size and accuracy—the "accuracy-to-size" trade-off—has remained poorly understood.
This work reframes neural network training as a system of interacting particles. We prove that as networks grow wider, the complex, non-convex loss landscape effectively becomes convex at the distributional level. This perspective allows us to guarantee global convergence for SGD and establish a universal error scaling law: the approximation error decreases at a rate of $O(n^{-1})$ relative to the number of neurons $n$.
2. Methodology: The Particle System View
We employ tools from statistical mechanics and interacting particle systems to analyze the training process through several key lenses:
- The Particle Representation: Each neuron (defined by its weights and biases) is treated as a single "particle." Training the network is then viewed as the movement of $n$ particles in a potential field defined by the loss function.
- The Mean-Field Limit: By taking the limit as the number of neurons $n \to \infty$, we transition from tracking individual particles to tracking the empirical distribution of those particles.
- Wasserstein Gradient Flow: We demonstrate that in the space of probability distributions, the training process is a gradient flow on a convex energy landscape.
- Asymptotic Analysis: Using the Law of Large Numbers (LLN) and the Central Limit Theorem (CLT), we derive the precise scaling of fluctuations and errors during and after training.
3. Key Insights and Theoretical Results
3.1. Asymptotic Convexity
A central finding is that convexity is a matter of perspective. While the loss function is non-convex with respect to individual weights $\theta_i$, it is a quadratic (and thus convex) functional of the weight distribution. As $n$ grows, the discrete system behaves increasingly like this continuous, well-behaved distribution, allowing SGD to bypass local minima.
3.2. Universal Error Scaling and "Self-Healing"
Perhaps the most striking result is the $O(n^{-1})$ error scaling. Standard CLT logic might suggest an error of $O(n^{-1/2})$. However, our analysis shows that as training converges ($t \to \infty$), the fluctuations "heal," and the error improves to $O(n^{-1})$. This scaling holds for functions in the space $\mathcal{F}_1$ (functions representable as an integral against a Radon measure).
3.3. Optimization Guidelines
Our analysis quantifies the noise introduced by SGD and provides specific guidelines for training. For instance, to maintain the optimal $O(n^{-1})$ scaling, the batch size $P$ should ideally scale quadratically with the network width ($P \propto n^2$). If the batch size is too small, SGD noise dominates and degrades the error scaling.
4. Experimental Validation: The 3-Spin Model
To test these findings, we used a mathematically rigorous "stress test": the 3-spin model. This involves a complex energy function on a high-dimensional sphere (up to $d=25$), notorious in physics for having an exponential number of local minima.
In a dimension where traditional grid-based approximation would require over 33 million points ($2^{25}$), a neural network with just 1,024 neurons successfully captured the function's complex features. We evaluated performance using both Radial Basis Function (RBF) networks and single-layer networks with sigmoid nonlinearities, confirming that the approximation error scales as $1/n$ as predicted.
5. Limitations and Future Directions
While this framework provides a robust explanation for the success of wide single-layer networks, several challenges remain:
- Function Space: The $O(n^{-1})$ scaling is proven for functions in $\mathcal{F}_1$; its applicability to broader function classes requires further study.
- Generalization Error: This analysis primarily focuses on the training error in an "online learning" setting (infinite data). Integrating the generalization error (the gap between training and true distribution) is a necessary next step.
- Network Depth: Extending this particle system approach to deep (multi-layer) architectures remains a significant open challenge in the field.
6. Conclusion
By reinterpreting neural networks as interacting particle systems, we establish a rigorous foundation for the global convergence of SGD and the universal $O(n^{-1}$ scaling of approximation error. This mean-field perspective resolves the apparent contradiction between the non-convexity of the loss landscape and the empirical success of simple optimization algorithms in high dimensions.
Summary updated