Deep Neural Network Approach to Forward-Inverse Problems
Hyeontae Jo Hwijae Son Hyung Ju Hwang Eunheui Kim
math.NA cs.LG cs.NA math.AP




mymainaddress]Hyeontae Jocor1fn1
jht0116@postech.ac.kr
mymainaddress]Hwijae Soncor1fn1
son9409@postech.ac.kr
[fn1]Both authors contributed equally to this work

mymainaddress]Hyung Ju Hwangmycorrespondingauthor
hjhwang@postech.ac.kr
[mycorrespondingauthor]Corresponding author

mysecondaryaddress]Eunheui Kim
EunHeui.Kim@csulb.edu

[mymainaddress]Department of Mathematics, Pohang University of Science and Technology, South Korea
[mysecondaryaddress]Department of Mathematics and Statistics, California State University Long Beach, US









Differential equation, Approximated solution, Inverse problem, Artificial neural networks


In this paper, we construct approximated solutions of Differential Equations (DEs) using the Deep Neural Network (DNN). Furthermore, we present an architecture that includes the process of finding model parameters through experimental data, the inverse problem. That is, we provide a unified framework of DNN architecture that approximates an analytic solution and its model parameters simultaneously.  The architecture consists of a feed forward DNN with non-linear activation functions depending on DEs, automatic differentiation <cit.>, reduction of order, and gradient based optimization method. We also prove theoretically that the proposed DNN solution converges to an analytic solution in a suitable function space for fundamental DEs. Finally, we perform numerical experiments to validate the robustness of our simplistic DNN architecture for 1D transport equation, 2D heat equation, 2D wave equation, and the Lotka-Volterra system.







§ INTRODUCTION


This paper marks the first step toward a comprehensive study on deep learning architectures to solve forward-inverse problems for differential equations. Recent advances in deep learning show its capability to handle various types of model problems in many disciplines. In particular, deep learning techniques have been applied to understand data augmented differential equations. While most of such studies have been centered around heuristics and modeling prospectives, to the best of our knowledge, there is little to no theoretical analysis to confirm whether the deep learning architectures give rise to the correct solutions to the governing differential equations. An overreaching goal of this paper is to provide a comprehensive analysis of Deep Neural Networks (DNNs) to solve data-driven differential equations. This paper reports a novel architecture leveraging recent progress in deep learning techniques that solves forward-inverse problems for differential equations. The paper further includes a convergence analysis and its experimental results for our deep learning architecture. 

Forward-inverse problems (or inverse problems in short) for differential equations in this paper are related to data augmented differential equations. Namely, we consider equations of states for physical systems as governing differential equations and model parameters such as advection rates, reaction diffusion coefficients, for example, that need to be fitted by the given data. Hence numerical methods solving forward-inverse problems typically become constraint problems that require an ensemble of two steps, (1) solve the state equations, which is called the forward problems and (2) find the correct model parameters that fit the given data set. Inverse problem is an actively studied field and many numerical algorithms for the inverse problems are  robust enough to handle sufficiently large data sets, see for example <cit.> references therein.  However, such algorithms can be computationally expensive and they may be too sophisticated for non-experts in inverse problems to implement them. This calls for simplistic methods that unify two steps in solving forward-inverse problems. 

The contributions of this paper are three-fold. First, the DNN architecture presented in this paper highlights its simplistic approach to handling forward-inverse problems simultaneously. Second, a rigorous analysis of the convergence of the DNN solutions to the actual solutions for the governing problems is provided. Third, numerical experiments validate the robustness of our simple architecture. 

The paper comprises the followings. A short overview of related works on data-driven differential equations and the problem formulation are presented in the rest of Section <ref>. The methodology including the DNN architecture and loss function is described in Section <ref>. Theoretical results are given in Section <ref>. Section <ref> is devoted to the experiments done for the problem. In Section <ref>, we conclude the paper. 



 §.§ Background


There are many works to utilize an Artificial Neural Network (ANN) to solve Differential Equations (DEs) in place of using well established numerical methods such as finite difference, finite element, and finite volume methods. Those finite schemes are heavily depending on mesh-grid points, and they may become a hindrance when the state equations reside in a domain with complex geometry. As such, a mesh-free approximation using clever constructions of basis functions has been introduced, see for example <cit.>) and references therein. The concept of using ANN to solve DEs can be related to mesh-free approximations as one can consider Multi-Layer Perceptrons (MLPs) as an approximation to solutions to DEs. 

The ANN structure was first introduced in <cit.>. Several studies follow to identify a class of functions that can be recognized by ANNs. The following is a brief overview and a few highlights of such studies. Cybenko <cit.> established sufficient conditions for which a continuous function can be approximated by finite linear combinations of single hidden layer neural networks with the same univariate function. 
About the same time, Hornik et al <cit.> showed that measurable functions can be approximated by multi-layer feedforward networks with a monotone sigmoid function as the authors called them "universal approximators". Cotter <cit.> extends the result of <cit.> to new architectures, and later Li <cit.> showed that a MLP with one hidden layer can approximate a function and its higher partial derivatives on a compact set.

The concept of using ANN to solve DEs are not new, and it has gained much attention recently.
Some of the highlights include the following. Lagaris et al <cit.> studied to solve DEs and PDEs using an ANN with architecture including 1 single layer and 10 units and they next extended in <cit.> their results to a domain with complex geometry. Jianyu et al <cit.> used ANN with a radial basis function as an activation function for Poisson equations. More recently, Berg et al in <cit.> used a DNN to solve steady (time-independent) problems for a domain with complex geometry in one and two space dimensions, and later in  <cit.> they studied DNN architectures to solve augmented Poisson equations (inverse problems) including three space dimensions. 

The recent work by Raissi et al <cit.> can be perhaps closely related to our work in the sense that their DNN architectures (they called "continuous time models") resemble ours. We note however the aim of this paper is to establish a comprehensive study that includes a rigorous convergence analysis of DNNs to solve forward-inverse problems for DEs and PDEs. Since our convergence result is for linear equations at this point, we present our experiments for the well known linear equations as well. While our experiments cover simpler equations than those studied in <cit.>, as their focuses were on architectures for "data-efficient and physics informed learning machines", we hope that our result can enhance the experiments shown in <cit.>. We believe our first comprehensive results can shed lights onto further studies toward more complex and complicated systems using machine learning architectures.



 §.§ Problem formulation


We consider the equations of states as the following time dependent initial boundary value problems:

    L_pu    = 0,t∈ (0,T],x∈Ω,
    
    Iu    = f,x∈Ω,
    
    Bu    = g,t∈ (0,T],x∈∂Ω,

where L_p is a differential operator, p is a set of model parameters, Ω⊂ℝ^d is a bounded domain (for the position of the state u), ∂Ω is a boundary of Ω, f(x) is an initial distribution, I is an initial operator, B is a boundary operator, and g(t,x) is a boundary data. 
Next the governing equation is equipped with a set of observation data, which may be provided from actual experiments, as following:

    D={(t_i,x_j,u_ij)|i=1,2,...,n,j=1,2,...,m},

where u_ij denotes the output value (observation from the experiment) at position x_j∈Ω and time 0<t_i≤ T with the final time T. n and m refer the numbers of time and spatial observations respectively. Since our experiments cover ODEs and PDEs with one and two spatial dimensions, x_j dependencies and the index j for x_j will be adjusted for each example.

We apply DNNs to solve governing equations (<ref>)-(<ref>) and the observation data (<ref>). Our loss function includes the governing equation, observations, initial and boundary conditions. The loss function is minimized by using the standard gradient descent method. The results show that our DNN architecture can handle much lesser numbers of observations compared to known numerical solvers such as finite difference, element and volume methods. 
The results presented in this paper demonstrate that our DNN architecture is perhaps the most simplistic way to solve forward-inverse problems, yet robust enough to handle many different cases. Furthermore, we establish the convergence result of forward-inverse problems for parabolic or hyperbolic linear PDEs with Dirichlet boundary conditions. Specifically we show that the sequence of DNN solutions converges to an analytic solution in L^∞(0,T;H_0^1(Ω)) sense.



§ METHODOLOGY

This section provides our DNN architecture and the mathematical formulation of the training procedure.



 §.§ DNN architecture

 The DNN architecture can be written as a repeated composition of some affine transformations and some nonlinear activation functions. We denote by u_N the DNN solution and assume that the architecture consists of L + 1 layers. The first layer takes (t, x) as an input, and the last layer gives the output value u_N(t,x). The L-1 layers between the first and the last layers are called hidden layers. We have used common nonlinear activation functions such as sigmoid, rectified linear units, and hyperbolic tangents through the DNN. Each neuron in the DNN contains a bias except for the input neurons. In two consecutive layers, the connections between neurons are written as weight matrices. Relations between (l-1)^th and l^th layers are defined by :


    z^l_j = ∑_k^N_l-1 w^l_jkσ_l-1(z^l-1_k)+b^l_j,

where


    
  * z^l-1_k: k^th neuron in (l-1)^th layer
    
  * N_l-1: the number of neurons in (l-1)^th layer
	
  * b^l_j: the bias of j^th neuron in l^th layer
	
  * w^l_jk: the weights between k^th neuron in (l-1)^th layer and j^th neuron in l^th layer
	
  * σ_l-1 the activation function in (l-1)^th layer

For convenience, we denote z^0=(z^0_1,...,z^0_N_0) as (t,x) and z^L=(z^L_1,...,z^L_N_L) as u_N(t,x), respectively. The values N_l-1, L, and the form of σ_l-1 should be chosen before training. In the training procedure, we have to calculate the optimal weights and biases w^l_jk, b^l_j which minimize a suitable loss function. 



 §.§ Loss function

 The training procedure of the DNN is equivalent to the optimization problem of the loss function with respect to the DNN parameters. We denote the DNN solution by u_N(t,x)=u_N(t,x;w,b), where (w,b) are the set of weights and biases defined in (<ref>). Denote the number of grid points of time, spatial variables, initial and boundary domains by N_t, N_x, I, B_t, B_x respectively. Now we define the loss function using (<ref>),


    Loss_GE(w,b,p)=∫_[0,T]∫_Ω(L_pu_N(t,x;w,b))^2 dxdt ≈∑_i,j=1^N_t,N_x( L_pu_N(t_i,x_j;w,b))^2,

where the last approximated sum is obtained by sampling a grid point {(t_i,x_j)|t_i∈[0,T],x_j∈Ω, for i=1,...,N_t, j=1,...,N_x}. Note that the reason that we define the above loss function is to find the optimal weights (w,b) which minimize Loss_GE. However, (<ref>) is not sufficient because it excludes information about initial and boundary conditions. Therefore we define two loss functions from (<ref>)-(<ref>)


    Loss_IC(w,b)    = ∫_Ω(Iu_N(0,x;w,b)-f(x))^2dx ≈∑_i=1^I(u_N(0,x_i;w,b)-f(x_i))^2,
    
    Loss_BC(w,b)    = ∫_[0,T]∫_∂Ω(Bu_N(t,x;w,b)-g(t,x))^2dSdt ≈∑_i,j=1^B_t, B_x(u_N(t_i,x_j;w,b)-g(t_i,x_j)|)^2.


Combining all loss functions (<ref>)-(<ref>) is still not enough because the solution of DEs (<ref>)-(<ref>) could differ depending on the choice of the equation parameter p. Due to this reason, we should make one additional loss function to calibrate p using the observed data (<ref>). 


    Loss_Obs(w,b) = ∑_(t_i,x_j)∈ D|u_ij-u_N(t_i,x_j;w,b)|^2.


Finally, we define the forward loss and total loss as a summation of all three, and four loss functions respectively. For the forward loss, the model parameter p is considered to be fixed.

    Loss_Forward(w,b) = Loss_GE(w,b) + Loss_IC(w,b) + Loss_BC(w,b), 
       Loss_Total(w,b,p) = Loss_GE(w,b,p) + Loss_IC(w,b) + Loss_BC(w,b) + Loss_Obs(w,b).










§ THEORETICAL RESULT

This section provides a theoretical proof that there exists a sequence of weights such that the corresponding sequence of DNN solutions converges to an analytic solution on any compact subset of the domain. We focus on the DEs (<ref>)-(<ref>) where the existence and the uniqueness of solutions are guaranteed. We establish the result in two steps. We first show that a sequence of DNN solutions converges to an analytic solution for the corresponding model parameters, called the forward problem. We next show that both the estimated parameter and the DNN solutions converge to the model parameter and the analytic solution simultaneously, called the inverse problem.



 §.§ Forward problem

For the forward problem, we fix the model parameter p and denote the analytic solution to (<ref>)-(<ref>) by u_p. We also denote the DNN solution in (<ref>) by u_N. In u_N, activation functions σ are any non-polynomial functions in C^k(ℝ^n).

Next we quote the following Definition <ref> and Theorem <ref> from <cit.>

 Let I_n=[0, 1]^n be the unit interval on ℝ^n, k be a non-negative integer. Then we say a function f is contained in C^k(I_n) if f∈ C^k(Ω) for some open set U containing I_n


(Li, Theorem 2.1 in <cit.>) Let f∈C^k(I_n). Then, given ε>0, we can find parameters of a neural network u_N, defined in (<ref>) with L=1, so that

    D^kf-D^ku_N_L^∞(I_n)<ε

holds for any multi-index k=(k_1, k_2, ..., k_n), |k_1|+|k_2|+...+|k_n|≤ k, and k_i's are non-negative integers.


 Since the above result can be generalized to multi-layer architectures (for example, <cit.>) and to a general compact set K instead of I_n, we may assume that the architecture contains only one hidden layer (L=1) and the domain Ω is I_n (Ω = I_n).


 For a non-negative integer k, assume that the highest order of linear operator (<ref>) is k and u_p∈C^k(I_n), and the activation function σ(x) and its (k-th order) derivatives are continuous and discriminatory. Then, there exists {m_j, w_j, b_j}_j=1^∞ such that a sequence of the DNN solutions with m_j nodes, denoted by {u_j(w_j, b_j)}_j=1^∞ satisties


    Loss_Forward(w_j,b_j)→ 0 as j→∞





Let ϵ > 0 be given. By Theorem <ref>, there exists a neural network u_j(x) = ∑_i=1^m_j w_i^1 σ(w_i^2x + b_i) such that D^ku_p - D^ku_j_∞ < ϵ, where k is a non-negative multi-index up to differentiability of u_p. By integrating |L_pu_j|^2,  |Iu_j-f|^2,  |Bu_j - g|^2 over [0,T] ×Ω, Ω,  [0,T] ×∂Ω respectively, we obtain the desired result.


 The assumption u_p∈C^k(I_n) in Theorem <ref> is a strong condition. Since we can also approximate it by a sequence of compactly supported smooth functions in I_n, we can extend the assumption to a general Sobolev space.


The Theorem <ref> states that we can always find parameters of a DNN architecture which can reduce Loss_Forward if the DE has a smooth analytic solution. However, since we can not directly use information of an analytic solution, we next show that the DNN architecture equipped with parameters which minimize Loss_Forward converges to an analytic solution in Theorem <ref>.

 Let L_p=∂_t+L in (<ref>) be a second order parabolic operator and Bu=0 in (<ref>) be a Dirichlet boundary condition. Also we define the DNN solution u_j=u_j(t,x;w_j,b_j) with m_j nodes and the corresponding loss Loss_Forward(w,b). Then,  Loss_Forward(w,b)→ 0 implies

    u_j(t,x;w_j,b_j) → u_p  in  L^∞([0,T];H^1_0(Ω)),

where u_p is a solution to  (<ref>)-(<ref>)


First we assume that the activation function satisfies the Dirichlet boundary condition by replacing it with b(x)σ(t,x), where b(x) is an arbitrary smooth function that satisfies b=0 on ∂Ω. By evaluating u_p-u_j in (<ref>)-(<ref>), we have the following

    ∂_t(u_p-u_j)+L(u_p-u_j)    = ε_m(t,x),t∈ (0,T],x∈Ω,
    
    I(u_p-u_j)    = η_m(x),x∈Ω,
    
    B(u_p-u_j)    = 0,t∈ (0,T],x∈∂Ω

Then the energy estimates for the second order parabolic equation (see Theorem 5, Chapter 7 in  <cit.>) are applied to obtain that

    _0≤ t≤ Tu_p-u_j(·,t)_H^1_0(Ω)+u_p-u_j_L^2([0,T];H^1_0(Ω))+∂_t(u_p-u_j)_L^2([0,T];L^2(Ω))
    ≤ C(ε_m_L^2([0,T];L^2(Ω))+η_m_H^1_0(Ω)),

where the constant C in (<ref>) depends only on Ω, T and the coefficients of L. Note that the right hand side in (<ref>) is equivalent to Loss_Forward(w,b). This shows that the sequence of DNN solutions converges to the analytic solution when  Loss_Forward(w,b)→ 0.


The convergence result also holds when L_p=∂_tt+L is a second order hyperbolic operator.



 §.§ Inverse problem



Let P be the set of all possible model parameters. Define S := {u_p|p ∈ P} be the set of solutions corresponding to each model parameter p ∈ P.




We say the observation set D_p is clear if for any u_p, u_q ∈ S, u_p|_D = u_q|_D if and only if p=q


 Let Loss_total(w,b,p) be the total loss defined in (<ref>) and let the observation set D_p with p ∈ P be given and clear. We assume that for given {ϵ_j}_j=1^∞ with ϵ_j → 0, there exists (m_j, w_j, b_j, p_j) such that Loss_Total(w_j,b_j,p_j) < ϵ_j, and the parameter set {p_j} is contained in  P, then 

    u_j(w_j, b_j) → u_p a.e. and  p_j → p  as  j →∞


 We first divide the total loss into 
Loss_Total=Loss_Forward, p_j + Loss_Obs, p_j. 
For m fixed, we set  u_N_m,k(w_m,k,b_m,k) as a DNN solution with k≥ m nodes, where (w_m,k, b_m,k) is a minimizer of Loss_Forward defined in Definition <ref>. Then,  Theorem <ref> implies u_N_m,k→ u_p_m as k→∞. Also, Loss_Obs, p_m→ 0 implies p_m → p by definition of D_p







§ EXPERIMENTS

In this section, we provide experimental results based on several differential equations including 1D transport equation, 2D heat equation, 2D wave equation, and the Lotka-Volterra system. For each equation, we have calculated an analytic (if possible) or numerical solution with fixed model parameters in order to generate a small amount of true solution points which will be regarded as the observation points. We apply our DNN model to find an approximated solution and the optimal equation parameter at the same time. In this step, we have used a neural network with variable depth and width, and ReLU activations. We used the Adam optimizer <cit.> with (β1, β2) = (0.9, 0.999) in order to find the minimizer w, b, and p defined in (<ref>). Also, for higher order derivatives in (<ref>) we have applied the reduction of order technique to express it as a system of differential equations. This step dramatically reduces the computational cost for calculating (<ref>). For example, the second-order PDE u_xx=f can be replaced by v_x=f together with the equation v=u_x. That is, we derive two first-order PDEs v_x=f, u_x=v from one second-order PDE u_xx=f, then the output layer of DNN should be changed into (u,v). This method is applied to 2D Heat and Wave equations. Also, different types of activation functions are used depending on the behavioral characteristics of the governing equations. Finally, we provide two differences between 1) actual and model output values and 2) actual and calculated model parameters. Observation points were calculated from analytic (transport), series (heat, wave), numerical (Lotka-Volterra) solution and sampled randomly among them.

In the rest of this section, we present the experimental results. For each figure, top left, top right figures show our neural network solution and the analytic solution respectively. Bottom left shows the absolute error between the neural network solution and the analytic solution. Bottom right figure shows the convergence of estimated parameters to the real parameters. We have implemented our method by using Pytorch <cit.>, which is one of the most famous machine learning library. We first present the detailed experimental settings. Table <ref> and <ref> show the summarized information of the number of grid points and DNN architectures respectively.







 §.§ 1D Transport equation
 1D transport equation consists of

    ∂_tu+a∂_xu = 0,
       u(0,x) =
      sin^40.25*π(x-0.1)     if  0.1≤ x≤0.5
    
        0      otherwise,

where a=π/10 (≃ 0.314...). We have generated the observations from the analytic solution, by method of characteristics, of (<ref>).









 §.§ 2D Heat equation


    ∂_tu = a^2 (∂_xxu + ∂_yyu),
       u(t,0,y) = u(t,1,y) = 0,
       u(t,x,0) = u(t,x,1) = 0,

where a=1. We have generated the observations from the partial sum of the series solution, by separation of variables, of (<ref>)







 §.§ 2D Wave equation


    ∂_ttu = a^2 (∂_xxu + ∂_yyu),
       u(0,x) = xy(1-x)(1-y),
       ∂_tu(0,x,y) = 0,
       u(t,0,y) = u(t,1,y) = 0,
       u(t,x,0) = u(t,x,1) = 0,

where a=1. We have generated the observations from the partial sum of the series solution, by separation of variables, of (<ref>)





 §.§ Lotka-Volterra system



    u'(t) = α u -β uv,
       v'(t) = δ uv - γ v,
       u(0) = 1, v(0) = 1,

where α=1, β=0.4, δ=0.4, γ=0.1. We have generated the observations from a numerical solution by the Runge-Kutta method of (<ref>). We used the sin function as the activation function for Lotka-Volterra system. Considering the periodic nature of the solution, the periodic activation function is a natural choice.  





 §.§ Stability Condition


In this section, we address the CourantFriedrichsLewy (CFL) condition <cit.> which is a necessary condition while solving certain partial differential equations numerically. We compare the results of transport equation with three different Courant numbers which all violate the convergence condition. As we can see in figure <ref>, our method shows the convergence well regradless of CFL condition.



Note that our experiments in section 4.2 give nice results while the settings violate the well known stability condition called the Von Neumann stability condition.



§ CONCLUSION
 

First we summarize our theoretical results. For linear differential equations, we have shown that the DNN solution can reduce the proposed loss function as much as we want. A key point in the proof is a continuation of the Theorem 2.1 in <cit.> which states the fact that a linear combination of the dilated activations can approximate the target function and the derivative of such a linear combination can approximate its derivative in L_∞ sense. Next we have proved that the DNN which minimizes the loss converges to an analytic solution for linear parabolic or hyperbolic equations. In this step, we have applied basic energy estimates for each equation. Theoretical results for the inverse problem is also included as a continuation of the forward problem. We provide numerical experiments which show that our method indeed works accurately. We emphasize that our method can easily be implemented without any background knowledge about numerical analysis (for example, stability conditions) but about some libraries for implementing neural networks. Although it performs well for fundamental DEs, it might be hard to apply it to more complex equations. We have recognized that the error between a NN solution and an analytic/numerical solution is slightly increasing depending on time.  

For future directions, we may consider two problems. First, we can use more complicated neural network architectures such as CNN, RNN. Since we have dealt with time dependent PDEs, the combination of CNN and RNN would be a great choice for modelling. Second, the theoretical results for non-linear PDEs should be explored. The convergence results of our work are only applicable to linear PDEs. However, as in the experiment for the Lotka-Volterra system, our method is successful in approximating solutions even for non-linear systems. We hope proper convergence results for non-linear systems to be explored.



§ ACKNOWLEDGEMENT
 
This work was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF-2017R1E1A1A03070105, NRF-2019R1A5A1028324)



§ REFERENCES




