**4. Loss Function**

The neural network will produce deviation between prediction and reality during training, and the deviation value is represented by loss function. During the training, the stochastic gradient descent (SGD) algorithm is used to update the network parameters and reduce the value of the loss function, so that the prediction and the actual convergence gradually, tend to be consistent [26]. The final result of neural network output is fault probability body, where 1 represents fault and 0 represents non-fault. In this study, fault recognition is regarded as a binary segmentation task. In the fault probability body, the most part is non-fault, and the least part (less than 10%) has a value of 1. There are strong data imbalance and uneven fault distribution area. In this case, the binary cross entropy loss (BCE) function is most often used [6,27]. Dice loss function is commonly used to serve the segmentation and recognition tasks of small-scale targets in medical research [28]. In this research, BCE and Dice are combined to solve problems such as data imbalance, uneven fault distribution area and insufficient accuracy in fault identification. The expression of the combined loss function is as follows:

$$\begin{cases} L\_{BCE} = -\frac{1}{N} \sum\_{i}^{N} \left( \mathcal{g}\_{i} \log(p\_{i}) + (1 - \mathcal{g}\_{i}) \log(1 - p\_{i}) \right) \\\\ L\_{Dice} = 1 - \frac{\frac{2\sum\_{j} p\_{i} \mathbf{g}\_{i} + \mathbf{z}}{i}}{\sum\_{i} p\_{i} + \sum\_{j} \mathbf{g}\_{i} + \mathbf{z}} \\\\ L = \lambda L\_{BCE} + L\_{Dice} \end{cases}$$

where *N* is the total number of pixels in the input image. *pi* ∈ [0, 1] and *gi* ∈ [0, 1] represent the prediction probability and label value of pixel, respectively, *ε* is the smoothing factor, whose value range is (0.1,1). *λ* is the balance coefficient of Dice loss and BCE loss.

### **5. Training and Validation**

In the neural network training, we randomly selected 1000 seismic images from an open-source dataset [15] for training, and the corresponding label data were also completed by manual marking in advance, marked as 1 in places with faults and 0 in places without faults. The purpose of network training is to optimize the parameters of the whole network. With each training, the deviation between the prediction and the actual represented by the loss function will decrease until the prediction and the actual tend to be consistent.

Figure 7 shows randomly seismic data sets with their corresponding labels. We used another 200 images as test and validation data, which were not included in the training. In the process of training, SGD is used to optimize the network, and the number of images sent into the network is 10 each time. The network model can be trained when the number of epochs reaches 30 times. Figure 8a shows the change of training accuracy and validation accuracy of the modified U-Net with the number of epochs. After 30 epochs, the accuracy rate tends to be above 0.9. Figure 8b shows the changes of training loss and validation loss of the modified U-Net with the number of epochs. After 30 epochs, the loss value tends to 0.01. After training, save the network parameters. In the process of training and validation, in order to increase the diversity of training data sets and make the trained neural network have better classification or recognition performance, data enhancement is used to improve the diversity of training data sets. The data enhancement operation mainly includes data reversal and rotation around the time axis.

**Figure 7.** (**a**) Seismic data sets and (**b**) their fault labels.

**Figure 8.** (**a**) The training and validation accuracy both will increase with epochs, whereas (**b**) the training and validation loss decreases with epochs.

### **6. Application**

This paper used field data to verify the effectiveness of the trained network, and the fault probability volume is shown in Figure 9. In order to facilitate the interpretation of results, the opacity of the fault probability cube was adjusted and superimposed on the original seismic image. At the same time, we used a trained U-Net to identify faults of this data, and other parameters were completely the same except for GCM and GSM modules. The study area is located in a sandstone oil field in China, and the faults are mainly Y-shaped throughout the section and occur in almost every formation [29]. In the 700 ms–1500 ms time window, the number of faults is the largest, and the characteristics of faults are the most complex [30]. As depth increases, the imaging accuracy of seismic data decreases and the difficulty of fault imaging becomes more and more. On the plane, the fault is affected by the tension and strike-slip stress mechanism, and the fault direction is mainly NE and NW. This data set consists of 495 (lines) × 580 (CDPs) with a CDP spacing of 25 m and a line spacing of 25 m. The data are sampled at 1 ms with a length of 2 s. The inline number and xline number are in the range of (2410,2905) and (3600,4180), respectively. By using an NVIDIA TITAN Xp GPU, it takes about 110 min to calculate the fault probability volume. The randomly selected vertical profiles and time slice are inline 2510, xline 4025 and time slice at 1540 ms, respectively. The fault imaging results of the modified U-Net and U-Net are shown in Figures 10–12.

**Figure 9.** (**a**) Original 3D seismic data volume and (**b**) its fault probability volume.

**Figure 10.** Three seismic images are displayed with faults that are imaged using the trained modified U-Net model. (**a**) Inline 2510; (**b**) Xline 4025; (**c**) a time slice at 1540 ms.

**Figure 11.** (**a**) A seismic image is displayed with faults that are imaged using (**b**) the trained U-Net model and (**c**) the trained modified U-Net model.

**Figure 12.** (**a**) A time slice is displayed with faults that are imaged via (**b**) the trained U-Net model and (**c**) the trained modified U-Net model.

Figure 10 represents three seismic images in different directions with different scales faults that are imaged using the trained modified U-Net model. Figure 11b shows the fault image predicted by the trained U-Net model and Figure 11c shows the modified U-Net prediction results. The U-Net result (Figure 11b) is reliable enough to depict faults in this seismic image, however, much of the detail is still missing compared to features predicted by the modified U-Net (Figure 11c). Figure 12b,c illustrate fault imaging results of different slices. We observe that most faults can be clearly imaged under the trained modified U-Net model, and multiple groups of faults in different directions can be distinguished on horizontal slices. Figure 12b is the result of U-Net prediction, some small fracture information has not been portrayed. In summary, the field data example shows that the proposed method based on the modified U-Net has superior performance in detecting faults of multiple scales, and provides relatively high sensitivity and continuity.

### **7. Conclusions**

We developed a modified U-Net-based method to automatically image faults in the sandstone reservoirs in China. The proposed network containing GCM and GSM modules is designed and trained to enhance the ability of the network to select multi-scale information. The GCM and GSM module can select multi-scale information obtained by convolution of different dilation rates between groups, enhance the consistency of receptive field and fault recognition target region, and jointly improve the recognition ability of micro-faults. The field data applications demonstrate the effectiveness of this approach. For sandstone oil and gas reservoirs in China with abundant faults, this method has great advantages in improving fault imaging accuracy, but further research is needed in improving computational efficiency and optimizing network architectures.

**Author Contributions:** Conceptualization, J.W. and Y.S.; methodology, W.W.; software, Y.S.; validation, J.W.; formal analysis, Y.S.; investigation, W.W.; resources, J.W.; data curation, Y.S.; writing original draft preparation, J.W.; writing—review and editing, J.W.; visualization, W.W.; project administration, W.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Key Project of National Natural Science Foundation of China (41930431), China Postdoctoral Science Foundation (2020M680840) and Northeast Petroleum University's special fund (1305021889).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.
