Prediction of geothermal temperature field by multi-attribute neural network

Hot dry rock (HDR) resources are gaining increasing attention as a significant renewable resource due to their low carbon footprint and stable nature. When assessing the potential of a conventional geothermal resource, a temperature field distribution is a crucial factor. However, the available geostatistical and numerical simulations methods are often influenced by data coverage and human factors. In this study, the Convolution Block Attention Module (CBAM) and Bottleneck Architecture were integrated into UNet (CBAM-B-UNet) for simulating the geothermal temperature field. The proposed CBAM-B-UNet takes in a geological model containing parameters such as density, thermal conductivity, and specific heat capacity as input, and it simulates the temperature field by dynamically blending these multiple parameters through the neural network. The bottleneck architectures and CBAM can reduce the computational cost while ensuring accuracy in the simulation. The CBAM-B-UNet was trained using thousands of geological models with various real structures and their corresponding temperature fields. The method’s applicability was verified by employing a complex geological model of hot dry rock. In the final analysis, the simulated temperature field results are compared with the theoretical steady-state crustal ground temperature model of Gonghe Basin. The results indicated a small error between them, further validating the method’s superiority. During the temperature field simulation, the thermal evolution law of a symmetrical cooling front formed by low thermal conductivity and high specific heat capacity in the center of the fault zone and on both sides of granite was revealed. The temperature gradually decreases from the center towards the edges.


Introduction
Geothermal energy stands out as a novel form of renewable energy known for its high stability and low vulnerability to external influences when compared to other renewable sources such as tidal, wind, and solar energy (Zhao and Wan 2014;Wang et al. 2020;Qiu et al. 2022).Being a clean energy alternative with minimal carbon dioxide emissions, geothermal energy has gathered considerable attention from researchers and governments globally (Zhu et al. 2015;Xia and Zhang 2019;Yang et al. 2022).Understanding the temperature field distribution within geothermal areas is paramount for assessing their reserves (Bassam et al. 2010;Forrest et al. 2005).The temperature field plays a critical role in identifying the optimal drilling location and depth before commencing geothermal drilling operations (Vogt et al. 2010).Given the substantial costs associated with measuring temperature fields in geothermal regions, it becomes imperative to adopt methods that can accurately simulate these temperature distributions based on available data.
Currently, various methods are employed for simulating geothermal temperatures, including geostatistical methods (Williams and DeAngelo 2011;Siler et al. 2016) and numerical simulations (Song et al. 2018;Aliyu and Archer 2021;Salinas et al. 2021;Lv et al. 2022).These methods have been successfully applied to conventional geothermal fields.Fabbri (2001) utilized post-processing indicator Kriging outcomes to derive probability maps, which highlighted areas with high probabilities of temperatures above 80 ℃, between 70 ℃ and 80 ℃, and lower than 70 ℃.Sepúlveda (2012) used Kriging to predict drill-hole temperatures and stratigraphic data sets in the Wairakei geothermal field, New Zealand.Cheng et al. (2019) developed a conceptual numerical model that employs a fully coupled thermos-poroelastic finite-element model with Discrete Fracture Network (DFN) to simulate the response of naturally fractured geothermal reservoirs to water injection.Akbar and Fathianpour (2021) devised a computational model utilizing geological, geophysical, and structural data to enhance the understanding of high-enthalpy geothermal reservoirs.The model incorporates a Curie depth map to estimate heat sources and employs finite element methods to solve governing equations.Lesmana et al. (2021) studied and compared two development strategies, full-scale and stepwise development, for the Tompaso field in North Sulawesi, Indonesia, based on numerical and thermodynamic simulations.Conducting numerical simulations, Li et al. (2022) investigated the impact of geological layering on the thermal energy performance of underground mines, evaluating the influence of geological stratification on heat storage capacity and performance using heat storage and insulation materials.However, these methods have a few weaknesses.Both numerical simulation and geostatistical methods need detailed geological information and data quantity to complete the task, which limits the application of the two methods.
Machine learning has emerged as a promising area of research and development in geothermal exploration, with a rise in its widespread application across multiple research fields within geothermal energy.Currently, traditional machine learning techniques are predominantly employed in the exploration, reservoir characterization, petrophysics, and drilling aspects of the geothermal energy industry.In contrast, the deep learning algorithms are primarily utilized in reservoir engineering, seismic activity, and production/injection engineering (Moraga, et al. 2022;Okoroafor et al. 2022).Esen et al. (2007;2008a, b, c, d, e;2015) have conducted extensive research on ground coupled heat pump (GCHP), ground heat exchanger (GHE), and ground source heat pump (GSHP).They utilized various machine learning techniques such as ANFIS, ANN, and SVM to model and predict the performance of GCHP, GHE, and GSHP, providing diverse tools to enhance the modeling and predictive capabilities of machine learning.Rezvanbehbahani et al. (2017) applied the Gradient Boosted Regression Tree (GBRT) model to predict the heat flux distribution in Greenland using the simplified global geothermal heat flow (GHF) data set.Assouline et al. (2019) proposed a new methodology that combined the results random forest algorithm with GIS data processing and physical modeling to assess Switzerland's shallow geothermal potential via the geothermal gradient, ground thermal conductivity, and ground thermal diffusivity.In an effort to forecast the temperature of geothermal reservoirs based on selected hydro geochemistry data, Fusun and Mehmet Haklidir (2020) developed a Deep Neural Network (DNN) model, demonstrating promising results.Lösing and Ebbing (2021) suggested a machine learning-based method that employed the gradient-boosting regression technique to count geothermal heat flow (GHF) in Antarctica.Gudala and Govindarajan (2021) improved the mathematical model through the dynamic variations in the rock, fracture and fluid properties, and checked the geothermal performance through the recently developed integrated machine learning-response surface model-ARIMA model.Ishitsuka et al. (2021) developed two methods: one based on Bayesian estimation and the other based on neural network to estimate the temperature distribution of geothermal field.Xiong et al. (2022) compared the deep learning GoogLeNet model with Support Vector Machine (SVM), Decision Tree (DT), K-Nearest Neighbor (KNN) and other traditional machine learning to recognize geothermal surface manifestations.Yang et al. (2022) used the deep belief network (DBN) to identify the formation temperature field, and successfully applied the network to the identification of stratum temperature field of the southern Songliao Basin, China.Kiran et al. (2022) used FORGE well-logging data to synthesize the evolution of dynamic data, and analyzed and compared K-Nearest Neighbor, Random Forest, Decision Tree, Gradient Boosting and Deep Learning model with hidden layers.
The above researchers' work on geothermal based on machine learning and deep learning fully demonstrates the practical significance of using deep learning to predict the geothermal temperature field.Therefore, we propose a novel network called CBAM-B-UNet for simulating temperature fields in complex hot dry rocks.Specifically, CBAM-B-UNet takes key parameters including density, specific heat capacity, and thermal conductivity as inputs, and these parameters are adaptively fused by the neural network to simulate temperature fields of hot dry rocks.The data set used in this study was generated using the finite element method, and the numerical results were compared with logging data to verify the accuracy of the proposed model.Our findings indicate that CBAM-B-UNet is more effective for simulating the temperature field of hot dry rocks.Furthermore, the use of CBAM-B-UNet in complex models allows for the analysis of the evolution of fracture temperature fields, lithology, and other related factors.

Methodology
The challenge of simulating a temperature field with multiple rock parameters can be reframed as a nonlinear regression problem.In tackling such nonlinear regression challenges, neural network processing emerges as an effective solution.Thus, UNet is leveraged to address the complex task of temperature field simulation.To enhance the UNet capability in accurately simulating the temperature field of hot dry rocks and mitigating uncertainties tied to single-parameter simulations, a combination of bottleneck architectures and Convolutional Block Attention Module is employed with UNet.By utilizing a network to integrate three parameters and merging them with geological structure and additional information, a more precise geothermal temperature field can be generated.

CBAM-B-UNet architecture
The architecture of CBAM-B-UNet is based on UNet (Ronneberger et al. 2015).The UNet's efficient representation capabilities allow for the accurate simulation of temperature fields from rock parameters.Specifically, the encoder component of the CBAM-B-UNet architecture extracts both rock parameters (density, thermal conductivity, and specific heat capacity) and temperature field data.The decoder subsequently generates a corresponding functional relationship between the two data types, enabling the deep simulation of temperature fields that have been trained through the UNet.
The modified UNet features a contraction path on the left side with four downsampling blocks and an expansion path on the right side with four upsampling blocks, in line with the original UNet structure.Each downsampling block in the left path comprises a bottleneck architecture, ReLU activation function, Convolutional Block Attention Module (CBAM), sigmoid activation function, and downsampling operation.The bottleneck architecture reduces the number of network parameters, thereby accelerating the training process.Incorporating the CBAM enhances the robustness and generalization capabilities of the UNet.Both ReLU and sigmoid activation functions are utilized as nonlinear transformations to increase network nonlinearity (Krizhevsky et al. 2012).The downsampling operation involves a 2 × 2 maxpooling layer with a stride of 2, reducing the feature map size by half while retaining the maximum value.The intermediate bottlenecks include the bottleneck architecture, ReLU activation function, CBAM, and sigmoid activation function.Each upsampling block includes an upsampling operation (2 × 2 bilinear interpolation with a stride of 2), concatenation to merge left path features, bottleneck architecture, ReLU activation function, CBAM, and sigmoid activation function.The upsampling operation uses an upsampling layer to double the input image size.Finally, the temperature field is generated by a 1 × 1 convolution layer.By adjusting the number of output channels to 1, the network can accurately map rock parameters to the temperature field during the contraction and expansion learning phases, thereby achieving multi-parameter fusion.The structure of CBAM-B-UNet is shown in Fig. 1.

Convolutional block attention module (CBAM)
The convolutional block attention module (CBAM) was introduced by Woo et al. (2018).The module includes two sequential submodules, namely the channel and spatial submodules, and serves as a straightforward and efficient attention mechanism for feedforward convolutional neural networks.CBAM aims to direct the attention to the crucial features while also enhancing the representation capability of the neural network.By leveraging attention mechanisms, CBAM effectively focuses on informative features while suppressing redundant ones.In this study, the channel attention module and the spatial attention module are sequentially applied, facilitating the transmission of information in the neural network by learning to reinforce or suppress relevant characteristic information.Figure 2 shows the architecture of CBAM.
The channel attention module represents a distinctive type of attention module that aims to address the information loss commonly associated with single pooling operations.This is achieved by performing two pooling operations (maxpooling and averagepooling) in order to obtain two different feature maps.These maps are then processed by multi-layer perceptual filters and added together.Finally, the sigmoid activation function is applied to obtain the channel attention.Figure 3 shows the channel attention module.
The channel attention is as follows: where M c (F ) is channel attention module;σ (•) denotes the sigmoid function; MLP(•) is a multilayer perceptron; AvgPool(•) is avgpooling; MaxPool(•) is maxpooling.The spatial attention module principally reflects the importance of input values in the spatial dimension.The attention module is obtained through maxpooling and averagepooling, concatenation, convoluted by a standard convolution layer, and finally sigmoid activation function.Figure 4 shows the spatial attention module.
The spatial attention can be expressed as: (1) The input feature map is first multiplied by the channel attention point, then multiplied by the spatial attention point, and ultimately the final feature map is obtained after CBAM processing.This process is as follows: where ⊗ represents the multiplication of matrices by elements; F ′ is input characteristic map; F ′′ is output characteristic map.

Bottleneck architectures
The bottleneck architecture is a crucial component of ResNet, featuring a distinctive bottleneck design (He et al. He et al. 2016).This module utilizes three convolutional kernels of sizes 1 × 1, 3 × 3, and 1 × 1 to reduce network parameters and accelerate network training.The introduction of the CBAM enhances the network's robustness and generalization capabilities, albeit at the cost of increased network parameters, heightened computational complexity, and slower training speeds.To address this challenge, integrating the bottleneck architecture into UNet helps expedite network training.Figure 5 shows the bottleneck architecture.(2) (5)

Data set preparation
As a data-driven algorithm, the performance of CBAM-B-UNet is contingent upon the qualities of the training data set.In the study, the training data set builds upon the simulation of the temperature field of the strata after 600,000 years utilizing the finite element method.The rock parameters are derived from high-temperature and high-pressure petrophysical experiments and previous research (Zhang et al. 2021).To simplify the finite element calculation, this study posits several assumptions as the basis for establishing labeled data: (1) The rock matrix is considered to be homogeneous and isotropic, particularly with regard to thermal conductivity, which is assumed to be temperature independent.
(2) This study solely accounts for deep heat sources and does not take into consideration the generation of radioactive heat by rocks.
(3) Hydrothermal geothermal activity is not accounted for in the geological model, and the rock mass is assumed to be of the hot dry geothermal type.As water is not a part of the geological model, only heat conduction and energy transfer are considered.
(4) The dimensions of the geological model are 16 km × 16 km, with the heat source temperature set at 800 ℃ and the ground temperature set at 20 ℃.
The rock mass parameter ranges for all training data sets analyzed in this study are shown in Table 1.The geological structure model for the training data subset is shown in Fig. 6.Density, thermal conductivity, and specific heat capacity in the geological model are shown in Fig. 7. Subsequently, solving the temperature field was carried out using the finite element method, and the annotated results are shown in Fig. 8.

Data processing
The purpose of preprocessing data is to modify it to align with the requirements of the model and ensure compatibility between the data and model.Variations in values may result in the over-representation of attributes with greater values and increase training time for the neural network.Algorithms based on sample distance are sensitive to the magnitude of data.In this research, three parameters (density, thermal conductivity, and specific heat capacity) were selected to simulate the temperature field, and their values varied significantly, necessitating data preprocessing.To address this issue in the present study, a Z-score standardization technique was employed: where x * is the normalized data; x is the original data; µ is the mean of the sample data; σ is the standard deviation of the sample data. (8)

Training CBAM-B-UNet
The CBAM-B-UNet parameters are optimized using the Adam optimizer (Kingma and Ba 2014), with an initial learning rate of 0.001.To prevent overfitting and improve model generalization, the learning rate is attenuated using the cosine annealing algorithm with warm restart (Loshchilov and Hutter, Loshchilov and Hutter 2016).A batch size of 4 is used for training, and the model is trained for a total of 60 epochs.

Result test model
In this section, in order to verify the effectiveness and generalization ability of the neural network on the data set, the trained CBAM-B-UNet is applied to the geological model 1.
This section establishes a geological model, as shown in Fig. 9, comprising heat conduction channels, non-thermal conductors, and high-temperature granite conductors.The temperature field is simulated using CBAM-B-UNet and compared with the results obtained from a finite element method simulation, as shown in Fig. 10.Although the CBAM-B-UNet training relies on the data set generated by the finite element method, there exist slight disparities between the output of CBAM-B-UNet and the temperature field generated by the finite element method.Specifically, in the granite conductor, the temperature should be higher than in the periphery.However, the isotherms from the finite element method do not exhibit characteristics consistent with theoretical expectations.In contrast, the neural network simulation aligns more closely with the expected theoretical behavior.Consequently, it is concluded that the method proposed in this study offers enhanced performance in accurately predicting the temperature field, especially in scenarios where the granite conductor's temperature behavior differs from that observed in the finite element method simulations, thus showcasing the method's improved predictive capabilities.

Study area
The Gonghe Basin, located in Qinghai Province, is a rhombic basin that has developed during the Cenozoic Era.It lies on the northeast edge of the Qinghai-Tibet Plateau (Fig. 11A) and has been formed through tectonic movements of the Qilian and Kunlun Mountains (Fig. 11B) (Zeng et al. 2018;Zhang et al. 2018a, b).The basin boundary fault activity has resulted in uplift and rising of surrounding mountains; as a result, the basin has remained relatively stable, and an extensive set of Cenozoic sediments have been deposited.These sediments comprise primarily Quaternary alluvial-diluvial deposits, fluvial-lacustrine deposits, and Neogene and Paleogene lacustrine deposits.The base of the basin is mainly composed of Triassic strata and intrusive rocks, consisting of granite, granodiorite, and porphyry granite (Fig. 11C) (Wang et al. 2015;Li et al. 2015).In recent years, a series of wells (e.g., DR3, DR4, GR1, and GR2) have been organized and implemented by the China Geological Survey and Qinghai Provincial Department of Land and Resources, revealing the occurrence of high temperatures in Gonghe Basin (Fig. 11D) (Zhang et al. 2018a, b;Yan et al. 2015).This highlights the significant development potential of hot dry rocks in the Gonghe Basin.

Gonghe model
To further validate the applicability of CBAM-B-UNet, a 12 km × 20 km Gonghe geological model was developed in this section, referencing the geological model of the Gonghe Basin established by Gao and Zhao (2024).This model (Fig. 12) comprises various geological structures with complex lateral geological conditions.It is structured into four layers: two uppermost caprocks, a middle geothermal reservoir, and a lower heat source.Tectonic activities have led to the development of numerous faults and cracks horizontally within the model, serving as conduits for geothermal energy underground.Subsequently, the trained CBAM-B-UNet is utilized to simulate the temperature field of the Gonghe geological model (Fig. 13).A comparison is made between the temperature field simulated by CBAM-B-UNet and those simulated by 3D-UNet and the finite element method (Fig. 13) (Gao and Zhao 2024).The comparison results indicate that the performance of CBAM-B-UNet aligns more consistently with theoretical expectations.Specifically, areas with a higher concentration of cracks at depths of 2-3 km, 6 km, 9 km, and 18-19 km exhibit increased temperatures compared to the surrounding regions.In order to verify the accuracy of the simulation, the actual logging temperature measurement curve are compared with the temperature field simulated by CBAM-B-UNet, as shown in Fig. 14.The results reveal a high degree of consistency with the actual geological conditions, thus underlining the reliability and feasibility of CBAM-B-UNet in accurately predicting the temperature field in complex geological settings.
Figure 14a shows the theoretical steady-state crustal geotherms of the Gonghe and the temperature curve obtained by CBAM-B-UNet simulation temperature field.The output value indicates a difference of less than 20 ℃, suggesting an error rate of less than 2% for CBAM-B-UNet (Fig. 14b).These results demonstrate the high superiority of our method.

Discussion
Based on the aforementioned points, we remain confident of the potential success of our proposed approach in simulating the temperature distribution of hot dry rocks.Consequently, this segment of the study emphasizes on scrutinizing the impact of various factors such as CBAM, bottleneck architectures, and cosine annealing algorithm with the warm restart method on the performance of UNet.Additionally, we carry out an indepth analysis of the limitations and possible future directions of our study.The following discussion is based on geological model 1.

Effect of CBAM
This study enhances the capability of neural networks in handling regression problems by incorporating Convolutional Block Attention Modules (CBAM) into the original Unet architecture.The impact of CBAM on neural network performance is assessed by comparing the simulated temperature field by CBAM-B-UNet and the original UNet.The experimental outcomes reveal that, although the training duration of CBAM-B-UNet needs to be extended, the integrated attention mechanism of CBAM significantly enhances the simulation accuracy of the temperature field (Fig. 15).Notably, CBAMenhanced models outperform original UNet in simulating the effects of heat conduction channels, aligning more precisely with contemporary geological insights.These results demonstrate the efficacy of integrating CBAM into neural network structures to enhance the precision of regression modeling.

Effect of bottleneck architectures
To mitigate the time overhead induced by merging CBAM, a bottleneck architecture has been introduced into the neural network.Furthermore, the time taken for an epoch by CBAM-B-UNet, CBAM-UNet, and original UNet under identical conditions, as well as the overall training duration, were compared.The experimental findings demonstrate that CBAM-B-UNet exhibits reduced time consumption, underscoring the benefits of incorporating the bottleneck architecture.Table 2 shows a comparative analysis of the time consumed by these three methods.

Effect of cosine annealing algorithm with warm restart
Hyperparameters are a set of free parameters that provide a means of controlling the entire algorithm.In this study, the learning rate was identified as a critical  hyperparameter.To investigate the impact of the learning rate, two distinct learning rate adjustment strategies were compared in CBAM-B-UNet training, while keeping all other hyperparameters of CBAM-B-UNet constant.Figure 16 shows the loss curves resulting from the two different learning rate adjustment strategies.In the conventional algorithm, the loss value initially decreases gently, then gradually stabilizes around the 30th epoch with a high loss value.Conversely, the cosine annealing algorithm with warm restart exhibits only mild fluctuations during the attenuation process and stabilizes around the 30th epoch with a lower loss value.Notably, when the cosine annealing algorithm with a warm restart and the conventional algorithm complete training simultaneously, the conventional algorithm still exhibits underfitting, while the cosine annealing algorithm with a warm restart trains the neural network better.Consequently, this study suggests that the cosine annealing algorithm with a warm restart performs better than the conventional algorithm in training the neural network.

Limitations and future work
As an AI algorithm that is reliant on data, the training data set plays a critical role in determining the generalization capability of the neural network and is instrumental in establishing the functional relationships used in this study.The training data set for this study was created through the use of the finite element method to simulate the temperature field.As a result, the performance of our neural network is dependent, to some extent, on the finite element method.When utilizing the finite element method to establish the labels, a significant number of preconditions must be taken into account.These include the initial temperature of the heat source, the heat source's location, the boundary conditions (e.g., non-thermal conduction boundary), and the specific time at which the temperature conduction occurs.These preconditions limit the neural network's ability to simulate the temperature field solely under certain circumstances.Consequently, it is not possible to simulate the temperature field of hot dry rocks over time dimensions.Moreover, the process of setting up the labels is time-consuming.

Conclusions
This study utilizes the CBAM-B-UNet method to simulate the temperature field of hot dry rock.The main findings are as follows: 1. Based on the simulated temperature field: The cover layer has a significant impact on the regional temperature field due to its low thermal conductivity.This results in the temperature field above the cover layer being lower than the surrounding temperature field.Compared to granite and the crust, thermal conductive channels exhibit higher heat transfer rates, with temperatures in the conductive channels also higher than in the surrounding layers.The temperature field inside granite is higher than the surrounding geothermal field, indicating a faster heat transfer speed compared to the surrounding layers.

Fig. 2
Fig.2 Convolutional block attention module -B-UNet takes the geological model containing rock parameters R (density, thermal conductivity, and specific heat capacity) as input and the temperature field T as expected output.That is, the relationship between R and T is established by CBAM-B-UNet: where CBAM − B − Net(•) denotes an CBAM-B-UNet;θ = {W , b},W and b both are learnable parameters, W represents weight matrix, b represents bias matrix.In the training process of CBAM-B-UNet, the optimization and adjustment of the objective function are iterative.By continually comparing the current objective function with the

Fig. 6 Fig. 7
Fig. 6 Four representative samples from 10,000 simulated training data sets.a Pleated structure model.b Horst model.c Horizontal structure model.d Horizontal structure model.Different geological structure model enriches the training data set

Fig. 8
Fig. 8 The simulated temperature field in the context of a pleated structure model, b horst model, c horizontal structure model, and d horizontal structure model.The finite element method is used to simulate the heat conduction of the model, the temperature field after 600,000 years is simulated, and the labeled data are established

Fig. 11
Fig. 11Sketch map of regional geology and geothermal geology in Gonghe basin, northeastern Tibetan Plateau (modified fromZhang et al. 2021)

Fig. 13
Fig.13 Comparison of geological models in the Gonghe Basin using CBAM-B-UNet, 3D-UNet, and the finite element method to simulate the temperature field.a Temperature field simulated by CBAM-B-UNet; b temperature field simulated by 3D-UNet (Gao and Zhao 2024); c temperature field simulated by the finite element method (Gao and Zhao 2024)

Fig. 14 a
Fig. 14 a The theoretical steady-state crustal geotherms of the Gonghe and the temperature curve obtained by CBAM-B-UNet simulation temperature field.b The temperature difference between the actual well logging temperature curve and the simulated temperature curve

Fig. 16
Fig. 16The loss curves of two different learning rates: the traditional algorithm is blue curve, and cosine annealing is red curve 2. Based on training the neural network: By incorporating attention mechanisms, a better calculation of the weights of three parameters and fitting of the spatial geological model have been achieved.Integration of bottleneck architectures enhances the training speed of the network and significantly reduces the time required for network training.The cosine annealing algorithm with warm restarts can improve the network's fitting efficiency.Utilizing a multi-parameter fusion network to simulate the temperature field can effectively leverage multiple parameters, leading to more accurate results.

Table 1
Rock mass parameters

Table 2
Time consumed for the training and