A Domain Adaptation Information Bottleneck Federated Learning Method for Fault Diagnosis in Intelligent Manufacturing
The unchanging features are extracted through the information bottleneck federated learning method, which solves the problem of low model accuracy caused by data domain drift in different production lines in intelligent manufacturing, and achieves high-precision fault diagnosis.
Patent Information
- Application Number
- CN202410013035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2044-01-04
AI Technical Summary
In the field of intelligent manufacturing, due to the low model prediction accuracy caused by data domain drift of different production lines, existing federated learning methods have not been effectively overcome, affecting the accuracy of fault diagnosis.
The information bottleneck federated learning method is adopted to extract invariant features on the client side, use the information bottleneck principle to build a global objective function, reweight domain compression characterization, and realize effective extraction of cross-domain features and improved model failure prediction accuracy.
In the case where data distributions of different production lines vary greatly, the fault prediction accuracy of the global model is significantly improved, the modeling challenges brought about by domain drift are overcome, and the accuracy of fault diagnosis is improved.
Smart Images

Figure CN117993282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information bottleneck federated learning method, which is specifically designed for high-precision fault diagnosis in the field of intelligent manufacturing. Aiming at the intelligent manufacturing environment with domain-shifted data, this method uses the information bottleneck principle to compress and extract the data representations of each production line's client, so as to effectively identify and analyze faults. By learning the invariant features between different clients, the present invention can significantly improve the prediction accuracy of the global model in the fault diagnosis task. Especially when dealing with large differences in the data distributions of different clients, this method can effectively overcome the learning difficulties caused by domain drift and achieve accurate extraction of key fault information. This not only improves the accuracy of fault diagnosis, but also provides strong technical support for distributed collaborative fault diagnosis in the field of intelligent manufacturing. Background Art
[0002] In the field of intelligent manufacturing, especially in fault diagnosis applications, the data generated by different production lines (clients) usually have different distribution characteristics, and this phenomenon is called data domain drift. This problem is particularly prominent in distributed manufacturing systems and has a significant negative impact on machine learning-based prediction models, such as fault type identification and production quality control. As a common problem, data domain drift will greatly affect the model prediction accuracy of distributed modeling. In industrial distributed modeling, federated learning is a commonly used distributed machine learning framework that allows model training at the data source location and can effectively use the data of multiple clients for joint modeling. However, existing federated learning methods often fail to fully consider the problem of domain drift, resulting in low prediction accuracy of the model. To solve this problem, the present invention proposes a domain adaptation information bottleneck federated learning algorithm for intelligent manufacturing fault diagnosis. This method uses the information bottleneck principle to extract invariant features of cross-domain data, so that the model can adapt to and overcome the domain drift of the data and improve the prediction accuracy of the model. Therefore, the research results of the present invention have broad application prospects and can extract domain-invariant features from the data collected by each client, thus significantly improving the prediction accuracy of the model in fault diagnosis.
[0003] Due to the problem of domain - drifted data, the accuracy of traditional federated learning methods for fault diagnosis is relatively low, making it difficult to meet the requirements of efficient and safe monitoring. With the development of digitalization in China, large - scale and different - domain data from different factories need to be collaboratively modeled for fault diagnosis in the production process through federated learning methods. The problem of data domain drift, as a key factor affecting the performance of federated learning models, severely restricts the effect of joint fault diagnosis modeling between factories. To solve the joint modeling of different - domain drifted data, some robust learning strategies have been proposed. In distributed learning, the aggregated parameters or gradients of different clients are often heterogeneous. Such robust learning strategies can alleviate the impact brought by the difference in client - side data distribution, but it is difficult to guarantee the representational ability of the learned global model. In recent years, methods for domain generalization can effectively learn models with strong out - of - domain generalization ability, thus meeting the requirements of the generalization ability of the learned models in distributed learning. However, such methods often require learning in centralized data. When the data of multiple domains are distributed among different clients, it is difficult for domain - generalization methods to well achieve model training. Therefore, how to make good use of fault data from different domains to improve the fault - diagnosis prediction accuracy of the model in a distributed paradigm remains an open problem in industrial collaborative modeling and has strong practical significance.
[0004] The present invention designs a domain - adaptation information - bottleneck federated learning algorithm for intelligent - manufacturing fault diagnosis, aiming to solve the modeling challenges brought by the difference in data distribution of different domains between different production lines. The algorithm first establishes a global objective function, which is based on the information bottleneck of different - domain feature information and re - weights the compressed representation of the domain considering the diversity of data scale. Through the federated - learning framework, the effective extraction of cross - domain invariant features is realized, thereby improving the fault - prediction accuracy of the global model. In the actual industrial environment, especially when facing the data difference of different production lines, this method can effectively overcome the problems of limited expression ability of the global model and low fault - prediction accuracy. Summary of the Invention
[0005] The present invention obtains a domain - adaptation information - bottleneck federated learning algorithm for intelligent - manufacturing fault diagnosis. This method realizes the reasonable representation of the features of different clients by using the information bottleneck to extract invariant features of the domains to which different clients belong, and improves the fault - prediction accuracy of the model. In the joint modeling in the field of intelligent - manufacturing fault diagnosis, this method can obtain a global model with high accuracy when the data distribution difference of clients on different production lines is large.
[0006] The present invention adopts the following technical solutions and implementation steps:
[0007] 1. A domain - adaptation information - bottleneck federated learning method for intelligent - manufacturing fault diagnosis, characterized by comprising the following steps:
[0008] (1) Initialize and distribute the global model
[0009] a) The server initializes the global model parameter w with random numbers in the range [0, 1];
[0010] b) The server conducts global communication with the clients on different production lines and distributes the global model parameter vector to the clients on each production line;
[0011] c) The clients on different production lines receive the global model parameter vector and use these parameters to update their respective local model parameters to meet the requirements of their respective fault detection tasks;
[0012] (2) Local training of clients
[0013] a) The clients on the production line receive the global model parameter vector and update their respective local models with the global model parameter vector w;
[0014] b) The clients obtain and preprocess the local dataset;
[0015] ① Obtain the classification image dataset of the production line to which the client belongs, and the dataset contains P types of fault images;
[0016] ② Divide all samples into two groups, which are used as the training set and the test set respectively; the training set owned by each client is expressed as where represents the sample pair composed of the i-th fault image feature and the fault type of the k-th client, is the fault image feature of the i-th sample of the k-th one, is the label of the i-th sample of the k-th client, N k is the number of training set samples of the k-th client, and the number of test set samples of the k-th client is expressed as U k ; the total sum of the datasets of all K clients is N, that is, N = ∑N k ; the ratio of the number of samples in the training set to the number of samples in the test set is 4:1, and the fault categories included in the training set and the test set are the same;
[0017] ③ Adjust the dimensionality size of the fault picture features x k in the training set and the test set to 224×224; normalize the adjusted fault image features to [0, 1], and the normalization formula is
[0018]
[0019] where is the normalized image feature, and min(·) and max(·) represent taking the minimum value and the maximum value in the feature matrix respectively;
[0020] c) Construct and update the classification network model;
[0021] ① Construct a classification network based on the information bottleneck deep learning network: The information bottleneck deep learning network consists of four parts in total: First, the first part is the feature encoder part, which consists of a ResNet-18 network and an encoder, and processes the preprocessed fault image features with a size of 224×224 pixels and 3 color channels; The ResNet-18 network is composed of 17 convolutional layers and 1 fully connected layer connected in sequence. The kernel size of the first convolutional layer is 7×7, the number of channels is 64, and the stride is 2. The first convolutional layer is linked to the subsequent convolutional layers through global max pooling operation, and then the second convolutional layer and the 17th convolutional layer are connected in sequence. The kernel size of each convolutional layer is 3×3, and the stride is 1. Among these 16 convolutional layers, the number of channels of the second to fifth convolutional layers is 64, the number of channels of the sixth to ninth convolutional layers is 128, the number of channels of the tenth to thirteenth convolutional layers is 256, and the number of channels of the fourteenth to seventeenth convolutional layers is 512. Finally, the 17th convolutional layer is connected to a fully connected layer with an input dimension of 512 and an output dimension of 1000 through global average pooling operation. The encoder consists of a two-layer multi-layer perceptron with an input dimension of 1000 and an output dimension of 512; Next, the second part is the resampling layer, which contains 1 mean linear fully connected layer and 1 variance linear fully connected layer, and the input and output dimensions are both 512; The third part is the invariant feature classifier, which consists of 1 linear fully connected layer with an input dimension of 512 and an output dimension of P, that is, the probability of P types of faults; Finally, the fourth part is the domain auxiliary feature classifier, which also consists of 1 linear fully connected layer, but the input dimension is 513 and the output dimension is P;
[0022] ② Update the local model with the received model parameter vector: Update the parameters in the local model with the corresponding parameters in the model parameter vector;
[0023] d) Train the information bottleneck classification network model;
[0024] Training the information bottleneck classification network model is divided into two stages, namely the forward propagation stage and the backward propagation stage;
[0025] In the forward propagation stage, the N k fault samples in the local fault data set of the k-th client are randomly divided into multiple feature batches according to the batch sample number S. The t-th feature batch of the k-th client is denoted as The feature batches are sequentially fed into the classification network model, passing through the feature encoder, resampling layer, invariant feature classifier and domain auxiliary feature classifier. The training process of each batch of data is as follows: The process is as follows:
[0026] i. Input the feature batch of the t-th batch of the k-th client into the feature encoder to obtain the extracted representation z, with a dimension of S×512;
[0027] ii. Input the extracted representation z into the resampling layer to obtain the mean vector v k and the variance vector m k , v k and m k both have a dimension of S×512;
[0028] iii. Perform reparameterization through v k and m k to obtain the compressed representation ψ k , ψ k has a dimension of S×512, where the formula for reparameterization is:
[0029]
[0030] where rand(·) is a function for random sampling that selects a random number in the range [0,1], and e (·) is the exponential function;
[0031] iv. Input the compressed representation ψ k into the invariant feature classifier to obtain the vector vector which is the fault prediction result of the t-th feature batch of the k-th client, with a dimension of S×P;
[0032] v. Concatenate the compressed representation ψ k with the domain label k in the first dimension and input it into the domain auxiliary classifier to obtain the vector vector which is the auxiliary vector of the t-th batch of the k-th client, with a dimension of S×P;
[0033] In the backpropagation stage, calculate the gradient of the information bottleneck objective loss function with respect to the parameters and update the classification network model parameters, where the information bottleneck objective loss function is expressed as:
[0034]
[0035] where is the model parameter of the t-th batch of the k-th client, λ is a regularization factor with a value of 0.01, is the feature batch of the t-th batch of the k-th client;
[0036] In equation (3), is the domain-specific loss function, and its calculation formula is:
[0037]
[0038] wherein and are the mean vector and variance vector output after the feature encoding layer and resampling layer for the s-th sample of the k-th client respectively, N is the total number of training samples of all clients, S is the number of samples included in a batch, and N k is the number of training samples in the k-th client;
[0039] In Equation (3), L inv is the invariant feature classifier loss function, and its calculation formula is:
[0040]
[0041] wherein is the output of the s-th sample of the k-th client, lg(·) is the logarithmic function with base 10, and S is the number of samples included in a batch;
[0042] In Equation (3), L d is the domain auxiliary classifier loss function, and its calculation formula is:
[0043]
[0044] wherein is the auxiliary vector of the s-th sample of the k-th client, lg(·) is the logarithmic function with base 10, and S is the number of samples included in a batch;
[0045] Use the gradient descent algorithm to calculate the gradient of the model parameters through the information bottleneck objective loss function, and update the classification network model parameters. The expression for parameter update is as follows:
[0046]
[0047] where η t is the learning rate of gradient descent for the t-th batch, and its value range is 0.01 to 0.001, is the model parameter at the (t + 1)-th batch of the k-th client, is the model parameter at the t-th batch of the k-th client, and F k (·) is the information bottleneck loss function of the k-th client, is the gradient of the information bottleneck loss function with respect to the parameter sought;
[0048] e) Obtain the classification network model based on the information bottleneck;
[0049] Input the samples in the test set into the classification network model; the i-th sample is first input into the feature encoder to obtain the extracted representation z; the representation z is input into the resampling layer to obtain the extracted mean vector v k and variance vector m k ; the mean vector and variance vector are reparameterized through formula (2) to obtain the compressed representation ψ k ; input ψ k into the invariant feature classifier to obtain the probability of the fault category of the predicted i-th sample
[0050] f) Upload the updated classification network model;
[0051] Upload the trained fault classification network model to the server in the form of a model parameter vector;
[0052] (3) The server aggregates the client models
[0053] a) Wait for the training of the clients on all production lines to complete and collect the model parameter vectors sent by all clients;
[0054] b) Aggregate the local model parameter vectors uploaded by all clients to obtain the updated global model parameters, where the formula for aggregating the model parameters is:
[0055]
[0056] where K represents the number of clients, N k represents the training set samples of the k-th client, w k represents the model parameter vector of the k-th client, w represents the global model parameter vector, and N represents the total number of training set samples of all K clients;
[0057] c) Send the updated global model parameter vector to all clients;
[0058] (4) Global collaborative iterative training
[0059] The server and the clients on different production lines perform collaborative training, repeating steps (2)-(3) until the global iteration number h reaches the predetermined iteration number H, and the value of H is 100;
[0060] (5) Obtain and use the optimal global model
[0061] a) The server broadcasts the optimal global model parameter vector to the clients on all production lines;
[0062] b) The clients use the received model parameter vector to update the local model to obtain the final fault classification network model;
[0063] c) The client uses the final fault classification network model to classify the fault image data of the affiliated production line. Description of the Drawings
[0064] Figure 1 It is the model structure diagram of the domain adaptation information bottleneck federated learning method for fault diagnosis in intelligent manufacturing of the present invention
[0065] Figure 2 It is the fault prediction accuracy graph of the domain adaptation information bottleneck federated learning method for fault diagnosis in intelligent manufacturing of the present invention Detailed Embodiment
[0066] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to specific examples.
[0067] The present invention proposes an information bottleneck federated learning method for domain drift data, which is characterized by including the following steps:
[0068] (1) Initialize and distribute the global model
[0069] a) The server initializes the global model parameter w with a random number in the range of [0, 1];
[0070] b) The server conducts global communication with the clients of different production lines and distributes the global model parameter vector to the clients of each production line;
[0071] c) The clients of different production lines receive the global model parameter vector and use these parameters to update their respective local model parameters to meet the requirements of their respective fault detection tasks;
[0072] (2) Local training of the client
[0073] a) The clients of the production line receive the global model parameter vector and update their respective local models with the global model parameter vector w;
[0074] b) The client obtains and preprocesses the local dataset;
[0075] ① Obtain the classification image dataset of the production line to which the client belongs, and the dataset contains P types of fault images;
[0076] ② Divide all samples into two groups, which are used as the training set and the test set respectively; the training set owned by each client is expressed as where represents the sample pair composed of the i-th fault image feature and the fault type of the k-th client, is the fault image feature of the i-th sample of the k-th one, is the label of the i-th sample of the k-th client, Nk is the number of training set samples for the k-th client, and the number of test set samples for the k-th client is denoted as U k ; The total dataset of all K clients is N, that is, N = ∑N k ; The ratio of the number of samples in the training set to the number of samples in the test set is 4:1, and the fault categories included in the training set and the test set are the same;
[0077] ③ Resize the dimension of the fault image features x k in the training set and the test set to 224×224; Normalize the resized fault image features to [0,1], and the normalization formula is
[0078]
[0079] where is the normalized image feature, and min(·) and max(·) respectively represent taking the minimum and maximum values in the feature matrix;
[0080] c) Construct and update the classification network model;
[0081] ① Construct a classification network based on the information bottleneck deep learning network: The information bottleneck deep learning network consists of a total of 4 parts: First, the first part is the feature encoder part, which consists of a ResNet-18 network and 1 encoder, and processes the preprocessed fault image features with a size of 224×224 pixels and 3 color channels; The ResNet-18 network is composed of 17 convolutional layers and 1 fully connected layer connected in sequence. The kernel size of the first convolutional layer is 7×7, the number of channels is 64, and the stride is 2. The first convolutional layer is connected to the subsequent convolutional layers through global max pooling operation, and then the second convolutional layer and the 17th convolutional layer are connected in sequence. The kernel size of each convolutional layer is 3×3, and the stride is 1. Among these 16 convolutional layers, the number of channels from the second to the fifth convolutional layer is 64, the number of channels from the sixth to the ninth convolutional layer is 128, the number of channels from the tenth to the thirteenth convolutional layer is 256, and the number of channels from the fourteenth to the seventeenth convolutional layer is 512. Finally, the 17th convolutional layer is connected to a fully connected layer with an input dimension of 512 and an output dimension of 1000 through global average pooling operation. The encoder consists of a two-layer multi-layer perceptron with an input dimension of 1000 and an output dimension of 512; Next, the second part is the resampling layer, which includes 1 mean linear fully connected layer and 1 variance linear fully connected layer, and the input and output dimensions are both 512; The third part is the invariant feature classifier, which consists of 1 linear fully connected layer with an input dimension of 512 and an output dimension of P, that is, the probability of P types of faults; Finally, the fourth part is the domain auxiliary feature classifier, which also consists of 1 linear fully connected layer, but the input dimension is 513 and the output dimension is P;
[0082] ② Update the local model with the received model parameter vector: Update the parameters in the local model using the corresponding parameters in the model parameter vector;
[0083] d) Train the information bottleneck classification network model;
[0084] Training the information bottleneck classification network model is divided into two stages, namely the forward propagation stage and the backward propagation stage;
[0085] In the forward propagation stage, the N k fault samples of the local fault data set of the k-th client are randomly divided into multiple feature batches according to the batch sample number S. The t-th feature batch of the k-th client is denoted as Send the feature batches into the classification network model in sequence. After passing through the feature encoder, resampling layer, invariant feature classifier, and domain auxiliary feature classifier, the training process of each batch of data is as follows: The process is as follows:
[0086] vi. Input the feature batch of the t-th batch of the k-th client into the feature encoder to obtain the extracted representation z, with a dimension of S×512;
[0087] vii. Input the extracted representation z into the resampling layer to obtain the mean vector v k and variance vector m k , v k and m k have a dimension of S×512;
[0088] viii. Reparametrize through v k and m k to obtain the compressed representation ψ k , ψ k has a dimension of S×512, where the reparametrization formula is:
[0089]
[0090] where rand(·) is a function for random sampling that selects a random number in the range [0,1], and e (·) is the exponential function;
[0091] ix. Input the compressed representation ψ k into the invariant feature classifier to obtain the vector vector is the fault prediction result of the t-th feature batch of the k-th client, with a dimension of S×P;
[0092] x. Input the compressed representation ψ kConcatenate with the domain label k in the first dimension and input it into the domain - auxiliary classifier to obtain a vector vector is the auxiliary vector for the t - th batch of the k - th client, with a dimension of S×P;
[0093] In the back - propagation stage, calculate the gradient of the information - bottleneck objective loss function with respect to the parameters and update the parameters of the classification network model. The information - bottleneck objective loss function is expressed as:
[0094]
[0095] where is the model parameter for the t - th batch of the k - th client, λ is a regularization factor with a value of 0.01, is the feature batch for the t - th batch of the k - th client;
[0096] In Equation (11), is the domain - specific loss function, and its calculation formula is:
[0097]
[0098] where and are the mean vector and variance vector output after the k - th client's s - th sample passes through the feature encoding layer and the resampling layer respectively. N is the total number of training samples of all clients, S is the number of samples included in a batch, and N k is the number of training samples in the k - th client;
[0099] In Equation (11), L inv is the invariant - feature classifier loss function, and its calculation formula is:
[0100]
[0101] where is the output of the k - th client's s - th sample, lg(·) is the logarithm function with base 10, and S is the number of samples included in a batch;
[0102] In Equation (11), L d is the domain - auxiliary classifier loss function, and its calculation formula is:
[0103]
[0104] where is the auxiliary vector of the k - th client's s - th sample, lg(·) is the logarithm function with base 10, and S is the number of samples included in a batch;
[0105] Calculate the gradients of the model parameters using the gradient descent algorithm through the information bottleneck objective loss function, and update the classification network model parameters. The expression for parameter update is as follows:
[0106]
[0107] where η t is the learning rate of gradient descent for the t-th batch, with a value range of 0.01 to 0.001, is the model parameter at the (t + 1)-th batch for the k-th client, is the model parameter at the t-th batch for the k-th client, and F k (·) is the information bottleneck loss function for the k-th client, is the gradient of the information bottleneck loss function with respect to the parameter sought;
[0108] e) Obtain the classification network model based on the information bottleneck;
[0109] Input the samples in the test set into the classification network model; the i-th sample is first input into the feature encoder to obtain the extracted representation z; the representation z is input into the resampling layer to obtain the extracted mean vector v k and variance vector m k ; the mean vector and variance vector are reparameterized through formula (10) to obtain the compressed representation ψ k ; input ψ k into the invariant feature classifier to obtain the probability of the fault class of the predicted i-th sample
[0110] f) Upload the updated classification network model;
[0111] Upload the trained fault classification network model to the server in the form of a model parameter vector;
[0112] (3) The server aggregates the client models
[0113] a) Wait for all clients on the production lines to complete training and collect the model parameter vectors sent by all clients;
[0114] b) Aggregate the local model parameter vectors uploaded by all clients to obtain the updated global model parameters. The formula for aggregating the model parameters is:
[0115]
[0116] where K represents the number of clients, N k represents the training set samples of the k-th client, and w kDenote the model parameter vector of the k-th client, w denote the global model parameter vector, and N denote the total number of training set samples of all K clients;
[0117] c) Send the updated global model parameter vector to all clients;
[0118] (4) Global collaborative iterative training
[0119] The server and the clients on different production lines conduct collaborative training, repeating steps (2)-(3) until the global iteration number h reaches the predetermined iteration number H, and the value of H is 100;
[0120] (5) Obtain and use the optimal global model
[0121] a) The server broadcasts the optimal global model parameter vector to the clients on all production lines;
[0122] b) The clients update the local model using the received model parameter vector to obtain the final fault classification network model;
[0123] c) The clients use the final fault classification network model to classify the fault image data of the affiliated production line.
Claims
1. A domain adaptation information bottleneck federated learning method for intelligent manufacturing fault diagnosis, characterized in that It includes the following steps: (1) Initialize and distribute the global model a) The server initializes the global model parameters w with random numbers in the range [0, 1]; b) The server conducts global communication with the clients on different production lines and distributes the global model parameter vector to the clients on each production line; c) The clients on different production lines receive the global model parameter vector and use these parameters to update their respective local model parameters to meet the requirements of their respective fault detection tasks; (2) Local training of the client a) The clients on the production line receive the global model parameter vector and update their respective local models with the global model parameter vector w; b) The client obtains and preprocesses the local dataset; ① Obtain the classification image dataset of the production line to which the client belongs, and the dataset contains P-class fault images; ② Divide all samples into two groups, which are used as the training set and the test set respectively; the training set owned by each client is denoted as where denotes a sample pair composed of the i-th fault image feature and the fault type of the k-th client, is the fault image feature of the i-th sample of the k-th one, is the label of the i-th sample of the k-th client, N k is the number of training set samples of the k-th client, and the number of test set samples of the k-th client is denoted as U k ; the total sum of the data sets of all K clients is N, that is, N = ∑N k ; the ratio of the number of samples in the training set to the number of samples in the test set is 4:1, and the fault categories included in the training set and the test set are the same; ③ Resize the dimension of the fault image features \(x\) in the training set and the test set to \(224\times224\); normalize the adjusted fault image features to \([0, 1]\), and the normalization formula is k After that, normalize the adjusted fault image features to \([0, 1]\), and the normalization formula is wherein is the normalized image feature, and min(·) and max(·) respectively represent taking the minimum value and the maximum value in the feature matrix; c) Construct and update the classification network model; ① Construct a classification network based on the information bottleneck deep learning network: The information bottleneck deep learning network consists of a total of 4 parts: First, the first part is the feature encoder part, which consists of a ResNet-18 network and 1 encoder, and processes the preprocessed fault image features with a size of 224×224 pixels and 3 color channels; The ResNet-18 network is composed of 17 convolutional layers and 1 fully connected layer connected in sequence. The kernel size of the first convolutional layer is 7×7, the number of channels is 64, and the stride is 2. The first convolutional layer is linked to the subsequent convolutional layers through global max pooling operation, and then the second convolutional layer is connected to the 17th convolutional layer in sequence. The kernel size of each convolutional layer is 3×3 and the stride is 1. Among these 16 convolutional layers, the number of channels of the second to fifth convolutional layers is 64, the number of channels of the sixth to ninth convolutional layers is 128, the number of channels of the tenth to thirteenth convolutional layers is 256, and the number of channels of the fourteenth to seventeenth convolutional layers is 512. Finally, the 17th convolutional layer is connected to a fully connected layer with an input dimension of 512 and an output dimension of 1000 through global average pooling operation. The encoder consists of a two-layer multi-layer perceptron with an input dimension of 1000 and an output dimension of 512; Next, the second part is the resampling layer, which includes 1 mean linear fully connected layer and 1 variance linear fully connected layer, and the input and output dimensions are both 512; The third part is the invariant feature classifier, which consists of 1 linear fully connected layer with an input dimension of 512 and an output dimension of P, that is, the probability of P-class faults; Finally, the fourth part is the domain-assisted feature classifier, which also consists of 1 linear fully connected layer, but the input dimension is 513 and the output dimension is P; ② Update the local model with the received model parameter vector: Use the parameters in the corresponding part of the model parameter vector to update the parameters in the local model; d) Train the information bottleneck classification network model; Training the information bottleneck classification network model is divided into two stages, namely the forward propagation stage and the backward propagation stage; In the forward propagation stage, N k fault samples of the local fault data set of the k-th client are randomly divided into multiple feature batches according to the number of samples per batch S. The t-th feature batch of the k-th client is denoted as The feature batches are sequentially fed into the classification network model. After passing through the feature encoder, resampling layer, invariant feature classifier, and domain auxiliary feature classifier, the training process for each batch of data is as follows: The process is as follows: i. Input the feature batch of the t-th batch of the k-th client into the feature encoder to obtain the extracted representation z with a dimension of S×512; ii. Input the extracted characterization z into the resampling layer to obtain the mean vector v of the k-th client k and the variance vector m k , v k and m k are of dimension S×512; iii. Through v k and m k perform reparameterization to obtain the compressed representation ψ k , ψ k has a dimension of S×512, and the formula for reparameterization is: where rand(·) is a function for random sampling that selects a random number in the range [0, 1], and e (·) is the exponential function; iv. Input the compressed representation ψ k into the invariant feature classifier to obtain a vector The vector is the fault prediction result of the t-th feature batch of the k-th client, with a dimension of S×P; v. Concatenate the compressed representation ψ k with the domain label k in the first dimension and input it into the domain auxiliary classifier to obtain a vector The vector is the auxiliary vector for the t-th batch of the k-th client, with a dimension of S×P; The backward propagation stage is to calculate the gradient of the information bottleneck objective loss function with respect to the parameters and update the classification network model parameters, where the information bottleneck objective loss function is expressed as: wherein is the model parameter of the k-th client in the t-th batch, λ is a regulation factor with a value of 0.01, is the feature batch of the k-th client in the t-th batch; In formula (3), is a domain-specific loss function, and its calculation formula is: where and are the mean vector and variance vector output after the feature encoding layer and resampling layer for the s-th sample of the k-th client respectively. N is the total number of training samples of all clients, S is the number of samples included in a batch, and N k is the number of training samples in the k-th client; In formula (3), L inv is the loss function of the invariant feature classifier, and its calculation formula is: where is the output of the s-th sample of the k-th client, lg(·) is the logarithmic function with base 10, and S is the number of samples included in a batch; In Equation (3), L d is the domain auxiliary classifier loss function, and its calculation formula is: where is the auxiliary vector of the s-th sample of the k-th client, lg(·) is the logarithmic function with base 10, and S is the number of samples included in a batch; Calculate the gradients of the model parameters through the information bottleneck objective loss function using the gradient descent algorithm, and update the parameters of the classification network model. The expression for parameter update is as follows: where η t is the learning rate of gradient descent for the t-th batch, with a value range of 0.01 to 0.001, is the model parameter at the (t + 1)-th batch for the k-th client, is the model parameter at the t-th batch for the k-th client, F k (·) is the information bottleneck loss function for the k-th client, is the gradient of the information bottleneck loss function with respect to the parameter sought; e) Obtain the classification network model based on the information bottleneck; Input the samples in the test set into the classification network model; the i-th sample is first input into the feature encoder to obtain the extracted representation z; the representation z is input into the resampling layer to obtain the extracted mean vector v k and variance vector m k ; the mean vector and variance vector are reparameterized through formula (2) to obtain the compressed representation ψ k ; input ψ k into the invariant feature classifier to obtain the probability of the fault class of the predicted i-th sample f) Upload the updated classification network model; Upload the trained fault classification network model to the server in the form of a model parameter vector; (3) The server aggregates the client models a) Wait for the training of the clients on all production lines to complete, and collect the model parameter vectors sent by all clients; b) Aggregate the local model parameter vectors uploaded by all clients to obtain the updated global model parameters. The formula for aggregating the model parameters is: where K represents the number of clients, and N k represents the training set samples of the k-th client, and w k represents the model parameter vector of the k-th client, w represents the global model parameter vector, and N represents the total number of training set samples of all K clients; c) Send the updated global model parameter vector to all clients; (4) Global collaborative iterative training The server and the clients on different production lines perform collaborative training, repeating steps (2)-(3) until the global iteration number h reaches the predetermined iteration number H, where the value of H is 100; (5) Obtain and use the optimal global model a) The server broadcasts the optimal global model parameter vector to the clients on all production lines; b) The clients update their local models using the received model parameter vectors to obtain the final fault classification network model; c) The clients use the final fault classification network model to classify the fault image data of their respective production lines.
Citation Information
Patent Citations
Federal learning method with high communication efficiency in wireless communication scene
CN114580498A
Federal learning global model training method based on active learning and model compression
CN114943345A