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

On the Mathematical Understanding of ResNet with Feynman Path Integral

Minghao Yin, Xiu Li, Yongbing Zhang, Shiqi WangarXiv 2019

Residual Networks (ResNets) have revolutionized deep learning since their introduction in 2016, serving as the backbone for state-of-the-art computer vision models. Their defining innovation—the skip connection—allows for the training of extremely deep architectures. However, a fundamental mathematical theory explaining why this specific structure is so effective has remained largely heuristic. This research provides a fascinating bridge between deep learning and quantum physics, moving beyond "it just works" to a framework where ResNets are seen as discrete approximations of physical systems.

Conceptual bridge between Quantum Physics and Deep Learning via PDEs.

Theoretical Framework

The authors establish their theory through a two-fold mapping. First, they show that a standard residual block is mathematically identical to the discrete form of a second-order Partial Differential Equation (PDE), specifically a diffusion-advection-reaction equation. In this paradigm, passing data through successive layers of a ResNet is analogous to simulating the evolution of a physical system over time. Increasing network depth is thus equivalent to reducing the time step in a numerical PDE solver, leading to a more accurate "solution" or feature representation.

Second, by treating each layer as a small time step, the researchers derive a "propagator" for the network. They prove that the final output of a ResNet is equivalent to a Feynman path integral—a formulation in quantum mechanics where the state of a particle is determined by the weighted sum of all possible paths it could have taken from start to finish.

Analogy between the Feynman path integral (a) and a multi-layer neural network (b).

Key Insights and Ideas

  • The "Action" of a Network: In physics, paths are weighted by an "action" ($S$). The authors define a similar Lagrangian and Action for ResNets, showing that the network's output is dominated by paths that minimize this action.
  • Gradient Vanishing Explained: Through the path integral lens, the skip connection acts as an "identity path" that never vanishes. While other complex paths might see their gradients shrink, this primary path ensures a constant flow of information back to early layers.
  • Robustness through Exponentiality: Because the ResNet transformation is akin to an exponential propagator ($e^{Ht}$), small perturbations (noise) in the weights have a much smaller relative impact on the final output compared to the linear-chain structure of traditional CNNs like VGG.

Experimental Validation

To validate the theory, the researchers designed two novel architectures:

  • PDE-Net: Replaces standard $3 \times 3$ convolutions with specific, trainable differential operators (like $\frac{\partial^2}{\partial x^2}$). This model uses only 6 trainable parameters per layer (vs. 9 in a standard $3 \times 3$ conv) yet achieved nearly identical accuracy to standard ResNets on CIFAR-10 (e.g., 93.38% vs 94.89% at depth 101).
  • Decomposed-Net: Breaks $3 \times 3$ kernels into $1 \times 3$ and $3 \times 1$ kernels to mimic the structure of the PDE operators.

In noise-injection experiments, ResNet-18 maintained high accuracy even when significant noise was added to the weights. In contrast, VGG-16's performance plummeted rapidly under the same conditions, confirming the theoretical prediction of superior robustness.

Conclusion

By framing ResNets within the language of PDEs and Feynman path integrals, this work provides a rigorous explanation for the architectural advantages of skip connections. These insights not only demystify current successes but also offer a principled path forward for designing more efficient and robust neural architectures. Future work may extend this framework to explore larger kernel sizes and more integrated treatments of non-linearities like ReLU.

Summary updated

BibTeX
@misc{yin2019mathematical,
  author = {Minghao Yin and Xiu Li and Yongbing Zhang and Shiqi Wang},
  title = {{On the Mathematical Understanding of ResNet with Feynman Path Integral}},
  year = {2019},
  eprint = {1904.07568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.07568},
}
Figure