Lithology classification method and device based on double-graph attention network, equipment and medium
By constructing a sample map and a cluster map based on a dual-graph attention network for lithology classification, and combining adversarial training, the accuracy and reliability issues of cross-well lithology identification are solved, and efficient lithology label identification in complex geological environments is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG UNIV OF SCI & TECH
- Filing Date
- 2026-06-05
- Publication Date
- 2026-07-31
AI Technical Summary
Existing lithology identification methods lack accuracy and reliability in cross-well applications, especially in complex geological environments where they fail to meet actual exploration needs, and they lack a systematic approach to handling multi-scale geological features and geological constraints.
A lithology classification method based on dual-graph attention network is adopted. By constructing sample graphs and cluster graphs, and combining spatial adjacency and feature similarity, a dual-graph fusion GAT model is used for feature extraction and fusion. Combined with adversarial training of domain discriminator, gradient inversion layer and geological constraints, the accurate identification of cross-well lithology labels is achieved.
It improves the generalization ability and prediction accuracy in cross-well scenarios, and can provide stable and reliable lithological interpretation results in complex geological environments where labels are scarce.
Smart Images

Figure CN122493150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lithology identification technology, and in particular to a lithology classification method, apparatus, equipment and medium based on a dual-graph attention network. Background Technology
[0002] In oil and gas exploration and geological modeling, lithology identification is a fundamental task in reservoir evaluation. Traditional lithology analysis methods, such as cross-plot analysis, heavily rely on expert interpretation, exhibiting significant subjective bias and showing a marked decline in performance in highly heterogeneous reservoirs. To address this, researchers have gradually introduced machine learning techniques. Methods such as support vector machines, random forests, and extreme gradient boosting have shown potential in lithology identification due to their nonlinear fitting capabilities. However, these methods heavily rely on manual feature extraction, exhibiting significant limitations when handling high-dimensional, nonlinear, and geologically complex data. Subsequent developments in deep learning models, including convolutional neural networks, long short-term memory networks, graph neural networks, and transformer models, have further improved the accuracy of lithology identification by modeling local, temporal, spatial, or global features of well logging data. However, these methods still have fundamental limitations in cross-domain lithology identification. Traditional machine learning and most deep learning methods implicitly assume that the training and test sets follow an independent and identically distributed (ICD) pattern. However, in practical cross-well applications, different well locations may be situated in different structural or sedimentary environments, leading to significant differences in the distribution of well logging data, making this assumption difficult to uphold. Even geologically adjacent wells may exhibit shifts in lithological response characteristics due to variations in sedimentary microfacies, differences in provenance, or different degrees of tectonic alteration. When a model trained on single-well data is applied to another well, its prediction accuracy drops significantly.
[0003] To address the disparities in cross-well data distribution, domain adaptation techniques have been introduced into lithology identification. Existing domain adaptation methods, primarily including difference minimization strategies and adversarial training strategies, have made some progress in cross-well lithology identification. However, these methods face two main technical challenges. First, existing methods fail to adequately consider geologically specific constraints, particularly in modeling the inherent spatial correlations of well logging data, such as stratigraphic continuity and sedimentary sequence patterns. Second, existing methods lack systematic means to process multi-scale geological features, making it difficult to simultaneously capture macroscopic sedimentary facies boundaries and microscopic lithological abrupt changes. This limits the generalization ability of existing models in complex geological environments, and their accuracy and reliability in cross-well predictions fall short of practical exploration requirements. Summary of the Invention
[0004] This invention provides a lithology classification method, apparatus, equipment, and medium based on a dual-graph attention network to address the problem that the accuracy and reliability of cross-well lithology classification are insufficient to meet the needs of actual exploration.
[0005] In a first aspect, embodiments of the present invention provide a lithology classification method based on a dual-graph attention network, comprising: Obtain node information of sample nodes in the source and target domains; each sample node has multiple logging features, sample nodes in the source domain have lithology labels, and sample nodes in the target domain do not have lithology labels. A sample graph is constructed based on the spatial adjacency and feature similarity between each sample node; Each sample node is clustered, and a cluster graph is constructed using the cluster clusters as graph nodes and the cluster center points as node features. The sample image and cluster image are input into the dual-image fusion GAT model for feature extraction and fusion to obtain the sample fusion features. The sample fusion features are input into the classifier to obtain the lithological labels of each sample node in the target domain.
[0006] In one possible implementation, a sample graph is constructed based on the spatial adjacency and feature similarity between sample nodes, including: For any two sample nodes, if their depth difference is less than or equal to a preset depth threshold, then a spatial adjacency edge is established. Affinity propagation clustering is performed on the logging features of each sample node. If any two sample nodes belong to the same cluster, and the distance between their logging features is less than or equal to a preset feature distance threshold, then a feature similarity edge is established. By treating each sample node as a graph node and each spatially adjacent edge and each feature-similar edge as an edge set, a sample graph is constructed.
[0007] In one possible implementation, the sample nodes are clustered, and a cluster graph is constructed using the cluster clusters as graph nodes and the cluster centroids as node features, including: Using K The MESSEN clustering algorithm clusters individual sample nodes to obtain multiple clusters. Each cluster is treated as a graph node, and the mean of the logging features of all sample nodes within that cluster is used as the feature vector of that graph node. The K-nearest neighbor algorithm is used to establish edges between the nodes of the graph, and a clustering graph is constructed.
[0008] In one possible implementation, the dual-graph fusion GAT model includes a sample GAT network, a clustering GAT network, and an attention module. The sample graph and clustering graph are input into the dual-graph fusion GAT model for feature extraction and fusion to obtain sample fusion features, including: Input the sample image into the sample GAT network to obtain the sample local features; The clustering graph is input into the clustering GAT network to obtain cluster-level global features; Based on the affiliation relationship between each sample node and each cluster, the cluster-level global features are mapped to the sample space to obtain the sample global features; The attention module dynamically fuses local and global features of a sample to obtain fused features.
[0009] In one possible implementation, before inputting the sample graph and cluster graph into the dual-graph fusion GAT model for feature extraction and fusion to obtain the sample fusion features, the following steps are also included: Using the node information of each sample node as training data, the initial dual-graph fusion GAT model and classifier are adversarially trained by combining a domain discriminator, a gradient inversion layer, and a composite penalty function based on geological constraints, resulting in a trained dual-graph fusion GAT model and classifier.
[0010] In one possible implementation, the node information of each sample node is used as training data. This data is then combined with a domain discriminator, a gradient inversion layer, and a geologically constrained composite penalty function to perform adversarial training on the initial dual-graph fusion GAT model and classifier, resulting in a trained dual-graph fusion GAT model and classifier, including: The training data fusion features are generated by the dual-graph fusion GAT model. The fusion features are then input into the domain discriminator to obtain the probability that each sample node belongs to the source domain or the target domain. Based on each probability, the domain adversarial loss is calculated. By setting a gradient inversion layer between the dual-graph fusion GAT model and the domain discriminator, the gradient of the domain adversarial loss is inverted during backpropagation and then propagated back to the dual-graph fusion GAT model. When the training cycle meets the preset conditions, for sample nodes in the target domain whose prediction confidence is greater than the dynamic threshold, the lithology category with the highest prediction probability is used as the pseudo label, and the pseudo label loss is calculated. The classification loss is calculated based on the lithological labels of the sample nodes in the source domain, and the geological constraint loss is calculated based on the predicted probability distribution of all sample nodes. The composite penalty function value based on geological constraints is calculated based on domain adversarial loss, pseudo-label loss, classification loss, and geological constraint loss. The trainable parameters of the dual-graph fusion GAT model and classifier are iteratively updated with the goal of minimizing the composite penalty function value, resulting in the trained dual-graph fusion GAT model and classifier.
[0011] In one possible implementation, the composite penalty function based on geological constraints is:
[0012] in, for, For classifying losses, To combat losses in the domain, and For hyperparameters, Loss due to geological constraints, For pseudo-label loss; The formula for calculating geological constraint loss is:
[0013] in, For cluster consistency loss, For deep smoothing loss, To compensate for the loss caused by the jump, , and As weight.
[0014] Secondly, embodiments of the present invention provide a lithology classification device based on a dual-graph attention network, comprising: The acquisition module is used to acquire node information of sample nodes in the source domain and the target domain; each sample node has multiple logging features, the sample nodes in the source domain have lithology labels, and the sample nodes in the target domain do not have lithology labels. The first graph-building module is used to construct a sample graph based on the spatial adjacency and feature similarity between each sample node; The second graph construction module is used to cluster each sample node, using the clusters as graph nodes and the cluster center points as node features to construct a cluster graph. The feature fusion module is used to input the sample map and cluster map into the dual-map fusion GAT model to perform feature extraction and fusion, and obtain the sample fusion features. The lithology classification module is used to input the sample fusion features into the classifier to obtain the lithology labels of each sample node in the target domain.
[0015] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.
[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.
[0017] The lithology classification method, apparatus, equipment, and medium based on a dual-graph attention network provided in this invention provide a data foundation for subsequent cross-well knowledge transfer by using node information from the source and target domains as input information. A sample graph is constructed based on spatial adjacency and feature similarity, enabling the model to capture the fine-grained relationship between local formation continuity and well logging response. A global clustering graph is constructed through clustering, clustering samples into high-level semantic units, endowing the model with the ability to perceive macroscopic geological patterns. The dual-graph fusion graph attention network is used for feature extraction and fusion, effectively integrating local neighborhood information and global distribution information, overcoming the shortcomings of insufficient single-scale feature expression capabilities. This allows the classifier to output lithology labels for the target domain, achieving accurate cross-well identification even with few labels. A complete technical loop is formed from data acquisition to multi-scale feature fusion, improving the model's generalization ability and prediction accuracy in cross-well scenarios, especially in complex geological environments with scarce labels, resulting in more stable and reliable lithology interpretation results. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the implementation of a lithology classification method based on a dual-graph attention network according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the implementation of a lithology classification method based on a dual-graph attention network, provided in another embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a lithology classification device based on a dual-graph attention network provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0020] See Figure 1 The flowchart illustrating the implementation of the lithology classification method based on a dual-graph attention network provided in this embodiment of the invention is described in detail below: Step 101: Obtain node information of sample nodes in the source domain and target domain; wherein, each sample node has multiple logging features, the sample nodes in the source domain have lithology labels, and the sample nodes in the target domain do not have lithology labels.
[0021] In this embodiment, a sample node refers to a discrete data point obtained by sampling from the drilling logging curve at fixed depth intervals. Each node corresponds to the rock physical response at a certain depth location underground. Logging features include, but are not limited to, parameters such as natural gamma, sonic transit time, resistivity, and spontaneous potential. These parameters reflect the mineral composition, pore structure, and fluid properties of the rock from different dimensions. The source domain refers to well location data with artificially labeled lithological tags, and the target domain refers to unlabeled well location data to be predicted. The two may come from different wells or different sections of the same well. Due to factors such as sedimentary environment and instrument differences, the data distribution may be offset.
[0022] When acquiring node information for sample nodes, depth sampling points are first extracted from the logging data of the source and target wells. The sampling interval is set according to geological requirements, such as 0.076 meters or 0.5 meters. Each sample node is constructed with a d-dimensional feature vector, where d is the number of selected logging curves. Typically, curves sensitive to lithology and comparable across different wells are selected, such as natural gamma, sonic transit time, deep lateral resistivity, shallow lateral resistivity, spontaneous potential, and well diameter. For the source domain, each node is also associated with a lithology label, the label category of which is determined based on regional geological stratification and core thin section identification results, such as classifying mudstone, siltstone, sandstone, and breccia. For the target domain, nodes only have feature vectors and no labels. The depth values and clustering information of all nodes are also recorded to provide a basis for subsequent graph construction and geological constraints. Min-max normalization is used to transform each logging curve to the [0,1] interval to eliminate the influence of dimensions and accelerate model convergence.
[0023] Step 102: Based on the spatial adjacency and feature similarity between each sample node, a sample graph is constructed.
[0024] In this embodiment, the nodes of the sample map are each well logging sampling point. To capture the local variation patterns of lithology in the formation, a graph structure capable of depicting the relationships between sample nodes needs to be constructed. This construction is based on two key principles: depth-based spatial adjacency and feature-based spatial similarity. Specifically, for any two sample nodes, if the absolute value of the difference between their corresponding downhole depth values is less than or equal to a preset depth threshold, they are considered stratigraphically adjacent, and a spatial adjacency edge is established between them. This reflects the continuity of sedimentary formations, where the rock properties at adjacent depths typically change gradually rather than abruptly. This depth threshold can be set based on the sampling interval of the well logging data and the geological continuity characteristics.
[0025] On the other hand, in order to capture the consistency of lithology in the feature space, an affinity propagation clustering algorithm is run on the logging feature vectors of all sample nodes. This algorithm can automatically determine the number of clusters and group samples with similar features into the same cluster. For any two sample nodes belonging to the same cluster, if their logging feature distance is less than or equal to a preset feature distance threshold, a feature similarity edge is established between them.
[0026] Finally, all sample nodes are used as vertices of the graph. All the spatially adjacent edges and feature-similar edges established above together form an edge set, thus constructing a sample graph containing local neighborhood information and global feature distribution. This dual-criteria mapping method can provide a more accurate feature representation for lithology identification, preserving the local continuity in the stratigraphic depth direction while connecting nodes with similar features but not adjacent depths. This allows distant nodes in the same lithological segment to exchange information, enhancing label propagation capabilities.
[0027] Step 103: Cluster each sample node, using the clusters as graph nodes and the cluster center points as node features to construct a cluster graph.
[0028] In this embodiment, in order to capture the macroscopic semantic features of geological units at a higher level, it is necessary to construct a clustering graph from a global perspective.
[0029] First, the K-means clustering algorithm is used to divide all sample nodes (including the source and target domains) into K clusters. K is an adjustable hyperparameter used to control the granularity of the global graph, which can be set according to the geological complexity of the study area. Each cluster is considered a superpixel, representing a geologically consistent semantic unit. The feature vector of the cluster's center point is obtained by calculating the mean of the feature vectors of all sample nodes within the cluster.
[0030] Then, using these clusters as new graph nodes and their respective centroid feature vectors as node features, a vertex set for the clustering graph is constructed. To establish connections between these global nodes, the K-Nearest Neighbors (KNN) algorithm is employed. For each cluster node, the algorithm finds the top few most similar other cluster nodes in the feature space and establishes edges connecting them. The resulting clustering graph effectively compresses local sample information, characterizes the macroscopic distribution pattern of well logging data in the feature space, and lays the foundation for subsequent learning of high-level geological models.
[0031] Step 104: Input the sample image and cluster image into the dual-image fusion GAT model to perform feature extraction and fusion to obtain the sample fusion features.
[0032] In this embodiment, the dual-graph fusion GAT model aims to integrate local fine-grained information with global semantic information. This model comprises two parallel graph attention networks (GATs): a sample graph attention network and a clustering graph attention network, as well as an attention fusion module. Compared to ordinary graph convolutional networks, GATs can assign learnable attention weights to different neighbors, capturing both local and global structures more flexibly.
[0033] First, the sample map constructed in step 102 is input into the sample map attention network. This network uses multi-layer graph convolution operations and an attention mechanism to assign different weights to neighboring nodes, aggregating information from spatially adjacent and feature-similar neighboring nodes, thereby generating sample local features for each sample node that capture local stratigraphic continuity and lithological changes.
[0034] Meanwhile, the clustering graph constructed in step 103 is input into the clustering graph attention network. This network also uses a graph attention network structure to pass messages between its global nodes, learn the high-level semantic representation of each clustering node, and obtain cluster-level global features.
[0035] Since cluster graph nodes correspond to clusters rather than individual sample nodes, it is necessary to map the cluster-level global features back to the sample space based on the affiliation relationship between sample nodes and clusters, thus obtaining the sample-level global features corresponding to each sample node. This mapping is accomplished using a sample-cluster assignment matrix. This matrix is a binary matrix, where each element is 1 if the i-th sample node belongs to the k-th cluster, and 0 otherwise. By multiplying this assignment matrix by the cluster-level global features, the high-level semantic information of each cluster node can be backpropagated to all its associated sample nodes, thereby generating an aligned global representation for each sample node.
[0036] Finally, the attention fusion module receives the local features and aligned global features of each sample node, dynamically calculates the importance weights of the two features through a learnable attention mechanism, and performs a weighted summation to generate a sample fusion feature for each sample node that includes both local details and macroscopic patterns. This dynamic fusion method can provide more comprehensive and context-aware feature support for lithology classification.
[0037] Step 105: Input the sample fusion features into the classifier to obtain the lithological labels of each sample node in the target domain.
[0038] In this embodiment, the classifier typically consists of a fully connected layer followed by a Softmax activation function. Its input is the sample fusion feature vector generated in step 104, with the input dimension being the dimension of the fusion features and the output dimension being the total number of lithology categories, C. For each sample node in the target domain, the classifier outputs a C-dimensional probability vector, where each component represents the confidence level of the node belonging to the corresponding lithology category. The category corresponding to the highest probability is taken as the predicted lithology label for that node.
[0039] Through the above steps, since the entire dual-graph structure has aligned the data distribution of the source and target domains, the classifier can accurately classify the sample fusion features of the target domain, thereby achieving cross-well lithology identification.
[0040] This invention provides a data foundation for subsequent cross-well knowledge transfer by using node information from the source and target domains as input. A sample graph is constructed based on spatial adjacency and feature similarity, enabling the model to capture the fine-grained relationship between local formation continuity and logging response. A global clustering graph is constructed through clustering, clustering samples into high-level semantic units, endowing the model with the ability to perceive macroscopic geological patterns. A dual-graph fusion graph attention network is used for feature extraction and fusion, effectively integrating local neighborhood information and global distribution information, overcoming the shortcomings of insufficient single-scale feature expression. This allows the classifier to output lithological labels for the target domain, achieving accurate cross-well identification even with few labels. A complete technical loop is formed from data acquisition to multi-scale feature fusion, improving the model's generalization ability and prediction accuracy in cross-well scenarios. Especially in complex geological environments with scarce labels, more stable and reliable lithological interpretation results can be obtained.
[0041] In one possible implementation, a sample graph is constructed based on the spatial adjacency and feature similarity between sample nodes, including: For any two sample nodes, if their depth difference is less than or equal to a preset depth threshold, then a spatial adjacency edge is established. Affinity propagation clustering is performed on the logging features of each sample node. For any two sample nodes belonging to the same cluster, if the distance between their logging features is less than or equal to a preset feature distance threshold, a feature similarity edge is established. By treating each sample node as a graph node and each spatially adjacent edge and each feature-similar edge as an edge set, a sample graph is constructed.
[0042] In this embodiment, the process of constructing a sample graph based on the spatial adjacency and feature similarity between each sample node is as follows.
[0043] First, spatial adjacency edges are constructed using depth information: for any two sample nodes, if the absolute value of the difference in their downhole depths does not exceed a preset depth threshold, a spatial adjacency edge is established. The setting of this depth threshold is directly related to the formation continuity assumption and is usually on the same order of magnitude as the sampling interval of the logging data.
[0044] Secondly, feature similarity edges are constructed using well logging features: affinity propagation clustering is performed on the well logging feature vectors of all sample nodes. The advantage of this algorithm is that it does not require pre-specifying the number of clusters and can automatically divide clusters based on the similarity of the data itself. Then, for any two sample nodes belonging to the same cluster, if their well logging feature distance is less than or equal to a preset feature distance threshold, a feature similarity edge is established between them. This edge can connect non-adjacent sample nodes that are far apart in feature space but have similar rock physical responses, helping the model learn more discriminative information.
[0045] Finally, each sample node is treated as a vertex of the graph, and all the spatially adjacent edges and characteristically similar edges established above are merged into an edge set, thus forming a complete sample graph. This graph structure can more comprehensively reflect the lithological variations in the strata.
[0046] In one possible implementation, the sample nodes are clustered, and a cluster graph is constructed using the cluster clusters as graph nodes and the cluster centroids as node features, including: Using K The MESSEN clustering algorithm clusters individual sample nodes to obtain multiple clusters. Each cluster is treated as a graph node, and the mean of the logging features of all sample nodes within that cluster is used as the feature vector of that graph node. The K-nearest neighbor algorithm is used to establish edges between the nodes of the graph, and a clustering graph is constructed.
[0047] In this embodiment, the process of clustering each sample node to construct a clustering graph is as follows.
[0048] The K-means clustering algorithm is used to divide all sample nodes (including the source and target domains) into K clusters. The value of K is an important design parameter that controls the abstraction level of the global graph. The feature vector of the center point of each cluster is obtained by calculating the mean of the well-logging feature vectors of all sample nodes in the cluster. This center vector represents the typical characteristics of the cluster.
[0049] Subsequently, each cluster is treated as a new graph node, with its node feature being the center vector. To construct the connections between these nodes, the K-nearest neighbor algorithm is used: for each cluster node, the Euclidean distance between its center vectors and those of all other cluster nodes is calculated in the feature space, and edges are established with the nodes that are closest to it.
[0050] Clustering graphs constructed in this way can aggregate local sample information into high-level semantic units, effectively capturing macroscopic geological patterns in well logging data.
[0051] In one possible implementation, the dual-graph fusion GAT model includes a sample GAT network, a clustering GAT network, and an attention module. The sample graph and clustering graph are input into the dual-graph fusion GAT model for feature extraction and fusion to obtain sample fusion features, including: Input the sample image into the sample GAT network to obtain the sample local features; The clustering graph is input into the clustering GAT network to obtain cluster-level global features; Based on the affiliation relationship between each sample node and each cluster, the cluster-level global features are mapped to the sample space to obtain the sample global features; The attention module dynamically fuses local and global features of a sample to obtain fused features.
[0052] In this embodiment, the specific feature extraction and fusion process of the dual-graph fusion GAT model is as follows. The model includes a sample graph attention network specifically for processing sample graphs, a clustering graph attention network specifically for processing clustering graphs, and an attention module.
[0053] The sample graph attention network consists of multiple stacked graph attention convolutional layers, each followed by a linear rectified activation function to introduce non-linearity. This network generates sample local features for each node by message passing on the sample graph, aggregating information from its local neighborhood.
[0054] The clustering graph attention network employs a similar architecture to the sample graph attention network, performing convolutional operations on the clustering graph to generate global clustering features for each cluster node that encapsulate global relationships. To effectively combine these two types of features, feature alignment is first required based on the affiliation relationships between sample nodes and their clusters. Specifically, an assignment matrix is defined, with dimensions equal to the total number of samples multiplied by the number of clusters. Elements in this matrix indicate whether a sample node belongs to a particular cluster. By calculating the product of this assignment matrix and the global clustering features, the cluster-level features can be projected back to the sample level, generating an aligned global representation for each sample node.
[0055] Finally, the attention module receives the local features and aligned global features of each sample node as input. This module is essentially a small neural network that learns two scalar weights to dynamically determine whether to focus more on the local context or global semantic information of the current sample node. It then weights and fuses the local and global features according to these two weights, ultimately outputting the fused sample features. This fusion method makes the final feature representation more discriminative and robust.
[0056] In one possible implementation, before inputting the sample graph and cluster graph into the dual-graph fusion GAT model for feature extraction and fusion to obtain the sample fusion features, the following steps are also included: Using the node information of each sample node as training data, the initial dual-graph fusion GAT model and classifier are adversarially trained by combining a domain discriminator, a gradient inversion layer, and a composite penalty function based on geological constraints, resulting in a trained dual-graph fusion GAT model and classifier.
[0057] In this embodiment, before inputting the sample map and cluster map into the dual-graph fusion graph attention network model for feature extraction and fusion, adversarial training is required to align the data distributions of the source and target domains. The training data includes labeled sample nodes from the source domain and unlabeled sample nodes from the target domain. The training process combines a domain discriminator, a gradient reversal layer (GRL), and a composite penalty function based on geological constraints. The domain discriminator is a binary classification network whose goal is to distinguish whether the input features come from the source or target domain. The feature extractor, i.e., the dual-graph fusion GAT model, aims to generate domain-invariant features that can deceive the domain discriminator. The gradient reversal layer is placed between the feature extractor and the domain discriminator. During forward propagation, it acts as an identity function, performing no processing; however, during backward propagation, it multiplies the gradient from the domain discriminator by a negative number before passing it back to the feature extractor. This design allows the entire network to be trained end-to-end using the standard stochastic gradient descent algorithm, while simultaneously achieving the adversarial goals of minimizing domain differences for the feature extractor and maximizing domain differences for the domain discriminator. Through this adversarial training, the model can effectively reduce the data distribution differences between the source well and the target well, thereby significantly improving cross-domain generalization ability.
[0058] In one possible implementation, the node information of each sample node is used as training data. This data is then combined with a domain discriminator, a gradient inversion layer, and a geologically constrained composite penalty function to perform adversarial training on the initial dual-graph fusion GAT model and classifier, resulting in a trained dual-graph fusion GAT model and classifier, including: The training data fusion features are generated by the dual-graph fusion GAT model. The fusion features are then input into the domain discriminator to obtain the probability that each sample node belongs to the source domain or the target domain. Based on each probability, the domain adversarial loss is calculated. By setting a gradient inversion layer between the dual-graph fusion GAT model and the domain discriminator, the gradient of the domain adversarial loss is inverted during backpropagation and then propagated back to the dual-graph fusion GAT model. When the training cycle meets the preset conditions, for sample nodes in the target domain whose prediction confidence is greater than the dynamic threshold, the lithology category with the highest prediction probability is used as the pseudo label, and the pseudo label loss is calculated. The classification loss is calculated based on the lithological labels of the sample nodes in the source domain, and the geological constraint loss is calculated based on the predicted probability distribution of all sample nodes. The composite penalty function value based on geological constraints is calculated based on domain adversarial loss, pseudo-label loss, classification loss, and geological constraint loss. The trainable parameters of the dual-graph fusion GAT model and classifier are iteratively updated with the goal of minimizing the composite penalty function value, resulting in the trained dual-graph fusion GAT model and classifier.
[0059] In this embodiment, the specific process of adversarial training is as follows.
[0060] First, the node information from the training data is input into the dual-graph fusion GAT model to generate fused features. These fused features are then fed into a domain discriminator, which outputs the probability that each sample node belongs to either the source or target domain. Based on these real-world domain labels and predicted probabilities, the domain adversarial loss is calculated, typically using a binary cross-entropy loss function.
[0061] The gradient inversion layer inverts the gradient of this loss during backpropagation and then backpropagates it, forcing the feature extractor to learn domain-invariant representations. Simultaneously, based on the known lithology labels of the source domain sample nodes, the classification loss is calculated using the predicted probabilities output by the classifier; for example, focus loss can be used to handle class imbalance. At a certain stage of training, pseudo-labels are generated for the unlabeled target domain sample nodes. Specifically, for each target domain sample node, the model outputs the probability of it belonging to each category. If the maximum predicted probability of a sample node exceeds a currently set dynamic threshold, the lithology category corresponding to that maximum probability is used as the pseudo-label for that sample node, and the pseudo-label loss is calculated. The dynamic threshold can be gradually decreased from a high initial value to a lower value to ensure high-quality pseudo-labels in the early stages of training and increase the number of samples utilized in the later stages.
[0062] Finally, the geological constraint loss is calculated based on the predicted probability distribution of all sample nodes. The overall optimization objective is to find the minimum value of a composite penalty function. By iteratively updating all trainable parameters of the model and classifier until the preset total number of cycles is reached, a fully trained model capable of effectively handling cross-well domain offsets can be obtained.
[0063] In one possible implementation, the composite penalty function based on geological constraints is:
[0064] in, for, For classifying losses, To combat losses in the domain, and For hyperparameters, Loss due to geological constraints, For pseudo-label loss; The formula for calculating geological constraint loss is:
[0065] in, For cluster consistency loss, For deep smoothing loss, To compensate for the loss caused by the jump, , and As weight.
[0066] In this embodiment, the geologically constrained composite penalty function used for joint optimization is expressed as follows: the total loss is equal to the weighted sum of the classification loss, the domain adversarial loss, the geological constraint loss, and the pseudo-label loss.
[0067] The model employs a classification loss mechanism to learn basic lithology discrimination capabilities on labeled data in the source domain. A smaller classification value indicates more accurate classification of known lithologies. The domain adversarial loss, through adversarial training, aims to converge the feature distributions of the source and target domains. A smaller domain value indicates better spatial alignment of features between the two domains. The geological constraint loss is a composite penalty term that penalizes predictions that violate geological laws, such as lithological abrupt changes and depth discontinuities. A smaller geological constraint loss indicates that the model's predictions better conform to the principle of geological continuity. The pseudo-label loss allows the model to perform semi-supervised learning during training using high-confidence unlabeled sample nodes in the target domain, thereby further improving the model's generalization performance in the target domain. Two hyperparameters are used to balance the contribution weights of the geological constraint term and the pseudo-label term in the total loss. By minimizing this composite penalty function, the model can simultaneously learn discriminative, domain-invariant, and geologically consistent lithology classification boundaries.
[0068] The geological constraint loss includes cluster consistency loss, depth smoothing loss, and jump penalty loss. Cluster consistency loss is used to constrain sample nodes belonging to the same cluster to have similar predicted probability distributions. Depth smoothing loss is used to constrain sample nodes with a depth difference less than or equal to a preset depth smoothing threshold to have similar predicted probability distributions. Jump penalty loss is used to penalize sample node pairs with a predicted probability distribution difference greater than a preset quantile threshold.
[0069] In one specific embodiment, the implementation process of the lithology classification method based on dual-graph attention provided by the present invention is as follows: Figure 2 As shown. Before performing any model operations, data preparation and graph structure construction are performed first. For all sample nodes in the source and target domains, a sample graph is constructed based on their depth information: if the depth difference between any two sample nodes is less than or equal to a preset depth threshold, an edge is established between these two nodes. Simultaneously, affinity propagation clustering is applied to the well logging feature vectors of all nodes to obtain the cluster label for each sample node. Based on this, a clustering graph is constructed: first, the K-means algorithm is used to cluster all sample nodes into K clusters, and the centroid of each cluster is calculated as a node in the clustering graph; then, the K-nearest neighbor algorithm is used to establish edges connecting each cluster node to its most similar nodes. Finally, a sample-cluster assignment matrix is constructed. This matrix is a binary matrix, where the element corresponding to sample node i belonging to cluster j is 1.
[0070] The pseudocode and model parameter configuration are as follows: Input: Source domain contains labeled data Unlabeled data in the target domain Depth information , Clustering tags , Pseudo-label parameters , , , , , , , , Geological constraint weight Smoothing threshold .
[0071] Output: Lithofacies prediction results for the target domain samples .
[0072] 1. Construct a sample-level graph ,when Establish deep adjacency edges.
[0073] 2. Use Affinity Propagation to cluster the samples and establish feature similarity edges based on clustering relationships and feature distances.
[0074] 3. Use K-means to construct a cluster-level global graph And based on the top- of the cluster centers Clustering edges are established based on neighbor relationships.
[0075] 4. Construct the sample-cluster assignment matrix .
[0076] 5. Initialize sample-level GAT parameters Cluster-level GAT parameters Attention fusion parameters Classifier parameters and neighborhood discriminator parameters .
[0077] 6. Initialize geological constraint adaptive weights And normalized using softmax.
[0078] 7. Initialize class weights based on source domain class frequencies. .
[0079] 8. For each training round Perform the following steps: 1. According to Update the GRL coefficients.
[0080] 2. If ,set up Otherwise set .
[0081] 3. Obtain local features through sample-level GAT. .
[0082] 4. Obtain global clustering features through cluster-level GAT. .
[0083] 5. Calculate the global sample features after mapping. .
[0084] 6. Fusion through attention mechanisms and ,get .
[0085] 7. Use a classifier to obtain lithofacies predictions. .
[0086] 8. Use GRL and a neighborhood discriminator to obtain neighborhood predictions. .
[0087] 9. Calculate the source domain classification loss. .
[0088] 10. Computational Domain: Adversarial Loss .
[0089] 11. Based on the prediction probability matrix calculate , and .
[0090] 12. Calculate geological constraint loss .
[0091] 13. If and Based on the dynamic threshold, generate pseudo-labels for the target domain and calculate... Otherwise, .
[0092] 14. Calculate the total loss. .
[0093] 15. Update all model parameters using the Adam optimizer.
[0094] After the loop ends, output the final prediction result for the target domain. .
[0095] The model parameter configuration is shown in Table 1.
[0096] Table 1
[0097] Here, GRL stands for Gradient Reversal Layer, used to implement domain adversarial learning. The first layer of GAT uses 32 attention heads, the second layer uses 1 attention head, and each layer is followed by a ReLU activation function. The target domain input is uniformly unlabeled samples. This aligns with unsupervised domain adaptation tasks. The domain loss notation is standardized to [missing information]. And explicitly add to the total loss function The roles of AP and K-means are clearly distinguished: AP is used to construct similar edges for local features in a sample-level graph; K-means is used to construct a global graph at the cluster level. Weights in geological constraints. After being normalized by softmax, it is used in the loss calculation; The outer adjustment coefficient, serving as the jump penalty term, is used to control the strength of the jump term. The pseudo-label strategy includes dynamic confidence thresholds, quantile protection, and global top-level filtering. Select, category-level top- Selection and annealing weight decay are used to mitigate the interference of erroneous pseudo-labels on the training process.
[0098] Model parameter initialization includes: parameters for the dual-graph fusion graph attention network model, parameters for the attention fusion module, parameters for the classifier, and parameters for the domain discriminator. Simultaneously, three learnable adaptive weights are initialized, corresponding to the clustering, depth, and skip terms in the subsequent geological constraint loss, respectively. Furthermore, class weights are initialized based on the inverse frequency of the number of samples in each class of the source domain to mitigate the class imbalance problem.
[0099] The training then proceeds to the iterative training phase, with a preset total number of iterations. In each training cycle, parameter scheduling is performed first. The parameters of the gradient inversion layer are calculated, gradually increasing their values from 0 to close to 1. This results in weaker adversarial support in the early stages of training, facilitating the feature extractor's learning of basic features, while increasing adversarial support in the later stages, forcing the model to learn domain-invariant features. Simultaneously, the pseudo-label confidence threshold is dynamically adjusted based on the training progress. If the ratio of the current cycle to the total number of cycles is less than a preset late-phase ratio, a higher threshold is used to ensure pseudo-label quality; otherwise, a lower threshold is used to include more samples.
[0100] During the forward propagation phase, the sample image is input into the sample image attention network to obtain local sample features. The clustering image is input into the clustering image attention network to obtain global clustering features. Subsequently, the global clustering features are projected back into the sample space through multiplication of the assignment matrix to obtain an aligned global representation. The attention fusion module receives the sample local features and the aligned global representation, and dynamically fuses them to obtain the final sample fusion features. The classifier outputs the predicted probability based on the sample fusion features, and the domain discriminator outputs the domain classification result based on the fusion features processed by the gradient inversion layer.
[0101] Next, the various losses are calculated. The classification loss is calculated using the focus loss function, based on the predicted values and true labels of the source domain samples. The domain adversarial loss is calculated using the cross-entropy loss, based on the domain discriminator output and the true domain labels. When calculating the geological constraint loss, the predicted probability vector for each sample node is first extracted. The clustering loss mandates that sample nodes with the same cluster label have similar predicted probability distributions; it is calculated as the expected value of the difference in predicted probabilities among all sample node pairs within the same cluster. The depth loss mandates that sample nodes with similar depths have similar predicted probability distributions. The jump loss is used to suppress lithological abrupt changes; it penalizes sample node pairs whose predicted probability distributions change drastically. Specifically, it selects sample node pairs whose predicted probability differences are greater than a high quantile of the overall difference and calculates the expected value of their differences. Finally, the clustering loss, depth loss, and jump loss are weighted and summed using a learnable weight vector to obtain the total geological constraint loss.
[0102] The pseudo-label generation and loss calculation are executed only when the training period reaches a preset start period and is an integer multiple of a preset interval. First, the prediction confidence (maximum predicted probability) of each target domain sample node is calculated. The dynamic threshold is the maximum value between a preset threshold and the quantile of the confidence scores of all sample nodes in the current batch. Sample nodes with confidence scores greater than the dynamic threshold and satisfying the global top-several and class-top-several selection strategies are stored in a set. Then, the cross-entropy loss is calculated based on the predicted pseudo-labels and predicted probabilities of these sample nodes. If the conditions are not met, the pseudo-label loss is set to 0.
[0103] Finally, parameter updates are performed. The total loss is calculated, where two hyperparameters are used to balance the contributions of geological constraints and pseudo-labels. An adaptive moment estimator optimizer is used to calculate the gradient based on the total loss and backpropagate to update all trainable parameters. This process is repeated until the preset total number of training epochs is completed. After training, the sample node data of the target domain is input into the trained model, and the final output is the lithology label prediction result for each sample node.
[0104] To verify the effectiveness of the proposed method in practical cross-well lithology identification tasks, the applicant conducted verification experiments based on two oilfield datasets with different geological characteristics. The first dataset comes from a natural gas reservoir in a stable cratonic basin, containing 8 wells and over 3000 logging samples with a sampling interval of 0.5 meters. Each sample has multiple logging parameters, and there are 9 lithology categories. The second dataset comes from a foreland basin in an active orogenic belt, containing 3 wells and over 12000 logging samples with a sampling interval of 0.076 meters, and 5 lithology categories. In the data preprocessing stage, a minimum... The maximum normalization method scales all logging features to the [0,1] range. Validation experiments use accuracy and macro-average F1 score as evaluation metrics to comprehensively assess the model's identification performance across major and minor lithological classes.
[0105] In four cross-well domain adaptation tasks, the method of this invention was compared with several mainstream methods, including traditional machine learning models, deep learning models, and various unsupervised domain adaptation methods based on graph neural networks. Validation results show that in all tasks, the method of this invention consistently outperforms the comparative methods in accuracy, precision, recall, and F1 score, especially in the difficult task of migrating from complex geological regions to simpler geological regions, where the performance improvement is particularly significant. Ablation experiments further demonstrate the effectiveness of the geological constraint module introduced in this invention; removing this module significantly reduces the model's performance across all evaluation metrics. Confusion matrix comparison analysis shows that the method of this invention can more clearly distinguish easily confused lithological categories, such as mudstone, siltstone, and dolomite, and its prediction results highly match the actual stratigraphic stratification, exhibiting superior boundary recognition ability and overall classification stability. These validation results fully demonstrate the superiority, robustness, and practical application potential of this invention in cross-well lithology identification under minimal label conditions.
[0106] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0107] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0108] Figure 3 A schematic diagram of the lithology classification device based on a dual-graph attention network provided in an embodiment of the present invention is shown. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below: like Figure 3 As shown, the lithology classification device 3 based on a dual-graph attention network includes: The acquisition module 31 is used to acquire node information of sample nodes in the source domain and the target domain; wherein, each sample node has multiple logging features, the sample nodes in the source domain have lithology labels, and the sample nodes in the target domain do not have lithology labels. The first mapping module 32 is used to construct a sample map based on the spatial adjacency and feature similarity between each sample node; The second graph construction module 33 is used to cluster each sample node, using the clusters as graph nodes and the cluster center points as node features to construct a cluster graph. The feature fusion module 34 is used to input the sample map and cluster map into the dual-map fusion GAT model to perform feature extraction and fusion to obtain sample fusion features. The lithology classification module 35 is used to input the sample fusion features into the classifier to obtain the lithology labels of each sample node in the target domain.
[0109] In one possible implementation, the first mapping module 32 is specifically used for: For any two sample nodes, if their depth difference is less than or equal to a preset depth threshold, then a spatial adjacency edge is established. Affinity propagation clustering is performed on the logging features of each sample node. For any two sample nodes belonging to the same cluster, if the distance between their logging features is less than or equal to a preset feature distance threshold, a feature similarity edge is established. By treating each sample node as a graph node and each spatially adjacent edge and each feature-similar edge as an edge set, a sample graph is constructed.
[0110] In one possible implementation, the second mapping module 33 is specifically used for: Using K The MESSEN clustering algorithm clusters individual sample nodes to obtain multiple clusters. Each cluster is treated as a graph node, and the mean of the logging features of all sample nodes within that cluster is used as the feature vector of that graph node. The K-nearest neighbor algorithm is used to establish edges between the nodes of the graph, and a clustering graph is constructed.
[0111] In one possible implementation, the dual-graph fusion GAT model includes a sample GAT network, a clustering GAT network, and an attention module; the feature fusion module 34 is specifically used for: Input the sample image into the sample GAT network to obtain the sample local features; The clustering graph is input into the clustering GAT network to obtain cluster-level global features; Based on the affiliation relationship between each sample node and each cluster, the cluster-level global features are mapped to the sample space to obtain the sample global features; The attention module dynamically fuses local and global features of a sample to obtain fused features.
[0112] In one possible implementation, a training module is also included, used for: Before inputting the sample graph and cluster graph into the dual-graph fusion GAT model for feature extraction and fusion to obtain the sample fusion features, the node information of each sample node is used as training data. The initial dual-graph fusion GAT model and classifier are then subjected to adversarial training by combining a domain discriminator, a gradient inversion layer, and a composite penalty function based on geological constraints, resulting in a trained dual-graph fusion GAT model and classifier.
[0113] In one possible implementation, the training module is specifically used for: The training data fusion features are generated by the dual-graph fusion GAT model. The fusion features are then input into the domain discriminator to obtain the probability that each sample node belongs to the source domain or the target domain. Based on each probability, the domain adversarial loss is calculated. By setting a gradient inversion layer between the dual-graph fusion GAT model and the domain discriminator, the gradient of the domain adversarial loss is inverted during backpropagation and then propagated back to the dual-graph fusion GAT model. When the training cycle meets the preset conditions, for sample nodes in the target domain whose prediction confidence is greater than the dynamic threshold, the lithology category with the highest prediction probability is used as the pseudo label, and the pseudo label loss is calculated. The classification loss is calculated based on the lithological labels of the sample nodes in the source domain, and the geological constraint loss is calculated based on the predicted probability distribution of all sample nodes. The composite penalty function value based on geological constraints is calculated based on domain adversarial loss, pseudo-label loss, classification loss, and geological constraint loss. The trainable parameters of the dual-graph fusion GAT model and classifier are iteratively updated with the goal of minimizing the composite penalty function value, resulting in the trained dual-graph fusion GAT model and classifier.
[0114] In one possible implementation, the composite penalty function based on geological constraints is:
[0115] in, for, For classifying losses, To combat losses in the domain, and For hyperparameters, Loss due to geological constraints, For pseudo-label loss; The formula for calculating geological constraint loss is:
[0116] in, For cluster consistency loss, For deep smoothing loss, To compensate for the loss caused by the jump, , and As weight.
[0117] This invention provides a data foundation for subsequent cross-well knowledge transfer by using node information from the source and target domains as input. A sample graph is constructed based on spatial adjacency and feature similarity, enabling the model to capture the fine-grained relationship between local formation continuity and logging response. A global clustering graph is constructed through clustering, clustering samples into high-level semantic units, endowing the model with the ability to perceive macroscopic geological patterns. A dual-graph fusion graph attention network is used for feature extraction and fusion, effectively integrating local neighborhood information and global distribution information, overcoming the shortcomings of insufficient single-scale feature expression. This allows the classifier to output lithological labels for the target domain, achieving accurate cross-well identification even with few labels. A complete technical loop is formed from data acquisition to multi-scale feature fusion, improving the model's generalization ability and prediction accuracy in cross-well scenarios. Especially in complex geological environments with scarce labels, more stable and reliable lithological interpretation results can be obtained.
[0118] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 4 As shown, the electronic device 4 in this embodiment includes a processor 40 and a memory 41. The memory 41 stores a computer program 42. When the processor 40 executes the computer program 42, it implements the steps in the various method embodiments described above. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the various device embodiments described above.
[0119] For example, computer program 42 may be divided into one or more modules / units, which are stored in memory 41 and executed by processor 40 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 42 in electronic device 4.
[0120] Electronic device 4 may include, but is not limited to, processor 40 and memory 41. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 4 may also include input / output devices, network access devices, buses, etc.
[0121] The processor 40 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0122] The memory 41 can be an internal storage unit of the electronic device 4, such as a hard disk or RAM. The memory 41 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 41 can include both internal and external storage units of the electronic device 4. The memory 41 is used to store the computer program 42 and other programs and data required by the electronic device 4. The memory 41 can also be used to temporarily store data that has been output or will be output.
[0123] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0124] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0125] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0126] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0127] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0128] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A lithological classification method based on a dual-graph attention network, characterized in that, include: Obtain node information of sample nodes in the source and target domains; each sample node has multiple logging features, sample nodes in the source domain have lithology labels, and sample nodes in the target domain do not have lithology labels. A sample graph is constructed based on the spatial adjacency and feature similarity between each sample node; Each sample node is clustered, and a cluster graph is constructed using the cluster clusters as graph nodes and the cluster center points as node features. The sample image and the clustering image are input into the dual-image fusion GAT model for feature extraction and fusion to obtain sample fusion features. The sample fusion features are input into a classifier to obtain the lithological labels of each sample node in the target domain.
2. The lithological classification method based on a dual-graph attention network according to claim 1, characterized in that, The sample graph is constructed based on the spatial adjacency and feature similarity between each sample node, including: For any two sample nodes, if their depth difference is less than or equal to a preset depth threshold, then a spatial adjacency edge is established. Affinity propagation clustering is performed on the logging features of each sample node. For any two sample nodes belonging to the same cluster, if the distance between their logging features is less than or equal to a preset feature distance threshold, a feature similarity edge is established. By treating each sample node as a graph node and each spatially adjacent edge and each feature-similar edge as an edge set, a sample graph is constructed.
3. The lithological classification method based on a dual-graph attention network according to claim 1, characterized in that, The process of clustering each sample node, using the clusters as graph nodes and the cluster center points as node features, to construct a clustering graph includes: Using K The MESSEN clustering algorithm clusters individual sample nodes to obtain multiple clusters. Each cluster is treated as a graph node, and the mean of the logging features of all sample nodes within that cluster is used as the feature vector of that graph node. The K-nearest neighbor algorithm is used to establish edges between the nodes of the graph, and a clustering graph is constructed.
4. The lithological classification method based on a dual-graph attention network according to claim 1, characterized in that, The dual-graph fusion GAT model includes a sample GAT network, a clustering GAT network, and an attention module; The step of inputting the sample image and the clustering image into the dual-image fusion GAT model for feature extraction and fusion to obtain sample fusion features includes: The sample image is input into the sample GAT network to obtain the sample local features; The clustering graph is input into the clustering GAT network to obtain cluster-level global features; Based on the affiliation relationship between each sample node and each cluster, the cluster-level global features are mapped to the sample space to obtain the sample global features; The attention module dynamically fuses the local features and global features of the sample to obtain the sample fusion feature.
5. The lithological classification method based on a dual-graph attention network according to claim 1, characterized in that, Before inputting the sample image and the clustering image into the dual-image fusion GAT model for feature extraction and fusion to obtain the sample fusion features, the method further includes: Using the node information of each sample node as training data, the initial dual-graph fusion GAT model and classifier are adversarially trained by combining a domain discriminator, a gradient inversion layer, and a composite penalty function based on geological constraints, resulting in a trained dual-graph fusion GAT model and classifier.
6. The lithological classification method based on a dual-graph attention network according to claim 5, characterized in that, The process involves using the node information of each sample node as training data, and combining it with a domain discriminator, a gradient inversion layer, and a composite penalty function based on geological constraints to perform adversarial training on the initial dual-graph fusion GAT model and classifier, resulting in a trained dual-graph fusion GAT model and classifier, including: The training data fusion features are generated by the dual-graph fusion GAT model. The fusion features are then input into the domain discriminator to obtain the probability that each sample node belongs to the source domain or the target domain. The domain adversarial loss is calculated based on each probability. By setting a gradient inversion layer between the dual-graph fusion GAT model and the domain discriminator, the gradient of the domain adversarial loss is inverted during backpropagation and then fed back to the dual-graph fusion GAT model. When the training cycle meets the preset conditions, for sample nodes in the target domain whose prediction confidence is greater than the dynamic threshold, the lithology category with the highest prediction probability is used as the pseudo label, and the pseudo label loss is calculated. The classification loss is calculated based on the lithological labels of the sample nodes in the source domain, and the geological constraint loss is calculated based on the predicted probability distribution of all sample nodes. The composite penalty function value based on geological constraints is calculated based on domain adversarial loss, pseudo-label loss, classification loss, and geological constraint loss. The trainable parameters of the dual-graph fusion GAT model and classifier are iteratively updated with the goal of minimizing the composite penalty function value, resulting in the trained dual-graph fusion GAT model and classifier.
7. The lithological classification method based on a dual-graph attention network according to claim 6, characterized in that, The composite penalty function based on geological constraints is as follows: in, for, For classifying losses, To combat losses in the domain, and For hyperparameters, Loss due to geological constraints, For pseudo-label loss; The formula for calculating geological constraint loss is: in, For cluster consistency loss, For deep smoothing loss, To compensate for the loss caused by the jump, , and As weight.
8. A lithological classification device based on a dual-graph attention network, characterized in that, include: The acquisition module is used to acquire node information of sample nodes in the source domain and the target domain; each sample node has multiple logging features, the sample nodes in the source domain have lithology labels, and the sample nodes in the target domain do not have lithology labels. The first graph-building module is used to construct a sample graph based on the spatial adjacency and feature similarity between each sample node; The second graph construction module is used to cluster each sample node, using the clusters as graph nodes and the cluster center points as node features to construct a cluster graph. The feature fusion module is used to input the sample image and the clustering image into the dual-image fusion GAT model to perform feature extraction and fusion to obtain sample fusion features. The lithology classification module is used to input the fused features of the samples into the classifier to obtain the lithology labels of each sample node in the target domain.
9. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.