Complex lithology identification method based on deep learning and noise transfer matrix

Through the combination of deep learning and noise transfer matrix, the problem of time-consuming, labor-intensive and inaccurate traditional lithology identification is solved, efficient and accurate identification on label noise data sets is achieved, and the accuracy of lithology identification is significantly improved.

CN118736274AActive Publication Date: 2024-10-01TONGJI UNIV

Patent Information

Application Number
CN202410732197.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-10-01
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

Traditional lithology identification methods are time-consuming, labor-intensive, costly, and suffer from label noise leading to inaccurate identification.

Method used

A complex lithology identification method based on deep learning and noise transfer matrix is ​​adopted, and the loss function is modified through Co-teaching ideas and noise transfer matrix to train the ResNet neural network model, reduce the negative impact of noise data on model training, and improve the identification accuracy.

Benefits of technology

It significantly optimizes the noise processing in the lithology identification process, improves the accuracy of lithology identification, can train an accurate lithology identification model on data sets with label noise, and achieve efficient identification of the lithology of unlabeled samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736274A_ABST
    Figure CN118736274A_ABST
Patent Text Reader

Abstract

The invention relates to a complex lithology identification method based on deep learning and a noise transfer matrix, and the method comprises the steps: obtaining a rock core image, and forming a rock core image data set with label noise; constructing a ResNet neural network model, pre-training the model by using the rock core image data set, and calculating a noise transfer matrix and a noise rate of the rock core image data set; secondly, two ResNet neural network models are constructed, the two models are trained at the same time based on the Co-teaching thought, and model parameters are updated; in the training process of the two models, a noise transfer matrix is used for correcting a loss function, model parameters are updated through corrected loss, and a lithology recognition model is obtained; and performing lithology prediction on the unlabeled rock core sample by using the lithology identification model, and visually displaying a prediction result. According to the method, the Co-teaching technology and the noise transfer matrix are combined, so that the unknown lithology in the noise-containing data set can be efficiently and accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention relates to a complex lithology identification method in the field of geological technology, and in particular to a complex lithology automatic identification method based on Co-teaching and noise transfer matrix. Background technology:

[0002] Lithology description involves the properties, characteristics and composition of rocks, including appearance, texture, composition, structure and occurrence, which is crucial for the classification, identification and study of rocks. Lithology identification plays a core role in the field of geology. It not only helps to understand geological history and processes, but also serves as the basis for resource exploration and geological risk prediction. In addition, lithology identification technology is also widely used in construction engineering, water resources management, mineral exploration and environmental protection.

[0003] Traditional rock identification methods include microscopic analysis, which uses an optical microscope or electron microscope to observe thin sections of rocks; X-ray diffraction analysis, which determines the type and content of minerals in rock samples by measuring X-ray diffraction patterns in rock samples; chemical analysis, which determines the chemical composition of rock samples by chemical analysis, etc. These methods are usually time-consuming, labor-intensive, costly, and require high expertise from researchers.

[0004] With the development of computer technology, especially artificial intelligence, new methods have emerged in the field of lithology identification. By training image recognition models, it is possible to learn the characteristics of lithology from a large amount of core image data, and achieve automatic, efficient and high-precision lithology identification. However, the training of these models usually relies on manually annotated data sets, and the manual annotation process may introduce errors due to cost and professional experience limitations. This mislabeling problem is called "label noise", which leads to inaccurate lithology identification. Summary of the invention:

[0005] The purpose of the present invention is to provide a complex lithology identification method based on deep learning and noise transfer matrix. This complex lithology identification method based on deep learning and noise transfer matrix is ​​used to solve the problems in the prior art that lithology identification is time-consuming, labor-intensive, costly or inaccurate.

[0006] The technical solution adopted by the present invention to solve the technical problem is: the complex lithology identification method based on deep learning and noise transfer matrix includes the following steps:

[0007] Step 1: Obtain core image samples, perform preliminary annotation, and form a core image dataset with label noise;

[0008] Step 2: Build a ResNet neural network model, use the core image dataset to pre-train the ResNet neural network model, identify the anchor point samples with the highest prediction probability in each lithology category, record the prediction vectors of these anchor point samples, and use the prediction vectors of the anchor point samples to calculate the noise transfer matrix and noise rate of the core image dataset;

[0009] Step 3: Build two more ResNet neural network models. Based on the co-teaching idea, train the two ResNet neural network models at the same time. Sort the loss of samples in each training batch, select small loss samples to exchange between the two models, and then use these samples to update the model parameters.

[0010] Step 4: During the model training process in step 3, the noise transfer matrix is ​​used to correct the loss function, and the model parameters are updated with the corrected loss to accurately adapt to the influence of label noise, and the lithology recognition model is obtained after the training is completed;

[0011] Step 5: Use the lithology identification model to predict the lithology of unlabeled core samples and display the prediction results through visualization.

[0012] Step 1 of the above scheme is specifically as follows: core image samples are obtained by taking photos of the drilling core samples, and these core image samples are preliminarily labeled using experimental methods and artificial experience judgment methods to form a core image dataset with label noise.

[0013] The specific step 1 of the above scheme is:

[0014] By taking high-resolution photos of the core samples taken from the well, the images obtained are cut into rectangular core image samples of uniform size;

[0015] The experimental method and manual experience discrimination method are used to analyze and obtain the accurate lithology labels of some drilling core samples;

[0016] For core samples that have not been subjected to experimental analysis, the manual experience-based discrimination method of geological experts is used to label them, and the lithology labels of the remaining core samples are obtained;

[0017] The core image samples were matched with the corresponding lithology labels using spreadsheet software to create a core image dataset with label noise.

[0018] The specific steps of step 2 of the above scheme are:

[0019] Use the machine learning library to build a ResNet neural network model, and accurately configure the network model's hyperparameters, optimizer, and loss function to adapt to the characteristics of the core image dataset with label noise;

[0020] In the process of training the neural network using the core image dataset with label noise, the sample with the predicted probability closest to 1 in each category is identified as the anchor sample, and the prediction vector of the anchor sample is recorded. The prediction vector contains the model's predicted probability that each anchor sample belongs to each category;

[0021] Assemble the prediction vectors of the identified anchor samples to construct a noise transfer matrix, which reflects the transition probability of prediction labels between different categories;

[0022] The noise rate of the core image dataset is calculated by taking the sum and average of the off-diagonal elements of the noise transfer matrix to quantify the impact of label noise.

[0023] The method for calculating the noise transfer matrix and noise rate in step 2 of the above scheme is:

[0024] The relationship between the lithology recognition model trained on a dataset with label noise and the lithology recognition model trained on a noise-free dataset is expressed as follows:

[0025]

[0026] in is the lithology recognition model for a dataset with label noise, p(y=e j |x;w) is the lithology recognition model on the noise-free data set, represents the transformation relationship between the noise model and the noise-free model, e i represents the noise label, e j represents the true label, are the parameters of the lithology recognition model for the dataset with label noise, w are the parameters of the lithology recognition model on the noise-free dataset, and x is the input core image sample;

[0027] Define the noise transfer matrix T:

[0028] T∈I n×n

[0029]

[0030] Among them, for satisfying p(y=e j The sample with |x;w)=1 is called an anchor point. After pre-training the model on the core image dataset with label noise, find the sample in each category whose probability predicted by the model is closest to 1 as the anchor point of the category, and record the prediction vector of the model for the anchor point sample at this time:

[0031]

[0032] Among them, x j(anchor) represents the anchor point of category j, represents a noisy dataset, It means to find the sample whose probability of the model prediction being the category is closest to 1;

[0033] The noise transfer matrix is ​​calculated by the predicted probability of the anchor point. The i-th row and j-th column of the noise transfer matrix are the probability that the model predicts that the j-th category anchor point sample is the i-th category, that is, the i-th element of the j-th category prediction vector:

[0034]

[0035] After obtaining the noise transfer matrix, the noise rate is calculated by summing and averaging the off-diagonal elements of the noise transfer matrix:

[0036]

[0037] Among them, noise rate represents the noise rate, and n represents the total number of lithology categories.

[0038] The method of training two ResNet neural network models based on the co-teaching idea in step 3 of the above solution is:

[0039] 3.1. Randomly initialize the parameters of the two ResNet neural network models so that the initial positions of the two models in the parameter space are different;

[0040] 3.2. In each training round, first sort the training sample losses calculated by the two ResNet neural network models, select some samples with smaller losses as the focus of the current round of training, and reduce the negative impact of noise data on model training; sample loss sorting methods include bubble sort, selection sort, or merge sort;

[0041] 3.3. Based on the co-teaching concept, two ResNet neural network models are trained independently. At the end of each training batch, the selected samples with smaller losses are exchanged. Selecting a smaller part of the samples involves selecting a proportion. The setting of the proportion is expressed by the forgetting rate parameter. The forgetting rate refers to the proportion of samples to be forgotten in each training round. The forgetting ratio is related to the noise rate of the training data set:

[0042] forget rate =1-noise rate

[0043] Among them, forget rate Indicates the forgetting rate, noise rate represents the noise rate of the data set;

[0044] 3.4. Use the exchanged samples to update the parameters of the two ResNet neural network models, calculate the new loss value and apply the back propagation algorithm to optimize the model weights;

[0045] 3.5. Repeat 3.2-3.4 for multiple training rounds to optimize model performance. Through continuous sample exchange, use the different perspectives of the two models on data learning to eliminate the model's attention to label noise in the data.

[0046] Step 4 in the above scheme is specifically as follows:

[0047] Multiply the noise transfer matrix by the model output prediction vector of each sample, and adjust the prediction vector to reflect the probability deviation result caused by label noise and be closer to the real data distribution;

[0048]

[0049] Where, T ij is the noise transfer matrix, Represents the model's prediction vector for the sample;

[0050] Combine the adjusted prediction vector and the actual sample label, and calculate the corrected loss value through the selected loss function:

[0051]

[0052] In the formula, e i is the label of the current sample, l represents the loss function, l re represents the corrected loss function;

[0053] Using the calculated corrected loss, the parameters of the ResNet neural network model are updated through the back propagation algorithm to update the weights of the model.

[0054] The visualization processing in the above schemes includes generating graphical displays next to the predicted labels, using color coding to distinguish different lithology categories, or marking the predicted lithology distribution in geological maps.

[0055] Beneficial effects:

[0056] 1. The present invention combines Co-teaching technology with noise transfer matrix, which can efficiently and accurately identify unknown lithologies in noisy data sets, significantly optimize the noise processing in the lithology identification process, and is applied to training lithology identification models on core image data sets with label noise and identifying unknown sample lithologies, which is of great significance for solving complex lithology identification and improving lithology identification accuracy.

[0057] 2. The co-teaching method of the present invention effectively filters out noise data by exchanging samples with lower loss between two neural network models; in addition, by constructing a noise transfer matrix and applying it in loss calculation, label noise can be accurately modeled and processed. Combining these two strategies, a model that can accurately identify lithology can be trained on a core image dataset containing label noise, and applied to the identification of unlabeled samples.

[0058] 3. The present invention can use a core image dataset with label noise to train an accurate lithology recognition model and achieve efficient recognition of unlabeled sample lithology. The lithology recognition accuracy of this method is 0.688; the lithology recognition accuracy using Co-teaching is 0.612; the lithology recognition accuracy using the noise transfer matrix is ​​0.622. This method is 12% higher than Co-teaching and 11% higher than the noise transfer matrix, and can efficiently and accurately identify unknown lithologies in noisy datasets.

[0059] 4. The present invention uses the trained lithology recognition model to predict the lithology of unknown samples and visualizes the results of the model prediction so that users can intuitively evaluate the recognition effect and accuracy of the model.

[0060] 5. The present invention uses the ResNet neural network to pre-train the core image data set and identify the sample with the highest prediction probability in each lithology category as the anchor point. The noise transfer matrix and noise rate are calculated to provide a basis for noise adjustment in the subsequent training process. In the pre-training stage of the model, the noise transfer matrix is ​​calculated based on the prediction results of the anchor point samples. The matrix maps the conversion probability from the true category to the model prediction category, reflecting the misclassification probability between different categories.

[0061] 6. In the process of model training, the present invention uses the noise transfer matrix to correct the loss function to ensure that the influence of noise in the training process is effectively controlled. The corrected loss is used to update the model parameters to optimize the performance and accuracy of the model.

[0062] 7. The present invention uses professional equipment to take high-resolution photos of the core samples obtained by drilling and coring to ensure that sufficient details are captured for effective lithology identification; the photographed images will be cropped into rectangular core image samples of uniform size. This standardized processing ensures the consistency and accuracy of subsequent analysis.

[0063] 8. The present invention adopts a co-teaching-based strategy to simultaneously train two ResNet neural network models to improve the processing capability of core image datasets with label noise.

[0064] 9. In each training round, the present invention first evaluates the training sample losses calculated by the two models, sorts the loss values ​​using an effective sorting method (such as bubble sort, selection sort or merge sort), and selects some samples with smaller loss values ​​from the sorting results. These samples are considered to be the most likely to be correctly classified, so the noise impact is relatively small; the two models are not only trained independently, but also exchange these samples with smaller losses at the end of each training batch. This exchange enables each model to learn effective data processing strategies from the other and achieve the purpose of mutual teaching; the exchanged samples are used for the next training batch to help the two models correct each other during the training process and improve their resistance to noise; the exchanged samples are used to update the parameters of the two models. This step is the key to the entire Co-teaching training process, ensuring that the two models can effectively use the information learned from each other to optimize their respective training effects.

[0065] 10. In the present invention, the loss is calculated by combining the adjusted prediction vector and the actual sample label. This is usually done through cross entropy loss or other appropriate loss functions to evaluate the difference between the model prediction and the true label; based on the calculated loss, the back propagation algorithm is used to update the parameters of the model. In this step, the loss gradient is calculated based on the corrected prediction value, thereby ensuring that the influence of label noise is considered in the update process; in this way, the model learns to correct errors caused by label noise and improves the prediction accuracy of the real data label. Description of the drawings:

[0066] Figure 1 It is the technical circuit diagram of the present invention;

[0067] Figure 2 In the present invention, taking photos of the core samples taken from the well to obtain the core image sample map;

[0068] Figure 3 is a core image dataset with label noise in the present invention;

[0069] Figure 4 The noise transfer matrix and noise rate map obtained by pre-training the ResNet neural network in the present invention;

[0070] Figure 5 A schematic diagram of model training based on the co-teaching concept in the present invention;

[0071] Figure 6 A schematic diagram of the loss function correction based on the noise transfer matrix in the present invention;

[0072] Figure 7 This is a graph showing the accuracy and loss changes during the training process in the present invention;

[0073] Figure 8 This is a visualization diagram of the confusion matrix of the evaluation results and prediction results of the model trained in the present invention on the unlabeled sample set.

[0074] Fig. 9 This is a comparison chart of the accuracy of the present invention and different methods. Specific implementation method:

[0075] The present invention will be further described below in conjunction with the accompanying drawings:

[0076] Combination Figure 1-Figure 8 As shown in the figure, this complex lithology recognition method based on deep learning and noise transfer matrix includes the following steps:

[0077] S1, acquisition and preprocessing of core image dataset: take photos of the core samples taken from the well to obtain core image samples. Roughly label the core image samples through experimental methods and the manual experience judgment method of geological experts to form a core image dataset with label noise.

[0078] Drilling core samples refer to rock samples directly obtained from the underground reservoir drilling process. These samples are used for subsequent lithology analysis and image acquisition. Use high-resolution shooting equipment, such as digital cameras, smart phones or other professional image acquisition equipment, to take detailed photos of the core samples. The captured images are cropped into rectangular core image samples of uniform size to facilitate subsequent image processing and analysis. Core image samples are obtained by taking photos of the drilling core samples, and the core image samples are roughly labeled using experimental methods and artificial experience discrimination methods to obtain a core image dataset with label noise.

[0079] Lithology labels include but are not limited to shale, sandstone, siltstone, clay, and mudstone, covering most common sedimentary rock types. These labels provide the necessary classification basis for model training.

[0080] like Figure 2 As shown, a core sample obtained from a reservoir is photographed and cropped using an image processing library to obtain a core image sample of uniform size. The image processing library includes but is not limited to OpenCV.

[0081] Image cropping includes the following steps: ① Import OpenCV library: Import OpenCV library in Python; ② Determine the cropping area: Determine the location and size of the area to be cropped in each image, define a list containing the cropping parameters for each image. ③ Batch crop images: Iterate over each image, use OpenCV functions to perform the cropping operation, and save the cropped images to the specified directory.

[0082] The precise lithology labels of some core samples are obtained through experimental methods, and the rough lithology labels of the remaining core samples are obtained through manual experience discrimination. The experimental methods include but are not limited to microscopic analysis, X-ray diffraction analysis or chemical analysis; the manual experience discrimination method refers to manually discriminating the lithology of the remaining core samples based on the lithology of some core samples determined by experimental methods.

[0083] The core image samples are systematically organized and placed into different folders according to their labels, thus forming a structured core image dataset containing label noise. Figure 3 As shown in the figure, the image samples of each lithology label are stored in a separate folder. These folders are named with the corresponding lithology label number, ensuring that the name of each folder intuitively reflects the lithology category stored inside it. For example, all image samples labeled as "shale" are placed in a folder named "001", while "sandstone" samples are stored in a folder named "002", and so on. This naming method simplifies file access and data retrieval during subsequent processing and analysis.

[0084] The core image samples are roughly labeled using experimental methods and artificial experience discrimination methods to form a core image dataset with label noise. This process includes the following steps:

[0085] Detailed scientific analysis, such as microscopic observation and X-ray diffraction analysis, is performed on some core samples to obtain accurate lithology labels for these samples. These methods generally provide highly reliable data for establishing standardized lithology identification benchmarks. The remaining core samples are labeled for lithology based on the empirical judgment of geological experts. This method relies on the expert's ability to identify rock features and may introduce human errors, resulting in label noise.

[0086] The core image samples were matched to the corresponding lithology labels using spreadsheet software. This process involved matching the image files with the label data to form a complete core image dataset.

[0087] In the present invention, label noise refers to the situation in which some samples in the data set are incorrectly labeled as other lithology categories due to manual labeling errors. This noise comes from subjective judgment differences or recognition errors of the labelers.

[0088] S2, Model pre-training and noise evaluation: Noise transfer matrix and noise rate obtained by pre-training ResNet neural network on the core image dataset with labeled noise.

[0089] First, a ResNet neural network model is built based on the machine learning library Pytorch. Then, the core image dataset with label noise built in step S1 is used to train the ResNet model. Appropriate model parameters and hyperparameters are selected during the training process. During the training process, samples with prediction probabilities closest to 1 are identified for each category and these samples are set as anchor points. The prediction vectors of these anchor point samples are recorded. The prediction vector contains the model's prediction probability that each anchor point sample belongs to each category. The noise transfer matrix is ​​calculated using the anchor point prediction vector. The overall noise rate is calculated by analyzing the off-diagonal elements in the noise transfer matrix.

[0090] Specifically, Figure 4 As shown, it is the noise transfer matrix and noise rate calculated by the model. The relationship between the lithology recognition model trained on the data set with label noise and the lithology recognition model trained on the noise-free data set can be expressed as follows:

[0091]

[0092] in is the lithology recognition model for a dataset with label noise, p(y=e j |x;w) is the lithology recognition model on the noise-free data set, represents the transformation relationship between the noise model and the noise-free model, e i represents the noise label, e j represents the true label, w represents the parameters of the two models, and x is the input core image sample.

[0093] The noise transfer matrix T can be defined as:

[0094] T∈I n×n

[0095]

[0096] Among them, for satisfying p(y=e j The sample with |x;w)=1 is called an "anchor point". After pre-training the model on the noise dataset, find the sample in each category whose probability of model prediction is closest to 1 as the anchor point of that category, and record the prediction vector of the model for the anchor point sample at this time:

[0097]

[0098] Among them, x j(anchor) represents the anchor point of category j, represents a noisy dataset, It means to find the sample whose probability of being predicted by the model is closest to 1.

[0099] Then, the noise transfer matrix can be calculated from the predicted probability of the anchor point. The i-th row and j-th column of the noise transfer matrix are the probability that the model predicts that the j-th category anchor point sample is the i-th category, that is, the i-th element of the j-th category prediction vector:

[0100]

[0101] After obtaining the noise transfer matrix, the noise rate can be calculated by summing and averaging the off-diagonal elements of the noise transfer matrix:

[0102]

[0103] Among them, noise rate represents the noise rate, and n represents the total number of lithology categories.

[0104] Hyperparameter settings: Learning Rate, which controls the rate at which the model weights are updated, affects the speed and convergence quality of the model training process; Batch Size, which is the number of samples input into the model during each training process, affects the accuracy of gradient estimation and memory usage; Epoch, which is the number of times the entire data set is traversed, is directly related to the adequacy of model training.

[0105] Optimizer selection: SGD (Stochastic Gradient Descent): A standard optimization method that updates the model's weights using randomly selected samples in each iteration, often used for large-scale and sparse data sets; Adam (Adaptive Moment Estimation): A more modern optimization algorithm that combines momentum and adaptive learning rate techniques, which can usually reach convergence faster.

[0106] Application of loss function: Mean Squared Error, mainly used for regression problems, calculates the sum of squares of the differences between the predicted value and the actual value; Cross-Entropy Loss, used for classification problems, evaluates the difference between the probability distribution of the model output and the probability distribution of the true label.

[0107] Functions of prediction probability and prediction vector: prediction probability represents the model's confidence that the input sample belongs to each possible category, in the form of probability distribution; prediction vector, specifically the probability value of each category obtained from the model output layer, is used for subsequent classification judgment and loss calculation.

[0108] Definition of anchor samples: Anchor samples refer to samples that the model considers to have the highest probability of belonging to a specific category (i.e., the predicted probability is closest to 1) in classification prediction. These samples usually represent the best performance of the model for a certain category recognition under the current training state.

[0109] The present invention adopts the following steps to establish a pre-trained core recognition model based on the ResNet neural network, specifically including network construction, training and noise processing:

[0110] Build a ResNet neural network model as a pre-trained model using a popular machine learning library such as TensorFlow or PyTorch;

[0111] Configure the neural network hyperparameters, such as learning rate, batch size, and epochs, to suit the characteristics of the core image dataset;

[0112] Choose the appropriate optimizer (such as SGD or Adam) and loss function (such as cross entropy loss). These choices have a significant impact on the network training effect and convergence speed;

[0113] The ResNet network is trained using a rock core image dataset with label noise. During the training process, the system monitors the prediction results of each category and looks for samples whose probability of the model prediction for that category is closest to 1, and defines these samples as anchor samples;

[0114] Record the prediction vectors of these anchor point samples, which reflect the model's most confident judgment of each category under the current training state;

[0115] Use the prediction vector of the anchor sample to build a noise transfer matrix. This matrix describes the probability conversion from the true category to the predicted category, which can reflect the model's tendency to confuse different categories;

[0116] Calculate the off-diagonal elements of the noise transfer matrix and average these elements to get the overall noise rate. This noise rate measures the degree of label noise in the dataset and is crucial for subsequent model adjustment and optimization.

[0117] S3, a dual-model synchronous training strategy based on the co-teaching idea, adopts the co-teaching strategy to simultaneously train two ResNet models, and filters the impact of label noise through loss sorting and sample exchange.

[0118] Co-teaching training process: Train two ResNet neural network models at the same time, sort the loss of samples in each training batch, select samples with smaller loss, exchange these samples with smaller loss between the two models, and use these samples to update the model parameters.

[0119] Based on the co-teaching idea, two ResNet models are trained simultaneously. In each training round, the loss of samples in the batch is sorted, and some samples with smaller loss are selected and exchanged between the two models, which are then used to update the model parameters.

[0120] Specifically, Figure 5 As shown in the figure, two ResNet models are created using the Pytorch machine learning library. Both models are initialized with random parameters before training to ensure the diversity of training starting points; in each training round, the training sample losses calculated by each model are first sorted. This step is to identify the samples that each model handles best in the current training state, that is, the samples with the smallest loss; select some samples with smaller losses, which are considered to be the most likely correct samples; based on the co-teaching idea, these samples with smaller losses are exchanged between the two models. In this way, each model can benefit from the best practices learned by the other model, especially when dealing with possible label noise; the exchanged samples are used for further training and the parameters of the two models are updated at the same time. This includes calculating new loss values ​​and applying the back-propagation algorithm to optimize the model weights; this process is repeated in multiple training rounds to continuously optimize model performance and eliminate the model's attention to label noise in the data through continuous sample exchange.

[0121] The present invention selects a smaller portion of samples involving a selection ratio, and the setting of the ratio is represented by a forgetting rate parameter. The forgetting rate refers to the ratio of a certain number of samples to be forgotten in each training round, and this forgetting ratio is related to the noise rate of the training data set:

[0122] forget rate =1-noise rate

[0123] Among them, forget rate Indicates the forgetting rate, noise rate represents the noise rate of the dataset, which is calculated in S2.

[0124] S4, correct the loss function based on the noise transfer matrix. The noise transfer matrix is ​​used to correct the loss function of the model during the training process to improve the ability to handle label noise.

[0125] The loss function is corrected using the noise transfer matrix. The noise transfer matrix has been calculated in S2, which is obtained by analyzing the anchor samples in the pre-training phase. During the training process, the noise transfer matrix that has been calculated is multiplied by the model output prediction vector for each training sample. The purpose of this step is to adjust the prediction vector so that it reflects the probability deviation caused by label noise and more accurately reflects the probability of the actual category, taking into account the label noise present in the data; the prediction vector adjusted by the noise transfer matrix is ​​used to calculate the loss function. In this way, the loss function can more accurately evaluate the difference between the model prediction and the actual label because it takes into account the influence of label noise; the model parameters are updated using the corrected loss. This usually involves executing a backpropagation algorithm to calculate the gradient based on the corrected loss and update the model weights accordingly. This process helps the model gradually adapt to and correct errors caused by label noise during training.

[0126] Specifically, Figure 6 As shown, the output of the model is modified by the noise transfer matrix, that is, the noise transfer matrix is ​​multiplied by the model's prediction vector for each sample:

[0127]

[0128] Among them, T ij is the noise transfer matrix, Represents the model's prediction vector for the sample. Then, the model loss is calculated using a pre-set loss function in combination with the model's label:

[0129]

[0130] Among them, e i is the label of the current sample, l represents the loss function, l re Represents the corrected loss function.

[0131] S5 uses the trained model to predict the lithology of unlabeled samples and evaluates the prediction results.

[0132] The unlabeled sample dataset is input into the lithology recognition model trained on the core image dataset with label noise. The lithology recognition model outputs the lithology prediction results, which are then evaluated.

[0133] like Figure 8 As shown in the figure, the trained lithology recognition model is tested with an unlabeled sample data set, the model is evaluated based on multiple evaluation indicators, and the confusion matrix of the model is calculated to accurately evaluate the effectiveness of the model.

[0134] Among them, the evaluation indicators include accuracy, precision, recall, and F1-score.

[0135]

[0136] Among them, TP is true positive, TN is true negative, FP is false positive, and FN is false negative. After completing the evaluation index calculation, calculate the confusion matrix.

[0137] The method of using the trained lithology recognition model to predict the lithology of unlabeled samples and visualize the results is as follows:

[0138] Input unlabeled core image samples into the trained lithology recognition model. These samples are obtained from drilling coring or other rock sampling processes and have not been previously labeled;

[0139] The lithology recognition model processes the input image samples and outputs the lithology prediction results for each sample. This prediction is based on the knowledge gained by the model through learning the labeled samples in the training set, and can recognize and classify various different rock types;

[0140] Visualize the model's predictions so that users can intuitively evaluate and understand the model's performance. Visualization methods may include generating graphical displays next to prediction labels, using color coding to distinguish different lithology categories, or marking the predicted lithology distribution in geological maps.

[0141] pass Fig. 9 It can be seen that the lithology recognition accuracy of this method is: 0.688; the lithology recognition accuracy using Co-teaching is: 0.612; the lithology recognition accuracy using the noise transfer matrix is: 0.622, and the lithology recognition accuracy of the ordinary method is: 0.531. Compared with Co-teaching, this method is improved by 12%, and compared with the noise transfer matrix, it is improved by 11%. The present invention combines Co-teaching technology with noise transfer matrix, which can efficiently and accurately identify unknown lithologies in noisy data sets, significantly optimizes noise processing in the lithology recognition process, and is used to train lithology recognition models on core image data sets with label noise and identify unknown sample lithologies. It is of great significance for solving complex lithology recognition and improving lithology recognition accuracy.

Claims

1. A complex lithology identification method based on deep learning and noise transfer matrix, characterized in that The steps include: Step 1: Obtain core image samples, perform preliminary annotation, and form a core image dataset with label noise; Step 2: Build a ResNet neural network model, use the core image dataset to pre-train the ResNet neural network model, identify the anchor point samples with the highest prediction probability in each lithology category, record the prediction vectors of these anchor point samples, and use the prediction vectors of the anchor point samples to calculate the noise transfer matrix and noise rate of the core image dataset; Step 3: Build two more ResNet neural network models. Based on the co-teaching idea, train the two ResNet neural network models at the same time. Sort the loss of samples in each training batch, select small loss samples to exchange between the two models, and then use these samples to update the model parameters. Step 4: During the model training process in step 3, the noise transfer matrix is ​​used to correct the loss function, and the model parameters are updated with the corrected loss to accurately adapt to the influence of label noise, and the lithology recognition model is obtained after the training is completed; Step 5: Use the lithology identification model to predict the lithology of unlabeled core samples and display the prediction results through visualization.

2. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 1 is characterized in that: The step 1 specifically includes: taking photos of the drilling core samples to obtain core image samples, and using experimental methods and artificial experience judgment methods to preliminarily label these core image samples to form a core image data set with label noise.

3. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 2 is characterized by: The step 1 is specifically as follows: By taking high-resolution photos of the core samples taken from the well, the images obtained are cut into rectangular core image samples of uniform size; The experimental method and manual experience discrimination method are used to analyze and obtain the accurate lithology labels of some drilling core samples; For core samples that have not been subjected to experimental analysis, the manual experience-based discrimination method of geological experts is used to label them, and the lithology labels of the remaining core samples are obtained; The core image samples were matched with the corresponding lithology labels using spreadsheet software to create a core image dataset with label noise.

4. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 3 is characterized by: The step 2 is specifically as follows: Use the machine learning library to build a ResNet neural network model, and accurately configure the network model's hyperparameters, optimizer, and loss function to adapt to the characteristics of the core image dataset with label noise; In the process of training the neural network using the core image dataset with label noise, the sample with the predicted probability closest to 1 in each category is identified as the anchor sample, and the prediction vector of the anchor sample is recorded. The prediction vector contains the model's predicted probability that each anchor sample belongs to each category; Assemble the prediction vectors of the identified anchor samples to construct a noise transfer matrix, which reflects the transition probability of prediction labels between different categories; The noise rate of the core image dataset is calculated by taking the sum and average of the off-diagonal elements of the noise transfer matrix to quantify the impact of label noise.

5. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 4 is characterized in that: The method for calculating the noise transfer matrix and the noise rate in step 2 is: The relationship between the lithology recognition model trained on a dataset with label noise and the lithology recognition model trained on a noise-free dataset is expressed as follows: in is the lithology recognition model for a dataset with label noise, p(y=e j |x;w) is the lithology recognition model on the noise-free data set, represents the transformation relationship between the noise model and the noise-free model, e i represents the noise label, e j represents the true label, are the parameters of the lithology recognition model for the dataset with label noise, w are the parameters of the lithology recognition model on the noise-free dataset, and x is the input core image sample; Define the noise transfer matrix T: T∈ n×n Among them, for satisfying p(y=e j The sample with |x;w)=1 is called an anchor point. After pre-training the model on the core image dataset with label noise, find the sample in each category whose probability predicted by the model is closest to 1 as the anchor point of the category, and record the prediction vector of the model for the anchor point sample at this time: Among them, x j(anchor) represents the anchor point of category j, represents a noisy dataset, It means to find the sample whose probability of the model prediction being the category is closest to 1; The noise transfer matrix is ​​calculated by the predicted probability of the anchor point. The i-th row and j-th column of the noise transfer matrix are the probability that the model predicts that the j-th category anchor point sample is the i-th category, that is, the i-th element of the j-th category prediction vector: After obtaining the noise transfer matrix, the noise rate is calculated by summing and averaging the off-diagonal elements of the noise transfer matrix: Among them, noise rate represents the noise rate, and n represents the total number of lithology categories.

6. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 5 is characterized by: The method of training two ResNet neural network models based on the co-teaching idea in step 3 is: 3.

1. Randomly initialize the parameters of the two ResNet neural network models so that the initial positions of the two models in the parameter space are different; 3.

2. In each training round, first sort the training sample losses calculated by the two ResNet neural network models, select some samples with smaller losses as the focus of the current round of training, and reduce the negative impact of noise data on model training; sample loss sorting methods include bubble sort, selection sort, or merge sort; 3.

3. Based on the co-teaching concept, two ResNet neural network models are trained independently. At the end of each training batch, the selected samples with smaller losses are exchanged. Selecting a smaller part of the samples involves selecting a proportion. The setting of the proportion is expressed by the forgetting rate parameter. The forgetting rate refers to the proportion of samples to be forgotten in each training round. The forgetting ratio is related to the noise rate of the training data set: forget rate =1-noise rate Among them, forget rate Indicates the forgetting rate, noise rate represents the noise rate of the data set; 3.

4. Use the exchanged samples to update the parameters of the two ResNet neural network models, calculate the new loss value and apply the back propagation algorithm to optimize the model weights; 3.

5. Repeat 3.2-3.4 for multiple training rounds to optimize model performance. Through continuous sample exchange, use the different perspectives of the two models on data learning to eliminate the model's attention to label noise in the data.

7. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 6 is characterized by: The step 4 is specifically as follows: Multiply the noise transfer matrix by the model output prediction vector of each sample, and adjust the prediction vector to reflect the probability deviation result caused by label noise and be closer to the real data distribution; Where, T ij is the noise transfer matrix, Represents the model's prediction vector for the sample; Combine the adjusted prediction vector and the actual sample label, and calculate the corrected loss value through the selected loss function: In the formula, e i is the label of the current sample, l represents the loss function, l re represents the corrected loss function; Using the calculated corrected loss, the parameters of the ResNet neural network model are updated through the back propagation algorithm to update the weights of the model.

8. The complex lithology identification method based on deep learning and noise transfer matrix according to claim 7 is characterized by: The visualization process may include generating a graphical display next to the predicted label, using color coding to distinguish different lithology categories, or marking the predicted lithology distribution in a geological map.

Citation Information

Patent Citations

  • Label noisy image learning method based on dual active query

    CN113255849A

  • Target detection image label denoising method based on confidence learning

    CN117576406A

  • Taxpayer industry classification method based on label-noise learning

    US20230031738A1

Cited By

  • Dish identification optimization method based on parameter offset

    CN119323717A

  • Surrounding rock stability prediction method based on mixed space-time self-attention mechanism

    CN120234694A

  • Photovoltaic module shielding detection method based on noise label learning

    CN120747120A