A forgetting learning method, system, device and medium for local client model training

By distributing the global model to the client for initialization and privacy label allocation in federated learning, optimizing the model using the binary cross-entropy loss function, and iteratively updating it using the client's local dataset, the problems of high computational cost and low accuracy in federated forgetting learning are solved, achieving efficient and accurate forgetting training.

CN122132913APending Publication Date: 2026-06-02THE ACAD OF TIANJIN UNIV HEFEI +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
THE ACAD OF TIANJIN UNIV HEFEI
Filing Date
2026-02-13
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing federated forgetting learning research is computationally expensive in multi-client scenarios, and existing methods are computationally costly, difficult to implement the forgetting process, and have low accuracy.

Method used

By distributing the global model to the client, initializing the model and assigning privacy labels, optimizing the client model using the binary cross-entropy loss function, and iteratively updating it using the client's local forgetting dataset, the client model can be trained using forgetting methods.

Benefits of technology

It improves the efficiency and accuracy of forgetting learning, protects data privacy, achieves a balance between personalization and globalization, and simplifies the achievement of forgetting goals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132913A_ABST
    Figure CN122132913A_ABST
Patent Text Reader

Abstract

This invention relates to the field of machine learning technology and discloses a forgetting learning method, system, device, and medium for local client-side model training. The method includes: distributing a global model to clients participating in federated learning to obtain client-side models; initializing the client-side models to obtain initial client-side models and assigning privacy labels to the training data to obtain privacy-labeled data; calculating the binary cross-entropy loss function value of the initial client-side models; updating and optimizing the initial client-side models based on the binary cross-entropy loss function value to obtain a target client-side model; aggregating the target client-side models to obtain an aggregated global model; and iteratively updating the aggregated global model to obtain the target global model. This invention can improve the efficiency and accuracy of forgetting learning training for client-side models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, specifically to a forgetting learning method, system, device, and medium for local client-side model training. Background Technology

[0002] Federated learning is a novel machine learning paradigm that enables numerous clients, such as smartphones, IoT devices, and edge devices, to collaboratively learn machine learning models. The setup for federated learning is a network of clients connected to a server, aiming to build a global model from client data in a privacy-preserving and efficient communication manner. Federated learning primarily performs the following three steps in each round: the server broadcasts the current global model to some or all clients; each client fine-tunes the global model using its local training data and reports its model update to the server; the server aggregates the models uploaded by the clients according to certain aggregation rules and uses the aggregated model to update the global model. The updated global model is then broadcast to the next round of participating clients, and this process is repeated until the global model converges.

[0003] Machine forgetting learning refers to the ability of machine learning models to selectively eliminate sensitive information acquired during training. Existing research on machine forgetting learning can be divided into two main categories: Centralized Machine Unlearning (CMU) and Federated Machine Unlearning (FMU), also known as Federated Unlearning (FU). The goal of both is to enable users to autonomously erase data that does not need to be used for training.

[0004] Most existing research on machine forgetting learning focuses on centralized machine forgetting learning (CMU), which involves first collecting all training data samples on a server, and then having users request the removal of specific samples from the training model to "forget" them. This is an efficient, practical, and convenient approach. However, in complex scenarios with multiple clients, federated learning (FL), as a distributed machine learning framework, is more effective and practical. Furthermore, because the server cannot access the data voluntarily erased by participants in federated learning, federated machine forgetting learning (FMU) emerged. Federated machine forgetting learning supports collaborative training of machine learning (ML) models across multiple parties. By storing data locally, it prevents privacy breaches that could occur if data were directly uploaded to the server. Instead of using raw data directly from users' local machines as in centralized learning, federated learning aggregates model parameters uploaded by local users, incrementally trains the model through multiple rounds to build a global model, and then distributes the global model to clients for local training.

[0005] Existing research on federated forgetting learning typically assumes that all data to be deleted belongs to a single client, meaning the goal of forgetting is to eliminate the historical contributions of a particular client to the global model training. However, from a privacy perspective, this does not align with the evolving trend of the right to forget, where each user can request the removal of their personal data from the system within a reasonable timeframe. An intuitive approach to implementing forgetting learning is to retrain the model from scratch after deleting specific data. However, according to legislation regarding the right to forget, each client needs its own forgetting capability, requiring solutions to handle forgetting requests from multiple clients. This results in a massive retraining process, necessitating the re-participation of all clients in the federated learning process, and demanding enormous computational resources and capabilities. In short, this approach is computationally expensive, and having the same group of clients participate in the retraining process multiple times is impractical.

[0006] Patent document CN120471190A discloses a prototype-based federated forgetting learning method, including: obtaining the local prototype (as the target prototype) and forgetting request calculated when the target client is about to exit the initial federated learning training phase; interrupting the aggregation process of the federated learning training phase and entering the forgetting phase according to the forgetting request; in the forgetting phase, the remaining clients adopt a model forgetting strategy based on the target prototype to eliminate the influence of the target client's data on the local models of the remaining clients, and introducing a global prototype to perform model recovery training on the local prototype after the influence is eliminated; obtaining the local models of the remaining clients after recovery training and aggregating them to obtain the reconstructed global model, and resuming the initial federated learning training phase according to the reconstructed global model. This method can realize the client's forgetting needs without affecting the performance of the global model, effectively protecting data privacy. This document uses the standard cross-entropy loss function (multi-objective classification), but this idea, while maintaining the original model's predictive performance on local data, maximizes the difference between the local prototype and the target prototype to guide the model to forget the target client's data. It requires calculating the similarity between the local prototype, the target prototype, and the global prototype, resulting in a complex architecture, high computational cost, and difficulty in implementing the forgetting process. The accuracy is relatively low.

[0007] Patent document CN116522007A discloses a data forgetting learning method for recommender system models, including the following steps: First, obtain the computational function of the recommender system model for samples on the training dataset, whose output is the prediction of the samples, and the model has been trained to its optimal state on the training dataset. Then, through this optimal model and the influence function estimation, obtain the model after erasing unusable data. This invention does not change the original model's training architecture, model architecture, or deployment method, but removes model parameters that are not important for data erasure, thus improving the accuracy and efficiency of data erasure based on the influence function. This document obtains the difference between the two loss functions before and after forgetting by obtaining the summation expression of the binary cross-entropy loss function for all samples. L, and its core idea of ​​forgetting is to adjust the model parameters so that... Minimizing L and accelerating the forgetting process through pruning, without combining it with the original loss function, and using multi-objective adversarial optimization, results in low efficiency in achieving the forgetting objective.

[0008] In conclusion, improving the efficiency and accuracy of client-side model forgetting learning training has become an urgent problem to be solved. Summary of the Invention

[0009] The technical problem to be solved by this invention is how to improve the efficiency and accuracy of client-side model forgetting learning training.

[0010] The present invention solves the above-mentioned technical problems through the following technical means:

[0011] Obtain the global model and distribute it to the clients participating in federated learning to obtain the client models; The client model is initialized to obtain the initial client model, and privacy labels are assigned to the training data corresponding to the client to obtain privacy label data; The client-side initial model is used to predict the privacy tag data to obtain the prediction results and the client-side local forgotten dataset. The binary cross-entropy loss function value of the client-side initial model is calculated based on the prediction results. The initial client model is updated and optimized based on the binary cross-entropy loss function value to obtain the target client model; The target client model is aggregated to obtain an aggregated global model. The aggregated global model is then iteratively updated using the client's local forgetting dataset to obtain the target global model.

[0012] Optionally, the step of distributing the global model to clients participating in federated learning to obtain client models includes: Select clients to participate in federated learning from a pre-defined set of clients to obtain the target clients; A copy of the global model is broadcast to the target client to obtain the client model.

[0013] Optionally, the step of assigning privacy labels to the training data corresponding to the client to obtain privacy label data includes: Identify private and non-privacy data in the training data; Preset privacy labels are assigned to the privacy data and the non-privacy data respectively to obtain the privacy label data corresponding to the training data.

[0014] Optionally, calculating the binary cross-entropy loss function value of the client's initial model based on the prediction result includes: Calculate the original loss function value of the client's initial model based on the prediction results; The binary cross-entropy loss function value is calculated using a pre-constructed loss function formula based on the original loss function value and the prediction result.

[0015] Optionally, the step of calculating the binary cross-entropy loss function value using a pre-constructed loss function formula based on the original loss function value and the prediction result includes: The loss function formula is expressed as follows:

[0016] in, This represents the value of the binary cross-entropy loss function. This represents the original loss function value. This indicates the total number of privacy-labeled data. This represents the preset adaptive loss weight. Indicates the first Privacy tag data The corresponding privacy label has only two values, 0 and 1, used to determine whether the data needs to be forgotten. This represents data that needs to be forgotten. This indicates data that does not need to be forgotten. For the prediction results, used to represent The probability is 1.

[0017] Optionally, updating and optimizing the initial client model based on the binary cross-entropy loss function value to obtain the target client model includes: Calculate the parameter gradients of the model parameters in the initial client model based on the binary cross-entropy loss function value; The model parameters are optimized by gradient descent based on the parameter gradient to obtain updated model parameters; Calculate the binary cross-entropy loss function value corresponding to the updated model parameters, and return the steps described above for calculating the gradient of the model parameters in the initial client model based on the binary cross-entropy loss function value, until the binary cross-entropy loss function value is less than a preset loss threshold, thus obtaining the target client model.

[0018] Optionally, the step of iteratively updating the aggregated global model using the client-side local forgetting dataset to obtain the target global model includes: The global loss value of the aggregated global model is calculated using a preset global loss function; When the global loss value is less than or equal to a preset global loss threshold, the aggregated global model is used as the target global model; When the global loss value is greater than the global loss threshold, the aggregated global model is sent to the clients participating in federated learning to obtain the updated client model; The client-side model is iteratively updated using the client-side local forgetting dataset until the global loss value is less than or equal to the global loss threshold, thus obtaining the target global model.

[0019] To address the aforementioned problems, this invention also proposes a forgetting learning system for local client-side model training, the system comprising: The model distribution module is used to obtain the global model and distribute the global model to the clients participating in federated learning to obtain the client model; The privacy label allocation module is used to initialize the client model to obtain the client initial model, and to allocate privacy labels to the training data corresponding to the client to obtain privacy label data. The loss calculation module is used to perform data prediction on the privacy tag data using the client's initial model, obtain the prediction result and the client's local forgotten dataset, and calculate the binary cross-entropy loss function value of the client's initial model based on the prediction result. The model update and optimization module is used to update and optimize the initial client model based on the binary cross-entropy loss function value to obtain the target client model; The global model iteration and update module is used to aggregate the target client model to obtain an aggregated global model, and to iteratively update the aggregated global model using the client's local forgotten dataset to obtain the target global model.

[0020] The present invention also provides a processing device, characterized in that it includes at least one processor and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor can execute the forgetting learning method of the local client model training described above by calling the program instructions.

[0021] The present invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions that cause the computer to execute the forgetting learning method of the above-described local client model training.

[0022] The advantages of this invention are: This invention distributes a global model to clients participating in federated learning. The clients initialize the model to obtain an initial client model and assign privacy labels to their corresponding training data, resulting in privacy-labeled data. This allows the initial client model to forget privacy data during training, thus filtering out private information and improving the accuracy of forgetting learning. Furthermore, by calculating the binary cross-entropy loss function of the initial client model, the forgetting task is directly incorporated into the loss function and combined with the original loss function. This simplifies the forgetting objective and improves the efficiency of forgetting learning. The initial client model is updated and optimized based on the binary cross-entropy loss function value to obtain the target client model. The model can be trained locally on the client, avoiding the sharing of original data and thus protecting data privacy. At the same time, it achieves a balance between personalization and globalization, improving the accuracy of forgetting learning. The target client model is then aggregated to obtain an aggregated global model. The aggregated global model is iteratively updated using the client's local forgetting dataset to obtain the accurate target global model. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating a forgetting learning method for local client model training in one embodiment of the present invention; Figure 2 This is a process diagram of a forgetting learning method for training a local client model in federated learning, according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the training steps of federated forgetting learning in one embodiment of the present invention; Figure 4 This is a graph showing the change in the average accuracy of the SISA algorithm in one embodiment of the present invention; Figure 5 This is a graph showing the change in the average prediction accuracy of the forgetting algorithm of the present invention in one embodiment of the present invention; Figure 6 This is a diagram showing the original data results of three federated learning algorithms—FedAvg, Per-FedAvg, and pFedMe—in one embodiment of the present invention. Figure 7 This is a graph showing the data results of three federated learning algorithms—FedAvg, Per-FedAvg, and pFedMe—incorporating the forgetting concept of SISA in one embodiment of the present invention on the MNIST dataset. Figure 8 This is a graph showing the data results of three federated learning algorithms—FedAvg, Per-FedAvg, and pFedMe—incorporating the forgetting mechanism of SISA in one embodiment of the present invention, on the Sythetic dataset. Figure 9 This is a data result diagram on the MNIST dataset after the three federated learning algorithms FedAvg, Per-FedAvg, and pFedMe are added to the forgetting learning method of the local client model training of this invention in one embodiment of the invention. Figure 10 This is a data result graph on the Sythetic dataset after incorporating the forgetting learning method of the present invention, which trains the local client model of the present invention, into three federated learning algorithms: FedAvg, Per-FedAvg, and pFedMe. Figure 11This is an overall flowchart of federated forgetting learning in one embodiment of the present invention.

[0024] Figure 12 This is a functional module diagram of a forgetting learning system for local client model training provided in one embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Reference Figure 1 The diagram shown is a flowchart illustrating a forgetting learning method for local client model training according to an embodiment of the present invention. In this embodiment, the forgetting learning method for local client model training includes: S1. Obtain the global model and distribute it to the clients participating in federated learning to obtain the client model.

[0027] In this embodiment of the invention, the global model is a shared machine learning model collaboratively trained by all clients, used to distribute to clients participating in federated learning for joint model training. Clients participating in federated learning are those that perform local training and upload model updates (not the original data) to directly communicate with other clients (clients 1, 2, ..., n participating in this round of training). The clients participating in federated learning do not necessarily include all clients.

[0028] Specifically, the step of distributing the global model to clients participating in federated learning to obtain client models includes: Select clients to participate in federated learning from a pre-defined set of clients to obtain the target clients; A copy of the global model is broadcast to the target client to obtain the client model.

[0029] In this embodiment of the invention, the client participating in federated learning refers to the client that actually participates in local training and uploads model updates in the current global model distribution. The target client can be a node with local data and computing power, a client that has passed the qualification screening, or a portion of the clients randomly selected from a large number of clients to participate.

[0030] Furthermore, the model sent to the client is a copy of the global model. The server broadcasts this copy to selected clients as a client-side model trained locally, containing all model parameters (weights and biases). However, in some variant algorithms, the server may only send a subset of the global model (such as the first few layers) to save on communication overhead.

[0031] S2. Initialize the client model to obtain the initial client model, and assign privacy labels to the training data corresponding to the client to obtain privacy label data.

[0032] In this embodiment of the invention, model initialization involves each client participating in federated learning directly overwriting (replacing) the parameters of its local model with the parameters of the global model to obtain the client's initial model. This makes the client's local model an exact copy of the global model, with completely identical parameters.

[0033] For details, please refer to Figure 2 As shown, the server will use the global model in round T. Distribute the information to each client participating in federated learning (client 1, client 2, ..., client n, which are clients participating in this round of training). Local model initialization: Each client receives the global model. Then, initialize its local forgetting model. Client 1 receives the global model Then, initialize its local forgetting model as follows: And so on, client k receives the global model Then, initialize its local forgetting model as follows: .

[0034] Furthermore, each client has a dataset for training forgetting learning. Suppose that k labeled classes T1, T2, ..., Tk belong to a privacy dataset and need to be forgotten after the client-side forgetting model is trained. Then, these data classes that need to be forgotten can be labeled with privacy tags. =1, other data-related privacy tags =0, where This represents data that needs to be forgotten. This indicates data that does not need to be forgotten. In this embodiment of the invention, the step of assigning privacy labels to the training data corresponding to the client to obtain privacy label data includes: Identify private and non-privacy data in the training data; Preset privacy labels are assigned to the privacy data and the non-privacy data respectively to obtain the privacy label data corresponding to the training data.

[0035] In detail, regarding the training data Where xi is a data point in the training data (such as an image), yi is its original label, and so on. The assigned privacy label has only two values, 0 and 1, used to determine whether it is data that needs to be forgotten.

[0036] In this embodiment of the invention, by assigning privacy data labels to privacy data, the prediction result of the client's initial model can be made close to 1 during the training process, that is, the privacy data in the training data is forgotten, thereby achieving "filtering" of privacy data.

[0037] S3. Use the client-side initial model to perform data prediction on the privacy tag data to obtain the prediction results and the client-side local forgotten dataset. Calculate the binary cross-entropy loss function value of the client-side initial model based on the prediction results.

[0038] In this embodiment of the invention, data prediction involves the client's initial model performing label prediction on the privacy-labeled data to obtain the prediction result for each training data point, such as the probability that the training data belongs to the privacy-labeled data and the probability that it belongs to the original label.

[0039] Specifically, the classification module in the client's initial model can be used to classify and predict each training data point in the privacy-labeled data, thus obtaining the prediction result. For example, the training data... The prediction result is , It also represents the probability of predicting the original label. For multi-class classification problems, if it is necessary to remove multiple distinct labels... Labels, these are marked in this invention Privacy Labels for Tag Data Both are 1, and It is predicted that these The sum of the probabilities of the labels is equal to the predicted probability of each label. The probability of =1.

[0040] Specifically, calculating the binary cross-entropy loss function value of the client's initial model based on the prediction result includes: Calculate the original loss function value of the client's initial model based on the prediction results; The binary cross-entropy loss function value is calculated using a pre-constructed loss function formula based on the original loss function value and the prediction result.

[0041] Specifically, the loss function formula is expressed as:

[0042] in, This represents the value of the binary cross-entropy loss function. This represents the original loss function value. This indicates the total number of privacy-labeled data. This represents the preset adaptive loss weight. Indicates the first Privacy tag data The corresponding privacy label, For the prediction results, used to represent The probability is 1.

[0043] In detail, These are data points in privacy-labeled data (such as an image), where yi is its original label, and additionally... The privacy label assigned to the hypothesis has only two values, 0 and 1, used to determine whether data needs to be forgotten. Prediction results. express for The probability of 1 is the probability that the private data needs to be forgotten. ≥0 is an adaptive loss weight. Dynamically adjusting the adaptive weight allows the client model to adapt to different training stages and control model accuracy.

[0044] The original loss function value is the loss value of the original classification task corresponding to the training data. For example, if the training data is images and the original classification task is image classification, the original loss function value can be calculated based on the prediction results and the true original label of each training data using a preset original loss function.

[0045] Furthermore, when the real label of the privacy label data... When the value is 1, the binary cross-entropy loss function The first item It will penalize the client's initial model if its prediction results... The case is close to 0. We need to minimize the binary cross-entropy loss function, when the true privacy label of the privacy label data... When it is 0, the binary cross-entropy loss function The second item It will penalize the local model if its predictions are incorrect. The case is close to 1. This binary cross-entropy penalty function is defined as the loss function formula. This allows the client to locally forget the dataset. All samples The labels all tend to predict 1, corresponding to the data that needs to be forgotten; the rest of the data... The labels all tend to be 0, and only the labels are deleted during subsequent training. Data with label 1 represents the local forgetting dataset on the client side. The forgetting effect of the data was investigated to obtain a local forgotten dataset on the client side without affecting the original dataset. Tag categorization.

[0046] More specifically, in the case of forgetting a single label, if we assume that the privacy label data to be forgotten is the actual original label... If it is H, then the privacy label of this privacy label data is... It should be 1, and based on the loss function of the previously defined local forgetting model for the original data. In and privacy labels Train the binary cross-entropy loss function so that... Try to approach 1 (but it won't actually reach 1, it just...) The probability of =1), and at this time It just so happens to be a prediction The probability of being an H label (because) When predicted as H =1, which requires forgetting, and this equality is satisfied in the case of a single forgetting tag. This invention marks these... Privacy Labels for Tag Data Both are 1, and It is predicted that these The sum of the probabilities of the labels is equal to the predicted probability of each label. The probability of 1 is also considered, and the newly defined binary cross-entropy is used for training.

[0047] In this embodiment of the invention, the binary cross-entropy loss function in the loss function formula is used to classify forgotten and non-forgotten data. For each privacy-labeled data... : when At that time, the prediction results A value close to 1 indicates that the client-side model tends to forget this data. when At that time, the prediction results The value is close to 0, meaning the client-side model tends to retain this data.

[0048] In detail, the loss function formula allows for data forgetting without affecting the original classification task, and the label task is effectively binary classified to achieve forgetting. The operation is simple: the forgetting task is directly added to the loss function and combined with the original loss function. Data is forgotten while the original target is classified, which simplifies the achievement of the forgetting target and improves the efficiency of forgetting learning.

[0049] S4. Update and optimize the initial client model based on the binary cross-entropy loss function value to obtain the target client model.

[0050] In this embodiment of the invention, updating and optimizing the initial client model involves minimizing the value of the binary cross-entropy loss function to update the model parameters of the initial client model, thereby obtaining the target client model.

[0051] In detail, the step of updating and optimizing the initial client model based on the binary cross-entropy loss function value to obtain the target client model includes: Calculate the parameter gradients of the model parameters in the initial client model based on the binary cross-entropy loss function value; The model parameters are optimized by gradient descent based on the parameter gradient to obtain updated model parameters; Calculate the binary cross-entropy loss function value corresponding to the updated model parameters, and return the steps described above for calculating the gradient of the model parameters in the initial client model based on the binary cross-entropy loss function value, until the binary cross-entropy loss function value is less than a preset loss threshold, thus obtaining the target client model.

[0052] In this embodiment of the invention, the parameter gradient is obtained by taking the partial derivative of the binary cross-entropy loss function value with respect to the model parameters. The parameters are then updated by using the parameter gradient to descend along the parameter gradient, resulting in updated model parameters. The binary cross-entropy loss function value corresponding to the initial client model is calculated when updating the model parameters, and the steps described above for calculating the gradient of the model parameters in the initial client model are returned. This process continues until the binary cross-entropy loss function value is less than a preset loss threshold, thus obtaining the target client model.

[0053] Specifically, updating and optimizing the initial client model can be expressed as follows:

[0054] in, This indicates updating the model parameters. Indicates model parameters, This represents the preset learning rate. Represents the gradient of the parameters. This represents the value of the binary cross-entropy loss function.

[0055] Furthermore, by updating and optimizing the initial model on the client side, model training can be performed locally on the client side, avoiding the sharing of original data, thus protecting data privacy, while achieving a balance between personalization and globalization, and improving the accuracy of forgetting learning.

[0056] S5. Perform model aggregation on the target client model to obtain an aggregated global model. Use the client's local forgetting dataset to iteratively update the aggregated global model to obtain the target global model.

[0057] In this embodiment of the invention, model aggregation involves each client participating in federated learning uploading the target client obtained from this training to the server corresponding to the global model. The server receives all the local forgotten models uploaded by the clients and aggregates them to generate a new global model.

[0058] Specifically, the target client models uploaded by each client can be aggregated using methods such as FedAvg (Federated Averaging), FedProx (Federated Proximity Optimization), and stochastic controlled averaging to obtain the aggregated global model for this federated learning.

[0059] Furthermore, for the process of obtaining the target global model, please refer to [link / reference]. Figure 3 As shown, this can be represented as a time training sequence, assuming that in the first... During T rounds of training, the global model is aggregated. It is a dataset The model is obtained through training. Then, in the T+k (k=1,2,3,…)th round, this invention will use the global model… Viewed as the remaining client-local forgotten dataset after the new forgetting process. The results obtained from the training process, among which This refers to the dataset forgotten during federated forgetting learning from round T to round T+k-1. It allows for easy analysis of the results, simplifies the federated forgetting learning process, and more clearly reveals differences between the two models before and after federated forgetting learning. Furthermore, it contains information about the client's local forgotten dataset, which could potentially be compromised and leaked.

[0060] Specifically, the step of iteratively updating the aggregated global model using the client-side local forgetting dataset to obtain the target global model includes: The global loss value of the aggregated global model is calculated using a preset global loss function; When the global loss value is less than or equal to a preset global loss threshold, the aggregated global model is used as the target global model; When the global loss value is greater than the global loss threshold, the aggregated global model is sent to the clients participating in federated learning to obtain the updated client model; The client-side model is iteratively updated using the client-side local forgetting dataset until the global loss value is less than or equal to the global loss threshold, thus obtaining the target global model.

[0061] In this embodiment of the invention, the global loss value of the aggregated global model in the current training round is calculated based on the training dataset corresponding to the global model and the global loss function. When the global loss value is less than or equal to a preset global loss threshold, it indicates that the aggregated global model meets the requirements and can be directly used as the target global model. When the global loss value is greater than the preset global loss threshold, the next round of federated learning training begins, that is, the aggregated global model is distributed to the clients participating in federated learning to obtain an updated client model. The updated client model is then updated and optimized using the client's local forgotten dataset and aggregated to obtain the aggregated global model and forgotten data for this round. The global loss value is then calculated, and the forgotten data is used as the privacy label data for the next round to iteratively update the aggregated global model until the global loss value is less than or equal to the preset global loss threshold, thus obtaining the target global model.

[0062] The forgetting learning method proposed in this invention for training local client models in federated learning is first compared with the classic forgetting algorithm SISA (S hardened, isolated, sliced, and aggregated training) to evaluate its forgetting effect. Then, it is aggregated under the three federated learning algorithms to measure its federated forgetting effect. The following is a detailed explanation.

[0063] 1. Forgetting experiment in the SISA algorithm: First, a forgetting scenario is set up using the SISA algorithm, comparing it with the original SISA algorithm to verify the effectiveness of the proposed forgetting model. This invention evaluates the forgetting effect of the number of slices and segments on the Purchase dataset under the SISA algorithm, with 70% of the data used for training and 30% for testing. The number of slices and segments is customized, and data to be forgotten in the dataset is randomly generated and assigned to each slice unit. Training is then performed to remove data from each slice unit with forgetting requests. Finally, softmax is used to output the results, and a prediction accuracy is output through a voting strategy. The evaluation metrics used are as follows: (1) Prediction accuracy = ; (2) Average forecast accuracy = ; (3) Recall rate = ; (4) FR = Recall of the original model × Recall of the forgetting model.

[0064] Experiments were conducted using the stochastic gradient descent optimizer provided in SISA, and the results are as follows: Figure 3 As shown: from Figure 4 The average prediction accuracy of the SISA algorithm can be seen from this. The value gradually decreases as the number of fragments multiplied by the number of slices increases, and because SISA uses a random forgetting method, the average prediction accuracy is high. It is gradually approaching 50%. Among them, Figure 4 The horizontal axis represents the number of slices × the number of segments, and the vertical axis represents the average accuracy value. Curve fitting shows that the final accuracy value approaches 0.5.

[0065] Next, the original binary cross-entropy loss function will be further modified to the defined forgetting loss function. Collect all the forgetting request data and define the data... for Forgetting is necessary. Similarly, a logits dataset is loaded using a data loader, and parameters are modified to obtain a new loss for experimentation, yielding the data. Figure 5 .in, Figure 5 The horizontal axis represents the number of segments × the number of slices, and the vertical axis represents the average accuracy value. Blue dots represent the prediction accuracy under the original model, fitted with a red curve, converging to around 96%; green dots represent the prediction accuracy under the forgetting algorithm of this invention, fitted with a yellow curve, converging to around 45%; purple dots represent the value of the newly defined index FR, fitted with a pink curve, converging to around 44%. This indicates that the forgetting effect of this invention is more accurate than the random forgetting of SISA.

[0066] from Figure 5 As can be seen from this, the average prediction accuracy of the forgetting algorithm is... Converging at 46%, FR value and All showed a slight downward trend, indicating that the forgetting scheme proposed in this invention has a better forgetting effect and is not affected by the number of slices and segments.

[0067] Compared to the SISA algorithm, the forgetting learning method of this invention for training local client models in federated learning has a better forgetting effect and does not discard some fragment data, thus resulting in better training effect for sub-models. However, it inevitably leads to an increase in computational and storage costs.

[0068] 2. Forgetting experiment under federated learning algorithm: Next, the ideas of the SISA algorithm and the method proposed in this invention are combined with three federated learning algorithms: FedAvg, Per-FedAvg, and pFedMe, considering their forgetting effects. Non-independent and identically distributed micro-strong convex sets, the MNIST dataset and the Synthetic dataset, are generated. An l2-regularized multinomial logistic regression (MLR) model with a softmax activation function and cross-entropy loss function is used. Due to the limitation of the MNIST data size, the complete dataset is distributed across N=20 clients. To model the heterogeneous setting in terms of local data size and classes, each client is allocated a different local data size in the range [1165, 3834], and only 2 out of 10 labels are used.

[0069] The results of the three algorithms, FedAvg, Per-FedAvg, and pFedMe, are presented as follows: Figure 6 , specifically, Figure 6 a) is a subplot of prediction accuracy, with the horizontal axis representing the number of training rounds and the vertical axis representing the test accuracy. Figure 6 b) is a subplot of training loss values, with the horizontal axis representing the training epoch and the vertical axis representing the training loss value. pFedMe(PM) adjusts the personalization factor and offers higher client-side model personalization performance compared to pFedMe(GM). The results show that as the number of training rounds increases, the training loss values ​​of all three federated learning algorithms gradually decrease, with pFedMe(PM) decreasing the fastest and Per-FedAvg the slowest. Regarding prediction accuracy, pFedMe(PM) has the fastest convergence speed and a prediction accuracy exceeding 93%, demonstrating the best performance; Per-FedAvg has the slowest convergence speed and the lowest accuracy, ultimately approaching 92%.

[0070] Next, we introduce the idea of ​​SISA to slice the MNIST and Sythetic datasets provided in the original code and randomly forget the data. For convenience, we only divide the datasets into two slices and perform random forgetting on one of them: Specifically, see Figure 7 , Figure 8 The above describes the data results obtained by incorporating the forgetting mechanism of SISA into three federated learning algorithms: FedAvg, Per-FedAvg, and pFedMe. Figure 7 a) is a subplot of prediction accuracy on the MNIST dataset, with the horizontal axis representing the number of training rounds and the vertical axis representing the test accuracy. Figure 7 b) is a subplot of training loss values ​​on the MNIST dataset, with the horizontal axis representing the training epoch and the vertical axis representing the training loss value. Figure 8a) is a subplot of prediction accuracy on the Sythetic dataset, with the horizontal axis representing the number of training epochs and the vertical axis representing the test accuracy. Figure 8 b) is a subplot of the training loss values ​​on the Sythetic dataset, with the x-axis representing the training epoch and the y-axis representing the training loss value. In the experimental results on the MNIST dataset, as shown... Figure 7 b) and Figure 8 As shown in b), with the increase of training epochs, the training loss value of the pFedMe algorithm decreases the fastest, while that of the Per-FedAvg algorithm decreases the slowest. For Figure 7 a) and Figure 8 a) The test accuracy results show significant changes for all three algorithms. The original prediction accuracy converged to between 92% and 93%, but now it's around 45% on the MNIST dataset and around 42.5% on the Sythetic dataset. In terms of convergence, the pFedMe algorithm converges faster than the other two algorithms.

[0071] Further, see Figure 9 , Figure 10 As shown, Figure 9 , Figure 10 This is a graph showing the data results obtained after incorporating the forgetting learning method of the client model training in this invention with three federated learning algorithms: FedAvg, Per-FedAvg, and pFedMe. Figure 9 a) is a subplot of prediction accuracy on the MNIST dataset, with the horizontal axis representing the number of training rounds and the vertical axis representing the test accuracy. Figure 9 b) is a subplot of training loss values ​​on the MNIST dataset, with the horizontal axis representing the training epoch and the vertical axis representing the training loss value. Figure 10 a) is a subplot of prediction accuracy on the Sythetic dataset, with the horizontal axis representing the number of training epochs and the vertical axis representing the test accuracy. Figure 10 b) is a subplot of the training loss values ​​on the Sythetic dataset, with the x-axis representing the training epoch and the y-axis representing the training loss value. This method is combined with three federated learning algorithms, trained and tested on the MNIST and Sythetic datasets, to obtain the changes in training loss values. Figure 9 b) and Figure 10 b) The results are consistent with those of the inclusion of SISA, with the difference being... Figure 9 a) This shows that training on the MNIST dataset eventually converged to around 41%. Figure 10 a) The training on the Sythetic dataset eventually converged to around 39%, and there was a further decrease, which shows that the method we used after fusion has a better forgetting effect than the SISA algorithm combined with federated learning.

[0072] Figure 11This is the overall flowchart of federated forgetting learning, showing that the client first participates in federated learning, then chooses whether to request forgetting learning. Clients that do not participate in forgetting learning leave the training process. Clients that participate in forgetting learning need to perform aggregation verification after completing forgetting learning to verify whether forgetting was successful.

[0073] like Figure 12 The diagram shown is a functional block diagram of a forgetting learning system for local client model training provided in an embodiment of the present invention.

[0074] The forgetting learning system 100 for local client model training described in this invention can be installed in a processing device. Depending on the functions implemented, the forgetting learning system 100 for local client model training may include a model distribution module 101, a privacy label allocation module 102, a loss value calculation module 103, a model update and optimization module 104, and a global model iterative update module 105. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, stored in the memory of the electronic device.

[0075] In this embodiment, the functions of each module / unit are as follows: The model distribution module 101 is used to obtain the global model and distribute the global model to the clients participating in federated learning to obtain the client model; The privacy label allocation module 102 is used to initialize the client model to obtain the client initial model, and to allocate privacy labels to the training data corresponding to the client to obtain privacy label data. The loss calculation module 103 is used to perform data prediction on the privacy tag data using the client initial model, obtain the prediction result and the client local forgotten dataset, and calculate the binary cross-entropy loss function value of the client initial model based on the prediction result. The model update and optimization module 104 is used to update and optimize the initial client model based on the binary cross-entropy loss function value to obtain the target client model. The global model iteration update module 105 is used to aggregate the target client model to obtain an aggregated global model, and to iteratively update the aggregated global model using the client's local forgotten dataset to obtain the target global model.

[0076] The specific execution steps in each of the above modules are the same as the corresponding execution steps in the forgetting learning method for training the local client model.

[0077] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example.

[0078] 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 at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0079] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A forgetting learning method for local client model training, characterized in that, include: Obtain the global model and distribute it to the clients participating in federated learning to obtain the client models; The client model is initialized to obtain the initial client model, and privacy labels are assigned to the training data corresponding to the client to obtain privacy label data; The client-side initial model is used to predict the privacy tag data to obtain the prediction results and the client-side local forgotten dataset. The binary cross-entropy loss function value of the client-side initial model is calculated based on the prediction results. The initial client model is updated and optimized based on the binary cross-entropy loss function value to obtain the target client model; The target client model is aggregated to obtain an aggregated global model. The aggregated global model is then iteratively updated using the client's local forgetting dataset to obtain the target global model.

2. The forgetting learning method for local client model training as described in claim 1, characterized in that, The step of distributing the global model to clients participating in federated learning to obtain client models includes: Select clients to participate in federated learning from a pre-defined set of clients to obtain the target clients; A copy of the global model is broadcast to the target client to obtain the client model.

3. The forgetting learning method for local client model training as described in claim 1, characterized in that, The process of assigning privacy labels to the training data corresponding to the client to obtain privacy label data includes: Identify private and non-privacy data in the training data; Preset privacy labels are assigned to the privacy data and the non-privacy data respectively to obtain the privacy label data corresponding to the training data.

4. The forgetting learning method for local client model training as described in claim 1, characterized in that, The step of calculating the binary cross-entropy loss function value of the client's initial model based on the prediction result includes: Calculate the original loss function value of the client's initial model based on the prediction results; The binary cross-entropy loss function value is calculated using a pre-constructed loss function formula based on the original loss function value and the prediction result.

5. The forgetting learning method for local client model training as described in claim 4, characterized in that, The calculation of the binary cross-entropy loss function value using a pre-constructed loss function formula based on the original loss function value and the prediction result includes: The loss function formula is expressed as follows: in, This represents the value of the binary cross-entropy loss function. This represents the original loss function value. This indicates the total number of privacy-labeled data. This represents the preset adaptive loss weight. Indicates the first Privacy tag data The corresponding privacy label has only two values, 0 and 1, used to determine whether the data needs to be forgotten. This represents data that needs to be forgotten. This indicates data that does not need to be forgotten. For the prediction results, used to represent The probability is 1.

6. The forgetting learning method for local client model training as described in claim 1, characterized in that, The step of updating and optimizing the initial client model based on the binary cross-entropy loss function value to obtain the target client model includes: Calculate the parameter gradients of the model parameters in the initial client model based on the binary cross-entropy loss function value; The model parameters are optimized by gradient descent based on the parameter gradient to obtain updated model parameters; Calculate the binary cross-entropy loss function value corresponding to the updated model parameters, and return the steps described above for calculating the gradient of the model parameters in the initial client model based on the binary cross-entropy loss function value, until the binary cross-entropy loss function value is less than a preset loss threshold, thus obtaining the target client model.

7. The forgetting learning method for local client model training as described in claim 1, characterized in that, The step of iteratively updating the aggregated global model using the client-side local forgetting dataset to obtain the target global model includes: The global loss value of the aggregated global model is calculated using a preset global loss function; When the global loss value is less than or equal to a preset global loss threshold, the aggregated global model is used as the target global model; When the global loss value is greater than the global loss threshold, the aggregated global model is sent to the clients participating in federated learning to obtain the updated client model; The client-side model is iteratively updated using the client-side local forgetting dataset until the global loss value is less than or equal to the global loss threshold, thus obtaining the target global model.

8. A forgetting learning system for local client-side model training, characterized in that, include: The model distribution module is used to obtain the global model and distribute the global model to the clients participating in federated learning to obtain the client model; The privacy label allocation module is used to initialize the client model to obtain the client initial model, and to allocate privacy labels to the training data corresponding to the client to obtain privacy label data. The loss calculation module is used to perform data prediction on the privacy tag data using the client's initial model, obtain the prediction result and the client's local forgotten dataset, and calculate the binary cross-entropy loss function value of the client's initial model based on the prediction result. The model update and optimization module is used to update and optimize the initial client model based on the binary cross-entropy loss function value to obtain the target client model; The target client model is aggregated to obtain an aggregated global model. The aggregated global model is then iteratively updated using the client's local forgetting dataset to obtain the target global model.

9. A processing device, characterized in that, It includes at least one processor and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor can execute the method as described in any one of claims 1-7 by invoking the program instructions.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause the computer to perform the method as described in any one of claims 1-7.