Model processing method, medium, electronic device, server and program product

By generating random misleading tags on sample data to be forgotten in federated learning and retraining the model, the data forgetting problem in federated learning is solved, learning failure and data privacy protection are achieved, while maintaining system efficiency.

CN119760761APending Publication Date: 2025-04-04TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411594157.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In federated learning, it is difficult to effectively realize data forgetting in the existing technology, especially to meet the "forgotten data" requirements of participants while ensuring user data privacy.

Method used

By generating completely random misleading labels for forgotten sample data, model retraining is carried out, so that the model can make decision offsets for forgotten sample data, thereby achieving learning failure and data forgetting.

Benefits of technology

The learning failure and data forgetting of the model are realized, data leakage is avoided, and the basic efficiency of federated learning is maintained without excessive additional computing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760761A_ABST
    Figure CN119760761A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a model processing method, medium, electronic device, server and program product, and relates to the field of computer technology. The method includes: obtaining sample data to be forgotten and a first sample label corresponding to the sample data; randomly generating a second sample label according to the sample data; the second sample label is different from the first sample label; retraining the first data model according to the sample data and the second sample label to obtain a second data model; sending the second data model to the server so that the server determines the target data model according to the second data model. By generating a completely random misleading label, i.e., a second sample label, for the sample data to be forgotten, and then retraining the first data model according to the sample data and the second sample label, the model generates a decision deviation for the sample data to be forgotten, thereby achieving the effect of learning the failed forgotten data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to a model processing method, medium, electronic device, server and program product. Background Art

[0002] With the promulgation of laws and regulations such as the Data Security Law, the "right to be forgotten" of user data has received increasing attention. Federated learning, as a promising distributed privacy-preserving machine learning framework, should not only ensure that the participants in the collaborative training model do not leak user data, but also meet the participants' requirements to "forget data". Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a model processing method, medium, electronic device, server and program product.

[0004] In a first aspect, the present disclosure provides a model processing method, which is applied to a first client, and the method includes: Obtaining sample data to be forgotten and a first sample label corresponding to the sample data; Randomly generate a second sample label according to the sample data; the second sample label is different from the first sample label; Retraining the first data model according to the sample data and the second sample label to obtain a second data model; The second data model is sent to a server so that the server determines a target data model according to the second data model.

[0005] Optionally, the first data model includes a first feature extractor and a first fully connected layer; and retraining the first data model according to the sample data and the second sample label to obtain the second data model includes: Retraining the first fully connected layer according to the sample data and the second sample label to obtain a second fully connected layer; The second data model is obtained according to the first feature extractor and the second fully connected layer.

[0006] In a second aspect, the present disclosure provides a model processing method, which is applied to a server, and the method includes: Receive a second data model sent by the first client; wherein the second data model is obtained by the first client retraining the first data model according to the sample data and the second sample label, the second sample label is randomly generated according to the sample data, and the second sample label is different from the first sample label corresponding to the sample data; A target data model is determined according to the second data model.

[0007] Optionally, determining the target data model according to the second data model includes: Acquire multiple third data models corresponding to the multiple second clients; The target data model is obtained according to the second data model and the plurality of third data models.

[0008] Optionally, the second data model includes a first feature extractor and a second fully connected layer, and the third data model includes a second feature extractor and a third fully connected layer; and obtaining the target data model according to the second data model and the plurality of third data models includes: Determine a third feature extractor according to the first feature extractor and a plurality of the second feature extractors; Determine a fourth fully connected layer according to the second fully connected layer and the plurality of third fully connected layers; The target data model is obtained according to the third feature extractor and the fourth fully connected layer.

[0009] Optionally, determining a fourth fully connected layer according to the second fully connected layer and the plurality of third fully connected layers comprises: Determine a first weight corresponding to the second fully connected layer and a second weight corresponding to the third fully connected layer; the first weight is greater than the second weight; The second fully connected layer and the plurality of the third fully connected layers are weightedly aggregated according to the first weight and the second weight to obtain the fourth fully connected layer.

[0010] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the model processing method provided in the first aspect of the present disclosure, or implements the steps of the model processing method provided in the second aspect of the present disclosure.

[0011] In a fourth aspect, the present disclosure provides an electronic device, comprising: a first memory on which a computer program is stored; and a first processor, configured to execute the computer program in the first memory to implement the steps of the model processing method provided in the first aspect of the present disclosure.

[0012] In a fifth aspect, the present disclosure provides a server, comprising: a second memory on which a computer program is stored; and a second processor, configured to execute the computer program in the second memory to implement the steps of the model processing method provided in the second aspect of the present disclosure.

[0013] In a sixth aspect, the present disclosure provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the model processing method provided in the first aspect of the present disclosure, or implements the steps of the model processing method provided in the second aspect of the present disclosure.

[0014] Through the above technical solution, first, the sample data to be forgotten and the first sample label corresponding to the sample data are obtained. Secondly, a second sample label is randomly generated according to the sample data; the second sample label is different from the first sample label. Afterwards, the first data model is retrained according to the sample data and the second sample label to obtain the second data model. Finally, the second data model is sent to the server so that the server determines the target data model according to the second data model. By generating a completely random misleading label, that is, a second sample label, for the sample data to be forgotten, and then retraining the first data model according to the sample data and the second sample label, the model generates a decision deviation for the sample data to be forgotten, thereby achieving the effect of learning invalid forgotten data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients according to the second data model. In this way, only a small amount of data processing is required, without too much additional computing overhead, to effectively achieve the learning invalidation and data forgetting of the model, and also effectively guarantee the basic efficiency of federated learning.

[0015] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings: Figure 1 The present invention is a flowchart of a method for processing a model according to an exemplary embodiment.

[0017] Figure 2 The present invention is a flowchart of a method for processing a model according to an exemplary embodiment.

[0018] Figure 3 It is a flow interaction diagram of a model processing method according to an exemplary embodiment.

[0019] Figure 4 It is a block diagram of a processing device of a model according to an exemplary embodiment.

[0020] Figure 5 It is a block diagram of a processing device of a model according to an exemplary embodiment.

[0021] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment.

[0022] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0023] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0024] The terms "first", "second", etc. in the specification and claims of this application and the above drawings are used to distinguish similar objects and do not have to be understood as a specific order or sequence. In addition, in the description with reference to the drawings, the same symbols in different drawings represent the same elements.

[0025] In the description of the present disclosure, unless otherwise specified, "multiple" means two or more than two, and other quantifiers are similar thereto; "at least one item", "one item or multiple items" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one item a can represent any number of a; for another example, one item or multiple items among a, b and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple; "and / or" is a kind of description of the association relationship of associated objects, indicating that there can be three kinds of relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " indicates that the associated objects before and after are in an "or" relationship.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] Although operations or steps are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood that it is required to perform these operations or steps in the specific order shown or in a serial order, or to perform all the operations or steps shown to obtain the desired results. In the embodiments of the present disclosure, these operations or steps can be performed in series; these operations or steps can also be performed in parallel; or some of these operations or steps can be performed.

[0028] Before introducing the processing method, medium, electronic device, server and program product of the model provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure are first introduced. The present disclosure can be applied in the scenario of model training. With the development of computer technology, federated learning is widely used in model training as a promising distributed privacy-preserving machine learning framework. Federated learning allows multiple participants to collaboratively train models without sharing the original user data. In other words, multiple participants can collaborate by exchanging only model parameters instead of the data itself, and then obtain the optimal global model after aggregation.

[0029] With the promulgation of laws and regulations such as the Data Security Law, the "right to be forgotten" of user data has received more and more attention. However, in actual application, it is difficult to make the model trained by multiple participants completely forget the user data. Because the user data has been used to jointly train the global model, even if the user deletes the corresponding user data, the global model has already learned the user data, that is, the user data has already affected the global model.

[0030] At present, data forgetting in federated learning in related technologies is mainly achieved through the following three technical solutions: (1) Data forgetting scheme for retraining: This scheme removes the forgotten data that needs to be forgotten and then lets the model learn the remaining data from scratch. Since the model no longer comes into contact with the forgotten data, this method can achieve a better forgetting effect.

[0031] (2) Data forgetting scheme based on gradient ascent: This scheme takes into account that model training is to update parameters by gradient descent based on the target data. Therefore, the gradient of the forgotten data to be forgotten can be saved during training. When the model training is completed, only the saved gradient needs to be reversed to ascent to eliminate the model's memory of the forgotten data.

[0032] (3) Data forgetting scheme based on model pruning: This scheme achieves the effect of making the model forget data by selectively removing certain neurons that are highly correlated with the forgotten data from the model structure.

[0033] Based on the above solutions, the inventors have found in long-term practice that the above solutions have the following problems: (1) Data forgetting scheme for retraining: Since the cost of training the model from scratch is too high and in scenarios where the federated learning system requires collaborative learning among multiple parties, the retraining of one participant will slow down the learning process of all participants and significantly reduce the efficiency of the federated learning system.

[0034] (2) Data forgetting scheme based on gradient ascent: By performing reverse gradient ascent on the saved gradients after training, the model’s memory of forgotten data is eliminated. Although the operation is efficient, it does not take into account the performance of the model on other data, and often leads to a large loss of model performance.

[0035] (3) Data forgetting scheme based on model pruning: By selectively removing certain neurons that are highly correlated with the forgotten data from the model structure, the overall performance of the model will be greatly lost after deleting the neurons because the internal structure of the model is highly coupled and the correlation between the parameters is strong.

[0036] Based on the above situation, there is an urgent need for a data forgetting solution that has high forgetting efficiency and maintains model performance.

[0037] In order to solve the above technical problems, the present invention provides a model processing method, medium, electronic device, server and program product, which generates completely random misleading labels, that is, second sample labels, for forgotten sample data, and then retrains the first data model according to the sample data and the second sample label, so that the model produces a decision deviation for the forgotten sample data, thereby achieving the effect of learning failed forgotten data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without too much additional computing overhead, to effectively achieve model learning failure and data forgetting, and effectively guarantee the basic efficiency of federated learning.

[0038] The specific implementation modes of the present invention are described in detail below with reference to the accompanying drawings.

[0039] Figure 1 is a flowchart of a model processing method according to an exemplary embodiment, which can be applied to a first client. In an actual application scenario, the first client can be understood as a participant in the collaborative training in the federated learning system, and the participant has the need to forget data. Figure 1 As shown, the method may include the following steps: In step S101, sample data to be forgotten and a first sample label corresponding to the sample data are obtained.

[0040] In some embodiments, the federated learning system usually corresponds to multiple clients participating in collaborative training, each client corresponds to a data model, and each data model can be composed of a feature extractor E responsible for feature extraction and a fully connected layer W responsible for decision making, that is, each client i has its own data model In addition, each client has a corresponding data set, which includes multiple sample pairs. , each sample pair includes a sample data and the corresponding sample labels The data model corresponding to the client can be trained based on multiple sample pairs in the data set.

[0041] For example, in general scenarios, the data model can be trained according to the following objectives:

[0042] Among them, CE is used to characterize the loss function of the classification task (such as the cross entropy loss function). is the sample data, To convert sample data After the data model is input, the prediction result output by the data model is the label predicted by the model. is the sample label corresponding to the sample data.

[0043] The specific meaning of the above expression is that each client trains the local data model in a way that minimizes the loss function, so that the prediction result of the data model is As close as possible to the actual sample labels The same. Among them, with multiple iterative training, the model parameters of the feature extractor and the fully connected layer in the data model will be updated according to the loss function after each training until the goal of minimizing the loss function is achieved.

[0044] In this step, when it is necessary to forget a certain sample data in the current first client u, the sample data can be obtained first. The corresponding first sample label , the first sample label is the true label corresponding to the sample data.

[0045] In step S102, a second sample label is randomly generated according to the sample data.

[0046] The second sample label is different from the first sample label.

[0047] In this step, for the sample data that needs to be forgotten, a completely random virtual misleading label can be generated for the sample data, that is, the second sample label In this way, by generating virtual misleading labels, the first data model can be guided in decision making based on the virtual misleading labels, so that the first data model learns wrong sample data, which can effectively achieve learning failure and data forgetting.

[0048] In step S103, the first data model is retrained according to the sample data and the second sample label to obtain a second data model.

[0049] In some embodiments, the first data model may include a first feature extractor and the first fully connected layer ; Considering that for deep learning models, the feature extractor is usually responsible for extracting representative features from the input, and the fully connected layer is responsible for making decisions and classifications based on these features. In other words, the fully connected layer in the model plays a key role in the output of the model, and in this embodiment, in order to achieve the purpose of data forgetting, as long as the model makes a wrong decision on the sample data. Therefore, by misleadingly adjusting the fully connected layer, the model can achieve decision-making deviation from the true label, thereby achieving the purpose of forgetting the data.

[0050] Based on the above analysis, the first fully connected layer can be retrained according to the sample data and the second sample label to obtain a second fully connected layer. Furthermore, the second data model can be obtained according to the first feature extractor and the second fully connected layer.

[0051] In a general training process, all model parameters will be updated with multiple training iterations. In this embodiment, if a certain sample data needs to be forgotten, there is no need to retrain the first feature extractor, only the first fully connected layer in the first data model needs to be retrained. In other words, the model parameters corresponding to the first feature extractor can be fixed and not involved in the parameter update during retraining. Only the model parameters of the first fully connected layer responsible for the final decision are updated and fine-tuned.

[0052] For example, the first fully connected layer can be retrained with the following objectives:

[0053] Among them, CE is used to characterize the loss function of the classification task (such as the cross entropy loss function). is the sample data, To convert sample data After the data model is input, the prediction result output by the data model is the label predicted by the model. is the second sample label.

[0054] The specific meaning of the above expression is that the first client retrains the first fully connected layer in the local first data model in a way that minimizes the loss function, so that the prediction result of the first data model is As far as possible, the generated virtual misleading second sample label In this way, by adjusting the model parameters of the first fully connected layer, the decision of the adjusted second fully connected layer is offset, so that the wrong decision is made on the sample data that needs to be forgotten, which can effectively achieve learning failure and data forgetting. At the same time, since this embodiment only fine-tunes the first fully connected layer, it does not bring too much additional computing overhead, thereby ensuring the basic efficiency of the federated learning system.

[0055] In step S104, the second data model is sent to the server so that the server determines the target data model according to the second data model.

[0056] After obtaining the second data model, the second data model may be sent to the server, and the server may further perform collaborative training based on the second data model and data models of other clients, thereby obtaining a target data model after collaborative training.

[0057] In addition, the forgetting process in this embodiment is carried out along with training. The performance loss caused by the data forgetting in the previous round through decision offset can be recovered through the next round of data model training, so that the data forgetting scheme in this embodiment can maintain good model performance while forgetting data. It should be noted that this embodiment does not introduce additional iterative training rounds to the original training process, but takes advantage of the characteristics of multiple rounds of repeated training in deep learning, integrates the forgetting operation with the original training process, and maintains good model performance while forgetting data.

[0058] By adopting the above method, a completely random misleading label, i.e., a second sample label, is generated for the forgotten sample data, and then the first data model is retrained according to the sample data and the second sample label, so that the model produces a decision deviation for the forgotten sample data, thereby achieving the effect of learning failure and forgotten data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without too much additional computing overhead, to effectively achieve the learning failure and data forgetting of the model, and effectively guarantee the basic efficiency of federated learning.

[0059] Figure 2 is a flowchart of a model processing method according to an exemplary embodiment. The method can be applied to a server, which is a device corresponding to the federated learning system, such as Figure 2As shown, the method may include the following steps: In step S201, a second data model sent by a first client is received.

[0060] The second data model is obtained by the first client after retraining the first data model according to the sample data and the second sample label. The second sample label is randomly generated according to the sample data, and the second sample label is different from the first sample label corresponding to the sample data.

[0061] In step S202, a target data model is determined according to the second data model.

[0062] In the process of collaborative training of the federated learning system, it is necessary to combine the data models of multiple participants for collaborative training. Therefore, in this step, it is necessary to further obtain multiple third data models corresponding to multiple second clients. Among them, the first client and the second client are both participants corresponding to the server, and each second client corresponds to a third data module. Afterwards, the target data model can be obtained based on the second data model and the multiple third data models.

[0063] In some embodiments, the second data model includes a first feature extractor and a second fully connected layer, and the third data model includes a second feature extractor and a third fully connected layer. Accordingly, according to the second data model and the plurality of third data models, obtaining the target data model may include the following steps: First, a third feature extractor is determined based on the first feature extractor and a plurality of the second feature extractors.

[0064] In this embodiment, since the first feature extractor is not retrained, the feature extractors in the data model sent by multiple clients can be aggregated in an average aggregation manner. That is, the aggregation weight corresponding to each feature extractor is the same. In this step, the first feature extractor and multiple second feature extractors can be averaged and aggregated to obtain the third feature extractor. For example, the aggregation method of the third feature extractor can be expressed by the following expression:

[0065] in, is the third feature extractor, The feature extractors (including a first feature extractor and multiple second feature extractors) sent to multiple clients, k is the number of the multiple clients.

[0066] Specifically, the model parameters corresponding to the first feature extractor and the plurality of second feature extractors may be averaged and aggregated to obtain the model parameters corresponding to the third feature extractor.

[0067] Secondly, a fourth fully connected layer is determined according to the second fully connected layer and the plurality of third fully connected layers.

[0068] In this embodiment, the first fully connected layer is retrained to make the retrained second data model achieve the purpose of decision shift. Therefore, in order to make the adjusted second fully connected layer affect the target data model, the aggregation weight corresponding to the second fully connected layer can be increased, and the enhanced weight can be given to it during aggregation. , According to the actual task performance, the value can be 2, 5, etc.). That is to say, when aggregating the fully connected layer, a non-average aggregation method is adopted. The weight of the second fully connected layer after the decision offset adjustment is larger, so that the target data model can pay more attention to the second fully connected layer, thereby achieving a better data forgetting effect.

[0069] In this step, a first weight corresponding to the second fully connected layer and a second weight corresponding to the third fully connected layer may be determined. The first weight is greater than the second weight. And according to the first weight and the second weight, the second fully connected layer and the plurality of the third fully connected layers are weighted aggregated to obtain the fourth fully connected layer. For example, the aggregation method of the fourth fully connected layer may be expressed by the following expression:

[0070] in, is the fourth fully connected layer, is the first weight corresponding to the second fully connected layer (the third weight corresponding to the third fully connected layer is, for example, 1), is the second fully connected layer, (excluding ) is the third fully connected layer, and k is the number of clients.

[0071] Specifically, the model parameters corresponding to the second fully connected layer and the multiple third fully connected layers may be weightedly aggregated to obtain the model parameters corresponding to the fourth fully connected layer.

[0072] It should be noted that, if the first client includes multiple clients, the first weights corresponding to the second fully connected layers in the multiple first clients may be the same or different.

[0073] Finally, the target data model is obtained according to the third feature extractor and the fourth fully connected layer.

[0074] After obtaining the model parameters corresponding to the third feature extractor and the model parameters corresponding to the fourth fully connected layer, the target data model can be obtained according to the model parameters corresponding to the third feature extractor and the model parameters corresponding to the fourth fully connected layer. For example, the target data model can be expressed as ( , ).

[0075] Similarly, the forgetting process in this embodiment is carried out along with training. The performance loss of the target data model caused by data forgetting through decision offset in the previous round can be recovered through the next round of target data model training, so that the data forgetting scheme in this embodiment can maintain good model performance while forgetting data.

[0076] By adopting the above method, a completely random misleading label, that is, a second sample label, is generated by treating the forgotten sample data, and then the first data model is retrained according to the sample data and the second sample label, so that the model produces a decision offset for the forgotten sample data, thereby achieving the effect of learning failure and forgetting the data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without bringing too much additional computing overhead, to effectively achieve the learning failure and data forgetting of the model, and also effectively guarantee the basic efficiency of federated learning. At the same time, in order to make the second fully connected layer after the decision offset affect the target data model, the aggregation weight corresponding to the second fully connected layer of the first client can be increased, and it can be given a strengthened weight during aggregation to enhance the impact on the target data model, so that the target data model can better forget the sample data.

[0077] Figure 3 is a flow chart of a model processing method according to an exemplary embodiment. Figure 3 As shown, the method may include the following steps: In step S301, the first client obtains sample data to be forgotten and a first sample label corresponding to the sample data.

[0078] In step S302, the first client randomly generates a second sample label according to the sample data.

[0079] The second sample label is different from the first sample label.

[0080] In step S303, the first client retrains the first data model according to the sample data and the second sample label to obtain a second data model.

[0081] In step S304, the first client sends the second data model to the server.

[0082] In step S305, the second client sends the third data model to the server.

[0083] There may be multiple second clients, that is, the third data model may include multiple ones.

[0084] In step S306, the server obtains the target data model according to the second data model and the third data model.

[0085] Regarding the method in the above embodiment, the specific manner in which each step performs the operation has been described in the relevant Figure 1 to Figure 2 The method is described in detail in the embodiments and will not be elaborated here.

[0086] By adopting the above method, a completely random misleading label, that is, a second sample label, is generated by treating the forgotten sample data, and then the first data model is retrained according to the sample data and the second sample label, so that the model produces a decision offset for the forgotten sample data, thereby achieving the effect of learning failure and forgetting the data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without bringing too much additional computing overhead, to effectively achieve the learning failure and data forgetting of the model, and also effectively guarantee the basic efficiency of federated learning. At the same time, in order to make the second fully connected layer after the decision offset affect the target data model, the aggregation weight corresponding to the second fully connected layer of the first client can be increased, and it can be given a strengthened weight during aggregation to enhance the impact on the target data model, so that the target data model can better forget the sample data.

[0087] Figure 4 is a block diagram of a processing device of a model according to an exemplary embodiment, which is applied to a first client, such as Figure 4 As shown, the device 400 includes: An acquisition module 401 is used to acquire sample data to be forgotten and a first sample label corresponding to the sample data; A generating module 402, configured to randomly generate a second sample label according to the sample data; the second sample label is different from the first sample label; A training module 403, configured to retrain the first data model according to the sample data and the second sample label to obtain a second data model; The sending module 404 is used to send the second data model to the server so that the server determines the target data model according to the second data model.

[0088] Optionally, the first data model includes a first feature extractor and a first fully connected layer; the training module 403 is used to retrain the first fully connected layer according to the sample data and the second sample label to obtain a second fully connected layer; and obtain the second data model according to the first feature extractor and the second fully connected layer.

[0089] By adopting the above method, a completely random misleading label, i.e., a second sample label, is generated for the forgotten sample data, and then the first data model is retrained according to the sample data and the second sample label, so that the model produces a decision deviation for the forgotten sample data, thereby achieving the effect of learning failure and forgotten data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without too much additional computing overhead, to effectively achieve the learning failure and data forgetting of the model, and effectively guarantee the basic efficiency of federated learning.

[0090] Figure 5 is a block diagram of a processing device of a model according to an exemplary embodiment, which is applied to a server, such as Figure 5 As shown, the device 500 includes: The receiving module 501 is used to receive a second data model sent by the first client; wherein the second data model is obtained by the first client after retraining the first data model according to the sample data and the second sample label, the second sample label is randomly generated according to the sample data, and the second sample label is different from the first sample label corresponding to the sample data; The determination module 502 is used to determine a target data model according to the second data model.

[0091] Optionally, the determination module 502 is used to obtain multiple third data models corresponding to multiple second clients; and obtain the target data model according to the second data model and the multiple third data models.

[0092] Optionally, the second data model includes a first feature extractor and a second fully connected layer, and the third data model includes a second feature extractor and a third fully connected layer; the determination module 502 is used to determine the third feature extractor based on the first feature extractor and multiple second feature extractors; determine the fourth fully connected layer based on the second fully connected layer and multiple third fully connected layers; and obtain the target data model based on the third feature extractor and the fourth fully connected layer.

[0093] Optionally, the determination module 502 is used to determine a first weight corresponding to the second fully connected layer and a second weight corresponding to the third fully connected layer; the first weight is greater than the second weight; and according to the first weight and the second weight, the second fully connected layer and multiple third fully connected layers are weightedly aggregated to obtain the fourth fully connected layer.

[0094] By using the above-mentioned device, a completely random misleading label, that is, a second sample label, is generated by treating the forgotten sample data, and then the first data model is retrained according to the sample data and the second sample label, so that the model produces a decision offset for the forgotten sample data, thereby achieving the effect of learning failure and forgotten data. Afterwards, the retrained second data model is sent to the server, and the server determines the target data model after collaborative learning with other clients based on the second data model. In this way, only a small amount of data processing is required, without bringing too much additional computing overhead, to effectively achieve the learning failure and data forgetting of the model, and also effectively guarantee the basic efficiency of federated learning. At the same time, in order to make the second fully connected layer after the decision offset have an impact on the target data model, the aggregation weight corresponding to the second fully connected layer of the first client can be increased, and it can be given a strengthened weight during aggregation to enhance the impact on the target data model, so that the target data model can better forget the sample data.

[0095] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0096] Figure 6 FIG. 6 is a block diagram of an electronic device 600 according to an exemplary embodiment. Figure 6 As shown, the electronic device 600 may include: a first processor 601 , a first memory 602 . The electronic device 600 may also include one or more of a multimedia component 603 , an input / output (I / O) interface 604 , and a first communication component 605 .

[0097] The first processor 601 is used to control the overall operation of the electronic device 600 to complete all or part of the steps in the above-mentioned model processing method. The first memory 602 is used to store various types of data to support the operation of the electronic device 600, and these data may include instructions for any application or method used to operate on the electronic device 600, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The first memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 603 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the first memory 602 or sent through the first communication component 605. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 604 provides an interface between the first processor 601 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The first communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding first communication component 605 may include: Wi-Fi module, Bluetooth module, NFC module.

[0098] In an exemplary embodiment, the electronic device 600 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned model processing method.

[0099] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the first processor, the steps of the above-mentioned model processing method are implemented. For example, the computer-readable storage medium can be the above-mentioned first memory 602 including program instructions, and the above-mentioned program instructions can be executed by the first processor 601 of the electronic device 600 to complete the above-mentioned model processing method.

[0100] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a second processor. When the computer program is executed by the second processor, the steps of the above-mentioned model processing method are implemented.

[0101] Figure 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. For example, the electronic device 700 may be provided as a server. Figure 7 The electronic device 700 includes a second processor 722, which may be one or more, and a second memory 732 for storing a computer program executable by the second processor 722. The computer program stored in the second memory 732 may include one or more modules each corresponding to a set of instructions. In addition, the second processor 722 may be configured to execute the computer program to perform the above-mentioned model processing method.

[0102] In addition, the electronic device 700 may further include a power supply component 726 and a second communication component 750, the power supply component 726 may be configured to perform power management of the electronic device 700, and the second communication component 750 may be configured to implement communication of the electronic device 700, for example, wired or wireless communication. In addition, the electronic device 700 may further include an input / output (I / O) interface 758. The electronic device 700 may operate based on an operating system stored in the second memory 732, such as Windows Server 2000. TM , Mac OS X TM , Unix TM , Linux TM etc.

[0103] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the second processor, the steps of the above-mentioned model processing method are implemented. For example, the computer-readable storage medium can be the above-mentioned second memory 732 including program instructions, and the above-mentioned program instructions can be executed by the second processor 722 of the electronic device 700 to complete the above-mentioned model processing method.

[0104] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a second processor. When the computer program is executed by the second processor, the steps of the above-mentioned model processing method are implemented.

[0105] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0106] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0107] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A method for processing a model, characterized in that: Applied to a first client, the method includes: Obtaining sample data to be forgotten and a first sample label corresponding to the sample data; Randomly generate a second sample label according to the sample data; the second sample label is different from the first sample label; Retraining the first data model according to the sample data and the second sample label to obtain a second data model; The second data model is sent to a server so that the server determines a target data model according to the second data model.

2. The method according to claim 1, characterized in that: The first data model includes a first feature extractor and a first fully connected layer; and retraining the first data model according to the sample data and the second sample label to obtain the second data model includes: Retraining the first fully connected layer according to the sample data and the second sample label to obtain a second fully connected layer; The second data model is obtained according to the first feature extractor and the second fully connected layer.

3. A model processing method, characterized in that: Applied to a server, the method comprises: Receive a second data model sent by the first client; wherein the second data model is obtained by the first client retraining the first data model according to the sample data and the second sample label, the second sample label is randomly generated according to the sample data, and the second sample label is different from the first sample label corresponding to the sample data; A target data model is determined according to the second data model.

4. The method according to claim 3, characterized in that Determining the target data model according to the second data model includes: Acquire multiple third data models corresponding to the multiple second clients; The target data model is obtained according to the second data model and the plurality of third data models.

5. The method according to claim 4, characterized in that The second data model includes a first feature extractor and a second fully connected layer, and the third data model includes a second feature extractor and a third fully connected layer; and obtaining the target data model according to the second data model and the plurality of third data models includes: Determine a third feature extractor according to the first feature extractor and a plurality of the second feature extractors; Determine a fourth fully connected layer according to the second fully connected layer and the plurality of third fully connected layers; The target data model is obtained according to the third feature extractor and the fourth fully connected layer.

6. The method according to claim 5, characterized in that The determining of the fourth fully connected layer according to the second fully connected layer and the plurality of third fully connected layers comprises: Determine a first weight corresponding to the second fully connected layer and a second weight corresponding to the third fully connected layer; the first weight is greater than the second weight; The second fully connected layer and the plurality of the third fully connected layers are weightedly aggregated according to the first weight and the second weight to obtain the fourth fully connected layer.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the program implements the steps of the method described in claim 1 or 2, or implements the steps of the method described in any one of claims 3 to 6.

8. An electronic device, characterized in that: include: a first memory having a computer program stored thereon; A first processor is used to execute the computer program in the first memory to implement the steps of the method according to claim 1 or 2.

9. A server, characterized in that: include: a second memory having a computer program stored thereon; A second processor is used to execute the computer program in the second memory to implement the steps of the method according to any one of claims 3 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to claim 1 or 2, or implements the steps of the method according to any one of claims 3 to 6.