**1. Introduction**

Reflection seismic exploration is used to detect changes in impedance in the subsurface through an active seismic source. Seismic inversion refers to the process of estimating the properties of underground rocks using surface acquired seismic data. Classical seismic inversion methods usually start with a smooth model of underground properties, and then perform forward simulation to generate synthetic seismic data. The differences between the synthetic and actual seismic data can be used to update the model parameters [1]. Traditional inversion methods are usually physics-driven, which are limited by expensive computational costs and physical theory/assumptions. Due to the increased complexity of the subsurface structures, and the difficulty in obtaining a good initial model to converge to the high-resolution target model for conventional methods, advanced techniques are required for effective and efficient seismic inversion. More recently, with the successes of deep learning in the computer vision community, time series forecasting [2], and natural language processing, researchers have developed various data-driven seismic inversion techniques. The amount of available seismic data is growing exponentially and the deep learning methods are becoming integral components of geophysical exploration workflows [3], such as P-wave detection [4], seismic fault detection [5–8], seismic data noise attenuation [9,10], seismic data interpolation [11–15], and seismic slope estimation [16].

**Citation:** Zheng, X.; Wu, B.; Zhu, X.; Zhu, X. Multi-Task Deep Learning Seismic Impedance Inversion Optimization Based on Homoscedastic Uncertainty. *Appl. Sci.* **2022**, *12*, 1200. https://doi.org/ 10.3390/app12031200

Academic Editor: Andrea Paglietti

Received: 20 December 2021 Accepted: 19 January 2022 Published: 24 January 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Deep neural networks are built by a composition of hierarchical linear and non-linear functions (layers). The high-capacity networks trained using large datasets enable tasks beyond traditional methods, such as high-resolution velocity model building [17]. At the same time, seismic impedance inversion has also made many contributions using deep learning methods. In 2019, Biswas et al. used Convolutional Neural Networks (CNNs) to estimate acoustic impedance and elastic impedance from seismic data [18]. Das et al. used a Fully Convolutional Neural Network (FCN) to invert P-wave impedance [19]. Alfarraj et al. [20] introduced a Recurrent Neural Network (RNN) based on serial modeling to estimate petrophysical properties and Mustafa et al. [21] introduced a Temporal Convolutional Network (TCN) to estimate various rock properties from seismic data. Li et al. [22] used geological and geophysical model-driven CNNs (GGCNNs) to estimate elastic properties from pre-stack seismic data. Wu et al. proposed a Fully Convolutional Residual Network (FCRN) combined with transfer learning for seismic impedance inversion [23], and then extended their work to semi-supervised learning seismic impedance inversion based on a Generative Adversarial Network (GAN) [24,25]. Wang et al. [26] proposed a novel seismic impedance inversion method based on a Cycle-consistent Generative Adversarial Network (Cycle-GAN). To fully explore the multichannel characteristics of the seismic data [27], Wu et al. proposed a deep learning method for multidimensional seismic impedance inversion [28].

These studies show that neural networks have great potential for seismic inversion. All of these methods are based on learning the mapping from seismic data to well logging data, and then using the learned mapping to estimate properties for off-well locations. This approach usually requires a large amount of labeled training data to improve generalization performance. However, due to the high drilling cost, the number of wells in most exploration operations is limited, leading to a trained model with poor generalization. MTL provides an effective way to mitigate this problem [29,30]. Compared with single task learning, multi-task learning network is in the fashion of "single input and multi output", with an incomparable advantage over a single task network [31]. Simultaneously learning multiple related tasks can improve the model generalization ability, thus improving the performance of the main task on the same amount of labeled data [32]. Meanwhile, multitask learning can help extract multi-scale texture information from datasets [33]. There are two main ways to implement MTL: hard parameter sharing and soft parameter sharing. Hard parameter sharing involves the hidden layer of a two-task sharing network, and uses different output layers to complete different tasks. The soft parameter sharing method means that each task has its own model and parameters, and the distance between model parameters is then regularized to increase the similarity of models [34]. When there is a high correlation between tasks, the hard parameter sharing method is more suitable, and the higher the correlation between tasks, the greater the proportion of sharing layers in hard parameter sharing [35]. Mustafa et al. proposed an example of multi-task learning via representation sharing where multiple tasks (seismic impedance inversion and data reconstruction) are learnt simultaneously in the hope that the network can learn more generalizable feature representations leading to better performance in all tasks [1]. This is especially the case when the tasks are highly related to each other. In this paper, we propose a multi-task FCRN for simultaneous seismic impedance inversion and seismic data reconstruction. The performance of hard parameter sharing deep learning is highly dependent on the loss weight of each task, and the weighted linear sum of the loss for each individual task is usually used for training. However, it is tedious to manually adjust the weights for the loss of different tasks. It was found that the optimal weights for each task are closely related to the task magnitude and ultimately depend on the task's noise level [36]. Therefore, in this paper, we propose an automatic weight adjustment method for a multi-task loss function based on homoscedastic uncertainty for seismic impedance inversion. The test results from the two synthetic datasets of the Marmousi2 and Overthrust model, and one field dataset of the Volve model, show that the proposed method can

automatically determine the optimal weight of the two tasks, and generate higher accurate impedance results than single-task model.

The remainder of this paper is organized as follows. Section 2 describes the methodology, which includes the network architecture and the theory of multi-task loss function based on homoscedastic uncertainty. In Section 3, the three datasets and experimental results are presented. We discuss the limitations of the proposed method in Section 4. Conclusions are given in Section 5.

### **2. Methodology**
