Discriminator knowledge distillation personalized federated learning method based on conditional generative adversarial network

By using discriminator knowledge based on conditional generation adversarial network in federated learning, personalized federated learning methods are solved, the problems of data distribution differences and communication overhead are improved, personalized accuracy and privacy protection capabilities are achieved, and efficient and accurate personalized federated learning is achieved.

CN119578467APending Publication Date: 2025-03-07HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411707810.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the federated learning environment, the non-independent homogeneity of data leads to unstable model performance and is difficult to meet personalized needs. At the same time, communication overhead is large and the privacy protection capabilities of personalized models are insufficient.

Method used

The discriminator knowledge distillation personalized federated learning method is adopted based on conditional generation adversarial networks. Through the combination of knowledge distillation and conditional generation adversarial networks, model parameters are optimized, distinctive feature representation of client models are enhanced, communication overhead is reduced, and privacy protection capabilities of personalized models are improved.

Benefits of technology

It improves the personalized accuracy in federated learning, reduces the resource overhead of model training, enhances the privacy protection capabilities of personalized models, and achieves more efficient and accurate personalized federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578467A_ABST
    Figure CN119578467A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of federated learning, and discloses a discriminator knowledge distillation personalized federated learning method based on a conditional generative adversarial network. The problems of appearance of massive participants and influence of non-independent identical distribution of data on federal learning data cost and personalized learning efficiency are solved; a discriminator knowledge distillation model fused with the conditional generative adversarial network is put forward to be embedded into a personalized federated learning framework; the differentiated feature representation of the client model is enhanced through the discriminator knowledge distillation model, so that the personalized model effectively recognizes and captures specific modes and features of individuals, the representation capability and the personalized effect of the model are enhanced, the higher model compression rate is achieved, and meanwhile, the user experience is improved. The conditional generative adversarial network fused with the discriminator generates synthetic data specific to each client, and the synthetic data improves the generalization ability of personalized federal learning and the adaptability of the model on the premise of fully ensuring the data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of federated learning, and in particular to a discriminator knowledge distillation personalized federated learning method based on a conditional generative adversarial network. Background Art

[0002] In the digital age, data has become a key resource for promoting scientific progress and technological innovation. However, with the increasing awareness of personal privacy protection, how to make full use of data scattered in different geographical locations and organizations while protecting data privacy has become a pressing issue. Federated learning was proposed in this context. Federated learning is a distributed machine learning method that allows multiple participants to jointly train a shared model while maintaining data privacy and localization. This method has received widespread attention in recent years because it addresses the challenges of data privacy and centralized data processing, especially in areas involving sensitive data such as healthcare, finance, and personal communications.

[0003] However, in the context of federated learning, data is often not independent and identically distributed, and there are significant differences in the distribution of data, making it difficult to meet the personalized needs of different users. In addition, the heterogeneity of data also leads to the instability of model performance. In federated learning, since the participating devices may have different hardware capabilities and computing resources, the quality of model updates varies, which further exacerbates the imbalance of model performance. In order to solve these problems, personalized federated learning came into being.

[0004] The application of personalized federated learning is mainly to meet the needs of individual users and make the federated learning system better adapt to the preferences, behaviors and characteristics of different users. This method is particularly important for tasks involving user privacy, such as personalized recommendations, medical diagnosis, smartphone assistants and other scenarios. It is designed according to the specific application scenarios and needs to meet the characteristics of specific tasks and the distribution of data. Personalized federated learning requires the design of models for individual users. These models usually take into account personalized factors such as user historical behavior, preferences, interests, etc. to better meet the needs of each user. Since it involves user personal data, personalized federated learning needs to pay special attention to privacy protection. Use a secure federated learning framework and encryption technology to ensure that user data is effectively protected during transmission and processing. In federated learning, personalized models are usually trained on local devices, and then the updates of individual models are integrated through model aggregation. The aggregation process needs to consider how to balance the performance of personalized and global models to achieve better overall results. In general, personalized federated learning is an important technical means that can effectively meet user personalized needs and protect user privacy. By reasonably designing models and algorithms, combined with a secure federated learning framework and privacy protection technology, personalized federated learning can be implemented in various application scenarios.

[0005] Personalized federated learning still faces some key challenges. First, how to effectively design personalization strategies to cope with the huge differences in data distribution between different clients remains an open problem. Most current personalization methods rely on techniques such as meta-learning and transfer learning, which often require complex algorithm design and parameter adjustment, limiting their practicality and having limited effects when dealing with extreme non-independent and identically distributed data. Second, communication overhead is a major bottleneck in federated learning systems, especially in personalized scenarios. Each client not only needs to upload its own model updates, but may also need to download global models and other additional information for personalization, which greatly increases the communication burden. Third, although personalized federated learning has a natural advantage in protecting privacy, it is still necessary to further enhance data privacy and improve the privacy protection capabilities of personalized models during the personalization process. Summary of the invention

[0006] The present invention provides a discriminator knowledge distillation personalized federated learning method based on conditional generative adversarial network, which is used to solve the impact of the emergence of massive participants and the non-independent and identically distributed nature of data on the data cost of federated learning and the efficiency of personalized learning, including excessive model parameters and limited personalized model effects, while improving the personalized accuracy between various clients of federated learning.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is: a discriminator knowledge distillation personalized federated learning method based on conditional generative adversarial network, comprising the following steps:

[0008] S1. Build a knowledge distillation model. After the teacher network extracts sample features, the soft labels and intermediate layer representations generated by the teacher network generator are passed to the student network through knowledge distillation. The student network generator imitates the soft labels and calculates the knowledge distillation loss to update the parameters.

[0009] S2. Build a discriminator model that incorporates a conditional generative adversarial network. Extract features from the original sample through the student network, input the extracted features into the generator to obtain the generated sample, and then input the generated sample and the original sample into the discriminator. The discriminator evaluates the accuracy of feature extraction from the student network, and optimizes the conditional generative adversarial network through adversarial training with the generator network.

[0010] S3, combining the knowledge distillation model and the discriminator model into a discriminator knowledge distillation model, calculating the loss function of the discriminator knowledge distillation model, and optimizing the parameters of the discriminator knowledge distillation model through training;

[0011] S4. After the local training is completed, the client sends the updated model to the central server; the central server performs weighted averaging on the models from multiple clients to generate a global model; the server sends the new global model to each client and updates the local model parameters; each client further optimizes the personalized model parameters locally by balancing the differences between the local model and the global model; after meeting the set convergence criteria, the training is stopped, and the server distributes the optimized global model to each client to complete the model training process.

[0012] Furthermore, the specific steps of building the knowledge distillation model in step S1 are as follows:

[0013] Step S1.1, select a teacher network trained on centralized data and multiple student networks trained on federated learning devices;

[0014] Step S1.2: Given that the generator output of the teacher network is logits, obtain the probability p of the i-th class i The formula is as follows: Among them, z i is the logits of the i-th class, T is the temperature control factor, and for knowledge distillation, the T used by the teacher model when calculating the output probability is greater than 1;

[0015] Step S1.3: Use distillation loss to measure the matching degree of logits between the teacher network and the student network. The distillation loss formula is as follows: where z T and z s They are the logits of the teacher network and the student network respectively;

[0016] Step S1.4, calculate the cross entropy gradient of logits to obtain the optimization direction of the matching degree of logits between the teacher network and the student network. The formula for calculating the cross entropy gradient of logits is as follows:

[0017] Step S1.5: The distillation loss between the teacher network and the student network is simplified to z si -z Ti , the cross entropy loss is the cross entropy between the predicted probability of the student model and the true label, and the final cross entropy loss is as follows: L CE (y,p(z s ,T))=Σ i -y i log(p(z si ,T)) Among them, y is the true label, and the value of T is 1;

[0018] Step S1.6, optimize the matching degree of logits between the teacher network and the student network through the loss function. The final loss function consists of cross entropy loss and distillation loss. The final loss function is as follows: L=α·L KD ((p(z s ,T)(p(z s ,T)))+β·L CE (y,p(z s ,T)) Among them, α, β and γ are balance factors.

[0019] Furthermore, the specific steps of building a discriminator model incorporating a conditional generative adversarial network in step S2 are as follows:

[0020] Step S2.1, introduce the conditional generative adversarial network as a framework for training generative models; the conditional generative adversarial network consists of a set of adversarial models, namely, a generative model G that captures data distribution and a discriminative model D that is used to estimate whether the sample comes from real data;

[0021] Step S2.2: Input sample x to learn generator distribution p g , the generator constructs a mapping function from the prior noise distribution p(z) to the data space, and the discriminator outputs a scalar indicating that x comes from the real sample instead of p gWith the probability of , both G and D are trained, following the value function V(G,D), minimizing log(1-D(G(z))) to adjust the parameters of G and minimizing logD(x) to adjust the parameters of D, and applying conditional information y to control the category of the generated data. The final value function formula is as follows:

[0022] Step S2.3: Generate adversarial networks with the trained conditional data of each of the N clients, and then send their unique local model values ​​to the cloud server. The cloud server then calculates the aggregated average of these models and sends this value back to the N clients. Each client finally updates its local model value.

[0023] Furthermore, the specific steps of optimizing the discriminator knowledge distillation model parameters in step S3 are as follows:

[0024] Step S3.1, the loss function of the model mainly includes the inherent loss function of the conditional generative adversarial network and the learning loss function between the teacher network and the student network. First, the generator is distilled to ensure that the samples generated by the student network are consistent with those generated by the teacher network. The formula is as follows: Where T represents the teacher network, S represents the student network, G represents the generator, D represents the discriminator, and x i Represents input;

[0025] Step S3.2, the feature-based loss formula is as follows:

[0026] Step S3.3: Input the samples generated by the generators of the student network and the teacher network into the discriminator of the teacher network and compare their feature information; combine the above two to obtain the distillation loss formula of the student-generated network. The distillation loss formula of the student-generated network is as follows:

[0027] Step S3.4, obtain the discriminator loss function to optimize the model parameters. The discriminator loss function formula is as follows:

[0028] Step S3.5: Enhance the discriminative ability of the discriminative network at the feature level. The formula is as follows: where y i Represents the real sample input;

[0029] Step S3.6, the total loss function of the model is obtained by integrating the loss functions of each part, and the total loss function of the model is calculated to update the model parameters. The total loss function formula is as follows: Among them, β1, γ1, β2, and γ2 are balance factors.

[0030] Furthermore, the specific steps of the model training process in step S4 are as follows:

[0031] Step S4.1, establish a global model through the formula, the formula is as follows: The function f(w) represents the expected loss function of the client data distribution, ξ i is a random data sample drawn from the distribution of client i;

[0032] Step S4.2: Use a regularized loss function with a two-norm for each client, as follows: Among them, θ i represents the personalized model of client i, and λ represents the regularization parameter that controls the strength of the personalized model;

[0033] Step S4.3: The optimization objective of personalized federated learning can be written as the following two-level optimization problem, with the following formula:

[0034] Step S4.4, F i (w) is the envelope method, and the formula is as follows:

[0035] Step S4.5: In each communication round t, the server broadcasts the latest global model w to all clients t , then, after all clients have performed R local updates, the server will retrieve a uniformly sampled subset S of the clients t Receive the latest local model for model averaging;

[0036] Step S4.6: In the inner optimization, each client i solves the optimal personalization problem to obtain its personalized model. In the outer optimization, client i uses gradient descent, and the local update is about F i , the formula is as follows: Where η is the learning rate, Can be based on Using the current personalization model calculate.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. The present invention is a personalized federated learning model based on discriminator knowledge distillation of conditional generative adversarial networks. The present invention embeds the discriminator knowledge distillation model integrated with conditional generative adversarial networks into the federated learning framework for the first time. The discriminator knowledge distillation technology can achieve the dual goals of improving model efficiency and reducing resource overhead. The integration of conditional generative adversarial networks enables the model to generate customized data according to specific conditional information, providing higher flexibility and accuracy for personalized federated learning, and realizing accurate adaptation of the model.

[0039] 2. The present invention can enhance the discriminative feature representation of the client model by introducing a local discriminator. With the assistance of the discriminator, the participants can learn features that can better distinguish their own local data, so that the personalized model can better identify and capture individual-specific patterns and features, which helps to improve the model's representation ability and personalization effect.

[0040] 3. The present invention can improve the transmission efficiency of complex federated learning in a large model environment and reduce data communication overhead by adopting a compression model. The advantage of the compression model is that it reduces the size of the model, thereby reducing the bandwidth and time required for transmission; at the same time, personalized integration with federated learning end users can improve the generalization ability and performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a general structure diagram of personalized federated learning based on discriminator knowledge distillation of conditional generative adversarial network provided by an embodiment of the present invention;

[0042] Figure 2 It is a discriminator knowledge distillation model diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present invention is further described in detail below in conjunction with the accompanying drawings in the embodiments.

[0044] 1. The embodiment of the present invention is based on the discriminator knowledge distillation personalized federated learning of the conditional generative adversarial network, including the following steps:

[0045] Step S1: First, select the single-image Cora, Citeseer and Pubmed datasets and the multi-image BA-2motifs and Mutag datasets for experiments, and divide each dataset into training set, test set and validation set; gradually start to build a discriminator knowledge distillation personalized federated learning framework based on conditional generative adversarial network. The general structure of discriminator knowledge distillation personalized federated learning based on conditional generative adversarial network is as follows: Figure 1 As shown in the figure; first, build a knowledge distillation model; after the teacher network extracts sample features, the soft labels and intermediate layer representations generated by the generator of the teacher network are passed to the student network through knowledge distillation. The generator of the student network imitates the soft labels and calculates the knowledge distillation loss to update the parameters.

[0046] The specific steps of building the knowledge distillation model in step S1 are as follows:

[0047] Select a teacher model trained on centralized data and one or more student models trained on federated learning devices;

[0048] Determine the knowledge transferred from the teacher model to the student model; this includes soft labels, intermediate layer representations; the teacher network is a powerful model trained on large-scale, global data, while the student network is a model trained on local data;

[0049] Formulate a loss function that measures the difference between the student model’s predictions and the teacher model’s predictions; typical knowledge distillation losses include the cross entropy loss between the target value and the soft label, and the difference loss of the intermediate layer representations;

[0050] Given that the generator output of the teacher network is logits, get the probability p of the i-th class i The formula is as follows: Among them, z i is the logits of the i-th class, T is the temperature control factor, and for knowledge distillation, the T used by the teacher model when calculating the output probability is greater than 1;

[0051] The distillation loss is used to measure the matching degree of logits between the teacher network and the student network. The distillation loss formula is as follows: where z T and z s They are the logits of the teacher network and the student network respectively;

[0052] Calculate the cross entropy gradient of logits to get the optimization direction of the matching degree of logits between the teacher network and the student network. The formula for calculating the cross entropy gradient of logits is as follows:

[0053] The distillation loss between the teacher network and the student network is simplified to z si -z Ti , the cross entropy loss is the cross entropy between the predicted probability of the student model and the true label, and the final cross entropy loss is as follows: L CE (y,p(z s ,T))=∑ i -y i log(p(z si ,T)) Among them, y is the true label, and the value of T is 1;

[0054] The loss function is used to optimize the matching degree of logits between the teacher network and the student network. The final loss function consists of cross entropy loss and distillation loss. The final loss function is as follows: L=α·L KD ((p(z s ,T)(p(z s ,T)))+β·L CE (y,p(z s ,T)) Among them, α, β and γ are balance factors;

[0055] According to the characteristics of federated learning, the knowledge distillation model is adjusted to adapt to the decentralized data to ensure that the model training and update process can proceed smoothly in the federated learning environment; according to the communication protocol for transmitting model parameters between federated learning devices; ensure security and privacy, and avoid leaking sensitive information;

[0056] Adjust the hyperparameters of the knowledge distillation model and federated learning algorithm, including learning rate, regularization parameters, etc.

[0057] S2. Build a discriminator model that incorporates a conditional generative adversarial network; extract features from the original sample through the student network, input the extracted features into the generator to obtain the generated sample, and then input the generated sample and the original sample together into the discriminator; the discriminator evaluates the accuracy of feature extraction from the student network, and optimizes the conditional generative adversarial network through adversarial training with the generator network.

[0058] The specific steps of building a discriminator model incorporating a conditional generative adversarial network in step S2 are as follows:

[0059] Identify the federated learning task and understand how data is distributed across different devices or data centers; involve multiple parties, each of which holds a portion of the data; introduce conditional generative adversarial networks as a framework for training generative models; conditional generative adversarial networks consist of a set of adversarial models, namely the generative model G that captures the data distribution and the discriminative model D that estimates that the sample comes from real data;

[0060] Select the type of discriminator according to the nature of the task; design the structure of the discriminator model according to the selected discriminator type and task, including selecting the type, number of layers, and activation function of the network layer;

[0061] Input sample x learns generator distribution p g , the generator constructs a mapping function from the prior noise distribution p(z) to the data space, and the discriminator outputs a scalar indicating that x comes from the real sample instead of p g With the probability of , both G and D are trained, following the value function V(G,D), adjusting the parameters of G to minimize log(1-D(G(z))), adjusting the parameters of D to minimize logD(x), and applying conditional information y to control the category of the generated data. The final value function formula is as follows:

[0062] The data of each of the N clients are generated through the trained conditional adversarial network, and then their unique local model values ​​are sent to the cloud server. The cloud server then calculates the aggregated average of these models and sends this value back to the N clients. Each client finally updates its local model value.

[0063] Deploy the designed discriminator model locally on each participant; ensure that the discriminator of each participant can receive local data and generate corresponding outputs; federated learning involves communication between participants so that information can be shared during training without sharing original data; define a communication protocol to ensure that the intermediate results of the discriminator can be transmitted between participants.

[0064] S3. Combine the knowledge distillation model and the discriminator model into a discriminator knowledge distillation model, calculate the loss function of the discriminator knowledge distillation model, and optimize the parameters of the discriminator knowledge distillation model through training; Discriminator knowledge distillation model architecture reference Figure 2 shown.

[0065] The specific steps for optimizing the discriminator knowledge distillation model parameters in step S3 are as follows:

[0066] The knowledge distillation loss function is used to guide the student model to learn the knowledge of the teacher model; the loss between the soft label of the teacher model and the output of the student model is used as the knowledge distillation loss function; the discriminator loss function is used to improve the robustness and generalization ability of the student model; the discriminator loss function is usually task-related, including adversarial loss function and auxiliary classification loss function; the knowledge distillation loss function and the discriminator loss function are fused through weighted averaging;

[0067] The loss function of the model mainly includes the inherent loss function of the conditional generative adversarial network and the learning loss function between the teacher network and the student network. First, the generator is distilled to ensure that the samples generated by the student network are consistent with those generated by the teacher network. The formula is as follows: Where T represents the teacher network, S represents the student network, G represents the generator, D represents the discriminator, and x i Represents input;

[0068] The feature-based loss formula is as follows:

[0069] The samples generated by the generators of the student network and the teacher network are input into the discriminator of the teacher network to compare their feature information; combining the above two, the distillation loss formula of the student-generated network is obtained. The distillation loss formula of the student-generated network is as follows:

[0070] The discriminator loss function is obtained to optimize the model parameters. The discriminator loss function formula is as follows:

[0071] Enhance the discriminative ability of the discriminative network at the feature level. The formula is as follows: where y i Represents the real sample input;

[0072] The total loss function of the model is obtained by integrating the loss functions of each part. The total loss function of the model is calculated to update the model parameters. The total loss function formula is as follows: Among them, β1, γ1, β2, and γ2 are balance factors;

[0073] Tune the hyperparameters of the loss function, such as weights and temperature parameters, to improve model performance and convergence speed; verify and debug the designed loss function in a federated learning environment; conduct experiments using simulated data or partial data to ensure that the loss function produces good results in actual training; apply the designed loss function to train the model in a real federated learning scenario; regularly monitor model performance and adjust the loss function when necessary.

[0074] S4. After the local training is completed, the client sends the updated model to the central server; the central server performs weighted averaging on the models from multiple clients to generate a global model; the server sends the new global model to each client and updates the local model parameters; each client further optimizes the personalized model parameters locally by balancing the differences between the local model and the global model; after meeting the set convergence criteria, the training is stopped, and the server distributes the optimized global model to each client to complete the model training process.

[0075] The specific steps of the model training process in step S4 are as follows:

[0076] A global model is established through the formula, the formula is as follows: The function f(w) represents the expected loss function of the client data distribution, ξ i is a random data sample drawn from the distribution of client i;

[0077] A regularized loss function with a two-norm is used for each client, as follows: Among them, θ i represents the personalized model of client i, and λ represents the regularization parameter that controls the strength of the personalized model;

[0078] The optimization objective of personalized federated learning can be written as the following two-level optimization problem, with the following formula:

[0079] F i (w) is the envelope method, and the formula is as follows:

[0080] In each communication round t, the server broadcasts the latest global model w to all clients. t , then, after all clients have performed R local updates, the server will retrieve a uniformly sampled subset S of the clients tReceive the latest local model for model averaging;

[0081] In the inner optimization, each client i solves the optimal personalization problem to obtain its personalized model. In the outer optimization, client i uses gradient descent and the local update is about F i , the formula is as follows: Where η is the learning rate, Can be based on Using the current personalization model calculate;

[0082] Determine the number of training rounds, learning rate, and regularization parameters in the training process of the discriminator knowledge distillation personalized federated learning method based on conditional generative adversarial networks. This needs to be adjusted in the experiment through the validation set data to achieve the best model performance; after the federated learning training is completed, the performance of the model is evaluated by using the divided test set data.

[0083] The above description is only a specific implementation of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A personalized federated learning method for discriminator knowledge distillation based on conditional generative adversarial networks, characterized in that: The following steps are involved: S1. Build a knowledge distillation model. After the teacher network extracts sample features, the soft labels and intermediate layer representations generated by the teacher network’s generator are passed to the student network through knowledge distillation. The student network’s generator imitates the soft labels from the teacher network. S2. Build a discriminator model that incorporates a conditional generative adversarial network. Extract features from the original sample through the student network, input the extracted features into the generator to obtain the generated sample, and then input the generated sample and the original sample into the discriminator together. The discriminator evaluates the accuracy of feature extraction from the student network, and optimizes the conditional generative adversarial network through adversarial training with the generator network. S3, combining the knowledge distillation model and the discriminator model into a discriminator knowledge distillation model, calculating the loss function of the discriminator knowledge distillation model, and optimizing the parameters of the discriminator knowledge distillation model through training; S4. After the local training is completed, the client sends the updated model to the central server; The central server performs weighted averaging on the models from multiple clients to generate a global model. The server sends the new global model to each client and updates the local model parameters. Each client further optimizes the personalized model parameters locally by balancing the differences between the local model and the global model. After meeting the set convergence criteria, training is stopped and the server distributes the optimized global model to each client to complete the model training process.

2. According to claim 1, a personalized federated learning method for discriminator knowledge distillation based on conditional generative adversarial network is characterized in that: The specific steps of building the knowledge distillation model in step S1 are as follows: Step S1.1, select a teacher network trained on centralized data and multiple student networks trained on federated learning devices; Step S1.2: Given that the generator output of the teacher network is logits, obtain the probability p of the i-th class i The formula is as follows: Among them, z i is the logits of the i-th class, T is the temperature control factor, and for knowledge distillation, the T used by the teacher model when calculating the output probability is greater than 1; Step S1.3: Use distillation loss to measure the matching degree of logits between the teacher network and the student network. The distillation loss formula is as follows: where z T and z s They are the logits of the teacher network and the student network respectively; Step S1.4, calculate the cross entropy gradient of logits to obtain the optimization direction of the matching degree of logits between the teacher network and the student network. The formula for calculating the cross entropy gradient of logits is as follows: Step S1.5: The distillation loss between the teacher network and the student network is simplified to z si -z Ti , the cross entropy loss is the cross entropy between the predicted probability of the student model and the true label, and the final cross entropy loss is as follows: L CE (y,p(z s ,T))=Σ i -y i log(p(z si ,T)) Among them, y is the true label, and the value of T is 1; Step S1.6, optimize the matching degree of logits between the teacher network and the student network through the loss function. The final loss function consists of cross entropy loss and distillation loss. The final loss function is as follows: L=α·L KD ((p(z s ,T)(p(z s ,T)))+β·L CE (y,p(z s ,T)) Among them, α, β and γ are balance factors.

3. According to claim 1, a personalized federated learning method for discriminator knowledge distillation based on conditional generative adversarial network is characterized in that: In step S2, the specific steps of building a discriminator model incorporating a conditional generative adversarial network are as follows: Step S2.1, introduce the conditional generative adversarial network as a framework for training generative models; the conditional generative adversarial network consists of a set of adversarial models, namely, a generative model G that captures data distribution and a discriminative model D that is used to estimate whether the sample comes from real data; Step S2.2: Input sample x to learn generator distribution p g , the generator constructs a mapping function from the prior noise distribution p(z) to the data space, and the discriminator outputs a scalar indicating that x comes from the real sample instead of p g With the probability of , both G and D are trained, following the value function V(G,D), minimizing log(1-D(G(z))) to adjust the parameters of G and minimizing logD(x) to adjust the parameters of D, and applying conditional information y to control the category of the generated data. The final value function formula is as follows: Step S2.3: The data of each of the N clients are respectively generated through the trained conditional adversarial network, and then their unique local model values ​​are sent to the cloud server. The cloud server then calculates the aggregated average of these models and sends this value back to the N clients. Each client finally updates its local model value.

4. According to claim 1, a personalized federated learning method for discriminator knowledge distillation based on conditional generative adversarial network is characterized in that: In step S3, the specific steps of optimizing the discriminator knowledge distillation model parameters are as follows: Step S3.1, the loss function of the model mainly includes the inherent loss function of the conditional generative adversarial network and the learning loss function between the teacher network and the student network. First, the generator is distilled to ensure that the samples generated by the student network are consistent with those generated by the teacher network. The formula is as follows: Where T represents the teacher network, S represents the student network, G represents the generator, D represents the discriminator, and x i Represents input; Step S3.2, the feature-based loss formula is as follows: Step S3.3: Input the samples generated by the generators of the student network and the teacher network into the discriminator of the teacher network and compare their feature information; combine the above two to obtain the distillation loss formula of the student-generated network. The distillation loss formula of the student-generated network is as follows: Step S3.4, obtain the discriminator loss function to optimize the model parameters. The discriminator loss function formula is as follows: Step S3.5: Enhance the discriminative ability of the discriminative network at the feature level. The formula is as follows: where y i Represents the real sample input; Step S3.6, the total loss function of the model is obtained by integrating the loss functions of each part, and the total loss function of the model is calculated to update the model parameters. The total loss function formula is as follows: L KD (G s ,D s )=L GAN (G s ,D s )+β1L L1 (G s )+γ1L perc (Gs)+β2L GT (D s )+γ2L tri (D s )。 Among them, β1, γ1, β2, and γ2 are balance factors.

5. According to claim 1, a personalized federated learning method for discriminator knowledge distillation based on conditional generative adversarial network is characterized in that: In step S4, the specific steps of the model training process are: Step S4.1, establish a global model through the formula, the formula is as follows: The function f(w) represents the expected loss function of the client data distribution, ξ i is a random data sample drawn from the distribution of client i; Step S4.2: Use a regularized loss function with a two-norm for each client, as follows: Among them, θ i represents the personalized model of client i, and λ represents the regularization parameter that controls the strength of the personalized model; Step S4.3: The optimization objective of personalized federated learning can be written as the following two-level optimization problem, with the following formula: Step S4.4, F i (w) is the envelope method, and the formula is as follows: Step S4.5: In each communication round t, the server broadcasts the latest global model w to all clients t , then, after all clients have performed R local updates, the server will retrieve a uniformly sampled subset S of the clients t Receive the latest local model for model averaging; Step S4.6: In the inner optimization, each client i solves the optimal personalization problem to obtain its personalized model. In the outer optimization, client i uses gradient descent, and the local update is about F i , the formula is as follows: Where η is the learning rate, Can be based on Using the current personalization model calculate.

Citation Information

Cited By

  • Personalized federal learning method based on label-level feature enhancer

    CN120235217A

  • Federal learning method and system based on multi-agent and knowledge distillation, and medium

    CN120354255A

  • Accurate parking control method for polymerization reaction heating temperature based on generative AI

    CN121764256A

  • Federal learning anti-attack method, system and device and medium

    CN122221946A