Federal learning performance enhancement method and system based on variational auto-encoder

By introducing variational autoencoder and cross-attention mechanism in federated learning, the problem of uneven data distribution is solved, which significantly improves training accuracy and overall model performance, while ensuring customer privacy.

CN119443207APending Publication Date: 2025-02-14JIANGSU JICUI IC APPL TECH MANAGEMENT CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411536535.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

There is a problem of uneven distribution of data in federated learning, which leads to poor performance of the global model on some clients.

Method used

Using a federated learning performance enhancement method based on variational autoencoder, the data is mapped to the potential space through variational autoencoder, and the cross attention mechanism and knowledge distillation technology are used to optimize model parameters and weight average, and gradually improve the performance of the global model. .

Benefits of technology

It significantly improves the training accuracy, can better simulate the heterogeneity of data between each client, improves the performance of the overall model framework, and ensures the security of customer privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443207A_ABST
    Figure CN119443207A_ABST
Patent Text Reader

Abstract

The invention discloses a federal learning performance enhancement method and system based on a variational auto-encoder. The method comprises the following steps: initializing model parameters of the variational auto-encoder; constructing a federated learning optimization algorithm based on a variational auto-encoder, and initializing a neural network model; dividing the data set, and distributing a training set for each client; training a neural network model by using the training set, updating model parameters in each round of federated learning aggregation, and issuing the model parameters to the client; the client side trains encoder parameters, updates hidden space Z and decoder parameters and uploads the parameters to the server side; the server side adopts a distillation technology to take the decoder of the client side as a teacher model, and a global decoder is trained; processing the updated global decoder by using a cross attention mechanism; carrying out weighted average on model parameters, and continuously iterating to complete training; according to the method, the performance and the accuracy of the whole model framework are remarkably improved while the privacy of the customer is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of Internet of Things technology and the popularization of smart devices, people will generate massive amounts of data in their daily use. If existing data mining technology is used to analyze and mine relevant information, a large amount of personal information will be generated; traditional machine learning requires uploading data to a central server for training, and a series of problems such as privacy, security, and communication methods that follow have attracted special attention.

[0003] Federated Learning (FL) is a new paradigm that replaces traditional centralized machine learning. It aims to protect the privacy and security of customer data. Its core is that multiple clients collaborate to train models. Only necessary model parameters are uploaded to the server for aggregation, while the model itself is retained locally on the client, avoiding centralized data storage and effectively protecting customer data privacy.

[0004] However, federated learning also faces an important challenge, namely, the data distribution problem. Specifically, the client data is usually not standard independent and identically distributed (IID) data, but non-independent and identically distributed (Non-IID). In reality, the client data participating in federated learning training often have obvious differences. This significant data heterogeneity will lead to poor performance of the global model on some clients. Summary of the invention

[0005] In response to the problems existing in the prior art, this application proposes a method and system for enhancing the performance of federated learning based on variational autoencoders, which solves the data distribution defects of federated learning and can better simulate the heterogeneity of data between clients. While ensuring customer privacy, it improves the performance of the overall model framework and significantly improves the training accuracy.

[0006] In a first aspect, the present application provides a method for enhancing the performance of federated learning based on a variational autoencoder, comprising the following steps:

[0007] S1, initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ;

[0008] S2, build a federated learning optimization algorithm based on variational autoencoder and initialize the neural network model;

[0009] S3, divides the data set into training set and test set, and assigns the corresponding training set to each client;

[0010] S4, train the neural network model using the training set, and update the model parameters in step S1 during each round of federated learning aggregation, and send the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ;

[0011] S5, use the cross attention mechanism to the global decoder V stu to process;

[0012] S6, performing weighted averaging on the model parameters, and continuously iterating the process of step S4 and step S5 to complete the training and update the global model.

[0013] In a possible implementation of the first aspect, step S3 uses a parameterized Dirichlet distribution function to divide the training set; the formula is as follows:

[0014] p k ~Dir(a)

[0015] Among them, a is the distribution parameter of each category, p k is the generated data distribution vector;

[0016] For the kth client, the m category data distribution vector p k =[p k0 ,p k1 ,……,p km ] is generated by the Dirichlet distribution function with parameter a.

[0017] In a possible implementation of the first aspect, step S4 specifically includes the following content:

[0018] S41, the encoding process of the client training the encoder parameters according to the allocated training set is as follows:

[0019] Define the input data set as X = {X1, X2, ..., X n}, for each set of input data X k There is a distribution P(X k ), k∈[1,n], n represents the total number of clients;

[0020] Use the loss function of the first encoder Calculate the mean μ, using the loss function of the second encoder Calculate the variance σ 2 , we get V enc ;

[0021] Map X to the latent space Z = {Z1, Z2, ..., Z n}, the form is

[0022] S42, the reparameterization process of updating the latent space Z is as follows:

[0023] Let Z = μ + ε × σ, from Sampling a Z in is equivalent to sampling an ε from N(0,I), and using the gradient descent method to achieve the reverse optimization of the mean variance;

[0024] Make the Z variable of the latent space conform to the standard normal distribution:

[0025] p(Z|X)=N(0,I)

[0026] S43, updating the decoder parameter V dec The decoding process is as follows:

[0027] The decoder receives Z sampled from the latent space k , and perform layer-by-layer operations through the neural network model to finally generate Right now Where G represents the decoder network, With the original data X k Same size;

[0028] S44, merge the data generated by each client decoder together as the teacher model in knowledge distillation, and use the merged data to train the global decoder V stu , the global decoder is the student model in knowledge distillation; the model output is extracted using the softmax function, and the extraction process is as follows:

[0029]

[0030] where z i and z j It represents the data samples of the i-th and j-th categories; T represents the temperature of knowledge distillation;

[0031] The loss function of server-side knowledge distillation is expressed as:

[0032]

[0033] Among them, z server 、z client Data samples from the client decoder and the server decoder respectively.

[0034] In a possible implementation of the first aspect, step S41 uses the KL divergence between the general normal distribution and the standard normal distribution as an additional loss function, that is:

[0035]

[0036] In a possible implementation of the first aspect, a standard L2 norm is used as a reconstruction loss function, and N data are provided, the true value X and the generated value X are known. The reconstruction loss is:

[0037]

[0038] Define ELBO loss to evaluate the integrity of the variational autoencoder, ELBO = MSE + KL.

[0039] In a possible implementation of the first aspect, step S5 specifically includes the following content:

[0040] S51, for the global decoder V stu The output image first applies a convolutional layer to obtain a reduced-dimensional feature map H. The cross-attention mechanism is used on the feature map H, and two convolutional layers with 1×1 filters are used to generate the query matrix Q and the key matrix K, where C′ is the number of channels, W and H represent the width and height of the image respectively; the attention map is generated by affinity operation At the same time, another convolutional layer with a 1×1 filter is applied on the feature map H to generate the feature map And at each position u in the spatial dimension of the feature map V, we get Φ u is a set of feature vectors in V, which collects the context information of each pixel on its cross path into one piece to generate a new feature map H′. H′ u is the feature vector of the output feature map at position u, A i,u Represented as an attention map of channel i at position u; the contextual pixel information is added to the feature map H′.

[0041] S52, the cross attention mechanism is used again for the feature map H′, and the feature map H” is output, so that each position in the feature map is collected from all pixels.

[0042] In a possible implementation of the first aspect, step S6 specifically includes the following content:

[0043] S61, the server aggregates the output feature map H′′ obtained in step S5 to update the global model. The aggregation process is described by the following formula:

[0044]

[0045] Among them, θ global represents the output of the global model, n represents the total number of clients in the aggregation process, and y k It represents the model parameters of the kth client;

[0046] S62, sending the above model parameters to each client to complete the next training.

[0047] In a second aspect, the present application provides a system for executing the method for enhancing the performance of federated learning, comprising:

[0048] The variational autoencoder initialization module is used to initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ;

[0049] The neural network model initialization module is used to build a federated learning optimization algorithm based on variational autoencoders and initialize the neural network model;

[0050] The data set partitioning module imports the data set into the system and divides it into training sets and test sets, and allocates a corresponding training set to each client;

[0051] The global decoder training module uses the training set to train the neural network model, and updates the model parameters in each round of federated learning aggregation, and sends the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ;

[0052] The cross attention module uses the cross attention mechanism to update the global decoder V stu to process;

[0053] The aggregation module is electrically connected / communicationally connected to the global decoder training module and the cross attention module, and is used to perform weighted averaging of the model parameters and continuously iterate to complete the training.

[0054] Compared with the existing methods, this application has the following beneficial effects:

[0055] (1) Federated learning protects data privacy by uploading model parameters instead of original data. Variational Auto-encoder (VAE) is a generative network model that consists of a neural network architecture consisting of an encoder and a decoder. The two encoders calculate the corresponding mean and variance of the data and map them to the latent space Z. The decoder generates the corresponding data from the latent space Z and achieves the corresponding generation effect by comparing the difference between the generated data and the original data. Therefore, the federated learning optimization model based on variational auto-encoder (VAE) constructed in this application can improve the performance of the overall framework while ensuring customer privacy.

[0056] (2) This application uses a parameterized Dirichlet distribution function to divide the training data set, which can better simulate the situation where the data between clients are not independent and identically distributed, solve the data distribution defects of federated learning, and improve the performance of the global model on the client;

[0057] (3) This application uses a cross-attention mechanism to focus on the key parts of the global image, which significantly improves the training accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flowchart of the VAE-based federated learning performance enhancement method of the present application;

[0059] Figure 2 It is a schematic diagram of the FedVAE-CA model framework of the VAE-based federated learning performance enhancement method in one embodiment of the present application;

[0060] Figure 3 This is a comparison chart of the accuracy of the FedVAE-CA model and the traditional federated learning algorithm FedAvg model in one embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings.

[0062] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0063] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0064] In addition, if the terms "first" or "second" appear, these terms are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

[0065] In a first aspect, the present application provides a method for enhancing the performance of federated learning based on a variational autoencoder, comprising the following steps:

[0066] S1, initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ; Model parameters specifically include weight parameters and bias parameters.

[0067] S2, build a VAE-based federated learning optimization algorithm and initialize the neural network model (federated learning, cross-attention mechanism);

[0068] S3, collects or obtains data sets, divides the data sets into training sets and test sets according to requirements, and allocates corresponding training sets to each client;

[0069] You can use the CIFAR-10 dataset, which is widely used in the field of machine learning and computer vision. CIFAR-10 contains 60,000 32x32 pixel color images divided into 10 categories, with 6,000 images in each category. These categories include: airplane, car, bird, cat, deer, dog, frog, horse, boat, and truck.

[0070] The CIFAR-10 dataset is divided into a training set and a test set, where the training set has 50,000 images and the test set has 10,000 images; each class is evenly distributed in the training set and the test set, that is, each class has 5,000 images in the training set and 1,000 images in the test set;

[0071] In order to better simulate the situation where data between clients are not independent and identically distributed, the parameterized Dirichlet distribution function is used to divide the training set; the formula is as follows:

[0072] p k ~Dir(a)

[0073] Among them, a is the distribution parameter of each category, p k is the generated data distribution vector;

[0074] Parameter a is used to control the distribution diversity of client data to simulate the N-IID situation: when a is small, the data distribution of each client is more different, and the difference between data categories is more significant; when a is large, the data distribution of each client is more uniform, and the difference between data categories is smaller; for the kth client, the data distribution vector p of m categories is k =[p k0 ,p k1 ,……,p km ] is generated by the Dirichlet distribution function with parameter a.

[0075] S4, train the neural network model using the training set, and update the model parameters in step S1 during each round of federated learning aggregation, and send the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ;

[0076] S41, the encoding process of the client training the encoder parameters according to the allocated training set is as follows:

[0077] Define the input data set as X = {X1, X2, ..., X n}, for each set of input data X k There is a distribution P(X k ), k∈[1,n], n represents the total number of clients;

[0078] Use the loss function of the first encoder Calculate the mean μ, using the loss function of the second encoder Calculate the variance σ 2 , we get V enc ;

[0079] Map X to the latent space Z = {Z1, Z2, ..., Z n}, the form is

[0080] In order to make the latent space Z closer to the standard normal distribution, the general normal distribution and the standard normal distribution KL divergence are usually used as an additional loss function, that is:

[0081]

[0082] S42, the reparameterization process of updating the latent space Z is as follows:

[0083] Let Z = μ + ε × σ, from Sampling a Z in is equivalent to sampling an ε from N(0,I), and using the gradient descent method to achieve the reverse optimization of the mean variance;

[0084] Make the Z variable of the latent space conform to the standard normal distribution:

[0085] p(Z|X)=N(0,I)

[0086] S43, updating the decoder parameter V dec The decoding process is as follows:

[0087] The decoder receives Z sampled from the latent space k , and perform layer-by-layer operations through the neural network to finally generate the original data X k The decoder attempts to generate the probability distribution p(X|Z) of the corresponding data X, and the decoder outputs the generated data through the neural network. And upload to the server, where G represents the decoder network;

[0088] Here we use the standard L2 norm as the reconstruction loss function. Suppose there are N data, the true value X and the generated value are known. The reconstruction loss is:

[0089]

[0090] Define ELBO loss to evaluate the integrity of the variational autoencoder, ELBO = MSE + KL.

[0091] S44, merge the data generated by each client decoder together as the teacher model in knowledge distillation, and use the merged data to train the global decoder V stu , the global decoder is the student model in knowledge distillation; the model output is extracted using the softmax function, and the extraction process is as follows:

[0092]

[0093] where z i and z j It represents the data samples of the i-th and j-th categories; T represents the temperature of knowledge distillation. The larger T is, the higher the temperature of knowledge distillation is, the smoother the curve of the output image is, and the more information of other categories is contained.

[0094] The global decoder as a student network achieves the overall optimization effect through the knowledge of the teacher model. The loss function of server-side knowledge distillation is expressed as:

[0095]

[0096] Among them, zserver 、z client Data samples from the client decoder and the server decoder respectively.

[0097] S5, using the cross attention mechanism for the global decoder V stu Processing; specifically including the following:

[0098] S51, for the global decoder V stu The output image first applies a convolutional layer to obtain a reduced-dimensional feature map H. The cross-attention mechanism is used on the feature map H, and two convolutional layers with 1×1 filters are used to generate the query matrix Q and the key matrix K, where C′ is the number of channels, W and H represent the width and height of the image respectively; the attention map is generated by affinity operation At the same time, another convolutional layer with a 1×1 filter is applied on the feature map H to generate the feature map And at each position u in the spatial dimension of the feature map V, we get Φ u is a set of feature vectors in V, which collects the context information of each pixel on its cross path into one piece to generate a new feature map H′. H′ u is the feature vector of the output feature map at position u, A i,u It is represented as the attention map of channel i at position u; the contextual pixel information is added to the feature map H′ to enhance the local features and the pixel-level representation, making it more robust to the accurate recognition of the image;

[0099] S52, a single cross-attention mechanism only aggregates context information in the horizontal and vertical directions, which cannot recognize images well. Therefore, in order to obtain richer and denser context information, the cross-attention mechanism is used again for the feature map H′, and the feature map H″ is output, so that each position in the feature map is collected from all pixels.

[0100] S6, weighted averaging the model parameters, and continuously iterating the process of step S4 and step S5 to complete the training and update the global model; specifically, the following contents are included:

[0101] S61, the server aggregates the output feature map H" obtained in step S5 to update the global model. The aggregation process is described by the following formula:

[0102]

[0103] Among them, θ global represents the output of the global model, n represents the total number of clients in the aggregation process, and y kIt represents the model parameters of the kth client;

[0104] S62, sending the above model parameters to each client to complete the next training.

[0105] In a second aspect, the present application provides a system for executing the method, comprising the following modules:

[0106] The variational autoencoder initialization module is used to initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ;

[0107] The neural network model initialization module is used to build a federated learning optimization algorithm based on variational autoencoders and initialize the neural network model;

[0108] The data set partitioning module imports the data set into the system and divides it into training sets and test sets, and allocates a corresponding training set to each client;

[0109] The global decoder training module uses the training set to train the neural network model, and updates the model parameters in each round of federated learning aggregation, and sends the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ;

[0110] The cross attention module uses the cross attention mechanism to update the global decoder V stu to process;

[0111] The aggregation module is electrically connected / communicationally connected to the global decoder training module and the cross attention module, and is used to perform weighted averaging of the model parameters and continuously iterate to complete the training.

[0112] Those skilled in the art know that the present application can be implemented as a system, method or computer program product. Therefore, the present application can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), it can also be a combination of hardware and software, and the present application is generally referred to as a "module" or "system". In addition, in some embodiments, the present application can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.

[0113] In order to comprehensively evaluate the superior performance of the new method proposed in this application in practical applications, this embodiment selects the CIFAR-10 dataset for experiments, and divides the CIFAR-10 dataset into a training set and a test set, where the training set contains 50,000 images and the test set contains 10,000 images.

[0114] The experimental environment was built on the Ubuntu 22.04.1LTS platform, using an Intel CORE I713700KF CPU and NVIDIA GeForce RTX 3090 GPU (24GB RAM). The deep learning model was developed using Python and the Pytorch framework.

[0115] According to the evaluation criteria, the FedVAE-CA model proposed in this application is compared with the traditional federated learning algorithm FedAvg model. Figure 3 As shown, it can be seen that the present application has a certain degree of optimization and improvement in accuracy evaluation.

[0116] In summary, compared with the classic federated learning method FedAvg, the method proposed in the present invention has significant advantages over the model in terms of performance indicators in image recognition tasks, and also shows good results in the Non-IID case.

[0117] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable technicians familiar with the technical field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. For ordinary technicians in the technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A method for enhancing the performance of federated learning based on variational autoencoders, characterized in that: The steps include: S1, initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ; S2, build a federated learning optimization algorithm based on variational autoencoder and initialize the neural network model; S3, divides the data set into training set and test set, and assigns the corresponding training set to each client; S4, train the neural network model using the training set, and update the model parameters in step S1 during each round of federated learning aggregation, and send the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ; S5, use the cross attention mechanism to the global decoder V stu to process; S6, performing weighted averaging on the model parameters, and continuously iterating the process of step S4 and step S5 to complete the training and update the global model.

2. The method for enhancing the performance of federated learning according to claim 1, characterized in that: In step S3, the training set is divided using the parameterized Dirichlet distribution function; the formula is as follows: p k ~Dir(a) Among them, a is the distribution parameter of each category, p k is the generated data distribution vector; For the kth client, the m category data distribution vector p k =[p k0 , p k1 ,......,p km ] is generated by the Dirichlet distribution function with parameter a.

3. The method for enhancing the performance of federated learning according to claim 1, characterized in that: The step S4 specifically includes the following contents: S41, the encoding process of the client training the encoder parameters according to the allocated training set is as follows: Define the input data set as X = {X1, X2, ..., X n }, for each set of input data X k There is a distribution P(X k ), k∈[1,n], n represents the total number of clients; Use the loss function of the first encoder Calculate the mean μ, using the loss function of the second encoder Calculate the variance σ 2 , we get V enc ; Map X to the latent space Z = {Z1, Z2, ..., Z n }, the form is S42, the reparameterization process of updating the latent space Z is as follows: Let Z = μ + ε × σ, from N (μ, σ 2 Sampling a Z from N(0,I) is equivalent to sampling an ε from N(0,I), and using the gradient descent method to achieve the reverse optimization of the mean variance; Make the Z variable of the latent space conform to the standard normal distribution: p(Z|X)=N(0,I) S43, updating the decoder parameter V dec The decoding process is as follows: The decoder receives Z sampled from the latent space k , and perform layer-by-layer operations through the neural network model to finally generate Right now Where G represents the decoder network, With the original data X k Same size; S44, merge the data generated by each client decoder together as the teacher model in knowledge distillation, and use the merged data to train the global decoder V stu , the global decoder is the student model in knowledge distillation; the model output is extracted using the softmax function, and the extraction process is as follows: where z i and z j It represents the data samples of the i-th and j-th categories; T represents the temperature of knowledge distillation; The loss function of server-side knowledge distillation is expressed as: Among them, z server 、z client Data samples from the client decoder and the server decoder respectively.

4. The method for enhancing the performance of federated learning according to claim 3, characterized in that: In step S41, the KL divergence of the general normal distribution and the standard normal distribution is used as an additional loss function, that is:

5. The method for enhancing the performance of federated learning according to claim 3, characterized in that: Using the standard L2 norm as the reconstruction loss function, there are N data, known true values ​​X and generated values The reconstruction loss is: Define ELBO loss to evaluate the integrity of the variational autoencoder, ELBO = MSE + KL.

6. The method for enhancing the performance of federated learning according to claim 3, characterized in that: Step S5 specifically includes the following contents: S51, for the global decoder V stu The output image first applies a convolutional layer to obtain a reduced-dimensional feature map H. The cross-attention mechanism is used on the feature map H, and two convolutional layers with 1×1 filters are used to generate the query matrix Q and the key matrix K, where C′ is the number of channels, W and H represent the width and height of the image respectively; the attention map is generated by affinity operation At the same time, another convolutional layer with a 1×1 filter is applied on the feature map H to generate the feature map And at each position u in the spatial dimension of the feature map V, we get Φ u is a set of feature vectors in V, which collects the context information of each pixel on its cross path into one piece to generate a new feature map H′. H′ u is the feature vector of the output feature map at position u, A i,u Represented as an attention map of channel i at position u; the contextual pixel information is added to the feature map H′. S52, the cross attention mechanism is used again for the feature map H′, and the feature map H” is output, so that each position in the feature map is collected from all pixels.

7. The method for enhancing the performance of federated learning according to claim 6, characterized in that: Step S6 specifically includes the following contents: S61, the server aggregates the output feature map H" obtained in step S5 to update the global model. The aggregation process is described by the following formula: Among them, θ global represents the output of the global model, n represents the total number of clients in the aggregation process, and y k It represents the model parameters of the kth client; S62, sending the above model parameters to each client to complete the next training.

8. A system for executing the method according to any one of claims 1 to 7, characterized in that: include: The variational autoencoder initialization module is used to initialize the model parameters of the variational autoencoder, which include the encoder parameters V enc , decoder parameters V dec ; The neural network model initialization module is used to build a federated learning optimization algorithm based on variational autoencoders and initialize the neural network model; The data set partitioning module imports the data set into the system and divides it into training sets and test sets, and allocates a corresponding training set to each client; The global decoder training module uses the training set to train the neural network model, and updates the model parameters in each round of federated learning aggregation, and sends the updated model parameters to the client; the client trains the encoder parameters V according to the assigned training set enc , update the latent space Z and decoder parameters V dec , and upload it to the server; the server uses distillation technology to use the client's decoder as a teacher model to train the global decoder V stu ; The cross attention module uses the cross attention mechanism to update the global decoder V stu to process; The aggregation module is electrically connected / communicationally connected to the global decoder training module and the cross attention module, and is used to perform weighted averaging of the model parameters and continuously iterate to complete the training.

Citation Information

Cited By

  • Federal learning model robustness enhancement method, device and system

    CN120745754A