This is a partial integral differential equation solver based on deep learning.
Consider the following second-order semilinear parabolic partial differential equation.
Let
where
For the integral term, define the random variable space
First, we utilize the nonlinear Feynman-Kac formula to transform PIDEs into forward-backward stochastic differential equations with jumps (FBSDEJs), and use the Euler scheme to obtain the discrete format of FBSDEJs. Subsequently, we transform the problem of solving the discrete FBSDEJs into an optimization problem, and use deep learning techniques to solve the optimization problem, ultimately achieving numerical solutions for PIDEs.
Compared with existing research, the main innovation of this paper lies in the use of a smaller network and the handling of the integral term. For the integral term, we consider first expanding the integrand using Taylor series before integration, using the gradient term to approximate the non-local integral, and simplifying the integral calculation. The numerical solution method in this paper only uses one network to approximate the solution of PIDEs, with the differential term solved using automatic differentiation techniques, and the integral term calculated based on the differential term. Since only one network is used, compared to numerical methods that use separate neural networks to fit the differential and integral terms, the total parameter size used in the numerical method of this paper is smaller, which is more conducive to neural network parameter optimization. Numerical experiments show that the forward-backward deep neural network format can obtain numerical solutions with a relative error on the order of
pip install -r requirements.txt- matplotlib==3.8.0
- munch==4.0.0
- numpy==1.26.4
- pandas==2.2.1
- scipy==1.12.0
- tensorflow==2.14.0
- SolverNN.py: Solver based on forward-backward stochastic differential equation with jump.
- Network.py: Feed forward neural network.
- Tools.py: Useful tools.
- Other: Specific PIDE equations and solving code.
Run code and get the result.
- Create new file and import necessary packages.
import numpy as np import tensorflow as tf import logging import scipy.stats as ss import Tools from Network import * from SolverNN import FBSNNJ
- Custom equation solving classes
- Inherits the FBSNNJ class
def __init__: Custom parameter- Custom functions in PIDE
x_init_generator: initial pointsElement_jump: Element jump strengthForward_jump: Forward jump integral calculationjump_bate_fun: Jump function in backward SDEForward_SDE: Discrete form of forward SDEBackward_SDE: Discrete form of backward SDETerminal_condition: Terminal conditionSolution: Ground truth solutionmodel_approximate: Neural network approximation
- Instantiate the class and train
- Jiequn Han, Arnulf Jentzen, and Weinan E: Solving high-dimensional partial differential equations using deep learning
- Maziar Raissi: Forward–Backward Stochastic Neural Networks: Deep Learning of High-Dimensional Partial Differential Equations
- Liwei Lu, Hailong Guo, Xu Yang, Yi Zhu: Temporal Difference Learning for High-Dimensional PIDEs with Jumps