Learning Green's Functions with Neural Operators #37
jeremypa67
started this conversation in
Project Portfolio
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Learning Green's Functions with Neural Operators
I. Context and Motivation
During my internship at the Institut de Recherche Mathématique Avancée (IRMA) at the University of Strasbourg, I embarked on a research project focused on learning Green's functions using neural networks, a cutting-edge technique in the field of Scientific Machine Learning (SciML). The project aimed to explore the potential of neural operators as replacements for traditional numerical methods in solving partial differential equations (PDEs).
II. Theoretical framework
II.1. The Green's Function
II.1.a. Nonhomogeneous Second-Order Differential Equation
The nonhomogeneous second-order differential equation can be written as:
where$\mathcal{L}$ is a differential operator, $\Omega$ is the domain, and $u$ satisfies the boundary conditions $u(a) = \alpha$ and $u(b) = \beta$ .
II.1.b. Green's Function Definition [1,2]
The Green's function$G(x, \xi)$ is the solution to the differential equation with a Dirac delta function $\delta(x - \xi)$ as the source term, subject to zero boundary conditions $G(a, \xi) = 0$ and $G(b, \xi) = 0$ on $\partial \Omega$ .
II.1.c. Remarks on Green's Functions
Key Idea: This formulation allows the solution$u(x)$ to be expressed as a convolution of $G(x, \xi)$ with the source term $f(\xi)$ .
Boundary Conditions: The Dirichlet boundary conditions were the only ones used in the project.
II.2. Complete Formulation of a PDE Solution using Green's Function
Preliminary Problem: Suppose the PDE follows the form in equation (1)
Solution:
The solution to the equation is given by:
where$u_0(x)$ is the homogeneous solution and $G(x, \xi)$ is the Green's function.
Corresponding Green's Function:
The Green's function$G(x, \xi)$ is defined as:
subject to the boundary conditions$G(a, \xi) = G(b, \xi) = 0$ .
Neural Operators for PDEs [3,4]
The goal is to learn a neural network$N_{\kappa}$ with a kernel $\kappa$ that approximates the Green's function, as described in [3], and train $N_{\kappa}$ to minimize the mean squared error between the predicted and true solutions.
Neural Network Equation:
with appropriate boundary conditions.
PDE Solution (inspired from equation (3)):
where$u_{\text{hom, NO}}(x)$ is the homogeneous solution.
III. The architecture
The figure below, sourced from Nicolas Boullé's thesis [5], illustrates the architecture of the neural network used in the implementation:
Role of$N_G$ (Green's Function Network):
Role of$N_{\text{hom}}$ (Homogeneous Solution Network):
IV. Key Results and Visualizations
The test case involved in this project was the Helmholtz equation, as written below:
where$k$ is the wavenumber and $f(x)$ is the source term.
The domain is$[0,1]$ and the boundary conditions are $u(0) = 0$ and $u(1) = 0$ .
The parametric domain is$\mu = k \in [1.0, 2.0]$ .
The neural network configuration features 70 Fourier components with a standard deviation of 2.0, dependence on a physical parameter$\mu = k$ ranging from 1.0 to 2.0, a layer format of [50, 50, 50, 50, 50] for both $N_G$ and $N_{\text{hom}}$ , an optimizer combining Adam (100 iterations) and LBFGS (2000 iterations), a batch size of 200 for collocation and sensor points, Gaussian sampling with an RBF kernel $l = 0.03$ , and a rational activation function.
IV.1. Predicted Green's Function for the Parametric Helmholtz Equation
Here is a visualization of the predicted Green's function for the Helmholtz equation with varying wavenumbers, demonstrating the effectiveness of neural operators in capturing the fundamental solutions to complex PDEs.
For$k = 1$ :
Figure 1: Predicted Green's Function for the Helmholtz Equation with k = 1
For$k = 1.5$ :
Figure 2: Predicted Green's Function for the Helmholtz Equation with k = 1.5
For$k = 2$ :
Figure 3: Predicted Green's Function for the Helmholtz Equation with k = 2
IV.2. Error Analysis for the Parametric Helmholtz Equation
The figure shows the relative error between the predicted and reference solutions for the parametric Helmholtz equation across different source terms, analyzed as functions of the wavenumber ( k ) (1.0 to 2.0, step size 0.05).
Remark: Source terms are in the appendix, section.
IV.3. Loss Function Convergence for the Parametric Helmholtz Equation
The convergence of the loss function during the training process for the Parametric Helmholtz Equation demonstrates the optimization and effectiveness of the neural networks in learning the solution to PDEs.
IV.4. Performance Comparison: Neural Network vs Finite Differences
The figure below shows the comparison of the CPU time and error between the neural network approach and finite differences for the Laplace equation. The neural network approach achieved a lower error with comparable CPU time, demonstrating its effectiveness in solving the PDE.
Remark: in our case, the Laplace equation can be written as$\Delta u(x) = f(x)$ with homogeneous Dirichlet boundary conditions on spatial domain $[0,1]$ .
Figure: Performance Comparison: Neural Network vs Finite Differences
IV.5. Learning the Parametric Helmholtz Equation in the vicinity of Eigenmodes
The homogeneous Helmholtz equation has solutions called eigenmodes, representing natural oscillation patterns at wavenumbers that are multiples of$\pi$ . The Green's function, describing the response to a point source, has a singularity at the source point, requiring special techniques for analysis.
Indeed, the exact Green's function for the Helmholtz equation is given by:
where$k$ is the wavenumber.
Same training settings as for the previous results related to the Parametric Helmoltz above.
Only the parameter domain for the training changes:
Neural Network Configurations:
For$k_{\text{max}} = 3$ :
Figure: Predicted Green's Function for the Helmholtz Equation with maximal k value at 3
For$k_{\text{max}} = 3.1$ :
Figure: Predicted Green's Function for the Helmholtz Equation with maximal k value at 3.1
For$k_{\text{max}} = 3.14$ :
Figure: Predicted Green's Function for the Helmholtz Equation with maximal k value at 3.14
V. Conclusion and Future Work
The project successfully demonstrated the application of neural operators in learning Green's functions for the Helmholtz equation, showcasing the potential of neural networks in solving PDEs.
Future research could explore improving the accuracy of neural networks near eigenmodes, particularly in the Helmholtz equation, and applying these methods to more complex and higher-dimensional PDEs.
Key References
1. Green's Functions with Applications
2. Mathematical Physics: A Modern Introduction to Its Foundations
3. Neural Operator: Learning Maps Between Function Spaces with Applications to PDEs
4. Learning Green’s Functions Associated with Time-Dependent Partial Differential Equations
5. Data-Driven Discovery of Green’s Functions
Appendix: Source Terms
Table: Source terms$f_{1}(x; \mu)$ to $f_{10}(x; \mu)$ used in the analysis.
Beta Was this translation helpful? Give feedback.
All reactions