Diagnostic method and device for semi-supervised learning with adaptive prototype network and pseudo-label
Through the multiple accumulation semi-supervised learning method of adaptive prototype network and pseudo-label, combined with the squeeze and incentive mechanism, adaptive weighted features, the problem of difficulty in obtaining data labels in deep learning in rolling bearing fault diagnosis is solved, and the efficiency of small sample learning is improved. accuracy and data utilization, enabling more efficient fault diagnosis.
Patent Information
- Application Number
- CN202311528671.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-11-15
AI Technical Summary
In the existing technology, in rolling bearing fault diagnosis, the deep learning model has a high cost of obtaining data labels, resulting in low data utilization rate of semi-supervised learning and a decrease in diagnosis accuracy, especially in small sample data sets.
The multi-accumulation semi-supervised learning method of adaptive prototype network and pseudo-label is adopted, feature extraction and pseudo-label screening are performed through the adaptive prototype network, combined with the squeeze and incentive mechanism, adaptive weighted features, and multiple accumulation strategies are used to expand the training set and improve Model accuracy.
It improves classification performance, is suitable for small sample learning, effectively expands the size of the training set, improves the accuracy of fault diagnosis, and enhances the utilization efficiency of unlabeled data.
Smart Images

Figure CN117708694B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a diagnostic method and device for semi-supervised learning of an adaptive prototype network and pseudo labels. Background Art
[0002] Rolling bearings are an important component of rotating machinery widely used in engineering. However, due to their complex working environment and metal fatigue caused by long-term operation, bearings are subjected to alternating loads and impact loads for a long time, which can easily cause wear and breakage, leading to faulty operation. According to statistics, in fault detection, about 30%-40% of equipment failures are caused by bearing failures. This often leads to adverse consequences such as damage to large machinery and casualties. Therefore, research on rolling bearing fault diagnosis is of great significance.
[0003] At present, the methods based on rolling bearing fault diagnosis mainly use traditional machine learning and deep learning to process. However, in traditional machine learning methods, feature extraction requires human intervention and is also limited to a certain extent by manual labor; compared with traditional machine learning algorithms, deep learning algorithms can achieve automated feature extraction and improve accuracy and efficiency.
[0004] The success of deep learning depends largely on a large amount of data. However, in actual engineering, due to the limitations of the working environment and the deployment of sensors, the cost of obtaining a large amount of labeled data (data with known fault types) is extremely high, making it difficult to fully utilize deep learning models. Models that use a small amount of labeled data and a large amount of unlabeled data to complete classification tasks are called semi-supervised learning models, but the above methods still have low data utilization rates. When there are very few data sets and labeled data, the diagnostic accuracy will drop significantly. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a diagnostic method and device for semi-supervised learning of an adaptive prototype network and pseudo labels, which can improve classification performance.
[0006] In order to solve the above technical problems, the present invention provides a diagnostic method for semi-supervised small sample learning based on an adaptive prototype network and multiple accumulation of pseudo-label samples, comprising: extracting a support set and a query set from a training set respectively; inputting the support set into an adaptive prototype network for feature extraction to generate support set features, and inputting the query set into an adaptive prototype network for feature extraction to generate query set features; in the adaptive prototype network, calculating a support set prototype according to the support set features; in the adaptive prototype network, calculating the query set classification probability according to the support set prototype and the query set features to adjust the model parameters of the adaptive prototype network; inputting the test set into a pseudo-label multiple accumulation screening network to generate a pseudo-label data set; concatenating the pseudo-label data set with the training set and inputting them into an adaptive prototype network model to adjust the model parameters of the adaptive prototype network; inputting the test set into the adaptive prototype network to calculate the test set classification probability, and taking the class with the largest probability as the fault label of the current sample.
[0007] As an improvement of the above scheme, the step of calculating the support set prototype based on the support set features includes: calculating the maximum mean difference between the support feature set and the missing support feature set to characterize the influence of the support set features on the sample distribution, the support feature set is the set of all support set features, and the missing support feature set is the set that lacks a certain support set feature; calculating the weight of the support set features based on the maximum mean difference; and calculating the support set prototype of the lth category based on the weight and the support set features.
[0008] As an improvement to the above scheme, according to the formula Calculate the maximum mean difference m between the supporting feature set and the missing supporting feature set l To characterize the support set feature F(x l ) on the sample distribution; where S is the support feature set, S = {F(x1), F(x2), ..., F(x n )},S' l is the missing support feature set, S' l Indicates that the support set feature F(x) is missing in S l ), S'1={F(x1),F(x2),...F(x l-1 ),F(x l+1 ),...F(x n )}, for any x∈H.
[0009] As an improvement to the above scheme, according to formula α l =ln((1-m l ) / m l ) / 2, calculate the support set feature F(x l) l ; Among them, m l is the maximum mean difference between the supporting feature set and the missing supporting feature set.
[0010] As an improvement to the above scheme, according to the formula Calculate the support set prototype P of the lth class l ; Among them, S e is the support set, S e ={(x1,y1),(x2,y2),...,(x n ,y n )},x i ∈R D ,y i ∈{1,2,...L},α i is the support set feature F(x i )’s weight.
[0011] As an improvement of the above scheme, the step of calculating the query set classification probability according to the support set prototype and the query set features includes: according to the formula Calculate the query set classification probability in, is a sample of the query set, is the query set feature, P l is the prototype of the support set of the first category, for With P l The Euclidean distance between .
[0012] As an improvement of the above scheme, the step of inputting the test set into the adaptive prototype network to calculate the classification probability of the test set includes: according to the formula Calculate the query set classification probability in, is the sample of the test set, is the test set feature, P l is the prototype of the support set of the first category, for With P l The Euclidean distance between .
[0013] As an improvement of the above solution, a feature extractor based on a squeezing and excitation mechanism is provided in the adaptive prototype network.
[0014] Correspondingly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the processor executes the computer program, the steps of the diagnostic method of semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples are implemented.
[0015] Correspondingly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the diagnostic method for semi-supervised small sample learning based on an adaptive prototype network and multiple accumulation of pseudo-label samples are implemented.
[0016] The implementation of the present invention has the following beneficial effects:
[0017] The present invention combines an adaptive prototype network (including feature extraction), pseudo-label screening, and fault diagnosis.
[0018] in,
[0019] The adaptive prototype network is equipped with a feature extractor based on the squeezing and excitation mechanism. By realizing the self-attention function of the channel, the channel feature response is recalibrated, thereby emphasizing useful feature information and suppressing useless feature information. At the same time, the adaptive prototype network obtains an integrated strong feature prototype by adaptively weighting the features, which is suitable for small sample learning.
[0020] Pseudo-label screening uses multiple accumulation strategies to select as many pseudo-label samples as possible for semi-supervised learning, effectively expanding the size of the training set and improving the model accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of an embodiment of a diagnostic method of the present invention based on semi-supervised small sample learning with adaptive prototype network and multiple accumulation of pseudo-label samples;
[0022] Figure 2 It is a schematic diagram of the feature extractor in the present invention. DETAILED DESCRIPTION
[0023] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings.
[0024] See also Figure 1 , Figure 1 The flowchart of an embodiment of the diagnostic method of the present invention based on semi-supervised small sample learning with adaptive prototype network and multiple accumulation of pseudo-label samples is shown, which includes:
[0025] S101, extract support set and query set from training set respectively;
[0026] For example, K samples can be randomly sampled from each category of samples in the training set to generate a support set, and Q samples can be randomly sampled to generate a query set.
[0027] S102, inputting the support set into the adaptive prototype network for feature extraction to generate support set features, and inputting the query set into the adaptive prototype network for feature extraction to generate query set features;
[0028] In order to make the model pay attention to the differences between different perspectives during the learning process and automatically learn the importance of features from different perspectives, the present invention proposes an excitation and squeezing module, which realizes the self-attention function of the channel and recalibrates the channel feature response, thereby emphasizing useful feature information and suppressing useless feature information. Specifically, the present invention realizes feature recalibration in space and channel simultaneously by fusing SpatialSqueeze and Channel Excitation Block (cSE) with Channel Squeeze and SpatialExcitation Block (sSE).
[0029] like Figure 2 As shown, for any given feature input U = [u1,u2,…,u c ]∈R D×C , by spatial squeezing (operation 1) produces a vector z∈R 1×C , spatial compression is performed by a global average pooling layer; channel squeezing (operation 2) produces a vector o∈R D×1 , channel squeezing is done by convolution W s *U executes, W s ∈R 1×C×1 , which is actually the projection of multi-channel features on a feature level. The vector z passes through two fully connected layers Convert to Vector r1 represents the compression coefficient of the channel excitation. To ensure that the excitation coefficient is within the appropriate range, the excitation vector It is mapped to [0,1] through the sigmoid function. After channel squeezing, the resulting feature projection is still suitable for encoding-decoding operations. Therefore, two fully connected layers are used Convert o to r2 represents the compression coefficient of spatial excitation, and the sigmoid function makes the excitation vector Keep it in a suitable range. Operation 3 is channel excitation, and operation 4 is spatial excitation, so that the channel features and spatial features are recalibrated at the same time. Finally, the calibrated features are fused using the max-out method. Accordingly, for any given feature input U = [u1, u2, ..., u c ]∈R D×C , the calculation process is as follows:
[0030] z=GAP(U)
[0031]
[0032]
[0033] o=Ws *U
[0034]
[0035]
[0036]
[0037] Among them, GAP stands for global average pooling, δ(·) is the ReLU function, σ(·) is the sigmoid function, and * represents the convolution operation.
[0038] Therefore, the adaptive prototype network of the present invention is provided with a feature extractor based on squeezing and excitation mechanism. The present invention can generate support set features and query set features by inputting the support set and the query set into the feature extractor based on squeezing and excitation mechanism.
[0039] S103, in the adaptive prototype network, calculating the support set prototype according to the support set features;
[0040] The classic prototype network obtains the prototype of a class of samples by averaging. When the samples are dispersed and have large differences, treating each sample as equally important will reduce the accuracy of the prototype network. Therefore, samples that are closer to the center of the sample distribution and more representative should be given a larger weight; conversely, samples that are far from the center of the sample distribution should have their weight reduced.
[0041] Drawing on the ADABOOST method of integrating weak classifiers into strong classifiers, the present invention constructs a prototype network that integrates features adaptively and weightedly to express strong features. By measuring the impact of missing specific samples on sample distribution, its weighted weight is obtained and finally integrated into a strong feature, that is, the prototype of a class of samples.
[0042] Specifically, the step of calculating the support set prototype according to the support set features includes:
[0043] (1) Calculate the maximum mean difference between the supporting feature set and the missing supporting feature set to characterize the impact of the supporting set features on the sample distribution;
[0044] Maximum mean difference (MMD) is a commonly used method to measure the distribution difference between two data sets. For a given support feature set S = {F(x1), F(x2), ..., F(x n )}, F is the feature extraction based on squeezing and excitation mechanism; S' l ={F(x1),F(x2),...F(x l-1 ),F(x l+1 ),...F(x n)} indicates that the feature F(x) is missing in the support feature set S. l ), that is, the supporting feature set is the set of all supporting feature sets, and the missing supporting feature set is the set of missing supporting feature sets.
[0045] Correspondingly, the support set feature F(x l ) on the sample distribution can be converted into the calculation of S and S′ l The maximum mean difference between l , the specific calculation formula is as follows:
[0046]
[0047] Among them, S is the support feature set, S = {F(x1), F(x2), ..., F(x n )},S' l is the missing support feature set, S' l Indicates that the support set feature F(x) is missing in S l ), S' l ={F(x1),F(x2),...F(x l-1 ),F(x l+1 ),...F(x n )}, for any x∈H.
[0048] From the above, we can see that m l The smaller it is, the better the sample's compliance with the sample distribution is, and the closer it is to the center of the sample distribution; otherwise, it indicates that the sample deviates from the sample distribution.
[0049] (2) Calculate the weight of the support set feature based on the maximum mean difference;
[0050] When m l = 0, S and S′ l is the same distribution; at this time, the support set feature F(x l ) l The calculation formula is as follows:
[0051] α l =ln((1-m l ) / m l ) / 2
[0052] Among them, m l is the maximum mean difference between the supporting feature set and the missing supporting feature set.
[0053] (3) Based on the weights and support set features, calculate the support set prototype of the lth class.
[0054] Define the support set S e={(x1,y1),(x2,y2),...,(x n ,y n )},x i ∈R D ,y i ∈{1,2,...L} is the sample label of class L, and the support set prototype P of class l is calculated according to the following formula l ;
[0055]
[0056] P={P1,P2,...,P K}
[0057] Among them, S e is the support set, S e ={(x1,y1),(x2,y2),...,(x n ,y n )},x i ∈R D ,y i ∈{1,2,...L},α i is the support set feature F(x i ), P is the prototype of L class samples.
[0058] S104, in the adaptive prototype network, calculating the query set classification probability according to the support set prototype and the query set features to adjust the model parameters of the adaptive prototype network;
[0059] For the sample of query set that needs classification First, we get the feature extractor Calculate separately The Euclidean distance d between the L prototype vectors. Specifically, the query set classification probability can be calculated according to the following formula:
[0060]
[0061] in, is a sample of the query set, is the query set feature, P l is the prototype of the support set of the first category, for With P l The Euclidean distance between .
[0062] Accordingly, the loss can be calculated based on the query set classification probability and the updated network parameters can be sent back.
[0063] Therefore, the adaptive prototype network of the present invention obtains an integrated strong feature prototype by adaptively weighting the features, which is suitable for small sample learning.
[0064] S105, inputting the test set into the pseudo-label multiple accumulation screening network to generate a pseudo-label dataset;
[0065] For data-driven classification models, the number of trainable samples affects the accuracy of the model, especially in semi-supervised learning. The present invention uses a pseudo-label screening method based on uncertainty, combined with multiple data accumulation strategies, to effectively expand the scale of the training set and improve the accuracy of the model.
[0066] The specific uncertainty-based pseudo-label screening formula is as follows:
[0067]
[0068] in, represents the predicted probability of the i-th sample of category l, represents the uncertainty estimate of the i-th sample of category l, k p The uncertainty threshold, τ p is the threshold of prediction probability; when g l If it is 1, it means that the current sample is filtered as a pseudo label.
[0069] S106, concatenating the pseudo-label data set and the training set and inputting them into the adaptive prototype network model to adjust the model parameters of the adaptive prototype network;
[0070] In order to select as many trainable samples as possible while ensuring the accuracy of pseudo-label screening, the present invention introduces a multiple accumulation strategy. The pseudo-label data set screened in the previous round is combined with the training set, and the adaptive prototype network is trained again, and used for a new round of pseudo-label screening, and accumulated layer by layer until the stopping condition is met. If an erroneous pseudo-label is added to the shallow network, the error information will accumulate in the iteration until the deep layer of the network, which will greatly reduce the accuracy of fault diagnosis. Therefore, timely stopping of the accumulation strategy is the key to ensuring the accuracy of the model. Use the labeled training set to determine whether the network is degraded. If the addition of the pseudo-label reduces the accuracy of the adaptive prototype network for the training set, it indicates that the erroneous pseudo-label causes the network to degenerate, and the accumulation strategy is stopped. Among them, the accumulation strategy stops in two cases: (1) the screened pseudo-label is empty; (2) the network is degraded.
[0071] Therefore, pseudo-label screening selects as many pseudo-label samples as possible through multiple accumulation strategies for semi-supervised learning.
[0072] S107, input the test set into the adaptive prototype network to calculate the classification probability of the test set, and use the class with the largest probability as the fault label of the current sample.
[0073] Specifically, the query set classification probability is calculated according to the following formula:
[0074]
[0075] in, is the sample of the test set, is the test set feature, P l is the prototype of the support set of the first category, for With P l The Euclidean distance between .
[0076] Finally, the class with the highest probability is taken as the fault label of the current sample.
[0077] It should be noted that the test set may be target data to be subjected to fault diagnosis. The target data is output to the trained adaptive prototype network, and the corresponding fault label can be analyzed, thereby achieving effective fault diagnosis.
[0078] As can be seen from the above, the present invention combines adaptive prototype network (including feature extraction), pseudo-label screening, and fault diagnosis. Among them, the adaptive prototype network obtains an integrated strong feature prototype by adaptively weighting the features, which is suitable for small sample learning; the pseudo-label screening selects as many pseudo-label samples as possible through multiple accumulation strategies for semi-supervised learning; finally, the fault diagnosis of the bearing is realized.
[0079] Accordingly, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the diagnostic method of the semi-supervised learning of the above-mentioned adaptive prototype network and pseudo-label when executing the computer program. At the same time, the present invention also discloses a computer-readable storage medium, on which a computer program is stored, wherein the computer program implements the steps of the diagnostic method of the semi-supervised learning of the above-mentioned adaptive prototype network and pseudo-label when executed by the processor.
[0080] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A diagnostic method based on semi-supervised small sample learning with adaptive prototype network and multiple accumulation of pseudo-label samples, characterized in that: include: Extract support set and query set from training set respectively; Inputting the support set into the adaptive prototype network for feature extraction to generate support set features, and inputting the query set into the adaptive prototype network for feature extraction to generate query set features; In the adaptive prototype network, a support set prototype is calculated according to the support set features; The step of calculating the support set prototype according to the support set features includes: calculating the maximum mean difference between the support feature set and the missing support feature set to characterize the influence of the support set features on the sample distribution, wherein the support feature set is a set of all support set features, and the missing support feature set is a set of missing support set features; calculating the weight of the support set features according to the maximum mean difference; and calculating the first l The supporting set prototype of the class; In the adaptive prototype network, the query set classification probability is calculated according to the support set prototype and the query set features to adjust the model parameters of the adaptive prototype network; The test set is input into a pseudo-label multiple accumulation screening network to generate a pseudo-label data set; the pseudo-label multiple accumulation screening network uses an uncertainty-based pseudo-label screening method combined with a multiple data accumulation strategy to expand the scale of the training set. The specific uncertainty-based pseudo-label screening formula is as follows: in, Indicates the category l No. The predicted probability of a sample, Indicates the category l No. The uncertainty estimate for the samples is represents the uncertainty threshold, is the threshold of prediction probability; splicing the pseudo-label data set with the training set and inputting them into the adaptive prototype network model to adjust the model parameters of the adaptive prototype network; The test set is input into the adaptive prototype network to calculate the classification probability of the test set, and the class with the largest probability is used as the fault label of the current sample.
2. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1, characterized in that: According to the formula , calculate the maximum mean difference between the supporting feature set and the missing supporting feature set To characterize the support set features Impact on sample distribution; in, S To support feature sets, , is the missing support feature set, Indicated in S Missing support features , , , .
3. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1 or 2, characterized in that: According to the formula , calculate the support set features Weight ; in, is the maximum mean difference between the supporting feature set and the missing supporting feature set.
4. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1, characterized in that: According to the formula , calculate the l The supporting set prototype of the class ; in, For the support set, , Support set features The weight of .
5. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1, characterized in that: The step of calculating the query set classification probability according to the support set prototype and the query set features comprises: According to the formula , calculate the query set classification probability , in, is a sample of the query set, is the query set feature, For the l Class supports set prototypes, for and The Euclidean distance between .
6. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1, characterized in that: The step of inputting the test set into the adaptive prototype network to calculate the classification probability of the test set comprises: According to the formula , calculate the query set classification probability , in, is the sample of the test set, is the test set feature, For the l Class supports set prototypes, for and The Euclidean distance between .
7. The diagnostic method for semi-supervised small sample learning based on adaptive prototype network and multiple accumulation of pseudo-label samples as claimed in claim 1, characterized in that: The adaptive prototype network is provided with a feature extractor based on a squeeze and excitation mechanism.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Sewage treatment fault diagnosis method based on stacking element learning strategy
CN110009030A
Hyperspectral image semi-supervised classification method based on small sample learning
CN113408605A
Intelligent fault diagnosis method based on DSECJAN
CN114580288A
Fault diagnosis method for prototype adaptive mechanical equipment based on multi-scale attention
CN115508073A
Fault diagnosis method of wind turbine generator gearbox
CN115541228A
