Skip to main content
QUICK REVIEW

[Paper Review] Solving differential equations using physics informed deep learning: a hand-on tutorial with benchmark tests

Hubert Baty, Leo Baty|arXiv (Cornell University)|Feb 23, 2023
Model Reduction and Neural NetworksPhysics and Astronomy6 citations
TL;DR

This paper presents a hands-on tutorial on physics-informed neural networks (PINNs) for solving ordinary differential equations (ODEs), integrating physical laws directly into the loss function during training. It demonstrates that PINNs achieve accurate solutions with minimal data for weakly nonlinear problems, but require extensive training data for strongly nonlinear systems like the Van der Pol oscillator, highlighting trade-offs in data efficiency and generalization.

ABSTRACT

We revisit the original approach of using deep learning and neural networks to solve differential equations by incorporating the knowledge of the equation. This is done by adding a dedicated term to the loss function during the optimization procedure in the training process. The so-called physics-informed neural networks (PINNs) are tested on a variety of academic ordinary differential equations in order to highlight the benefits and drawbacks of this approach with respect to standard integration methods. We focus on the possibility to use the least possible amount of data into the training process. The principles of PINNs for solving differential equations by enforcing physical laws via penalizing terms are reviewed. A tutorial on a simple equation model illustrates how to put into practice the method for ordinary differential equations. Benchmark tests show that a very small amount of training data is sufficient to predict the solution when the non linearity of the problem is weak. However, this is not the case in strongly non linear problems where a priori knowledge of training data over some partial or the whole time integration interval is necessary.

Motivation & Objective

  • To provide a practical, step-by-step tutorial on implementing physics-informed neural networks (PINNs) for solving ordinary differential equations (ODEs).
  • To evaluate the performance of PINNs on a range of academic ODEs with increasing nonlinearity, comparing them to standard numerical integration methods.
  • To investigate the minimal data requirements for PINN training, particularly focusing on the role of initial conditions and collocation points.
  • To identify the conditions under which PINNs outperform or underperform relative to classical numerical solvers, especially in terms of data efficiency and convergence.
  • To highlight the mesh-free nature of PINNs as a key advantage while addressing challenges in hyperparameter tuning and training stability.

Proposed method

  • PINNs are trained by minimizing a composite loss function that combines data fidelity (supervised loss) and physics consistency (residual of the differential equation).
  • The physics loss is computed at collocation points distributed across the domain, enforcing that the neural network solution satisfies the differential equation at these points.
  • Automatic differentiation is used to compute derivatives of the network output with respect to input variables (e.g., time), enabling exact evaluation of differential terms in the residual.
  • The method uses a feedforward neural network architecture with input layer for spatial and temporal coordinates, hidden layers for nonlinear approximation, and a single output for the solution.
  • Training is performed using gradient-based optimization (e.g., Adam), with hyperparameters such as learning rate, data weight, and physics loss weight tuned to balance convergence and accuracy.
  • Benchmarking is conducted on ODEs including linear, nonlinear, and strongly nonlinear (Van der Pol) systems, with solution accuracy assessed against analytical or high-precision numerical solutions.
Figure 1: Schematic representation of the structure for a Physics-Informed Neural Network applied to the resolution of a differential equation. The input layer has two input variables (i.e. two neurons) noted $x_{1}$ and $x_{2}$ representing for example a space and a time coordinate respectively. Tw
Figure 1: Schematic representation of the structure for a Physics-Informed Neural Network applied to the resolution of a differential equation. The input layer has two input variables (i.e. two neurons) noted $x_{1}$ and $x_{2}$ representing for example a space and a time coordinate respectively. Tw

Experimental results

Research questions

  • RQ1How effective are PINNs in solving ODEs when only initial conditions are used as training data, particularly for weakly nonlinear systems?
  • RQ2What is the minimal number of training data points and collocation points required for PINNs to converge to accurate solutions in different nonlinearity regimes?
  • RQ3How does the performance of PINNs degrade as the nonlinearity of the ODE increases, such as in the Van der Pol oscillator with large ε?
  • RQ4In what scenarios do PINNs outperform traditional numerical solvers like Runge-Kutta in terms of data efficiency and solution speed?
  • RQ5What are the key challenges in hyperparameter tuning and convergence for PINNs, especially in strongly nonlinear problems?

Key findings

  • For weakly nonlinear ODEs, PINNs achieve accurate solutions using only 3 initial condition data points and 20–40 collocation points, significantly fewer than required by classical methods.
  • In the case of the Van der Pol oscillator with ε = 1/3, PINNs converge to the exact solution with 48 collocation points and minimal data, demonstrating high data efficiency.
  • For strongly nonlinear cases (ε = 5), PINNs fail to converge without a substantial amount of training data covering the entire time domain, indicating a critical data dependency.
  • The solution prediction is instantaneous after training, offering a key advantage over traditional solvers that require reintegration for each new input.
  • The method’s performance is highly sensitive to hyperparameter tuning, with no automatic procedure available, and convergence issues arise in high nonlinearity regimes.
  • Despite limitations, PINNs maintain a mesh-free advantage over traditional methods, enabling solution prediction across the domain without structured grids.
Figure 2: Tutorial solution $\hat{y_{\theta}}(t)$ (red solid line) predicted by the normal NN for $n_{t}=4000$ iterations (in left panel) and $n_{t}=24000$ iterations (in right panel) respectively, and compared to the exact solution (blue hatched line). The chosen training data set values are indica
Figure 2: Tutorial solution $\hat{y_{\theta}}(t)$ (red solid line) predicted by the normal NN for $n_{t}=4000$ iterations (in left panel) and $n_{t}=24000$ iterations (in right panel) respectively, and compared to the exact solution (blue hatched line). The chosen training data set values are indica

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.