CLAP: Gas Saturation Prediction in Shale Gas Reservoir Using a Cascaded Convolutional Neural Network–Long Short-Term Memory Model with Attention Mechanism

: Gas saturation prediction is a crucial area of research regarding shale gas reservoirs, as it plays a vital role in optimizing development strategies and improving the efﬁciency of exploration efforts. Despite the advancements in deep learning techniques, accurately modeling the complex nonlinear relationships involved in gas saturation prediction remains a challenge. To address this issue, we propose a novel cascaded model, CLAP, combining convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) with an attention mechanism. It effectively captures and visualizes the intricate nonlinear relationships, enabling accurate gas saturation prediction in shale gas reservoirs. In this study, nine logging curves from 27 shale gas wells in the Changning area of the Sichuan Basin were used to train the CLAP model for predicting the gas saturation of the Wufeng-Longmaxi Formation shale. Compared to the Archie and random forest models, the CLAP model exhibited enhanced accuracy in predicting shale gas saturation. Promisingly, the CLAP model demonstrates outstanding statistical performance in gas saturation prediction, achieving an impressive R 2 score of 0.762 and a mean square error (MSE) score of 0.934. These positive results highlight the effectiveness and potential utility of our proposed CLAP model in accurately predicting gas saturation in shale gas reservoirs. The application of deep learning techniques, such as CNNs, LSTM, and attention mechanisms, presents a promising avenue for further advancements in this ﬁeld.


Introduction
A shale gas reservoir is a very special type of reservoir, and the prediction of its gas saturation is very important for evaluating the gas reserves and development potential of the reservoir.However, due to the complexity and particularity of shale gas reservoirs, the prediction of gas saturation faces some challenges.Firstly, the porosity of shale gas reservoirs is very low, and the gas mainly exists in the micropores and nanopores of the rock in the adsorbed state.The release and flow mechanism of this adsorbed gas is very different from that of traditional reservoirs, so the traditional gas saturation model may not be suitable for shale gas reservoirs.Secondly, the rock properties and components of shale gas reservoirs are complex and diverse, including organic matter content, general rock texture (e.g., interlocking pattern, shales, and habits of primary mineral grains), mineral composition, and pore structure.The influence of these factors on gas saturation is very complicated, and traditional models often fail to accurately consider the influence of these factors.Researchers have proposed new methods and models to predict shale gas reservoirs' gas saturation.These methods include the electrical resistivity method, the non-electro special technique, and deep learning methods.These methods attempt to comprehensively consider factors such as rock properties, geological conditions, and stratigraphic characteristics to improve the prediction accuracy of gas saturation.
The electrical resistivity method was born in the 1920s, and was mainly used for the identification of oil and gas reservoirs, lithology classification, and quantitative interpretation and evaluation of reservoirs [1][2][3][4][5].However, the study of water saturation did not make any progress until Archie proposed the calculation method of water saturation in 1942 [2].While the Archie formula has been utilized, it comes with stringent prerequisites and challenging conditions regarding formation [3,4].A succession of resistivity-porositysaturation models for water saturation measurement have been developed, with several earning recognition in shale applications.Literature reviews indicate that primary factors affecting moisture estimation include negatively charged clays, clay swelling, conductive kerogen, pyrite, adsorbed water, pore structure, and low permeability [1][2][3][4][5][6][7].Many studies have been carried out on the relationship between resistivity logging data and water saturation in sandstone reservoirs, especially focusing on the Simandoux model [3], the improved Simandoux model [4], and the Indonesian model [5].Researchers have improved these models to analyze the relationship between water saturation and different types of clay minerals in more depth, such as the dual-water model [6], the Clay model, and the Waxman-Smits-Thomas (WST) model [7][8][9].More recently, researchers have also conducted many studies on water saturation prediction in organic-rich shales [10][11][12].The advantages of the electrical resistivity method are that it is simple to use, highly reliable, and suitable for saturation prediction under general geological conditions.However, shale reservoirs differ from conventional sandstone reservoirs.Factors such as the graphitization of organic matter, high pyrite content, and the added conductivity from clay minerals have a pronounced impact on resistivity.In the resistivity method (electrical approach), the more variable the parameters included in the response equation, the greater the iterative solution error.Traditional electrical logging saturation calculation methods are not particularly suitable for low-resistivity shale gas reservoirs.
In recent years, numerous scholars have conducted research on non-electrical saturation evaluations of shale gas reservoirs using both conventional and specialized logging data [5][6][7][8][9][10].At present, some researchers relate water saturation to shale skeleton minerals, such as quartz, clay minerals, feldspar, and carbonates (including calcite, dolomite, and siderite) through statistical regression to obtain empirical formulas [10,[12][13][14][15][16].Their models may only be applicable to specific areas, but they work well [14][15][16].The electrical method of predicting water saturation is common in other countries, whereas the non-electrical method is common in China's more complex and unique geological conditions [12][13][14][15][16]. Zhang proposed a model that considers different mineral compositions through statistical regression [12].Yan, based on the fact that the water saturation of shale reservoirs in the Sichuan Basin decreases with the decrease in clay mineral content and the increase in organic matter, indicates that the calculation model with dual factors is more appropriate [13].Shi proposed a method based on the ratio of the background value of organic matter to the measured and calculated value of TOC, but did not consider the deviation effect of bound water and TOC in clay on the calculation accuracy of water saturation [14].Li found that the bound water saturation of shale reservoirs is closely related to the clay mineral content [15,16].To sum up, there is an urgent need to develop a gas saturation prediction model that is widely suitable for most shale reservoirs.Yet, traditional methodologies exhibit distinct limitations [8][9][10][11][12][13][14].The non-electrical logging method faces challenges such as inaccuracies in the indirect calculation of key reservoir parameters from logging data and a limited amount of experimental data available for correcting these computed parameters [12][13][14][15][16]. Additionally, for shales with diverse mineral combinations, mineral structures, and reservoir properties, it becomes challenging to apply a single non-electrical model to predict gas saturation across different types of low-resistivity shales.It is imperative to develop new gas saturation prediction models based on the mineral composition, organic maturity, and unique logging data characteristics of each specific type of low-resistivity shale [12][13][14][15][16].
In the field of petroleum science and engineering, it has become a common method to use machine learning and deep learning algorithms for logging data analysis and prediction.Aifa successfully predicted the permeability and porosity of the Hassi R'Mel gas field in Algeria using a neuro-fuzzy system [17].Al-Mudhafar integrated advanced machine learning algorithms with log interpretation to accurately model lithofacies classification and permeability by deriving complex relationships in logging data [18].Wood proposed a TOB learning network algorithm as an optimized data-matching algorithm with high accuracy and interpretability, which provides an ideal tool for deeper data mining [19].Otchere introduced a novel ensemble model, combining random forest and Lasso regularization techniques for feature selection, which enhanced reservoir representation using the Extreme Gradient Boosting (XGBoost) regression model for permeability and water saturation prediction [20].Drawing from the classical capillary pressure formula, Xu established a linear regression model linking rock's capillary force inversely to porosity squared and correlated it with trap height in the pure gas zone [21].Huang introduced a shale gas reservoir saturation evaluation model using the random forest regression algorithm, offering a highly adaptable tool with strong generalization for shale gas development.Huang introduced a shale gas reservoir saturation evaluation model using the random forest regression algorithm, offering a highly adaptable tool with strong generalization for shale gas development [22].However, most machine learning models heavily rely on data preprocessing methods and often struggle to handle complex nonlinear relationships [23][24][25][26][27][28][29][30][31].This limitation holds true for gas saturation prediction in shale gas reservoirs, where accurately capturing the intricate nonlinear connections across various reservoir indicators becomes crucial [32][33][34][35][36][37].
Historically, gas saturation estimation of the Wufeng-Longmaxi shale in the Southern Sichuan basin was primarily based on the resistivity model [38][39][40][41][42].However, this method's limited precision compromised the accuracy of reservoir evaluations [38][39][40][41][42].In response, this study integrates well logs with experimentally measured gas saturation data, utilizing a cascaded deep learning framework that combines convolutional neural networks (CNNs), Long Short-Term Memory (LSTM), and attention mechanisms (ATTs) to predict the gas saturation of a shale gas reservoir.This approach seeks to harness the strengths of deep learning methodologies in tandem with geological rock and gas reservoir characteristics and logging data, aiming to bolster the precision and reliability of gas saturation predictions.

Source of Data
In this study, we utilized a dataset consisting of nine logging curves, namely natural gamma (GR), uranium-free gamma (KTH), uranium (U), potassium (K), acoustic time difference (AC), neutron (CNL), density (DEN), deep lateral resistivity (RT), and shallow lateral resistivity (RXO), collected from Schlumberger.These curves correspond to the Wufeng-Longmaxi Formation shale in 27 shale gas wells located in the Changning area, located at the southern edge of the Sichuan Basin.To train our model, we employed a total of 1436 gas saturation measurements from these wells as the experimental data.Subsequently, we utilized this dataset to train the model, allowing it to learn the complex relationships between the logging curves and gas saturation levels.Following the training phase, we applied the trained model to predict the gas saturation levels in an additional set of five shale gas wells that were not included in the training phase.
All these samples were analyzed for water saturation.Based on these measurements, gas saturation was determined by subtracting the water saturation from 100%.Dry shale was put in an environment with constant humidity.Vapor diffusion absorption occurs in shale when the humidity in the shale is lower than that in the external environment, increasing the water content in the shale.Then, water saturation was calculated based on the quality variation of the shale samples during this period [25,26].

Analysis of Feature Correlation and Importance
Correlation analysis is a statistical method used to measure and evaluate the strength and direction of relationships between variables to reveal intrinsic connections, predict modeling, explore data, assist feature selection, and find patterns, trends, and anomalies to improve model efficiency and accuracy.
Feature correlations are visualized by plotting, where the numerical magnitude represents the degree of correlation, the maximum value is 1, and a plus or minus sign represents a positive or negative correlation.Since the main task of this experiment is to predict water saturation, we mainly look at the correlation between water saturation and other columns, so that we can select the features with high correlation for prediction.In the second column of the figure, we can see that the correlation of all columns is greater than 0.1, which means that the prediction of water saturation is relevant.
In order to reveal the degree of association between each feature and the target variable and to understand which features play a key role in the prediction of the target variable, the machine learning random forest model has an important feature that can analyze the importance of features [23].Therefore, a random forest model is constructed to predict the importance of features.In the prediction process, the importance of the input parameters is analyzed, that is, the contribution value of the logging curve type to the prediction results of the random forest regression algorithm.Ten logging curves of natural gamma (GR), uranium-free gamma (KTH), uranium (U), thorium (TH), potassium (K), acoustic time difference (AC), neutron (CNL), density (DEN), deep lateral resistivity (RT), and shallow lateral resistivity (RXO) were selected as the input curves of the sample, and core water saturation (SW) was used as the output label (Figure 1).The relationship between the well logging curve and the core water saturation was analyzed.It was found that DEN, CNL, RT, RXO, K, AC, GR, U, and KTH are of high importance in the prediction of water saturation in ultra-low resistivity shale gas reservoirs, while TH is of general importance.Therefore, nine well-logging curves with high importance were finally selected as the input curves of the prediction model.

Water Saturation Prediction Method
A brief description of the experimental procedure.The process of this experiment is as follows: the original data set is obtained, and the experimental procedure involved several steps.Firstly, the original dataset was obtained and subjected to various analyses, including feature correlation and importance analysis, in order to explore the relationships within the data.The experimental model employed in this study is the CLAP model (combining convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) with an attention mechanism).The model underwent

Water Saturation Prediction Method
A brief description of the experimental procedure.
The process of this experiment is as follows: the original data set is obtained, and the experimental procedure involved several steps.Firstly, the original dataset was obtained and subjected to various analyses, including feature correlation and importance analysis, in order to explore the relationships within the data.The experimental model employed in this study is the CLAP model (combining convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) with an attention mechanism).The model underwent training using the prepared dataset, and its performance was evaluated.To assess the model's effectiveness, it was utilized for gas saturation prediction.Figure 2 visually represents the complete pipeline for predicting water saturation using the CLAP model.It provides a clear illustration of the step-by-step process and elucidates the specific role played by each component within the pipeline.The CLAP model is a pluggable module bridging the split data to the gas saturation.

Water Saturation Prediction Method
A brief description of the experimental procedure.
The process of this experiment is as follows: the original data set is obtained, and the experimental procedure involved several steps.Firstly, the original dataset was obtained and subjected to various analyses, including feature correlation and importance analysis, in order to explore the relationships within the data.The experimental model employed in this study is the CLAP model (combining convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) with an attention mechanism).The model underwent training using the prepared dataset, and its performance was evaluated.To assess the model's effectiveness, it was utilized for gas saturation prediction.Figure 2 visually represents the complete pipeline for predicting water saturation using the CLAP model.It provides a clear illustration of the step-by-step process and elucidates the specific role played by each component within the pipeline.The CLAP model is a pluggable module bridging the split data to the gas saturation.Furthermore, Tables 1-3 offer comprehensive comparisons and detailed analyses of the gas saturation prediction results, as well as the metrics among the three aforementioned models.CNNs are particularly advantageous when dealing with data that exhibits a similar network structure, such as time series and image data.Their benefits include parameter sharing and sparse connections, which lead to a reduction in the number of learning parameters required.Consequently, CNNs can effectively train on smaller datasets, thereby mitigating the risk of overfitting.Usually, the CNN architecture is primarily comprised of several modules, with the convolutional layer being the central component that sets it apart from other neural networks.In this layer, filter parameters are employed to perform convolution operations on the input layer (experimental data), enabling the extraction of fundamental features.These filter parameters are initially randomly initialized, and then the defined loss function is utilized for backpropagation in order to obtain the most suitable filter parameters for feature extraction [24].Taking the convolution of two-dimensional data as an example, the convolution operation formula is: where * is the convolution operation.
The second module in a convolutional neural network is the pooling layer, which calculates aggregate statistics for a specific layer of the network.Its primary purpose is to reduce model size, improve computation speed, and enhance the robustness of extracted features to mitigate overfitting.The pooling layer has a significant advantage over the convolutional layer-it does not have any parameters to learn, thereby alleviating parameter pressure within the network.Two commonly used types of pooling layers are max pooling and average pooling (Tables 1-3).Let's consider two-dimensional data as an example.Max pooling compresses the input data by selecting the maximum element value from the corresponding area, whereas average pooling calculates the average value within the area.
The third module is the fully connected layer, which performs a complete connection between neurons.It applies an appropriate activation function to generate the output activation values, representing the features extracted through the convolutional neural network [25].

LSTM Model
Long Short-Term Memory (LSTM) models are a variant of recurrent neural networks (RNNs), which are commonly used for modeling and prediction tasks that deal with sequence data (Figure 3).Compared with the traditional RNN model, the LSTM model introduces a gating mechanism, which can better capture and remember the long-term dependencies in the input sequence [26].
The core idea of LSTM model is to use memory units (cells) to store and transfer information, and to control the flow of information through gates.Specifically, the LSTM model consists of an input gate, a forget gate, an output gate, and a memory cell [27].
The input gate determines how much input information will be passed to the memory cell, the forget gate determines whether to delete the previous memory, and the output gate determines the output of the hidden state.The memory unit is responsible for storing and transferring long-term information, which is controlled and updated by the calculations of the gating unit.model consists of an input gate, a forget gate, an output gate, and a memory cell [27].Error!Reference source not found.
The input gate determines how much input information will be passed to the memory cell, the forget gate determines whether to delete the previous memory, and the output gate determines the output of the hidden state.The memory unit is responsible for storing and transferring long-term information, which is controlled and updated by the calculations of the gating unit.Where: xt is the input data at time t; Ct − 1 is the memory value at time t − 1; ht − 1 is the output value of LSTM at time t − 1.The three data xt, Ct−1, and ht−1 constitute the input data of the model.Ct is the memory value at time t, ht is the output value of LSTM at time t, and the two data Ct and ht constitute the output data of the model [28].Error!Reference source not found.
Control functions of forget gate, input gate and output gate: Where: x t is the input data at time t; C t−1 is the memory value at time t − 1; h t−1 is the output value of LSTM at time t − 1.The three data x t , C t−1 , and h t−1 constitute the input data of the model.C t is the memory value at time t, h t is the output value of LSTM at time t, and the two data C t and h t constitute the output data of the model [28].
Control functions of forget gate, input gate and output gate: where b o , U c , Wo are the bias, the input weight, and the cyclic weight of the forget gate, respectively.In these variants, one can optionally use the cell state as an additional input to the three gates of the ith cell (Tables 1-3).

Attention Mechanism
Attention mechanism is an important component used in neural network models (Figure 4).Its principle is to assign different attention weights to different parts of the input data, thereby reducing the role of irrelevant parts [29,30].This enables the model to focus more on important information during processing and learning tasks, ultimately enhancing performance.As shown in Figure 4, the attention mechanism focuses on relevant parts of the input sequence while generating an output.It involves computing attention weights that determine the importance of each element in the input sequence with respect to a query.These attention weights are used to calculate a context vector, which captures the most relevant information from the input.The context vector is then combined with the query to produce the final output.
Error! Reference source not found.where is the score of the feature ve higher score indicates greater attention. ℎ , ℎ is the weight value of the it ture in the attention mechanism, which is the ratio of the score of the feature v total population.Then, all vectors are summed and averaged to obtain the fin (Figure 4).

CLAP Model
The CNN-LSTM model with an attention mechanism is applied in the p shale gas saturation.This study focuses on utilizing data from 27 shale gas w in the Changning area, situated on the southern margin of the Sichuan Basin, targeting the ZhongWufeng Formation and Longmaxi Formation shale.The in the model involves performing convolution operations on the input data, eff tracting local features (depicted in Figure 5).The convolutional neural netw plays a crucial role in this extraction process.The extracted features obtain So as to improve the performance and performance of the model, the relevant formula [29,30] is as follows: ∑ N j=1 e (s(h i ,h t )) (5) where α i is the score of the feature vector, and a higher score indicates greater attention.s(h i , h t ) is the weight value of the ith input feature in the attention mechanism, which is the ratio of the score of the feature vector to the total population.Then, all vectors are summed and averaged to obtain the final vector α (Figure 4).

CLAP Model
The CNN-LSTM model with an attention mechanism is applied in the prediction of shale gas saturation.This study focuses on utilizing data from 27 shale gas wells located in the Changning area, situated on the southern margin of the Sichuan Basin, specifically targeting the ZhongWufeng Formation and Longmaxi Formation shale.The initial step of the model involves performing convolution operations on the input data, effectively extracting local features (depicted in Figure 5).The convolutional neural network (CNN) plays a crucial role in this extraction process.The extracted features obtained from the CNN are then fed into the Long Short-Term Memory (LSTM) network for sequential encoding.The LSTM network enables the modeling of long-term dependencies within the sequence data, generating a contextual representation.Following the LSTM output, attention weights are calculated to discern and emphasize significant segments of the input sequence.These attention weights serve as indicators of the relative importance of different parts of the sequence.By employing these weights, a weighted summation of the LSTM outputs is performed, obtaining an integrated context representation that better captures essential information.This integrated context representation subsequently serves as input to various structures, including the fully connected layer, facilitating the prediction of gas saturation.
sequence.These attention weights serve as indicators of the relative importance of different parts of the sequence.By employing these weights, a weighted summation of the LSTM outputs is performed, obtaining an integrated context representation that better captures essential information.This integrated context representation subsequently serves as input to various structures, including the fully connected layer, facilitating the prediction of gas saturation.The CLAP model offers several advantages.Firstly, the CNN component excels at extracting local features from the gas saturation experimental data, enabling effective capture of feature information at various scales (as demonstrated in Figure 6).This capability allows the model to extract multiple levels of abstract representation from the input sequence, thereby expressing the intrinsic characteristics of the experimental data more accurately.Secondly, the attention mechanism plays a pivotal role in the CLAP model.It selectively focuses on important segments of the input experimental data.Through selflearning, the model can autonomously determine which parts are crucial for predicting gas saturation, effectively introducing attention into the decision-making process.Lastly, due to the cohesive integration of the CNN, LSTM, and attention mechanism, the CLAP model exhibits strong expressive power and generalization ability [31].It can effectively capture the information embedded within the input experimental data, leading to more precise predictions of gas saturation (as illustrated in Tables 4 and 5).The CLAP model offers several advantages.Firstly, the CNN component excels at extracting local features from the gas saturation experimental data, enabling effective capture of feature information at various scales (as demonstrated in Figure 6).This capability allows the model to extract multiple levels of abstract representation from the input sequence, thereby expressing the intrinsic characteristics of the experimental data more accurately.Secondly, the attention mechanism plays a pivotal role in the CLAP model.It selectively focuses on important segments of the input experimental data.Through self-learning, the model can autonomously determine which parts are crucial for predicting gas saturation, effectively introducing attention into the decision-making process.Lastly, due to the cohesive integration of the CNN, LSTM, and attention mechanism, the CLAP model exhibits strong expressive power and generalization ability [31].It can effectively capture the information embedded within the input experimental data, leading to more precise predictions of gas saturation (as illustrated in Tables 4 and 5).The mean absolute error (MAE) is also a common regression loss function, which indicates the average magnitude of error in the predicted value regardless of the direction of the error, and its formula is as follows: Mean square error (MSE) is used in regression prediction tasks to measure the average squared difference between the predicted values of a model and the true values of the model.The formula is as follows: The R 2 score, also known as the coefficient of determination, is one of the statistical measures used to assess the goodness of fit of a regression model.It indicates the proportion of variance that the model is able to explain in the target variable, and its formula is as follows:

Presentation and Analysis of Experimental Results
Based on the Pytorch framework, this experiment used the Python language to write code, and completed the construction and training of the CLAP combined model.The dataset was processed and divided into two parts: 70% of the data were used for training the experimental model, while the remaining 30% were utilized for model validation, and the data include feature depth, AC, GR, CNL, DEN.

Characteristics of Error Function Variation and Model Convergence
The CLAP model was trained using 1436 samples over 500 epochs.The training error variation throughout the training process is illustrated in Figure 7.An epoch, in this context, refers to the complete forward and backward propagation of all data through the network [13][14][15].The loss plots indicated convergence after approximately 100 epochs.As the training progressed, the training error decreased to 0.014 (Figure 7a), while the R 2 value steadily increased to 0.843 (Figure 7b).This suggests that the model's regression analysis error was minimal, indicating good performance.

Result and Discussion
In this study, nine logging curves-including natural gamma (GR), uranium-free gamma (KTH), uranium (U), potassium (K), acoustic time difference (AC), neutron (CNL), density (DEN), deep lateral resistivity (RT), and shallow lateral resistivity (RXO)-were sourced from 27 shale gas wells in the Changning area at the southern edge of the Sichuan Basin.These curves, related to the Wufeng-Longmaxi Formation shale, were utilized to train the CLAP model.This trained model was then applied to predict gas saturation in five other shale gas wells not used in the training phase.Upon comparison with the Archie model (methods and details referenced in [13]) and the random forest model, the CLAP model demonstrated superior accuracy in predicting shale gas saturation.
Firstly, the prediction accuracy of the three prediction models was compared through the prediction results of gas saturation in a single well (Table 6, Figure 8).Well A is a shale gas well in the west of the Changning area.The lithology of the Wufeng-Longmaxi Formation is mainly black silica shale, gray calcarine shale, and gray clay shale, and the shale gas is well displayed.The GR curve of the Wufeng-Longmaxi Formation shows a high value at 1322-1313 m, and the lateral resistivity curve of the deep and shallow parts is low, ranging from 14 Ω•m to 77 Ω•m.The resistivity of some wells is less than 20 Ω•m, which makes the curve as a whole zigzag.By comparing the gas saturation prediction results of the Archie model, random forest model, and CLAP model in well A, it can be seen that the gas saturation prediction results of the CLAP model are obviously the most consistent with the experimental results of gas saturation obtained from the core.The gas saturation calculated by the Archie model is significantly lower than the experimental data of gas saturation.For the random forest model, the difference between the predicted and experimental results of gas saturation is significantly larger than that of the CLAP model.In order to further compare the accuracy of the prediction results of CLAP model, Archie model, and random forest model, the correlation analysis between the predicted gas saturation results of the three models and the core analysis of well A was carried out (Figure 9).It can be seen that the predicted results of the CLAP model have the strongest correlation with the experimental results, with an R 2 of 0.97, while the predicted results of random forest model have the worst correlation with the experimental results, with an R 2 of only 0.57.

Result and Discussion
In this study, nine logging curves-including natural gamma (GR), uranium-free gamma (KTH), uranium (U), potassium (K), acoustic time difference (AC), neutron (CNL), density (DEN), deep lateral resistivity (RT), and shallow lateral resistivity (RXO)-were sourced from 27 shale gas wells in the Changning area at the southern edge of the Sichuan Basin.These curves, related to the Wufeng-Longmaxi Formation shale, were utilized to train the CLAP model.This trained model was then applied to predict gas saturation in five other shale gas wells not used in the training phase.Upon comparison with the Archie model (methods and details referenced in [13]) and the random forest model, the CLAP model demonstrated superior accuracy in predicting shale gas saturation.
Firstly, the prediction accuracy of the three prediction models was compared through the prediction results of gas saturation in a single well (Table 6, Figure 8).Well A is a shale gas well in the west of the Changning area.The lithology of the Wufeng-Longmaxi Formation is mainly black silica shale, gray calcarine shale, and gray clay shale, and the shale gas is well displayed.The GR curve of the Wufeng-Longmaxi Formation shows a high value at 1322-1313 m, and the lateral resistivity curve of the deep and shallow parts is low, ranging from 14 Ω•m to 77 Ω•m.The resistivity of some wells is less than 20 Ω•m, which makes the curve as a whole zigzag.By comparing the gas saturation prediction results of the Archie model, random forest model, and CLAP model in well A, it can be seen that the gas saturation prediction results of the CLAP model are obviously the most consistent with the experimental results of gas saturation obtained from the core.The gas saturation calculated by the Archie model is significantly lower than the experimental data of gas saturation.For the random forest model, the difference between the predicted and experimental results of gas saturation is significantly larger than that of the CLAP model.In order to further compare the accuracy of the prediction results of CLAP model, Archie model, and random forest model, the correlation analysis between the predicted gas saturation results of the three models and the core analysis of well A was carried out (Figure 9).It can be seen that the predicted results of the CLAP model have the strongest correlation with the experimental results, with an R 2 of 0.97, while the predicted results of random forest model have the worst correlation with the experimental results, with an R 2 of only 0.57.The comparison of gas saturation prediction results of the three models with experimental data in the five shale gas wells is shown in Table 7.The mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R 2 ) between the predicted results of the CLAP model and the experimental data were 1.44-2.01,0.89-1.87,and 0.74-0.98,respectively.It can be seen that there is a strong correlation between the predicted results and the experimental data.Compared with the Archie model, the MAE, RMSE, and R 2 of the prediction results of the Archie model and the experimental data were between 12.34-27.43,12.34-16.93,and 0.46-0.78,respectively, indicating a poor correlation between them.The MAE, RMSE, and R 2 of the random forest model were between 8. 45-16.45, 13.46-27.47,and 0.26-0.67,respectively, indicating the worst correlation.From the perspective of the three error evaluation parameters, the CLAP model has the smallest error between the prediction results and the experimental data.By comparing the calculation results of this well, it can be found that the calculation results of the Archie model are generally lower than the experimental results, and there are large differences in some data, while the prediction results of the random forest model are very different from the experimental results.Therefore, both the Archie model and the random forest model are not suitable for the calculation of shale gas saturation in the study area.However, the error between the prediction results of the CLAP model and the experimental results is relatively small, so the CLAP model is more suitable for the prediction of shale gas saturation in the Changning area (Figure 9).Comparing the above three models, it can be seen that the CLAP model is superior to the traditional Archie model and the random forest model in the prediction calculation of shale gas saturation (Figure 9).Although the CLAP model does not have an equation representing physical properties, it can establish a more accurate prediction model of water saturation through multivariate data network training of logging parameters related to water saturation, and then obtain a more accurate gas saturation.The advantage of the CLAP model is that it can make full use of the diversity of logging data and combine the characteristics of convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) networks, has good memory ability in time series, and uses an attention mechanism (ATT) to improve the importance and correlation of features [43][44][45].This enables the model to capture the time series information in the input data and automatically select the most relevant features for prediction [43][44][45].The superior precision of the CLAP prediction model stems from two fundamental components: the incorporation of the attention mechanism and the synergistic combination of CNN and LSTM neural network architectures [46][47][48][49].The attention mechanism plays a pivotal role by assigning varying attention weights to different segments of the input data.This enables the model to effectively diminish the influence of irrelevant information and instead prioritize relevant and important details during the processing and learning tasks [46][47][48][49].The attention mechanism was integrated into CLAP, allowing it to selectively concentrate on significant aspects within the input experimental data [46][47][48][49].By leveraging the attention mechanism, the model becomes adept at identifying and focusing on the most informative features in the input, leading to enhanced predictive capabilities [50,51].Moreover, CNN and LSTM neural network structures are combined to model the implicit information of input data.The CNN is mainly responsible for extracting the local features of the experimental data of gas saturation, enabling it to effectively capture the feature information at different scales [50][51][52][53].The LSTM component addresses the challenge of modeling long-term dependencies, which are crucial in sequence data [50][51][52][53].Combining these two neural network structures results in a synergistic approach, enabling a more comprehensive understanding of the input experimental data, resulting in an improved prediction model [50][51][52][53].
Compared to the CLAP model, the problem with the random forest model is that it is relatively weak in dealing with high-dimensional data and time series data.The random forest model is more suitable for dealing with static data and low-dimensional data.Therefore, the performance of the random forest model is poor in the prediction of shale gas saturation.The applicability of the CLAP model to predict gas saturation includes four aspects: first, the quality of logging data is good, and non-formation factors can be used for prediction after correction; second, the core positioning should be accurate; third, the parameters of sensitive variables should be selected appropriately.Only by selecting sensitive logging curves of higher importance can the prediction results be optimized.The fourth aspect is the use of a large number of training sets; the number of training sets per well should be greater than 100.
In future endeavors, we aim to enhance the CLAP model by refining its attention mechanism, which, despite effectively discerning complex nonlinear relationships, still offers potential for optimization, especially across varied shale gas contexts.Additionally, while the model has shown notable efficacy with the Sichuan Basin dataset, its broader generalization across different shale gas reservoirs necessitates evaluation using data from diverse geographical regions.Subsequent studies should investigate the CLAP model's applicability as it extends beyond its current domain, making it a potential tool for predicting various time series data.This includes predicting EUR, TOC, and porosity in shale reservoir research, as well as applications in agriculture, soil analysis, weather forecasting, traffic data interpretation, and power load data analysis.The predictive insights garnered from the CLAP model can offer valuable technical guidance for expert decision-making across these sectors.

Conclusions
Traditional logging evaluation methods, often based on empirical relationships or statistical regression, struggle to delineate complex nonlinear relationships within logging data.In response, we introduce CLAP, a model that harnesses deep neural networks, particularly integrating convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) with an attention mechanism, to discern and extract concealed features from extensive logging data.This innovative approach notably enhances prediction accuracy, yielding outcomes of substantial practical value.
The high accuracy of the CLAP prediction model can be attributed to two primary factors: the introduction of the attention mechanism and the integration of CNN and LSTM neural network structures.The attention mechanism assigns differential weights to segments of input data, effectively emphasizing relevant details and diminishing irrelevant information.This prioritization, facilitated by the attention mechanism, empowers the model to hone in on the most informative features, thereby augmenting its predictive capabilities.In CLAP, the CNN captures local features from gas saturation data, while the LSTM models long-term sequence dependencies.Their combined synergy enhances the accuracy of gas saturation predictions.
Nine logging curves from 27 shale gas wells in the Changning area of the Southern Sichuan Basin were employed to train the CLAP model.This model was subsequently applied to predict gas saturation in five additional shale gas wells not included in the training phase.When compared to both the Archie model and the random forest model, the CLAP model showcased superior accuracy in predicting shale gas saturation.Notably, the CLAP model achieved an R 2 score of 0.762 and a mean square error (MSE) score of 0.934, underscoring its outstanding statistical performance and potential utility in gas saturation prediction.

Processes 2023 , 20 Figure 1 .
Figure 1.Correlation analysis of 10 logging curve data with gas saturation (based on R-squared parameter characterization).

Figure 1 .
Figure 1.Correlation analysis of 10 logging curve data with gas saturation (based on R-squared parameter characterization).

Figure 2 .
Figure 2. Experimental flow chart of water saturation prediction method in this study.

Figure 2 .
Figure 2. Experimental flow chart of water saturation prediction method in this study.

Figure 3 .
Figure 3.The memory cell structure of an LSTM.The dashed box encompasses the core section of the LSTM.

Figure 3 .
Figure 3.The memory cell structure of an LSTM.The dashed box encompasses the core section of the LSTM.

Figure 4 .
Figure 4. Attention structure diagram in this study.

Figure 4 .
Figure 4. Attention structure diagram in this study.

Figure 6 .
Figure 6.CLAP architecture in this study.

Figure 6 .
Figure 6.CLAP architecture in this study.

Figure 8 .
Figure 8.Comparison of gas saturation in Well A predicted using three models (CLAP model, random forest model, Archie model) with gas saturation obtained from experimental testing.

Figure 9 .
Figure 9. Scatter plot of gas saturation in Well A predicted by three models (CLAP model, random forest model, Archie model) versus gas saturation obtained from experiments.(a) Gas saturation calculated by CLAP model vs. experimental values of gas saturation, (b) gas saturation calculated by Archie model vs. experimental values of gas saturation, (c) Gas saturation calculated by random forest model vs. experimental values of gas saturation.

Figure 8 . 20 Figure 8 .
Figure 8.Comparison of gas saturation in Well A predicted using three models (CLAP model, random forest model, Archie model) with gas saturation obtained from experimental testing.

Figure 9 .
Figure 9. Scatter plot of gas saturation in Well A predicted by three models (CLAP model, random forest model, Archie model) versus gas saturation obtained from experiments.(a) Gas saturation calculated by CLAP model vs. experimental values of gas saturation, (b) gas saturation calculated by Archie model vs. experimental values of gas saturation, (c) Gas saturation calculated by random forest model vs. experimental values of gas saturation.

Figure 9 .
Figure 9. Scatter plot of gas saturation in Well A predicted by three models (CLAP model, random forest model, Archie model) versus gas saturation obtained from experiments.(a) Gas saturation calculated by CLAP model vs. experimental values of gas saturation, (b) gas saturation calculated by Archie model vs. experimental values of gas saturation, (c) Gas saturation calculated by random forest model vs. experimental values of gas saturation.

Table 1 .
Training parameters in this study.

Table 2 .
CNN model structural parameters.

Table 3 .
Structural parameters of LSTM models.

Table 5 .
Evaluation indicators of model results.

Table 6 .
Comparison of the prediction results of three models (CLAP model, random forest model and Archie model) in Well A and gas saturation data from the experiments.

Table 7 .
Comparison of the differences between the calculation results from three saturation models and core analysis in 5 wells.