DeepXDE: A deep learning library for solving differential equations
About
Deep learning has achieved remarkable success in diverse applications; however, its use in solving partial differential equations (PDEs) has emerged only recently. Here, we present an overview of physics-informed neural networks (PINNs), which embed a PDE into the loss of the neural network using automatic differentiation. The PINN algorithm is simple, and it can be applied to different types of PDEs, including integro-differential equations, fractional PDEs, and stochastic PDEs. Moreover, from the implementation point of view, PINNs solve inverse problems as easily as forward problems. We propose a new residual-based adaptive refinement (RAR) method to improve the training efficiency of PINNs. For pedagogical reasons, we compare the PINN algorithm to a standard finite element method. We also present a Python library for PINNs, DeepXDE, which is designed to serve both as an education tool to be used in the classroom as well as a research tool for solving problems in computational science and engineering. Specifically, DeepXDE can solve forward problems given initial and boundary conditions, as well as inverse problems given some extra measurements. DeepXDE supports complex-geometry domains based on the technique of constructive solid geometry, and enables the user code to be compact, resembling closely the mathematical formulation. We introduce the usage of DeepXDE and its customizability, and we also demonstrate the capability of PINNs and the user-friendliness of DeepXDE for five different examples. More broadly, DeepXDE contributes to the more rapid development of the emerging Scientific Machine Learning field.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| PDE solving | 1D Burgers | RelL2 Error0.0275 | 38 | |
| PDE solving | Navier-Stokes 2D | Relative L2 Error0.0651 | 34 | |
| PDE solving | Heat2D-CG | Relative L2 Error3.27 | 18 | |
| Forward PDE solving | Helmholtz (test) | Relative H1 Error0.4106 | 12 | |
| Forward PDE solving | Poisson (test) | Relative H1 Error45.38 | 12 | |
| Forward PDE solving | Darcy flow (test) | Relative H1 Error39.58 | 12 | |
| PDE solving | Burgers 2D | Relative L2 Error50.7 | 9 | |
| PDE solving | Kuramoto-Sivashinsky (KS) | Rel L2 Error1.01 | 9 | |
| Inverse PDE solving | Darcy flow (test) | Relative Error5.21 | 3 | |
| Forward PDE solving | Navier-Stokes (test) | Relative Error26.29 | 3 |