Federated learning modeling optimization method, device, readable storage medium and program product

By constructing feature generation and classification models in federated learning and iteratively optimizing them using noisy data and labels, the data leakage problem is solved, knowledge sharing is achieved without data leakage, and the efficiency and accuracy of the model are improved.

CN113792892BActive Publication Date: 2026-05-12WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2021-09-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing federated learning methods pose a risk of leaking the privacy of participant data, as federated servers can use a global model to infer the participants' original data.

Method used

By acquiring trained feature extraction and classification models, combining noisy data and real classification labels, and iteratively optimizing feature generation and classification models, a global feature generation model and a global classification model are constructed. This avoids direct reliance on the participants' original sample data, achieving knowledge sharing without data leakage.

Benefits of technology

It reduces the risk of leaking participants' private data in federated learning, improves the efficiency and accuracy of knowledge sharing in the model, reduces computational and communication overhead, and protects data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113792892B_ABST
    Figure CN113792892B_ABST
Patent Text Reader

Abstract

The application discloses a federal learning modeling optimization method, device, readable storage medium and program product, which are applied to a first device. The federal learning modeling optimization method comprises the following steps: generating first sample features corresponding to first training samples according to a feature extraction model, and generating second sample features corresponding to first noise data and first real classification labels together according to a feature generation model; iteratively training a feature generation model according to the first real classification labels, the first sample features and the second sample features; sending the feature generation model and a classification model to a second device, so that the second device constructs a target global feature generation model and a target global classification model; and iteratively optimizing the feature extraction model and the target global classification model according to the target global feature generation model, to obtain a target feature extraction model and a target classification model. The application solves the technical problem that the federal learning method has the risk of leaking the data privacy of participants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology in financial technology (Fintech), and more particularly to a federated learning modeling optimization method, device, readable storage medium, and program product. Background Technology

[0002] With the continuous development of fintech, especially internet fintech, more and more technologies (such as distributed systems and artificial intelligence) are being applied in the financial field. However, the financial industry is also placing higher demands on technology, such as on the distribution of tasks to be completed.

[0003] With the continuous development of computer software and applications of artificial intelligence, big data, and cloud services, in federated learning scenarios, each participant currently maintains a local model and a global model. Each participant learns locally specific knowledge through its local model and shares knowledge across all participants through the global model. Then, each participant aggregates its local and global models. However, a drawback of this approach is that the federated server can infer the participants' original data from their global models, thus posing a risk of data leakage. In other words, existing federated learning methods carry the risk of compromising participant data privacy. Summary of the Invention

[0004] The main purpose of this application is to provide a federated learning modeling optimization method, device, readable storage medium, and program product, aiming to solve the technical problem that existing federated learning methods have the risk of leaking the data privacy of participating parties.

[0005] To achieve the above objectives, this application provides a federated learning modeling optimization method, which is applied to a first device, and includes:

[0006] Obtain the trained feature extraction model and classification model, and extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample;

[0007] Obtain the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first true classification label;

[0008] The second sample features are classified by the classification model and the first sample features and the second sample features are distinguished by the sample discrimination model to be trained. The feature extraction model and the classification model are fixed, and the feature generation model to be trained is iteratively optimized to obtain the feature generation model.

[0009] The feature generation model and the classification model are sent to the second device, so that the second device can iteratively optimize and optimize the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models based on the feature generation models sent by the first device, so as to obtain the target global feature generation model and the target global classification model.

[0010] The system receives the target global feature generation model and the target global classification model sent by the second device, and iteratively optimizes the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0011] This application provides a federated learning modeling optimization method, which is applied to a second device, and the federated learning modeling optimization method includes:

[0012] Receive feature generation models and classification models sent by each first device, and aggregate the feature generation models into a global feature generation model and aggregate the classification models into a global classification model;

[0013] Extract the noise data and the corresponding real classification labels of the noise data;

[0014] Based on the noise data and the true classification label, the global feature generation model and the global classification model are iteratively trained and optimized by performing knowledge distillation between the global feature generation model and each of the feature generation models, thereby obtaining the target global feature generation model and the target global classification model.

[0015] The target global feature generation model and the target global classification model are respectively fed back to each of the first devices, so that the first devices can iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0016] This application also provides a federated learning modeling optimization device, which is a virtual device and is applied to a first device. The federated learning modeling optimization device includes:

[0017] The extraction module is used to obtain the trained feature extraction model and classification model, and to extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample.

[0018] The feature generation module is used to obtain the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first real classification label.

[0019] The iterative training module is used to classify the second sample features using the classification model and to distinguish the first sample features from the second sample features using the sample discrimination model to be trained. Under the condition of fixing the feature extraction model and the classification model, the feature generation model to be trained is iteratively optimized to obtain the feature generation model.

[0020] The sending module is used to send the feature generation model and the classification model to the second device, so that the second device can iteratively optimize and optimize the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models based on the feature generation models sent by the first device, so as to obtain the target global feature generation model and the target global classification model.

[0021] The iterative optimization module is used to receive the target global feature generation model and the target global classification model sent by the second device, and to iteratively optimize the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0022] This application also provides a federated learning modeling optimization device, which is a virtual device and is applied to a second device. The federated learning modeling optimization device includes:

[0023] The model aggregation module is used to receive feature generation models and classification models sent by each first device, and to aggregate the feature generation models into a global feature generation model and the classification models into a global classification model.

[0024] The extraction module is used to extract noise data and the corresponding real classification labels of the noise data;

[0025] The iterative optimization module is used to obtain a target global feature generation model and a target global classification model by iteratively training the global feature generation model and the global classification model based on the noisy data and the true classification label, and by performing knowledge distillation between the global feature generation model and each of the feature generation models.

[0026] The feedback module is used to feed back the target global feature generation model and the target global classification model to each of the first devices, so that the first devices can iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0027] This application also provides a federated learning modeling optimization device, which is a physical device. The federated learning modeling optimization device includes: a memory, a processor, and a program of the federated learning modeling optimization method stored in the memory and executable on the processor. When the program of the federated learning modeling optimization method is executed by the processor, it can implement the steps of the federated learning modeling optimization method as described above.

[0028] This application also provides a readable storage medium storing a program that implements a federated learning modeling optimization method. When the program is executed by a processor, it implements the steps of the federated learning modeling optimization method as described above.

[0029] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the federated learning modeling optimization method described above.

[0030] This application provides a federated learning modeling optimization method, device, readable storage medium, and program product, which, compared to the prior art, involves each participant maintaining a local model and a global model in a federated learning scenario. Each participant learns local knowledge through a local model and shares knowledge across all participants through a global model. Then, each participant aggregates their local and global models. This application first obtains a trained feature extraction model and a classification model, and extracts a first training sample, first noisy data, and the first true classification label corresponding to the first training sample. Then, it obtains the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first true classification label. The second sample features are then classified using the classification model, and the first sample features and the second sample features are distinguished using the sample differentiation model to be trained. While keeping the feature extraction model and the classification model fixed, the feature generation model to be trained is iteratively optimized to obtain a feature generation model. This achieves the goal of constructing a feature generation model carrying the model knowledge of the feature extraction model. Simultaneously, the feature generation model is not directly constructed based on the participants' original sample data. Finally, the feature generation model and the classification model are sent to a second device for the second device to use according to the participants' respective data. The first device sends a feature generation model, and iteratively optimizes and aggregates the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models to obtain a target global feature generation model and a target global classification model. Since the feature generation model is not directly constructed based on the original sample data of the participants, the second device cannot deduce the original sample data of the first device. The second device then receives the target global feature generation model sent by the second device and iteratively optimizes the feature extraction model and the classification model based on the target global feature generation model. This allows the feature extraction model and the classification model to learn the knowledge of all participants carried by the target global feature generation model and the target global classification model, thereby obtaining the target feature extraction model and the target classification model. This achieves the goal of enabling the local model to learn the model knowledge of the global model, that is, to share the knowledge of all participants through the global model, while not leaking the local original sample data. Therefore, it overcomes the technical defect that the federated server can deduce the original data of the participants through the global models of each participant, thus posing a risk of data leakage, and reduces the risk of leakage of the privacy data of the participants in federated learning. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating the first embodiment of the federated learning modeling optimization method of this application;

[0034] Figure 2 A flowchart illustrating the process of constructing a feature generation model in the federated learning modeling optimization method of this application;

[0035] Figure 3 This is a flowchart illustrating the second embodiment of the federated learning modeling optimization method of this application;

[0036] Figure 4 A flowchart illustrating the process of constructing a global feature extraction model and a global classification model for the second device in the federated learning modeling optimization method of this application;

[0037] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the federated learning modeling optimization method in the embodiments of this application.

[0038] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0039] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0040] This application provides a federated learning modeling optimization method applied to a first device. In the first embodiment of the federated learning modeling optimization method of this application, refer to... Figure 1 The federated learning modeling optimization method includes:

[0041] Step S10: Obtain the trained feature extraction model and classification model, and extract the first training sample, the first noise data, and the first true classification label corresponding to the first training sample;

[0042] In this embodiment, it should be noted that the federated learning modeling optimization method is applied to a federated learning scenario, which can be a horizontal federated learning scenario. The first device is a participant in the federated learning, the second device is a federated server for the federated learning, the feature extraction model and the classification model are local models trained iteratively on the first device, and the first noisy data is mixed with the first real classification label as input to the feature generation model to be trained. Thus, even if the second device reverse-engineers the privacy data of the participant based on the trained feature generation model, it will only obtain a mixture of the first noisy data and the first real classification label, and will not be able to obtain the first real classification label of the participant, thereby reducing the risk of leakage of the first real classification label.

[0043] Furthermore, the local iterative training process for the feature extraction model and the classification model is as follows:

[0044] Extract local training samples and their corresponding local classification labels. Then, pass the local training samples sequentially through the feature extraction model and the classification model to be trained to obtain the training output classification labels. Based on the training output classification labels and the local classification labels corresponding to the local training samples, calculate the model loss. If the model loss converges, use the feature extraction model and the classification model to be trained as the feature extraction model and the classification model to be trained as the classification model. If the model loss does not converge, update the feature extraction model and the classification model to be trained based on the model gradient calculated by the model loss, and return to the execution step: extract local training samples and their corresponding local classification labels.

[0045] Step S20: Obtain the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first real classification label.

[0046] In this embodiment, specifically, based on the feature extraction model, features are extracted from the first training sample to obtain first sample features, and based on the feature generation model to be trained, the first noisy data and the first true classification label are jointly converted into second sample features.

[0047] Step S30: Classify the second sample features using the classification model and distinguish the first sample features from the second sample features using the sample discrimination model to be trained. Iteratively optimize the feature generation model to be trained while keeping the feature extraction model and the classification model fixed to obtain the feature generation model.

[0048] In this embodiment, specifically, the second sample features are classified using the classification model, the training feature generation model is iteratively updated while the classification model is fixed, and the first sample features and the second sample features are distinguished using the sample discrimination model. While the feature extraction model is fixed, the training feature generation model and the training sample discrimination model are iteratively updated to optimize the training feature generation model and obtain the feature generation model.

[0049] The steps of classifying the second sample features using the classification model and distinguishing the first sample features from the second sample features using the sample discrimination model to be trained, and iteratively optimizing the feature generation model to be trained while fixing the feature extraction model and the classification model, to obtain the feature generation model, include:

[0050] Step S31: Classify the second sample features using the classification model, and distinguish the first sample features and the second sample features using the first sample discrimination model to be trained, and calculate the first classification loss and the sample discrimination loss.

[0051] In this embodiment, it should be noted that the sample discrimination model is used to distinguish whether the sample corresponding to the sample feature is a real sample or a mixed constructed sample composed of noise data and labels.

[0052] Specifically, the second sample features are classified using the classification model to obtain a first predicted classification label, and a first classification loss is calculated based on the first predicted classification label and the first true classification label. Additionally, based on the first sample discrimination model to be trained, the first sample features and the second sample features are distinguished separately to obtain each first sample discrimination prediction result. Then, based on each first sample discrimination result, the true sample discrimination label corresponding to the first sample feature, and the true sample discrimination label corresponding to the second sample feature, the sample discrimination loss is calculated.

[0053] The steps of classifying the second sample features using the classification model, and distinguishing the first sample features and the second sample features using the first sample discrimination model to be trained, and calculating the first classification loss and the sample discrimination loss, include:

[0054] Step S311: Based on the classification model, classify the features of the second sample to obtain the first predicted classification label;

[0055] Step S312: Calculate the first classification loss based on the first predicted classification label and the first true classification label;

[0056] In this embodiment, specifically, the second sample features are classified according to the classification model to obtain a first predicted classification label. Then, based on the difference between the first predicted classification label and the first true classification label, a first classification loss is calculated using a preset loss function. The preset loss function can be an L2 loss function or a cross-entropy loss function, etc.

[0057] Step S313: Based on the sample differentiation model, perform binary classification on the first sample features and the second sample features respectively to obtain the binary classification result;

[0058] In this embodiment, it should be noted that the sample discrimination model can be a binary classification model, used to perform binary classification on the first sample feature and the second sample feature, so as to achieve sample discrimination between the first sample feature and the second sample feature. For example, assuming that the true binary classification labels are labels 0 and 1, where 0 indicates that the corresponding sample feature is the output of the feature generation model, and 1 indicates that the corresponding sample feature is the output of the feature extraction model, the output binary classification label of the sample discrimination model can be represented as the probability value that the corresponding sample feature is the output of the feature extraction model.

[0059] Step S314: Calculate the sample discrimination loss based on the binary classification result and the positive and negative sample labels corresponding to the first sample features and the second sample features.

[0060] In this embodiment, it should be noted that the binary classification result includes the first binary classification result corresponding to the first sample feature and the second binary classification result corresponding to the second sample feature. The positive and negative sample labels are the set true binary classification labels. For example, the true binary classification label corresponding to the first sample feature can be set as a positive sample label, specifically 1, and the true binary classification label corresponding to the second sample feature can be set as a negative sample label, specifically 0. Alternatively, the true binary classification label corresponding to the second sample feature can be set as a positive sample label, specifically 1, and the true binary classification label corresponding to the first sample feature can be set as a negative sample label, specifically 0.

[0061] Specifically, based on the difference between the first binary classification result and the true binary classification label corresponding to the first sample feature in the positive and negative sample labels, a first binary classification loss is calculated using a preset loss function; based on the difference between the second binary classification result and the true binary classification label corresponding to the second sample feature in the positive and negative sample labels, a second binary classification loss is calculated using a preset loss function; then, the first binary classification loss and the second binary classification loss are aggregated to obtain the sample discrimination loss, wherein the aggregation method can be averaging or weighted summation, etc.

[0062] Step S32: Based on the first classification loss and the sample discrimination loss, iteratively optimize the feature generation model to be trained to obtain the feature generation model.

[0063] In this embodiment, specifically, based on the model gradient calculated from the first classification loss and the sample discrimination loss, the feature generation model and the sample discrimination model to be trained are iteratively updated using a preset model update method to optimize the feature generation model until the feature generation model meets the preset iterative update termination condition, thereby obtaining the feature generation model. The preset iterative update termination condition can be model loss convergence or reaching the maximum number of iterations threshold.

[0064] The step of iteratively optimizing the feature generation model to be trained based on the first classification loss and the sample discrimination loss to obtain the feature generation model includes:

[0065] Step S321: Determine whether the first classification loss and the sample discrimination loss have both converged;

[0066] In this embodiment, specifically, the first classification loss and the sample discrimination loss are aggregated into the total model loss, and it is determined whether the total model loss has converged, so as to determine whether the first classification loss and the sample discrimination loss have both converged. If the total model loss converges, then the first classification loss and the sample discrimination loss have both converged; otherwise, the first classification loss and the sample discrimination loss have not converged.

[0067] Step S322: If all convergences are achieved, then the feature generation model to be trained is taken as the feature generation model.

[0068] Step S323: If convergence is not achieved, update the feature generation model to be trained based on the model gradient calculated by the first classification loss and the sample discrimination loss, and update the first sample discrimination model to be trained based on the model gradient calculated by the sample discrimination loss, and return to the execution step: extract the first training sample, the first noise data, and the first true classification label corresponding to the first training sample.

[0069] In this embodiment, if both convergences are achieved, the feature generation model to be trained is used as the feature generation model. If both convergences are not achieved, the feature generation model to be trained is updated based on the model gradient of the total model loss relative to the feature generation model to be trained, and the first sample discrimination model to be trained is updated based on the model gradient of the total model loss relative to the first sample discrimination model to be trained. At the same time, the feature extraction model and the classification model are kept unchanged, and the execution steps are returned: extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample to continue the next round of iterative optimization.

[0070] like Figure 2 The diagram shows a flowchart of constructing a feature generation model in an embodiment of this application. In this flowchart, x represents the first training sample (i.e., data), z represents the first noisy data (i.e., noise), y represents the first true classification label (i.e., label), f represents the first sample feature, and g represents the second sample feature. L is the first predicted classification label. task This is the loss for the first category.

[0071] Step S40: The feature generation model and the classification model are sent to the second device so that the second device can iteratively optimize the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models based on the feature generation models sent by the first device, so as to obtain the target global feature generation model and the target global classification model.

[0072] In this embodiment, specifically, the feature generation model and the classification model are sent to a second device, so that the second device can iteratively optimize and aggregate the global feature generation model obtained by aggregating the feature generation models sent by the first device and the global classification model obtained by aggregating the classification models to obtain a target global feature generation model and a target global classification model. Specifically, noise data and real classification labels are acquired, and the feature generation models are aggregated into a global feature generation model and the classification models are aggregated into a global classification model. Then, based on the noise data and real classification labels, the global feature generation model and the global classification model are iteratively trained, and knowledge distillation is performed between the feature generation models and the global feature generation model to iteratively optimize the global feature generation model and the global classification model to obtain the target global feature generation model and the target global classification model. The purpose of knowledge distillation is to enable the global feature generation model to learn the model knowledge of each feature generation model in order to learn the knowledge of all participants.

[0073] Furthermore, it should be noted that the local sample data of each first device is usually not independent and identically distributed, meaning that the features possessed by each first device are not entirely the same. Consequently, the local models constructed by each first device usually have differences. If the local models are directly aggregated into a global model, the non-independent and identically distributed nature of the data of each first device will cause the feature generation models to interfere with each other during the aggregation process, leading to a decrease in the performance of the global model. However, in this embodiment, after the global model is obtained through aggregation, knowledge distillation is further performed between the global model and each local model, enabling the global model to further learn the model knowledge of each local model, thereby improving the performance of the global model and solving the problem of model performance degradation caused by the non-independent and identically distributed sample data of each federated learning participant.

[0074] In addition, if the local sample data of each first device are independent and identically distributed, the global feature generation model obtained by aggregating the feature generation models can be directly used as the target global feature generation model, and the global classification model obtained by aggregating the classification models can be directly used as the target global classification model. The aggregation methods include averaging and weighted summation.

[0075] Step S50: Receive the target global feature generation model and the target global classification model sent by the second device, and iteratively optimize the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0076] In this embodiment, specifically, the system receives a target global feature generation model and a target global classification model sent by the second device, and replaces and updates the classification model with the target global classification model. Then, iteratively updates the feature extraction model and the target global classification model, and performs knowledge distillation between the target global feature generation model and the feature extraction model while keeping the target global feature generation model fixed, and iteratively optimizes the feature extraction model and the target global classification model to obtain a target feature extraction model and a target classification model. The purpose of step S50 is to enable the feature extraction model to learn the knowledge of all participants through the target global feature generation model, that is, to share the knowledge of all participants, and to make the target global classification model and the feature extraction model compatible.

[0077] The step of iteratively optimizing the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model includes:

[0078] Step S51: Extract the second training sample, the second noise data, and the second true classification label corresponding to the second training sample;

[0079] Step S52: Obtain the local sample features generated by the feature extraction model for the second training sample, and obtain the global sample features generated by the target global feature generation model for the second noisy data and the second true classification label;

[0080] In this embodiment, specifically, features are extracted from the second training sample according to the feature extraction model to obtain local sample features, and the second noisy data and the second real classification label are converted into global sample features according to the target global feature generation model.

[0081] Step S53: Calculate the second classification loss based on the second true classification label and the second predicted classification label generated by the target global classification model for the local sample features;

[0082] In this embodiment, specifically, the local sample features are classified according to the target global classification model to obtain a second predicted classification label, and then a second classification loss is calculated by a preset loss function based on the difference between the second predicted classification label and the second true classification label.

[0083] Step S54: Calculate the feature similarity loss based on the similarity between the local sample features and the global sample features;

[0084] In this embodiment, it should be noted that the sample features are typically tensors, such as vectors and matrices. Therefore, the similarity between the local sample features and the global sample features can be represented by the distance between the local sample features and the global sample features.

[0085] Specifically, a distance loss is calculated based on the distance between the local sample features and the global sample features, and the distance loss is used as the feature similarity loss. The feature similarity loss is used to update the feature extraction model so that the feature extraction model outputs sample features consistent with the target global feature generation model. This achieves the goal of enabling the feature extraction model to learn the model knowledge of the target global feature generation model, and the target global feature generation model possesses the knowledge of all participants, thus achieving the goal of sharing the knowledge of all participants.

[0086] Step S55: Based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, iteratively optimize the feature extraction model and the target global classification model to obtain the target feature extraction model and the target classification model.

[0087] In this embodiment, specifically, it is determined whether the second classification loss and the feature similarity loss have both converged. If they have both converged, the feature extraction model is used as the target feature extraction model, and the target global classification model is used as the target classification model. If they have not converged, the target global feature generation model is kept unchanged, and the feature extraction model is updated based on the model gradient of the total loss composed of the second classification loss and the feature similarity loss relative to the feature extraction model. The target global classification model is also updated based on the model gradient of the second classification loss relative to the target global classification model. Then, the execution step is returned: extract the second training sample, the second noise data, and the second true classification label corresponding to the second training sample for the next iteration.

[0088] Additionally, it should be noted that in order to protect data privacy in federated learning, federated learning can currently be performed in a homomorphic encryption environment. However, homomorphic encryption involves extremely high computational overhead, while the data involved in the first and second devices in this application embodiment is plaintext data. Therefore, compared with the method of federated learning based on homomorphic encryption, the computational overhead is significantly reduced, thereby improving the efficiency of federated learning. Furthermore, to protect data privacy in federated learning, multi-party secure computation (MPC) can currently be used. However, MPC involves significant computational and communication overhead. In this embodiment, the data involved in the first and second devices are all complete plaintext data and do not involve the secret sharing process in MPC. Therefore, compared to MPC-based federated learning, the computational and communication overhead is significantly reduced, improving the efficiency of federated learning. Additionally, to protect data privacy in federated learning, differential privacy can currently be used. However, differential privacy requires adding noise to achieve privacy protection, which can affect the usability and accuracy of the model. In this embodiment, noise is not directly added to the feature extraction and classification models; instead, noise data and labels are input together into the feature generation model to simulate the output of the feature extraction model. Therefore, the accuracy and usability of the feature extraction and classification models are not affected. Thus, compared to differential privacy-based federated learning, the usability and accuracy of the federated learning model are improved.

[0089] The step of iteratively optimizing the feature extraction model and the target global classification model based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, to obtain the target feature extraction model and the target classification model includes:

[0090] Step S551: If the target global feature generation model and the target global classification model satisfy the preset federation termination condition, then based on the second classification loss and the feature similarity loss, while fixing the target global feature generation model, iteratively update the feature extraction model and the target global classification model to obtain the target feature extraction model and the target classification model.

[0091] In this embodiment, specifically, if a federated learning termination notification is received from the second device, it is determined that the target global generation model and the target global classification model meet the preset federated termination condition. Then, based on the second classification loss and the feature similarity loss, the feature extraction model and the target global classification model are iteratively updated while the target global feature generation model is fixed, to obtain the target feature extraction model and the target classification model. The specific implementation process of iteratively updating the feature extraction model and the target global classification model based on the second classification loss and the feature similarity loss while the target global feature generation model is fixed, to obtain the target feature extraction model and the target classification model, can be referred to the steps in step S55 above, and will not be repeated here.

[0092] Step S552: If the target global feature generation model and the target global classification model do not meet the preset federation termination condition, then based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, iteratively update the feature extraction model and the target global classification model, and return to the execution step: extract the first training sample, the first noise data, and the first true classification label corresponding to the first training sample.

[0093] In this embodiment, specifically, if no federated learning termination notification is received from the second device, it is determined that the target global feature generation model and the target global classification model have not met the preset federated termination condition. Then, it is determined whether the second classification loss and the feature similarity loss have both converged. If they have both converged, the execution step is returned to: extracting the first training sample, the first noise data, and the first true classification label corresponding to the first training sample for the next round of federated learning iteration. If they have not converged, the feature extraction model and the target global classification model are updated based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, and the execution step is returned to: extracting the second training sample, the second noise data, and the second true classification label corresponding to the second training sample for the next round of model iteration update.

[0094] Additionally, it should be noted that the federated learning modeling method can be used in the field of image processing, and the federated learning modeling optimization method further includes:

[0095] Step Q10: Obtain the trained image feature extraction model and image classification model, and extract the first training image sample, the first image noise data, and the first real image classification label corresponding to the first training image sample;

[0096] Step Q20: Obtain the first image sample features generated by the image feature extraction model for the first training image sample, and the second image sample features generated by the image feature generation model to be trained for the first image noise data and the first real image classification label.

[0097] Step Q30: The second image sample features are classified using the image classification model and the first image sample features and the second image sample features are distinguished using the image sample discrimination model to be trained. The image feature extraction model and the image classification model are fixed, and the image feature generation model to be trained is iteratively optimized to obtain the image feature generation model.

[0098] Step Q40: The image feature generation model and the image classification model are sent to the second device, so that the second device can iteratively optimize and optimize the global image feature generation model obtained by aggregating the image feature generation models and the global image classification model obtained by aggregating the image classification models based on the image feature generation models sent by the first device, so as to obtain the target global image feature generation model and the target global image classification model.

[0099] Step Q50: Receive the target global image feature generation model and the target global image classification model sent by the second device, and iteratively optimize the image feature extraction model and the target global image classification model based on the target global image feature generation model to obtain the target image feature extraction model and the target image classification model.

[0100] In this embodiment, it should be noted that the feature extraction model can be an image feature extraction model, the classification model can be an image classification model, the first training sample can be a first training image sample, the first noise data can be first image noise data, the first true classification label can be a first true image classification label, the feature generation model to be trained can be a model to be trained image feature generation, the second sample feature can be a second image sample feature, the model to be trained sample discrimination model can be a model to be trained image sample discrimination, the feature generation model can be an image feature generation model, the target global feature generation model can be a target global image feature generation model, the target global classification model can be a target global image classification model, the target feature extraction model can be a target image feature extraction model, and the target classification model can be a target image classification model. The specific implementation process of steps Q10 to Q50 can be referred to the content of steps S10 to S50, and will not be repeated here.

[0101] This application embodiment obtains a trained image feature extraction model and an image classification model, and extracts a first training image sample, a first image noise data, and a first real image classification label corresponding to the first training image sample. Then, it obtains a first image sample feature generated by the image feature extraction model for the first training image sample, and a second image sample feature generated by the image feature generation model to be trained for the first image noise data and the first real image classification label. Then, it performs image classification on the second image sample feature through the image classification model and distinguishes the first image sample feature from the second image sample feature through the image sample differentiation model to be trained. While fixing the image feature extraction model and the image classification model, it iteratively optimizes the image feature generation model to be trained to obtain an image feature generation model. This achieves the purpose of constructing a feature generation model that carries the model knowledge of the image feature extraction model, while the feature generation model is not directly constructed based on the original sample data of the participants. The image feature generation model and the image classification model are sent to the second device. The second device iteratively optimizes and aggregates the image feature generation models sent by the first device to obtain a global image feature generation model and a global image classification model, resulting in a target global image feature generation model and a target global image classification model. Since the feature generation model is not directly constructed based on the original image sample data of the participants, the second device cannot deduce the original sample data of the first device. The second device receives the target global image feature generation model and the target global image classification model sent by the second device and iteratively optimizes the image feature extraction model and the target global image classification model based on the target global image feature generation model. This allows the image feature extraction model and the image classification model to learn the knowledge of all participants carried by the target global image feature generation model and the target global image classification model, thereby obtaining the target image feature extraction model and the target image classification model. This achieves the goal of sharing the knowledge of all participants through a global model without leaking the original sample data of the participants. In other words, while realizing the construction of image feature extraction and image classification models based on federated learning, it also reduces the risk of each participant leaking its own original image sample data. It solves the "data silo" problem when building image feature extraction and image classification models, and improves the accuracy of image feature extraction and image classification models while protecting the data privacy of the original image sample data of all parties.

[0102] Compared to homomorphic encryption, building image processing models (image feature generation and image classification models) using federated learning significantly reduces computational overhead and improves efficiency. Compared to multi-party secure computation, federated learning significantly reduces computational and communication overhead, improving efficiency. Compared to differential privacy, this embodiment does not directly add noise to the image feature extraction and classification models; it merely uses noise data and labels as input to the image feature generation model to simulate the output of the image feature extraction model. Therefore, it does not affect the accuracy and usability of the image feature extraction and classification models, thus improving the usability and accuracy of the image processing models built using federated learning.

[0103] This application provides a federated learning modeling optimization method, which, compared to the prior art, involves each participant maintaining a local model and a global model in a federated learning scenario. Each participant learns local knowledge through a local model and shares knowledge across all participants through a global model. Then, each participant aggregates their local and global models. This embodiment first obtains a trained feature extraction model and a classification model, and extracts a first training sample, first noisy data, and the first true classification label corresponding to the first training sample. Then, it obtains the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first true classification label. The second sample features are then classified using the classification model, and the first sample features and the second sample features are distinguished using the sample differentiation model to be trained. While keeping the feature extraction model and the classification model fixed, the feature generation model to be trained is iteratively optimized to obtain a feature generation model. This achieves the goal of constructing a feature generation model carrying the model knowledge of the feature extraction model. Simultaneously, the feature generation model is not directly constructed based on the participants' original sample data. Finally, the feature generation model and the classification model are sent to a second device for the second device to use. Each of the first devices sends a feature generation model, and iteratively optimizes and aggregates the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models to obtain a target global feature generation model and a target global classification model. Since the feature generation model is not directly constructed based on the original sample data of the participants, the second device cannot deduce the original sample data of the first device. The second device then receives the target global feature generation model sent by the second device and iteratively optimizes the feature extraction model and the classification model based on the target global feature generation model. This allows the feature extraction model and the classification model to learn the knowledge of all participants carried by the target global feature generation model and the target global classification model, thereby obtaining the target feature extraction model and the target classification model. This achieves the goal of enabling the local model to learn the model knowledge of the global model, that is, to share the knowledge of all participants through the global model, while not leaking the local original sample data. Therefore, it overcomes the technical defect that the federated server can deduce the original data of the participants through the global models of each participant, thus posing a risk of data leakage, and reduces the risk of leakage of the privacy data of the participants in federated learning.

[0104] Furthermore, referring to Figure 3 In another embodiment of this application, the federated learning modeling optimization method is applied to a second device, and the federated learning modeling optimization method includes:

[0105] Step A10: Receive the feature generation model and classification model sent by each first device, and aggregate the feature generation models into a global feature generation model and aggregate the classification models into a global classification model;

[0106] Step A20: Extract the noise data and the corresponding real classification labels;

[0107] In this embodiment, it should be noted that the aggregation methods include averaging and weighted summation. Each first device needs to maintain a feature generation model and a classification model. The feature generation model is a model that simulates the output features of the corresponding feature extraction model based on noise data and real classification labels. The output features of the feature extraction model are the model output results obtained by extracting features from samples corresponding to real classification labels. The output of the feature generation model and the output of the feature extraction model can be distinguished by a sample discrimination model. Furthermore, for the same sample and its corresponding noise and label, the output of the feature generation model and the output of the corresponding feature extraction model can generate the same classification label through the classification model. The specific process of the first device constructing the feature generation model can be referred to the specific content of steps S10 to S30 above, and will not be repeated here.

[0108] Step A30: Based on the noise data and the true classification label, the global feature generation model and the global classification model are iteratively trained and optimized by performing knowledge distillation between the global feature generation model and each of the feature generation models, to obtain the target global feature generation model and the target global classification model.

[0109] In this embodiment, specifically, the global feature generation model and the global classification model are iteratively trained based on the noise data and the true classification labels to calculate the global classification loss. Knowledge distillation is performed between the global feature generation model and each of the feature generation models to calculate the knowledge distillation loss. Then, based on the global classification loss and the knowledge distillation loss, the global feature generation model and the global classification model are iteratively optimized to obtain the target global feature generation model and the target global classification model.

[0110] The step of performing knowledge distillation between the global feature generation model and each of the feature generation models to calculate the knowledge distillation loss includes:

[0111] Based on each of the aforementioned feature generation models, the noisy data and the true classification labels are jointly converted into locally generated features, and based on the global feature generation model, the noisy data and the true classification labels are jointly converted into globally generated features. Each feature generation model outputs a locally generated feature. Then, based on the distance between each locally generated feature and the globally generated feature, a feature distance loss value is calculated, and all the feature distance loss values ​​are aggregated into a knowledge distillation loss. The aggregation method can be averaging or weighted summation, etc.

[0112] The steps of obtaining a target global feature generation model and a target global classification model by iteratively training the global feature generation model and the global classification model based on the noise data and the true classification labels, and by iteratively optimizing the global feature generation model and the global classification model through knowledge distillation between the global feature generation model and each of the feature generation models, include:

[0113] Step A31: Based on each of the feature generation models, the noisy data and the real classification label are converted into local generated features, and based on the global feature generation model, the noisy data and the real classification label are converted into global generated features.

[0114] In this embodiment, it should be noted that each feature generation model takes noisy data and real classification labels as input and outputs a corresponding locally generated feature.

[0115] Step A32: Calculate the global classification loss based on the true classification label and the globally predicted classification label generated by classifying the globally generated features through the global classification model;

[0116] In this embodiment, specifically, the normalized global generated features are classified according to the global classification model to obtain global predicted classification labels. Then, based on the difference between the true classification labels and the global predicted classification labels, the global classification loss is calculated using a preset loss function, wherein the preset loss function can be an L2 loss function or a cross-entropy loss function, etc.

[0117] Step A33: Calculate the global feature similarity loss based on the similarity between each locally generated feature and the globally generated feature;

[0118] In this embodiment, specifically, based on the distance between each locally generated feature and the globally generated feature, a global feature distance loss value is calculated using a preset loss function, and then the global feature distance loss values ​​are aggregated into a global feature similarity loss.

[0119] The step of calculating the global feature similarity loss based on the similarity between each locally generated feature and the globally generated feature includes:

[0120] Step A331: Normalize each of the locally generated features to obtain each first normalized feature;

[0121] Step A332: Normalize the globally generated features to obtain the second normalized features;

[0122] In this embodiment, specifically, according to a preset normalization exponent function, each locally generated feature is normalized to a corresponding first normalized feature, and the globally generated feature is normalized to a corresponding second normalized feature. It should be noted that since the sample data of each first device are usually not independent and identically distributed, the feature generation models constructed by each first device based on the sample data usually have certain differences. Therefore, the outputs of each feature generation model usually also have certain differences, and the similarity cannot be directly calculated. Thus, it is necessary to normalize each locally generated feature and the globally generated feature.

[0123] Step A333: Calculate the global feature similarity loss based on the similarity between each of the first normalized features and the second normalized features.

[0124] In this embodiment, specifically, the mean of each of the first normalized features is calculated to obtain the global mean feature. Then, based on the distance between the global mean feature and the second normalized feature, the global distance loss value is calculated, and the global distance loss value is used as the global feature similarity loss, which is also known as knowledge distillation loss. This achieves the purpose of knowledge distillation between the global model and each local model when the sample data of each participant in federated learning are not independent and identically distributed.

[0125] Step A34: Based on the global feature similarity loss and the global classification loss, iteratively optimize the global feature generation model and the global classification model to obtain the target global feature generation model and the target global classification model.

[0126] In this embodiment, specifically, it is determined whether the global feature generation model and the global classification model meet the preset model iteration update number. If they do, the global feature generation model is used as the target global feature generation model, and the global classification model is used as the target global classification model. If they do not meet the requirements, the global classification model is updated based on the model gradient calculated by the global classification loss, and the global feature generation model is updated based on the model gradient calculated by the global feature similarity loss and the global classification loss. Then, the execution step is returned: extracting the noise data and the real classification labels corresponding to the noise data for the next round of model update iteration. The preset model iteration update number is a preset model update number threshold. Once the threshold is reached, the second device needs to send the target global feature generation model and the target global classification model to the first device.

[0127] Prior to the step of feeding back the target global feature generation model and the target global classification model to each of the first devices, the federated learning modeling optimization method further includes:

[0128] Step B10: Determine whether the target global feature generation model and the target global classification model satisfy the preset federated iteration termination condition;

[0129] Step B20: If satisfied, notify each of the first devices that the current federated learning modeling is complete, and execute the following steps: feed back the target global feature generation model and the target global classification model to each of the first devices respectively.

[0130] In this embodiment, it should be noted that the preset federal iteration termination condition can be model loss convergence or the maximum number of federal iterations, etc.

[0131] Specifically, it is determined whether the target global feature generation model and the target global classification model meet the preset federated iteration termination condition; if the target global feature generation model and the target global classification model meet the preset federated iteration termination condition, then each of the first devices is notified that the current federated learning modeling has ended, and the following steps are executed: feeding back the target global feature generation model and the target global classification model to each of the first devices respectively to end the current federated learning modeling; if the target global feature generation model and the target global classification model do not meet the preset federated iteration termination condition, then the following steps are executed directly: feeding back the target global feature generation model and the target global classification model to each of the first devices respectively to proceed to the next round of federated learning iteration.

[0132] Step A40: The target global feature generation model and the target global classification model are respectively fed back to each of the first devices, so that the first devices can iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0133] In this embodiment, specifically, the target global feature generation model and the target global classification model are fed back to each first device. Then, the first device replaces and updates its local classification model with the target global classification model. By iteratively updating the feature extraction model and the target global classification model, and by performing knowledge distillation between the target global feature generation model and the feature extraction model while keeping the target global feature generation model fixed, the feature extraction model and the target global classification model are iteratively optimized to obtain the target feature extraction model and the target classification model. The specific process of the first device generating the target feature extraction model and the target classification model can be referred to the specific content in steps S51 to S55, and will not be repeated here.

[0134] like Figure 4 The diagram shows the process of the second device constructing the target global feature extraction model and the target global classification model. In this diagram, the client is the first device, softmax is the preset normalization exponential function, the generation model is the feature generation model, the global generation model is the global feature generation model, z is the noise data, y is the true classification label, and KL is the knowledge distillation loss, which is also the global feature similarity loss.

[0135] This application provides a federated learning modeling optimization method, which differs from existing technologies where each participant maintains a local model and a global model in a federated learning scenario. In the former, each participant learns local knowledge through its local model and shares knowledge across all participants through the global model. Then, each participant aggregates its local and global models. This application first receives feature generation models and classification models from each first device, aggregates the feature generation models into a global feature generation model, and aggregates the classification models into a global classification model. It then extracts noise data and the corresponding true classification labels. Based on the noise data and the true classification labels, it iteratively trains the global feature generation model and the global classification model, and performs knowledge distillation between the global feature generation model and the individual feature generation models to iteratively optimize the global feature generation model and the global classification model, resulting in a target global feature generation model and a target global classification model. Notably, the first device does not directly send the feature extraction model to the second device, but instead sends the feature generation model, which is the output of the simulated feature extraction model, to the second device. Furthermore, the input to the feature generation model is noise data. Based on the data and labels, even if the second device has a feature generation model, it cannot deduce the samples and labels of the first device. Therefore, the target global feature generation model and the target global classification model are fed back to each of the first devices. The first devices then use the target global feature generation model to iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model, obtaining the target feature extraction model and the target classification model. The first device can use the global feature generation model to optimize the feature extraction model. Since the feature generation model is a simulated output model of the feature extraction model, the optimization process allows the feature extraction model to learn the knowledge of the global feature generation model. This achieves the goal of sharing the knowledge of all participants based on the global feature generation model, while not leaking local data privacy. Therefore, it overcomes the technical defect that the federated server can deduce the original data of each participant through their global models, thus reducing the risk of data leakage in federated learning.

[0136] Reference Figure 5 , Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0137] like Figure 5As shown, the federated learning modeling optimization device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to establish communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0138] Optionally, the federated learning modeling optimization device may also include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, etc. The rectangular user interface may include a display screen and an input submodule such as a keyboard; optionally, the rectangular user interface may also include standard wired or wireless interfaces. The network interface may optionally include standard wired or wireless interfaces (such as a Wi-Fi interface).

[0139] Those skilled in the art will understand that Figure 5 The structure of the federated learning modeling optimization device shown in the figure does not constitute a limitation on the federated learning modeling optimization device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0140] like Figure 5 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, and a federated learning modeling optimization program. The operating system is a program that manages and controls the hardware and software resources of the federated learning modeling optimization device, supporting the operation of the federated learning modeling optimization program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the federated learning modeling optimization system.

[0141] exist Figure 5 In the federated learning modeling optimization device shown, the processor 1001 is used to execute the federated learning modeling optimization program stored in the memory 1005 to implement the steps of the federated learning modeling optimization method described above.

[0142] The specific implementation of the federated learning modeling optimization device in this application is basically the same as the embodiments of the federated learning modeling optimization method described above, and will not be repeated here.

[0143] This application embodiment also provides a federated learning modeling optimization device, which is applied to a first device, and the federated learning modeling optimization device includes:

[0144] The extraction module is used to obtain the trained feature extraction model and classification model, and to extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample.

[0145] The feature generation module is used to obtain the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first real classification label.

[0146] The iterative training module is used to classify the second sample features using the classification model and to distinguish the first sample features from the second sample features using the sample discrimination model to be trained. Under the condition of fixing the feature extraction model and the classification model, the feature generation model to be trained is iteratively optimized to obtain the feature generation model.

[0147] The sending module is used to send the feature generation model and the classification model to the second device, so that the second device can iteratively optimize and optimize the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models based on the feature generation models sent by the first device, so as to obtain the target global feature generation model and the target global classification model.

[0148] The iterative optimization module is used to receive the target global feature generation model and the target global classification model sent by the second device, and to iteratively optimize the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0149] Optionally, the iterative training module is further configured to:

[0150] The classification model is used to classify the second sample features, and the first sample features and the second sample features are distinguished by the first sample discrimination model to be trained, and the first classification loss and the sample discrimination loss are calculated.

[0151] Based on the first classification loss and the sample discrimination loss, the feature generation model to be trained is iteratively optimized to obtain the feature generation model.

[0152] Optionally, the iterative training module is further configured to:

[0153] Based on the classification model, the features of the second sample are classified to obtain the first predicted classification label;

[0154] Calculate the first classification loss based on the first predicted classification label and the first true classification label;

[0155] Based on the sample differentiation model, the first sample features and the second sample features are classified into two categories to obtain the classification results.

[0156] Based on the binary classification results and the positive and negative sample labels corresponding to the first sample features and the second sample features, the sample discrimination loss is calculated.

[0157] Optionally, the iterative optimization module is further configured to:

[0158] Extract the second training sample, the second noise data, and the second true classification label corresponding to the second training sample;

[0159] Obtain the local sample features generated by the feature extraction model for the second training sample, and obtain the global sample features generated by the target global feature generation model for the second noisy data and the second true classification label;

[0160] The second classification loss is calculated based on the second true classification label and the second predicted classification label generated by the target global classification model for the local sample features;

[0161] The feature similarity loss is calculated based on the similarity between the local sample features and the global sample features;

[0162] Based on the second classification loss and the feature similarity loss, the feature extraction model and the target global classification model are iteratively optimized while keeping the target global feature generation model fixed, to obtain the target feature extraction model and the target classification model.

[0163] Optionally, the iterative optimization module is further configured to:

[0164] If the target global feature generation model and the target global classification model satisfy the preset federation termination condition, then based on the second classification loss and the feature similarity loss, the feature extraction model and the target global classification model are iteratively updated while the target global feature generation model is fixed, to obtain the target feature extraction model and the target classification model;

[0165] If the target global feature generation model and the target global classification model do not meet the preset federation termination condition, then based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, the feature extraction model and the target global classification model are iteratively updated, and the execution steps are returned: extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample.

[0166] The specific implementation of the federated learning modeling optimization device in this application is basically the same as the embodiments of the federated learning modeling optimization method described above, and will not be repeated here.

[0167] This application embodiment also provides a federated learning modeling optimization device, which is applied to a second device, and the federated learning modeling optimization device includes:

[0168] The model aggregation module is used to receive feature generation models and classification models sent by each first device, and to aggregate the feature generation models into a global feature generation model and the classification models into a global classification model.

[0169] The extraction module is used to extract noise data and the corresponding real classification labels of the noise data;

[0170] The iterative optimization module is used to obtain a target global feature generation model and a target global classification model by iteratively training the global feature generation model and the global classification model based on the noisy data and the true classification label, and by performing knowledge distillation between the global feature generation model and each of the feature generation models.

[0171] The feedback module is used to feed back the target global feature generation model and the target global classification model to each of the first devices, so that the first devices can iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

[0172] Optionally, the iterative optimization module is further configured to:

[0173] Based on each of the aforementioned feature generation models, the noisy data and the true classification label are jointly converted into locally generated features, and based on the global feature generation model, the noisy data and the true classification label are jointly converted into globally generated features.

[0174] Calculate the global classification loss based on the true classification label and the globally predicted classification label generated by classifying the globally generated features using a global classification model.

[0175] Calculate the global feature similarity loss based on the similarity between each locally generated feature and the globally generated feature;

[0176] Based on the global feature similarity loss and the global classification loss, the global feature generation model and the global classification model are iteratively optimized to obtain the target global feature generation model and the target global classification model.

[0177] Optionally, the iterative optimization module is further configured to:

[0178] The locally generated features are normalized to obtain the first normalized features;

[0179] The globally generated features are normalized to obtain the second normalized features;

[0180] The global feature similarity loss is calculated based on the similarity between each of the first normalized features and the second normalized features.

[0181] Optionally, the federated learning modeling optimization device is further used for:

[0182] Determine whether the target global feature generation model and the target global classification model satisfy the preset federated iteration termination condition;

[0183] If the conditions are met, notify each of the first devices that the current federated learning modeling is complete, and execute the following steps: feed back the target global feature generation model and the target global classification model to each of the first devices respectively.

[0184] The specific implementation of the federated learning modeling optimization device in this application is basically the same as the embodiments of the federated learning modeling optimization method described above, and will not be repeated here.

[0185] This application provides a readable storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the federated learning modeling optimization method described in any of the above claims.

[0186] The specific implementation of the readable storage medium in this application is basically the same as the embodiments of the federated learning modeling optimization method described above, and will not be repeated here.

[0187] This application provides a computer program product, which includes one or more computer programs. The one or more computer programs can be executed by one or more processors to implement the steps of the federated learning modeling optimization method described in any of the above claims.

[0188] The specific implementation of the computer program product in this application is basically the same as the embodiments of the federated learning modeling optimization method described above, and will not be repeated here.

[0189] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.

Claims

1. A federated learning modeling optimization method, characterized in that, Applied to the first device, the federated learning modeling optimization method includes: Obtain the trained feature extraction model and classification model, and extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample; Obtain the first sample features generated by the feature extraction model for the first training sample, and the second sample features generated by the feature generation model to be trained for the first noisy data and the first true classification label; The second sample features are classified by the classification model and the first sample features and the second sample features are distinguished by the sample discrimination model to be trained. The feature extraction model and the classification model are fixed, and the feature generation model to be trained is iteratively optimized to obtain the feature generation model. The feature generation model and the classification model are sent to the second device, so that the second device can iteratively optimize and optimize the global feature generation model obtained by aggregating the feature generation models and the global classification model obtained by aggregating the classification models based on the feature generation models sent by the first device, so as to obtain the target global feature generation model and the target global classification model. The system receives a target global feature generation model and a target global classification model sent by the second device, and iteratively optimizes the feature extraction model and the target global classification model based on the target global feature generation model to obtain a target feature extraction model and a target classification model. The step of iteratively optimizing the feature extraction model and the target global classification model based on the target global feature generation model to obtain the target feature extraction model and the target classification model includes: Extract the second training sample, the second noise data, and the second true classification label corresponding to the second training sample; Obtain the local sample features generated by the feature extraction model for the second training sample, and obtain the global sample features generated by the target global feature generation model for the second noisy data and the second true classification label; The second classification loss is calculated based on the second true classification label and the second predicted classification label generated by the target global classification model for the local sample features; The feature similarity loss is calculated based on the similarity between the local sample features and the global sample features; Based on the second classification loss and the feature similarity loss, the feature extraction model and the target global classification model are iteratively optimized while keeping the target global feature generation model fixed, to obtain the target feature extraction model and the target classification model.

2. The federated learning modeling optimization method as described in claim 1, characterized in that, The steps of classifying the second sample features using the classification model and distinguishing the first sample features from the second sample features using the sample discrimination model to be trained, and iteratively optimizing the feature generation model to be trained while fixing the feature extraction model and the classification model, to obtain the feature generation model, include: The classification model is used to classify the second sample features, and the first sample features and the second sample features are distinguished by the first sample discrimination model to be trained, and the first classification loss and the sample discrimination loss are calculated. Based on the first classification loss and the sample discrimination loss, the feature generation model to be trained is iteratively optimized to obtain the feature generation model.

3. The federated learning modeling optimization method as described in claim 2, characterized in that, The steps of classifying the second sample features using the classification model, and distinguishing the first sample features and the second sample features using the first sample discrimination model to be trained, and calculating the first classification loss and the sample discrimination loss include: Based on the classification model, the features of the second sample are classified to obtain the first predicted classification label; Calculate the first classification loss based on the first predicted classification label and the first true classification label; Based on the sample differentiation model, the first sample features and the second sample features are classified into two categories to obtain the classification results. Based on the binary classification results and the positive and negative sample labels corresponding to the first sample features and the second sample features, the sample discrimination loss is calculated.

4. The federated learning modeling optimization method as described in claim 1, characterized in that, The step of iteratively optimizing the feature extraction model and the target global classification model based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, to obtain the target feature extraction model and the target classification model includes: If the target global feature generation model and the target global classification model satisfy the preset federation termination condition, then based on the second classification loss and the feature similarity loss, the feature extraction model and the target global classification model are iteratively updated while the target global feature generation model is fixed, to obtain the target feature extraction model and the target classification model; If the target global feature generation model and the target global classification model do not meet the preset federation termination condition, then based on the second classification loss and the feature similarity loss, while keeping the target global feature generation model fixed, the feature extraction model and the target global classification model are iteratively updated, and the execution steps are returned: extract the first training sample, the first noisy data, and the first true classification label corresponding to the first training sample.

5. A federated learning modeling optimization method, characterized in that, Applied to a second device, the federated learning modeling optimization method includes: Receive feature generation models and classification models sent by each first device, and aggregate the feature generation models into a global feature generation model and the classification models into a global classification model; Extract the noise data and the corresponding real classification labels of the noise data; Based on the noise data and the true classification label, the global feature generation model and the global classification model are iteratively trained and optimized by performing knowledge distillation between the global feature generation model and each of the feature generation models, thereby obtaining the target global feature generation model and the target global classification model. The target global feature generation model and the target global classification model are respectively fed back to each of the first devices, so that the first devices can iteratively optimize the feature extraction model and the target global classification model corresponding to the feature generation model based on the target global feature generation model to obtain the target feature extraction model and the target classification model.

6. The federated learning modeling optimization method as described in claim 5, characterized in that, The steps of obtaining a target global feature generation model and a target global classification model by iteratively training the global feature generation model and the global classification model based on the noise data and the true classification labels, and by iteratively optimizing the global feature generation model and the global classification model through knowledge distillation between the global feature generation model and each of the feature generation models, include: Based on each of the aforementioned feature generation models, the noisy data and the true classification label are jointly converted into locally generated features, and based on the global feature generation model, the noisy data and the true classification label are jointly converted into globally generated features. Calculate the global classification loss based on the true classification label and the globally predicted classification label generated by classifying the globally generated features using a global classification model. Calculate the global feature similarity loss based on the similarity between each locally generated feature and the globally generated feature; Based on the global feature similarity loss and the global classification loss, the global feature generation model and the global classification model are iteratively optimized to obtain the target global feature generation model and the target global classification model.

7. The federated learning modeling optimization method as described in claim 6, characterized in that, The step of calculating the global feature similarity loss based on the similarity between each locally generated feature and the globally generated feature includes: The locally generated features are normalized to obtain the first normalized features; The globally generated features are normalized to obtain the second normalized features; The global feature similarity loss is calculated based on the similarity between each of the first normalized features and the second normalized features.

8. The federated learning modeling optimization method as described in claim 6, characterized in that, Before the step of feeding back the target global feature generation model and the target global classification model to each of the first devices, the federated learning modeling optimization method further includes: Determine whether the target global feature generation model and the target global classification model satisfy the preset federated iteration termination condition; If the conditions are met, notify each of the first devices that the current federated learning modeling is complete, and execute the following steps: feed back the target global feature generation model and the target global classification model to each of the first devices respectively.

9. A federated learning modeling optimization device, characterized in that, The federated learning modeling optimization device includes: a memory, a processor, and a program stored in the memory for implementing the federated learning modeling optimization method; the memory is used to store the program for implementing the federated learning modeling optimization method; the processor is used to execute the program for implementing the federated learning modeling optimization method to implement the steps of the federated learning modeling optimization method as described in any one of claims 1 to 4 or 5 to 8.

10. A readable storage medium, characterized in that, The readable storage medium stores a program that implements the federated learning modeling optimization method, which is executed by a processor to implement the steps of the federated learning modeling optimization method as described in any one of claims 1 to 4 or 5 to 8.

11. A program product, said program product being a computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the federated learning modeling optimization method as described in any one of claims 1 to 4 or 5 to 8.