A dynamic federated continual learning method and system for a class overlap scenario
By generating synthetic data through generative models and combining it with knowledge distillation techniques, the problems of catastrophic forgetting and concept drift in federated learning are solved, achieving privacy protection and reduced storage overhead, and enhancing the model's adaptability in dynamic data scenarios.
Patent Information
- Application Number
- CN202510348109.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-03-24
AI Technical Summary
Existing federated learning schemes suffer from catastrophic forgetting and concept drift problems in dynamic data scenarios, and they fail to effectively address privacy protection and storage overhead issues.
Generative models are used to generate synthetic data that simulates the global distribution characteristics of old task data. Knowledge distillation technology is used to update local model parameters on the client side. The synthetic data is filtered by combining feature mean and variance to reduce the direct use of old data, protect privacy and reduce storage overhead. At the same time, the generative model is used to review knowledge of old tasks to mitigate catastrophic forgetting.
While protecting privacy, it mitigates catastrophic forgetting, reduces storage and computational overhead, and improves the model's adaptability to dynamic data scenarios by accurately preserving old category information and reducing concept drift.
Smart Images

Figure CN119862941B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of federated continuous learning, specifically relating to a dynamic federated continuous learning method and system for scenarios with overlapping categories. Background Technology
[0002] In the field of federated learning, most existing solutions focus on scenarios with static data. However, in the real world, data is often dynamically changing, necessitating continuous federated learning. Catastrophic forgetting is a common and challenging problem during continuous learning across multiple tasks. Currently, most solutions rely on reusing old data, which not only increases storage overhead for users but also poses a privacy risk. While generating data using generative models can address this issue to some extent, configuring these models on the client side incurs excessive and unnecessary overhead. Furthermore, existing solutions generally do not consider scenarios with overlapping task categories, leading to concept drift—outdated information from past tasks hinders training for new tasks. Therefore, a new approach is urgently needed that can mitigate catastrophic forgetting using generative models while protecting privacy, and accurately retain information from older categories, thereby effectively solving the concept drift problem. Summary of the Invention
[0003] This invention aims to address the problems of catastrophic forgetting and concept drift in federated continuous learning.
[0004] The technical solution of the present invention is as follows:
[0005] A dynamic federated continuous learning method for scenarios with overlapping categories includes the following steps:
[0006] The server initializes the global model, which serves as the initial model for the first task, and sends its model parameters to the client.
[0007] The client uses the private data of the current task to update the local model parameters using the gradient descent method. After completing a fixed number of iterations, the updated parameters are uploaded to the server. When the client uploads the last time after completing the initial task training, the mean and variance of the features corresponding to each category are calculated and uploaded at the same time.
[0008] The server initializes the generation model and generates initial synthetic data based on initial condition labels and Gaussian noise distribution. After receiving the global model trained in the previous task and the feature mean and variance from the client, the server calculates the feature mean and variance and the loss function to train the generation model. The generation model is used to simulate the synthetic data with global distribution characteristics of the old task data.
[0009] Based on the updated global model, the client obtains the feature mean vectors of each category using real data from the new task and uploads them. The server aggregates the data to obtain the global mean, compares the deviation of the synthetic data of overlapping categories with the corresponding global mean, and deletes the synthetic data with high deviation.
[0010] The server sends the processed synthetic data to the client. The client uses the private data of the current task and the processed synthetic data to update the local model parameters, and then uploads the updated parameters. The server then aggregates these parameters again to update the global model. This process is repeated continuously, from uploading feature statistics to updating and aggregating the model, to achieve continuous learning.
[0011] Furthermore, during the process of updating the local model parameters using gradient descent with the current task's private data on the client side, each iteration calculates the gradient and adjusts the parameters by minimizing the loss function, where the loss function is... CE() is the cross-entropy loss function. For model parameters, For real labels, Predict labels for the model.
[0012] Furthermore, the mean and variance of the features corresponding to each category are calculated as follows:
[0013] The client-side model is divided into two parts: a feature extractor. and classifier Client sample The feature representation is obtained through the feature extractor:
[0014] ,
[0015] Calculate the feature mean for each category and variance :
[0016] ,
[0017] in It is the set of samples of category c in client k. It is the number of samples belonging to category c in the local data of client k. It is the feature representation of sample i belonging to category c.
[0018] Furthermore, the mean and variance of the features are calculated along with the loss function to train the generative model, as shown in the following formula:
[0019] ,
[0020] 、 , , For synthetic data categories c The characteristic mean and variance;
[0021] For each category, select the client with the greatest loss. :
[0022] ,
[0023] Calculate the feature loss:
[0024] ,
[0025] Then through the loss function Update generated model parameters:
[0026] ,
[0027] in, For batch normalization loss, and These are the mean and variance of the generated data. and The target statistic is the actual data.
[0028] Furthermore, based on the updated global model, the client obtains the feature mean vectors for each category using real data from the new task and uploads them. The server aggregates these to obtain the global mean. The deviation of the synthetic data for overlapping categories from the corresponding global mean is compared, and synthetic data with higher deviations is deleted. Specifically:
[0029] After receiving the global model, the client uses the true value of the new task to obtain the feature mean vector for each category:
[0030] ,
[0031] in, For new task categories a In the client k The eigenmean vector in the data. Let be the number of samples of category a in client k. It is a client k Medium category The sample set, For the feature extractor part of the global model, The data is uploaded to the server for aggregation to obtain the global mean. The aggregation formula is as follows:
[0032] ,
[0033] Next, the synthetic data from the server is fed into the global model to obtain predicted labels, i.e., for each synthetic sample. Each has a corresponding prediction label. Its tag set is The label set for the new task data is ,so Given a set of overlapping categories, for a synthetic sample of overlapping categories, calculate its similarity to the global mean of the corresponding category:
[0034] ,
[0035] in, , , For synthetic data Feature representation after feature extraction This is the global mean corresponding to the predicted labels of the synthetic samples;
[0036] Then convert the similarity into deviation:
[0037] ,
[0038] in, The bias is set to a constant, and then the bias of the composite samples of all overlapping categories is normalized:
[0039] ,
[0040] in, The total number of samples in overlapping categories, based on a threshold. Deletion bias is higher than Synthetic samples.
[0041] Furthermore, the loss function by which the client updates the local model parameters using the private data of the current task and the processed synthetic data is:
[0042] ,
[0043] in, CE () represents the cross-entropy loss function. KL () is the KL divergence function. For the client k In the mission t Model parameters, For real labels, Represents raw data With processed synthetic data The combination These are the weighting coefficients. The client's model parameters from the previous task. This is for predicting the output.
[0044] The present invention also provides a dynamic federated continuous learning system for class overlap scenarios, including a server and a client;
[0045] The server is used to initialize the global model and distribute parameters, initialize the generated model, receive model parameters, feature mean and variance uploaded by the client, train the generated model, generate synthetic data, filter the synthetic data, and aggregate the model parameters uploaded by the client to update the global model.
[0046] The client is used to update local model parameters using private data, upload model parameters, feature mean and variance, receive global model and synthetic data from the server, calculate feature mean vector based on the global model using real data from the new task and upload it, and update local model parameters using private data and synthetic data and upload it.
[0047] Furthermore, the interaction process between the server and the client, as well as the operational steps they each perform, correspond to the steps of the dynamic federated continuous learning method for class overlap scenarios.
[0048] Compared with the prior art, the present invention has the following advantages:
[0049] The dynamic federated continuous learning method and system proposed in this invention for category overlap scenarios possess several significant advantages. Regarding privacy protection and computational overhead, a generative model is used to generate data simulating the global distribution characteristics of old task data. Combined with knowledge distillation techniques, this avoids the direct use of old data, protecting data privacy while reducing storage overhead and computational burden caused by reusing old data. To address the catastrophic forgetting problem, data generated by the generative model helps the model review old task knowledge when learning new tasks, effectively mitigating catastrophic forgetting. In handling category overlap scenarios, a category adaptation mechanism based on data features accurately retains old category information by filtering synthetic data, reducing concept drift and enabling the model to quickly adapt to dynamic data distributions. This greatly enhances the model's adaptability in complex real-world scenarios and can be widely applied to various scenarios of distributed intelligent devices, powerfully promoting the practical application and development of federated continuous learning technology. Attached Figure Description
[0050] The accompanying drawings illustrate various embodiments generally by way of example rather than limitation, and are used, together with the specification and claims, to explain embodiments of the invention. Where appropriate, the same reference numerals are used in all drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the apparatus or method.
[0051] Figure 1 This is a flowchart and system of the technical solution of the present invention;
[0052] Figure 2 A flowchart for generating the model training process;
[0053] Figure 3 A flowchart for filtering synthetic data. Detailed Implementation
[0054] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0055] like Figure 1 As shown, this invention involves two entities: a server and a client. Through their interaction, this invention provides the following dynamic federated continuous learning method and system for scenarios with overlapping categories, including the following steps:
[0056] Global model initialization: The server initializes the global model as the initial model for the first task and sends its model parameters to the client.
[0057] Initial task training: Client k utilizes the current task Private data Gradient descent is used to adjust the model parameters. Update the function. In each iteration, minimize the loss function. The parameter update process is as follows:
[0058] ,
[0059] in It is the learning rate, and r represents the current iteration round. , , is the loss function relative to the parameters The gradient is calculated, and CE() is the cross-entropy loss function. Parameter updates require a fixed number of iterations. The updated model parameters are then uploaded to the server. The server averages and aggregates the model parameters to update the global model. The aggregation formula is as follows:
[0060] ,
[0061] Where K is the total number of clients. This represents the total number of samples for client k.
[0062] When the client uploads model parameters for the last time, it also uploads the mean and variance of the features for each category to the server. The calculation of the feature mean and variance is as follows: The client model is divided into two parts: the feature extractor... and classifier Client sample The feature representation is obtained through the feature extractor:
[0063] ,
[0064] Calculate the feature mean for each category and variance :
[0065] ,
[0066] in It is the set of samples of category c in client k. It is the number of samples belonging to category c in the local data of client k. It is the feature representation of sample i belonging to category c.
[0067] Generative model training: The server initializes the generative model based on initial condition labels. Initial synthetic data is generated using noise z extracted from a Gaussian distribution. The fully trained global model from the previous task is then received. and the client's feature mean and variance Then, the feature mean of each category of the synthetic data was calculated in the same way. and variance The difference lies in the feature extractor used. This is part of the global model. Then, for each category, the feature mean and variance of the synthetic data are calculated against the loss from the client-uploaded data, defined as:
[0068] ,
[0069] For each category, select the client with the greatest loss. :
[0070] ,
[0071] Calculate the feature loss:
[0072] ,
[0073] Then through the loss function Update generated model parameters:
[0074] ,
[0075] in For batch normalization loss, and This is the target statistic for the actual data. See [link / reference]. Figure 2 .
[0076] The server generates synthetic data. ,in This represents the number of synthetic samples. The updated global model is then distributed to the client.
[0077] Filtering synthetic data: The client receives the global model. Then, using real data from the new task Obtain the feature mean vector for each category:
[0078] ,
[0079] in Let a be the feature mean vector of the new task category a in client k. Let be the number of samples of category a in client k. It is a category in client k The sample set, For global model The feature extractor section. The data is uploaded to the server for aggregation to obtain the global mean. The aggregation formula is as follows:
[0080] ,
[0081] Next, the synthetic data from the server is fed into the global model to obtain predicted labels, i.e., for each synthetic sample. Each has a corresponding prediction label. Its tag set is The tag set for the new task data is... ,so This is the set of overlapping categories. For a synthetic sample of overlapping categories, calculate its similarity to the global mean of the corresponding category:
[0082] ,
[0083] in Then, the similarity is converted into a deviation:
[0084] ,
[0085] Then the bias of the composite samples of all overlapping categories is normalized:
[0086] ,
[0087] in The total number of samples in overlapping categories. Based on the threshold. Deletion bias is higher than Synthetic samples. See Figure 3 .
[0088] 7) The server will process the composite data. Send it to the client.
[0089] 8) The client utilizes the private data of the current task. With synthetic data Update the local model parameters using the following loss function:
[0090] ,
[0091] Where CE() is the cross-entropy loss function and KL() is the KL divergence function. Upload the updated model parameters. Aggregate the global model on the server.
[0092] 9) Repeat steps 3)-7) to complete the training for the subsequent tasks.
[0093] This invention can effectively mitigate the catastrophic forgetting of previous tasks by using a data-free distillation method without compromising privacy; at the same time, it can adapt to category overlap scenarios in dynamic data environments and proposes a category adaptation mechanism based on data features, which achieves accurate retention of old category information by filtering synthetic data without outdated information.
[0094] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the technical scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A dynamic federated continuous learning method for scenarios with overlapping categories, applied to distributed intelligent devices, characterized in that, Includes the following steps: The server initializes the global model as the initial model for the first task and sends its model parameters to the client. The client uses the private data of the current task to update the local model parameters using the gradient descent method. After completing a fixed number of iterations, the updated parameters are uploaded to the server. When the client uploads the last data during the initial task training, the mean and variance of the features for each category are calculated and uploaded. The server initializes the generation model and generates initial synthetic data based on initial condition labels and Gaussian noise distribution. After receiving the global model trained in the previous task and the feature mean and variance from the client, the server calculates the feature mean and variance and the loss function to train the generation model. The generation model is used to simulate the synthetic data with global distribution characteristics of the old task data. Based on the updated global model, the client obtains the feature mean vectors of each category using real data from the new task and uploads them. The server aggregates the data to obtain the global mean, compares the deviation of the synthetic data of overlapping categories with the corresponding global mean, and deletes the synthetic data with high deviation. The server sends the processed synthetic data to the client. The client uses the private data of the current task and the processed synthetic data to update the local model parameters, and then uploads the updated parameters. The server aggregates these parameters again to update the global model. This process is repeated continuously from uploading feature statistics to updating and aggregating the model, thus achieving continuous learning. The formula for calculating the feature mean and variance and training the generative model using the loss function is as follows: The mean and variance of the features of category c uploaded by the client. Let K be the mean and variance of the features of the synthetic data category c, and K be the total number of clients. For each category, select the client k with the largest loss. * : Calculate the feature loss: Then through the loss function L g Update generated model parameters: L g =L bn +β·L feature in, For batch normalization loss, μ i and σ i These are the mean and variance of the generated data, μ * and σ * The target statistic for the real data is β, where β is the weighting coefficient and L is the weighting coefficient. feature It is the feature loss used to train generative models.
2. The dynamic federated continuous learning method for class overlap scenarios according to claim 1, characterized in that, During the process of updating the local model parameters on the client side using gradient descent with the current task's private data, each iteration calculates the gradient and adjusts the parameters by minimizing the loss function, where the loss function is... CE() is the cross-entropy loss function, θ are the model parameters, and y are the true labels. Predict labels for the model.
3. The dynamic federated continuous learning method for class overlap scenarios according to claim 1, characterized in that, The specific steps for calculating the feature mean and variance for each category are as follows: The client-side model is divided into two parts: the feature extractor h. k and classifier g k Client sample x i The feature representation is obtained through the feature extractor: z i =h k (x i ) Calculate the feature mean μ for each category k and variance σ k : in It is the set of samples of category c in client k. It is the number of samples belonging to category c in the local data of client k. It is the feature representation of sample i belonging to category c. Let c be the feature mean of class c in client k. Let be the specific variance of class c in client k.
4. The dynamic federated continuous learning method for class overlap scenarios according to claim 1, characterized in that, The client, based on the updated global model, obtains the feature mean vectors for each category using real data from the new task and uploads them. The server aggregates these vectors to obtain the global mean. The deviation of the synthetic data for overlapping categories from the corresponding global mean is compared, and synthetic data with high deviation is deleted. Specifically: After receiving the global model, the client uses the true value of the new task to obtain the feature mean vector for each category: in, Let a be the feature mean vector of the new task category a in client k. Let be the number of samples of category a in client k. h is the set of samples of category a in client k. G For the feature extractor part of the global model, The data is uploaded to the server for aggregation to obtain the global mean. x i For client-side samples, the aggregation formula is as follows: Next, the synthetic data from the server is fed into the global model to obtain predicted labels, i.e., for each synthetic sample. Each has a corresponding prediction label. Its tag set is The label set for new task data is so Given a set of overlapping categories, for a synthetic sample of overlapping categories, calculate its similarity to the global mean of the corresponding category: in, For synthetic data, z j For synthetic data Feature representation after feature extraction This is the global mean corresponding to the predicted labels of the synthetic samples; Then convert the similarity into deviation: Where ε is a constant, the bias of the composite samples of all overlapping categories is then normalized: Where, n o The total number of samples in overlapping categories, based on a threshold. Deletion bias is higher than Synthetic samples, This is the set of biases for all composite samples of overlapping categories.
5. The dynamic federated continuous learning method for class overlap scenarios according to claim 1, characterized in that, The loss function used by the client to update the local model parameters using the private data of the current task and the processed synthetic data is: Where CE() is the cross-entropy loss function and KL() is the KL divergence function. For the model parameters y of client k in task t i For real labels, This represents the original data x and the processed composite data. The combination, where α is the weighting coefficient, and θ is the weighting coefficient. t-1 The client's model parameters from the previous task. This is for predicting the output.
6. A dynamic federated continuous learning system for scenarios with overlapping categories, characterized in that, Includes both server and client; The server is used to initialize the global model and distribute parameters, initialize the generated model, receive model parameters, feature mean and variance uploaded by the client, train the generated model, generate synthetic data, filter the synthetic data, and aggregate the model parameters uploaded by the client to update the global model. The client is used to update local model parameters using private data, upload model parameters, feature mean and variance, receive global model and synthetic data from the server, calculate feature mean vector based on real data of the new task using the global model and upload it, and update local model parameters using private data and synthetic data and upload it. The interaction process between the server and the client, as well as the operation steps they each perform, correspond to the steps of the dynamic federated continuous learning method for class overlap scenarios as described in any one of claims 1-5.
Citation Information
Patent Citations
Model multi-terminal collaborative training method and medical risk prediction method and device
CN110797124A
Prediction method of sample data set and hybrid prediction model
CN113780411A