Federated learning model forgetting method, sharded prediction aggregation method, and related apparatuses

CN116662805BActive Publication Date: 2026-09-11XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310594710.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2026-09-11
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

然而,实现完全删除用户数据在联邦学习场景中较困难,因为用户数据已被用于训练联邦学习模型,即使用户持有者已删除用户数据,但是这些数据对联邦学习模型产生的影响仍然存在,从而使用户面临严重的隐私泄露风险,更甚者会暴露用户个人信息

Benefits of technology

[0035]The federated learning model forgetting method of the present invention includes: determining a first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset; deleting the forgotten data from the first data group to obtain a second data group; retraining the initial model using the second data group to obtain a first data model; and obtaining a forgotten federated learning model based on the first data model. This ensures that user data is completely forgotten, and is time-efficient and highly effective.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662805B_ABST
    Figure CN116662805B_ABST
Patent Text Reader

Abstract

The application provides a federated learning model forgetting method, a fragmented prediction aggregation method and related devices. The federated learning model forgetting method comprises the following steps: determining a first data group corresponding to forgetting data, wherein the first data group is obtained after grouping training data sets; deleting the forgetting data from the first data group to obtain a second data group; retraining an initial model by using the second data group to obtain a first data model; and obtaining a forgetting federated learning model based on the first data model. In this way, the user data can be completely forgotten, and the time consumption is low and the efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of information security technology and relates to a federated learning model forgetting method, a fragmented prediction aggregation method, and related devices. Background Technology

[0002] With the enactment of laws and regulations such as the Data Security Law, user data holders should guarantee the "right to have their personal data forgotten," meaning they must completely delete user data upon request. However, achieving complete deletion of user data is difficult in federated learning scenarios because the user data has already been used to train the federated learning model. Even if the user holder has deleted the data, its impact on the model remains, exposing users to serious privacy risks, and potentially even exposing their personal information. The most fundamental solution is for the data holder to remove the samples requested for deletion from the training dataset and then retrain a new federated learning model using the remaining samples. However, the time and computational resources required for this method are often prohibitive for the federated learning participants. Existing federated learning forgetting methods mostly prioritize forgetting rate and model accuracy, but cannot guarantee the complete forgetting of user data. Summary of the Invention

[0003] This invention provides a federated learning model forgetting method, data processing method, and related apparatus, which can ensure that user data is completely forgotten, and consumes little time and is highly efficient.

[0004] In a first aspect, the present invention provides a federated learning model forgetting method, comprising: determining a first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset; deleting the forgotten data from the first data group to obtain a second data group; retraining an initial model using the second data group to obtain a first data model; and obtaining a federated learning model after forgetting based on the first data model.

[0005] Prior to the step of determining the first data group corresponding to the forgotten data, the following steps are included:

[0006] The training dataset for each client is divided into n first data groups;

[0007] The initial model is trained using n first data sets to obtain n second data models corresponding to the client.

[0008] Extract a second data model from each of the n clients, and aggregate the extracted second data models to obtain n initial federated learning models.

[0009] The step of retraining the initial model using the second data set to obtain the first data model includes:

[0010] The second data set is processed using multiple feature processing units to obtain the processing result;

[0011] The initial model is trained using the processing results to obtain the first data model;

[0012] Each feature processing unit includes a feature extractor, a first forgetting layer, and a second forgetting layer; the first forgetting layer is connected to the output of the feature extractor, and the second forgetting layer is connected to the first forgetting layer and the input of the next feature extractor.

[0013] Among them, the federated learning models obtained after forgetting based on the first data model include:

[0014] The first data model is used to replace the predetermined second data model, and the first data model is aggregated with the remaining second data models to obtain the forgotten federated learning model;

[0015] The predetermined second data model is obtained by training on a first data set before the forgotten data is deleted.

[0016] Secondly, the present invention provides a method for fragmented prediction aggregation of a federated learning model, comprising:

[0017] The federated learning model is used to process the data to be processed, resulting in n confidence levels. The federated learning model includes a forgotten federated learning model or an initial federated learning model. The forgotten federated learning model includes m first data models and nm second data models. The initial federated learning model includes n second data models. The forgotten federated learning model is obtained through the above method, and the initial federated learning model is obtained through the above method.

[0018] Aggregate the n confidence scores to obtain the sharded prediction aggregation result.

[0019] The step of aggregating n confidence scores to obtain the fragmented prediction aggregation result of the data to be processed includes:

[0020] The n confidence scores are aggregated using the following formula (1) to obtain the fragmented prediction aggregation result:

[0021]

[0022] Where Xi is the i-th confidence level.

[0023] Thirdly, the present invention provides a forgetting device for a federated learning model, comprising:

[0024] The localization module is used to determine the first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset;

[0025] A deletion module is used to delete the forgotten data from the first data group to obtain a second data group;

[0026] The training module is used to retrain the initial model using the second set of data to obtain the first data model.

[0027] The forgetting module is used to obtain a federated learning model after forgetting based on the first data model.

[0028] Fourthly, the present invention provides a fragmented prediction aggregation apparatus for a federated learning model, characterized in that it comprises:

[0029] The processing module is used to process the data to be processed using a federated learning model to obtain n confidence scores. The federated learning model includes a forgotten federated learning model or an initial federated learning model. The forgotten federated learning model includes m first data models and nm second data models. The initial federated learning model includes n second data models. The forgotten federated learning model is obtained by the above method, and the initial federated learning model is obtained by the above method.

[0030] The aggregation module is used to aggregate n confidence scores to obtain sharded prediction aggregation.

[0031] Fifthly, the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0032] The memory is used to store computer programs;

[0033] When the processor executes the program stored in the memory, it implements any of the steps described above.

[0034] In a sixth aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the steps described above.

[0035] The federated learning model forgetting method of the present invention includes: determining a first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset; deleting the forgotten data from the first data group to obtain a second data group; retraining the initial model using the second data group to obtain a first data model; and obtaining a forgotten federated learning model based on the first data model. This ensures that user data is completely forgotten, and is time-efficient and highly effective. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the first embodiment of the federated learning model forgetting method of the present invention;

[0037] Figure 2 This is a schematic diagram of the structure of an embodiment of the federated learning model training method of the present invention;

[0038] Figure 3 yes Figure 2 A flowchart;

[0039] Figure 4 This is a schematic diagram of the feature extraction process of the present invention;

[0040] Figure 5 This is a schematic diagram of the structure of an embodiment of the forgetting device for the federated learning model of the present invention;

[0041] Figure 6 This is a schematic diagram of a structure of an embodiment of the fragmented prediction aggregation device of the federated learning model of the present invention;

[0042] Figure 7 This is a schematic diagram of the structure of an embodiment of the electronic device of the present invention. Detailed Implementation

[0043] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The foregoing and other technical contents, features, and effects of the present invention will be clearly presented in the following detailed description of the specific embodiments with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention. The accompanying drawings are for reference and illustration only and are not intended to limit the technical solutions of the present invention.

[0044] Please see Figure 1 This is a flowchart illustrating the first embodiment of the forgetting method for the federated learning model of the present invention.

[0045] Step S1: Determine the first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset.

[0046] Step S2: Delete the forgotten data from the first data group to obtain the second data group.

[0047] Step S3: Retrain the initial model using the second data set to obtain the first data model.

[0048] Step S4: Obtain the federated learning model after forgetting based on the first data model.

[0049] The learning model forgetting method of this invention is based on a pre-trained model. Please refer to [the relevant documentation / contact information]. Figure 2 The procedure before step S1 also includes:

[0050] Step S21: Divide the training dataset of each client into n first data groups.

[0051] Please see Figure 3 Divide the training dataset D in each client into n parts to obtain n first data groups, denoted as D. A1 D A2 ... D An The training dataset consists of user data, such as images.

[0052] It is understandable that the training dataset can be divided into groups equally or not; there are no specific restrictions.

[0053] Step S22: Train the initial model using n first data sets to obtain n second data models corresponding to the client.

[0054] Please see Figure 3 The initial model is trained using the first set of data to obtain n second data models corresponding to the client, denoted as M. A1 M A2 ...M An Specifically, using the first data set D A1 The initial model is trained to obtain a second data model M. A1 Using the first data set D A2 The initial model is trained to obtain a second data model M. A2 Using the first data set D An The initial model is trained to obtain a second data model M. An And so on, until n second data models are obtained.

[0055] Specifically, by performing this operation on each client using the above steps S21 and S22, each client will have n second data models.

[0056] Step S23: Extract a second data model from each of the n clients, and aggregate the extracted second data models to obtain the initial federated learning model corresponding to each of the n clients.

[0057] Please see Figure 3 Extract a second data model from each of the n clients, and aggregate the extracted second data models to obtain n initial federated learning models.

[0058] In one embodiment, the second data models at corresponding locations in each client are aggregated. For example, the second data model M in client A is aggregated. A1 The second data model M in client B B1 And the second data model M in client C C1 Aggregation is performed to obtain an initial federated learning model F1; the second data model M in client A is then used. A2 The second data model M in client B B2 And the second data model M in client C C2 Aggregation is performed to obtain an initial federated learning model F2; the second data model M in client A is then used. An The second data model M in client B Bn And the second data model M in client C Cn By aggregating the data, we obtain an initial federated learning model F. n The central server will initialize the federated learning models F1, F2...F... n This is sent to each client. That is, each client has n initial federated learning models F1, F2...F... n .

[0059] If you need to delete user data when using the model after training is complete, then... Figure 1 The process is shown below.

[0060] Specifically, in step S1, the forgotten data refers to the user data that needs to be deleted. At this point, it is determined which first data group D contains the forgotten data. A1 D A2 ... D An In step S2, if forgotten data is in the first data group D... A1 Then, from the first data group D A1Forgotten data is removed, and the remaining data forms a second data group. In step S3, the initial model is trained using the remaining data, i.e., the second data group, to obtain a first data model. For example, the first data model is denoted as M. In step S4, the forgotten federated learning model is obtained based on the first data model M. Both the first data model and the other second data models are derived from grouping the training dataset. Compared to the entire training dataset, the grouping strategy can significantly reduce the size of the training dataset, thereby saving training time and resources.

[0061] Specifically, the first data model is used to replace the predetermined second data model, and the first data model is aggregated with the remaining second data models to obtain a forgotten federated learning model; the predetermined second data model is obtained by training on a first data set before deleting the forgotten data. For example, the first data model is obtained from the first data set D. A1 After removing forgotten data, a second set of data was obtained and trained on the initial model. Therefore, the second data model M was replaced with the first data model. A1 Then, it is aggregated with the remaining second data models to obtain the corresponding post-forgotten federated learning model. For example, in Figure 2 During the model training process shown, the second data model M in client A is used. A1 The second data model M in client B B1 And the second data model M in client C C1 By aggregating the data, we obtain an initial federated learning model F1; then in Figure 1 During the model forgetting process shown, the second data model M in client A is replaced by the first data model M. A1 Then, with the second data model M in client B. B1 And the second data model M in client C C1 The models are aggregated to obtain a federated learning model F1 after forgetting.

[0062] In step S3, retraining the initial model using the second data set includes processing the second data set using multiple feature processing units to obtain processing results; training the initial model using the processing results to obtain the first data model; wherein each feature processing unit includes a feature extractor and a first forgetting layer and a second forgetting layer; the first forgetting layer is connected to the output of the feature extractor, and the second forgetting layer is connected to the first forgetting layer and the input of the next feature extractor.

[0063] In this invention, a "forgetting strategy" is adopted when retraining the initial model using the second data set. That is, the initial model with the first forgetting layer and the second forgetting layer is retrained using the second data set. During the training process, all other training layers except the first forgetting layer, the second forgetting layer, and the FC layer are frozen, so that the retraining of the second data set only applies to all forgetting layers and FC layers, thereby saving training time and training parameters, and obtaining the first data model.

[0064] The method of this invention addresses the issue that grouping the training dataset during training reduces its size, leading to a significant drop in model accuracy. To resolve this, a pre-trained model is introduced (the model is first trained on a large, general-purpose dataset). Increasingly, downstream training tasks are based on pre-trained models, ensuring the model has sufficient representational power to train an excellent model with only a small number of samples. Furthermore, by "freezing" the pre-trained network, the number of parameters the model needs to learn is greatly reduced, thus shortening retraining time.

[0065] Existing methods involve adding an adapter after the frozen backbone and before prediction. These adapters can learn to achieve good prediction results, and ensemble voting with a sufficient number of adapters can improve prediction accuracy. However, simply adding an adapter after the frozen backbone and before prediction is insufficient because it cannot truly learn the samples thoroughly.

[0066] This invention proposes a method to address the accuracy degradation caused by freezing the pre-trained backbone network through model layer addition. In short, this invention includes multiple feature processing units, each comprising a feature extractor, a first forgetting layer, and a second forgetting layer. (See also...) Figure 4 Layer 1 and Layer 2 are feature extractors, each consisting of four convolutional layers, all of which are 3x3 convolutional layers with k=3, s=1, and p=1. The first and second forgetting layers form the feature experts, and both are 1x1 convolutional layers with k=3, s=1, and p=0. Before the feature extractor Layer 1, there are also 7x7 convolutional layers with k=7, s=2, and p=3, and a max-pooling layer. The avgpool and fc layers following the feature extractor Layer 2 are the output processing layers of the federated learning model. The first and second forgetting layers are used to learn more fully from the client's data, improving the effectiveness of the feature extractor and enabling it to specifically learn from the client's samples. For details, please refer to [link to relevant documentation]. Figure 2Specifically, the first forgetting layer is connected to the output of the feature extractor, and the second forgetting layer is connected to both the first forgetting layer and the input of the next feature extractor. Most models in recent years have adopted the residual connection method proposed by ResNet, so the concept of residuals is also introduced into the layers added in this method. Furthermore, to ensure that the number of channels does not change when adding layers, this method suggests using two forgetting layers. The first forgetting layer increases the number of channels, and the second forgetting layer restores the number of channels.

[0067] The federated learning model forgetting method of the present invention can reduce the number of samples to be retrained: if no grouping is performed, then once a client deletes data, in order to achieve the privacy protection requirement of complete forgetting, the entire large federated learning model must be retrained. However, after adopting the grouping strategy of the present invention, the entire federated learning framework trains multiple small federated learning models. When a client deletes data, it is only necessary to determine the data group to which it belongs (confirming the location is very simple), then remove the data, and retrain the small federated learning model to which it belongs.

[0068] Theoretically, if the client divides the training dataset D into n parts, then retraining the small federated learning model only takes 1 / n of the time. However, reducing the number of retraining samples leads to a significant drop in model accuracy. This invention, however, uses the idea of ​​transfer learning to perfectly solve this problem. It first pre-trains the model on a general large dataset (such as ImageNet), so that the model can be trained with a small amount of data to achieve a high accuracy.

[0069] This invention also reduces the number of parameters required for retraining: by freezing the pre-trained backbone network and using it as a feature extractor, the federated model learns only a very small number of parameters, thus saving time. This invention adds a first forgetting layer and a second forgetting layer after the feature extractor, maximizing the role of the feature extractor and learning more fully from the client's data, thereby significantly improving the final accuracy of the federated model. Another advantage of freezing the backbone network is that it reduces the communication cost between the client and the central server. Because the backbone network is frozen, fewer parameters are forgotten each time, requiring only interaction with the central server to retrieve the forgotten parameters, thus greatly reducing communication overhead. This is especially important given the large number of federated learning models built in this framework, which leads to a sharp increase in communication volume and costs; however, freezing the backbone network solves this problem.

[0070] The method of the present invention can also reduce traffic consumption: assuming that the size of the first forgetting layer and the second forgetting layer is X1, and the size of the federated learning model is X2, generally X2>10*X1; assuming the number of clients is N. It can be obtained that: for the federated learning pre-training model in which the feature expert is added and the backbone is frozen, the amount of communication parameters M1 = N*X1 each time when communicating with the central server; for the federated learning pre-training model in which the backbone is not frozen, the amount of communication parameters M2 = X2 each time when communicating with the central server. Under the assumption, when N ≤ 10, M1 < M2 holds, so the traffic consumption of the present invention will be less than or equal to that under the traditional federated learning framework.

[0071] The present invention also provides a sharded prediction aggregation method for a federated learning model. Specifically, the federated learning model is used to process data to be processed to obtain n confidence levels, wherein the federated learning model comprises a forgotten federated learning model or an initial federated learning model; the forgotten federated learning model comprises m first data models and n-m second data models; the initial federated learning model comprises n second data models; the forgotten federated learning model is obtained through the above-mentioned Figure 1 obtaining step, and the initial federated learning model is obtained through the above-mentioned Figure 2 obtaining step; the n confidence levels are aggregated to obtain a sharded prediction aggregation result. The data to be processed is user data, for example, the user data is an image.

[0072] For example, in one aspect of the present invention, the Figure 1 obtained forgotten federated learning model can be used to perform sharded prediction aggregation processing on data to be processed, then n confidence levels are obtained, and the n confidence levels are aggregated to obtain the sharded prediction aggregation result of the data to be processed.

[0073] In another aspect of the present invention, the Figure 2 obtained initial federated learning model can be used to perform sharded prediction aggregation processing on data to be processed, then n confidence levels are obtained, and the n confidence levels are aggregated to obtain the sharded prediction aggregation result of the data to be processed.

[0074] Specifically, each client has n federated learning models. A prediction image is input into the n models of the client, each model will give a confidence level for the image, and n multi-dimensional confidence levels are obtained. Aggregation voting is performed on the n multi-dimensional confidence levels, and the formal expression of the specific method is shown in the following formula (1):

[0075]

[0076] wherein Xi is the confidence vector output by each model, and the function f represents the label corresponding to the maximum value of the vector after summation and averaging, that is, ylabel.

[0077] Please refer to Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the federated learning model forgetting device of the present invention, specifically including: a localization module 51, a deletion module 52, a training module 53, and a forgetting module 54. The localization module 51 is used to determine the first data group corresponding to the forgotten data, wherein the first data group is obtained by grouping the training dataset. The deletion module 52 is used to delete the forgotten data from the first data group to obtain a second data group. The training module 53 is used to retrain the initial model using the second data group to obtain a first data model; the forgetting module 54 is used to obtain a forgotten federated learning model based on the first data model.

[0078] Please see Figure 6 This is a schematic diagram of an embodiment of a fragmented prediction aggregation device for a federated learning model, specifically including: a processing module 61 and an aggregation module 62. The processing module 61 is used to process the data to be processed using a federated learning model to obtain n confidence levels. The federated learning model includes a forgotten federated learning model or an initial federated learning model; the forgotten federated learning model includes m first data models and nm second data models; the initial federated learning model includes n second data models; the forgotten federated learning model is obtained through the above... Figure 1 The initial federated learning model is obtained through the above... Figure 2 The aggregation module 62 is used to aggregate n confidence levels to obtain the sharded prediction aggregation result.

[0079] This invention also provides an electronic device, such as... Figure 7 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0080] The memory is used to store computer programs;

[0081] When the processor executes the program stored in the memory, it implements any of the method-based steps provided in the first aspect of the present invention.

[0082] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0083] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0084] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0085] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0086] The method provided in this invention can be applied to electronic devices. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. No limitation is made herein; any electronic device that can implement this invention falls within the protection scope of this invention.

[0087] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the Ethereum smart contract transaction defect detection methods based on No GIL parallelism provided in the first aspect of this invention.

[0088] For the embodiments of the device / electronic device / storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments.

[0089] It should be noted that the electronic device and storage medium of the present invention can implement all the above-described methods and embodiments, and can achieve the same or similar beneficial effects.

[0090] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0091] The above are merely implementation methods of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A forgetting method for a federated learning model to ensure complete forgetting of user data, characterized in that, include: The training dataset in each client is divided into n parts, resulting in n first data groups; The training dataset is user data, and the user data consists of images; The initial model of the corresponding client is trained using n first data sets of each client, so that each client has n second data models; A second data model at the same position is extracted from each of the n clients, and the n extracted second data models at the same position are aggregated in the central server to obtain an initial federated learning model. The central server sends the initial federated learning model to each client, and each client eventually has a total of n initial federated learning models. When user data needs to be deleted, the first data group containing the forgotten data is determined, wherein the first data group is obtained by grouping the training dataset; the forgotten data is the user data that needs to be deleted. The forgotten data is deleted from the first data group, and the remaining data forms the second data group; The initial model is retrained using a second set of data to obtain a first data model. Specifically, this includes: processing the second set of data using multiple feature processing units to obtain processing results; and retraining the initial model using the processing results to obtain the first data model. Each feature processing unit includes a feature extractor, a first forgetting layer, and a second forgetting layer. The first forgetting layer increases the number of channels, and the second forgetting layer restores the number of channels. The first forgetting layer is connected to the output of the feature extractor, and the second forgetting layer is connected to both the first forgetting layer and the input of the next feature extractor. During retraining, all training layers in the initial model except for the first forgetting layer, the second forgetting layer, and the fully connected (FC) layer are frozen; only the parameters of the first forgetting layer, the second forgetting layer, and the FC layer are updated. The first data model is used to replace the second data model corresponding to the first data group containing the forgotten data. The first data model and the second data models corresponding to the other first data groups that belong to the same position as the first data group containing the forgotten data are aggregated to obtain the federated learning model after forgetting. The second data model is trained based on the first data group before the forgotten data was deleted.

2. A method for fragmented prediction aggregation in a federated learning model, characterized in that, include: The federated learning model is used to process the data to be processed to obtain n confidence levels. The federated learning model includes a forgotten federated learning model or an initial federated learning model. The forgotten federated learning model includes m first data models and nm second data models. The initial federated learning model includes n second data models. The forgotten federated learning model and the initial federated learning model are obtained by claim 1 above. Aggregate the n confidence scores to obtain the sharded prediction aggregation result.

3. The fragmented prediction aggregation method according to claim 2, characterized in that, The step of aggregating n confidence scores to obtain the fragmented prediction aggregation result includes: The n confidence scores are aggregated using the following formula (1) to obtain the fragmented prediction aggregation result: (1); Where Xi is the i-th confidence level.

4. A forgetting device for a federated learning model to ensure complete forgetting of user data, characterized in that, include: The localization module is used to divide the training dataset in each client into n parts, resulting in n first data groups; The training dataset is user data, specifically images. Each client's initial model is trained using n first data groups, resulting in n second data models for each client. A second data model at the same location is extracted from each of the n clients, and these n extracted second data models at the same location are aggregated at the central server to obtain an initial federated learning model. The central server then sends this initial federated learning model to each client, resulting in n initial federated learning models for each client. When user data needs to be deleted, the first data group containing the forgotten data is determined. This first data group is obtained by grouping the training dataset. The forgotten data refers to the user data to be deleted. The deletion module is used to delete the forgotten data from the first data group, and the remaining data forms the second data group; A training module is used to retrain an initial model using a second set of data to obtain a first data model. Specifically, it includes: processing the second set of data using multiple feature processing units to obtain processing results; and retraining the initial model using the processing results to obtain the first data model. Each feature processing unit includes a feature extractor, a first forgetting layer, and a second forgetting layer. The first forgetting layer is connected to the output of the feature extractor, and the second forgetting layer is connected to the first forgetting layer and the input of the next feature extractor. During retraining, all training layers in the initial model except for the first forgetting layer, the second forgetting layer, and the fully connected (FC) layer of the initial model are frozen, and only the parameters of the first forgetting layer, the second forgetting layer, and the FC layer are updated. The forgetting module is used to replace the second data model corresponding to the first data group containing the forgotten data with the first data model, and to aggregate the first data model and the second data models corresponding to the other first data groups that belong to the same position as the first data group containing the forgotten data to obtain the forgotten federated learning model.

5. A fragmented prediction aggregation device for a federated learning model, characterized in that, include: A processing module is used to process the data to be processed using a federated learning model to obtain n confidence levels. The federated learning model includes a forgotten federated learning model or an initial federated learning model. The forgotten federated learning model includes m first data models and nm second data models. The initial federated learning model includes n second data models. The forgotten federated learning model and the initial federated learning model are obtained through the above claim 1. The aggregation module is used to aggregate n confidence scores to obtain the sharded prediction aggregation result.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in claim 1.

Citation Information

Patent Citations

  • Knowledge tracking method and system based on federated learning

    CN111461442A

  • Recommendation model updating method, recommendation model training method and computing equipment

    CN115098771A