NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Machine Learning from a Continuous Viewpoint

Weinan E, Chao Ma, Lei WuarXiv 2019

Introduction

The rapid advancement of deep learning has often been characterized as a form of modern "alchemy," where success is frequently driven by empirical trial-and-error rather than a rigorous theoretical foundation. In "Machine Learning from a Continuous Viewpoint I," authors Weinan E, Chao Ma, and Lei Wu propose a paradigm shift, moving away from viewing neural networks as discrete optimization problems of weights and biases. Instead, they advocate for a "first principles" approach rooted in the calculus of variations and partial differential equations (PDEs). By treating machine learning as a continuous problem, the authors provide a unified mathematical language that explains the success of existing architectures and suggests paths for more stable algorithm design.

The Problem: Beyond Ad-Hoc Architectures

Classical numerical analysis, such as the finite element method used in physics, relies on fundamental guiding principles to ensure stability and convergence. In contrast, deep learning often lacks such a foundation, leading to challenges like the "curse of dimensionality" and unpredictable generalization. The authors argue that by examining the continuum limit—the theoretical state where the number of neurons or layers approaches infinity—we can uncover the underlying dynamics of learning and understand why certain models, like Residual Networks (ResNets), outperform others.

A Continuous Framework for Machine Learning

The authors redefine machine learning through three primary continuous components:

  1. Representation of Functions: Rather than discrete sums, functions are represented as expectations (integral transforms) or as the output of a continuous flow defined by Ordinary Differential Equations (ODEs). This approach leverages Monte Carlo-like properties to mitigate the curse of dimensionality.
  2. Loss Functionals: The objective is defined as "population risk," treated as a functional within the space of probability distributions.
  3. Gradient Flows: The evolution of parameters is categorized into two distinct types:
  4. Non-conserved (Model A): Parameters evolve via standard $L^2$ gradient flow.
  5. Conserved (Model B): Probability distributions evolve according to the Wasserstein metric, governed by continuity equations.

Neural Networks as Discretizations

A central insight of this work is that standard neural network architectures are specific "particle-based" discretizations of these continuous flows. For instance, a two-layer neural network can be viewed as a particle method discretization of an integral transform. Similarly, a ResNet is a discretization of a continuous ODE flow.

This perspective offers a compelling explanation for the success of over-parametrization. In classical numerical analysis, a finer mesh leads to a more accurate solution. In the continuous framework, increasing the number of parameters is analogous to refining the discretization of the continuous gradient flow. This explains why wider and deeper networks often exhibit greater stability and better performance. Conversely, the authors note that deep fully connected networks without residual connections lack a well-defined continuum limit, providing a theoretical reason for their susceptibility to vanishing or exploding gradients.

Key Insights and Results

The continuous viewpoint yields several significant theoretical and practical insights:

  • Emergence of GELU: By applying a "smoothed particle method" to their continuous representation, the authors derive an activation function mathematically equivalent to the Gaussian Error Linear Unit (GELU). This provides a first-principles justification for an activation function that has become a standard in modern Transformer architectures.
  • The Frequency Principle: The authors verify the "spectral bias" of neural networks, demonstrating that gradient-based training recovers low-frequency components of a target function before high-frequency ones.
  • Global Convergence: The paper provides mathematical proof that for certain flow-based models, the gradient flow converges to a global minimum under specific conditions, such as uniform target distributions.
  • Convergence Rates: Numerical experiments on synthetic 1D target functions and Reproducing Kernel Hilbert Space (RKHS) functions confirm that testing error decreases at a rate of $O(1/t)$ during training for the proposed particle methods.

Limitations and Future Directions

While the continuous viewpoint provides a robust theoretical foundation, the authors acknowledge several areas for future research. A primary challenge is the rigorous analysis of discretization error—the mathematical gap between the continuous model and its discrete implementation. Additionally, while the theory handles high dimensions, the current numerical validations are focused on low-dimensional synthetic cases. Extending this framework to reinforcement learning and testing the derived "new algorithms" (such as spectral or smoothed particle methods) on real-world, high-dimensional datasets remains a critical next step for the field.

Conclusion

By reframing machine learning through the lens of PDEs and the calculus of variations, Weinan E and his colleagues provide a path toward a more principled understanding of deep learning. This continuous perspective not only explains the "why" behind current successes like ResNets and GELU but also offers a structured methodology for designing the next generation of robust and interpretable machine learning models.

Summary updated

BibTeX
@misc{e2019machine,
  author = {Weinan E and Chao Ma and Lei Wu},
  title = {{Machine Learning from a Continuous Viewpoint}},
  year = {2019},
  eprint = {1912.12777},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.12777},
}
Figure