# Microseismic Location Error Due to Eikonal Traveltime Calculation
## 2 Methods
### Eikonal Solution Using Physics-Informed Neural Networks (PINNs)  
Conventional numerical algorithms for solving the eikonal equation, such as FSM or FMM, require the same computational effort for perturbations in the source location and/or velocity model. In diffraction stacking-based locations, a dense grid of potential source locations needs to be computed [2] requiring a large number of source calculations, especially in large 3D models. Therefore, we also consider a recently proposed algorithm to solve the eikonal equation using PINNs [9]. Once a randomly initialized neural network is trained to provide traveltimes for a particular source location, additional computationsfor new source locations can be significantly sped up using this pre-trained network. This technique is referred to as \"transfer learning\" in the machine learning literature. To solve the factored eikonal Equation (7), [PERSON] et al. [9] leverage the capabilities of neural networks as function approximators [11] and define a loss function that minimizes the residual of the underlying factored eikonal equation on a randomly chosen set of training (collocation) points in the computational domain. This is achieved using the following components:  
1. a deep neural network (DNN) approximation of the unknown traveltime field \(\tau(x,y,z)\),
2. a differentiation algorithm, i.e., automatic differentiation in this case, to evaluate the partial derivatives of \(\tau(x,y,z)\) with respect to the spatial coordinates \((x,y,z)\),
3. a loss function incorporating the underlying eikonal equation sampled on a collocation grid, an optimizer to minimize the loss function by updating the neural network parameters. Let us consider a three-dimensional domain \(\Omega\in\mathbb{R}^{3}\) where \(\mathbf{x}=(x,y,z)\) with a point-source \(\mathbf{x}_{s}=(x_{s},y_{s},z_{s})\) where \(\tau(\mathbf{x}_{s})=1\). The unknown traveltime factor \(\tau\) is approximated by a DNN such that \(\tau(\mathbf{x})\approx\hat{\tau}(\mathbf{x})=DNN(\mathbf{x};\theta)\), where \(\mathbf{x}=(x,y,z)\) are the network's input, \(\hat{\tau}\) is the network's output, and \(\theta\) represents all trainable parameters of the network. The loss function to train these parameters is given as [9]:  
\[\mathcal{I}=\frac{1}{N_{I}}\sum_{\mathbf{x}^{*}\in I}\lVert\mathcal{L}\rVert^ {2}+\frac{1}{N_{I}}\sum_{\mathbf{x}^{*}\in I}\lVert\mathcal{H}(-\hat{\tau}) \rVert^{2}+\lVert\hat{\tau}(\mathbf{x}_{s})-1\rVert^{2}, \tag{11}\]  
where  
\[\mathcal{L}=T_{0}^{2}|\
abla\hat{\tau}|^{2}+2T_{0}\hat{\tau}(\
abla T_{0}, \
abla\hat{\tau})+\hat{\tau}^{2}|\
abla T_{0}|^{2}-\alpha^{2}S_{0}^{2}(\mathbf{ x}). \tag{12}\]  
The first term in the loss function minimizes the residual of the factored eikonal equation on a set \(I\) of \(N_{I}\) training points (\(\mathbf{x}^{*}\)), the second term penalizes negative solutions by using the Heaviside function \(\mathcal{H}(-\hat{\tau})\). The final term enforces the boundary condition. Network parameters \(\theta\) are then optimized by minimizing this loss function on a set of training points. Once the DNN is trained, we evaluate the trained neural network on a set of regular grid points in \(\Omega\) to obtain an estimate of the unknown traveltime factor. The final traveltime estimate is obtained by multiplying it with the known traveltime part, i.e.,  
\[\hat{T}(\mathbf{x})=T_{0}(\mathbf{x})\hat{\tau}(\mathbf{x}). \tag{13}\]  
A workflow detailing the algorithm is shown in Figure 2.  
Figure 2: A randomly initialized deep neural network (DNN) is trained on a set randomly selected training points \(\mathbf{x}^{*}\) with a given slowness model \(S(\mathbf{x}^{*})\). The network is minimized with additional inputs at these training points including the known traveltime field \(T_{0}(\mathbf{x}^{*})\) and its spatial derivative \(\
abla T_{0}(\mathbf{x}^{*})\).