Dynamic federation continuous learning method and system for category overlapping scene

By using generative models and knowledge distillation techniques in federal continuous learning, generating simulated old task data and accurately retaining old category information, catastrophic forgetting and concept drifting problems are solved, and efficient privacy protection and computational optimization are achieved.

CN119862941AActive Publication Date: 2025-04-22ZHEJIANG GONGSHANG UNIVERSITY +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510348109.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

There are catastrophic forgetting and concept drift problems in federal continuous learning, which are difficult to effectively solve in existing solutions and increase storage and computing overhead while protecting privacy.

Method used

Generative models are used to generate data that simulates the global distribution characteristics of old task data. Combined with knowledge distillation technology, the old category information is accurately preserved and concept drift is reduced through the calculation and screening of feature mean and variance.

Benefits of technology

Effectively alleviates catastrophic forgetting, protects data privacy, reduces storage and computing overhead, and improves the adaptability of the model in complex real-life scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862941A_ABST
    Figure CN119862941A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic federal continuous learning method and system oriented to category overlapping scenes. According to the method, the generation model is adopted to generate data to simulate the global distribution characteristics of old task data, so that the privacy of the data in the training process is ensured; training the local model ensures the validity of the synthetic data. In addition, by screening synthetic data without outdated information, rapid adaptation to dynamic data distribution and accurate reservation of old category information are realized. The method has the advantages of being high in model adaptability, high in forgetting resistance, low in calculation overhead and the like, and is suitable for multi-scene application of distributed intelligent equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of federated continuous learning, and specifically relates to a dynamic federated continuous learning method and system for category overlapping scenarios. Background Art

[0002] In the field of federated learning, most existing federated learning solutions focus on scenarios where data is static. However, in the real world, data is usually in a state of dynamic change, which requires federated continuous learning to deal with it. Catastrophic forgetting is a common and thorny problem in the process of continuous learning of multiple tasks. At present, most solutions rely on the reuse of old data, which not only increases the user's storage overhead, but also poses the risk of privacy leakage. Although using generative models to generate data can solve this problem to a certain extent, if the generative model is configured on the client, it will generate too much unnecessary overhead. In addition, existing solutions generally do not consider scenarios where categories overlap between tasks, which will lead to the concept drift problem, that is, outdated information contained in past tasks will hinder the training of new tasks. Therefore, there is an urgent need for a new method that can not only use generative models to mitigate catastrophic forgetting while protecting privacy, but also accurately retain old category information, thereby effectively solving the concept drift problem. Summary of the invention

[0003] The present invention aims to solve the problems of catastrophic forgetting and concept drift in federated continuous learning.

[0004] The technical solution of the present invention is as follows: A dynamic federated continuous learning method for category overlapping scenarios 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 current task private data and the gradient descent method to update the local model parameters. After completing a fixed round of iterations, the updated parameters are uploaded to the server. When the last upload of the initial task training is completed, the feature mean and variance corresponding to each category are calculated and uploaded at the same time. The server initializes the generative model and generates initial synthetic data based on the initial condition label and Gaussian distribution noise; after receiving the global model trained for the previous task and the feature mean and variance of the client, the feature mean and variance are calculated and the loss function is used to train the generative model, which is used to simulate the synthetic data of the global distribution characteristics of the old task data; Based on the updated global model, the client uses the real data of the new task to obtain the feature mean vector of each category and upload it. The server aggregates to obtain the global mean, compares the deviation between the synthetic data of the overlapping categories and the corresponding global mean, and deletes the synthetic data with higher 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, and then continuously repeats the steps from uploading feature statistical information to model update aggregation to achieve continuous learning.

[0005] Furthermore, when the client uses the current task private data to update the local model parameters using the gradient descent method, each round of 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 model parameters, is the true label, Predict labels for the model.

[0006] Furthermore, the feature mean and variance corresponding to each category are calculated as follows: The client model is divided into two parts: feature extractor and classifier , client sample The feature representation is obtained by the feature extractor: , Calculate the feature mean for each category and variance : , in is the sample set of category c in client k, is the number of samples belonging to category c in the local data of client k, is the feature representation of sample i belonging to category c.

[0007] Furthermore, the feature mean and variance are calculated and the loss function is used to train the generative model. The formula is: , 、 , , For synthetic data categories c The characteristic mean and variance of For each category, select the client with the greatest loss : , Calculate feature loss: , Then through the loss function Update the generated model parameters: , in, is the batch normalization loss, and are the mean and variance of the generated data, and is the target statistic of the real data.

[0008] Furthermore, based on the updated global model, the client uses the real data of the new task to obtain the feature mean vector of each category and uploads it. The server aggregates it to obtain the global mean, compares the deviation between the synthetic data of the overlapping categories and the corresponding global mean, and deletes the synthetic data with higher deviation. Specifically: After the client receives the global model, it uses the reality of the new task to obtain the feature mean vector of each category: , in, For new task categories a On the client side k The feature mean vector in , is the number of samples of category a in client k, Is the client k Medium Category A sample set of is the feature extractor part of the global model, Upload to the server and aggregate to get the global mean , the aggregation formula is as follows: , After that, the server's synthetic data is given to the global model to obtain the predicted label, that is, each synthetic sample There are corresponding prediction labels , whose label set is , the label set of the new task data is ,so is a set of overlapping categories. For the synthetic samples of overlapping categories, calculate their similarity with the global mean of the corresponding category: , in, , , For synthetic data Feature representation after feature extraction, is the global mean corresponding to the predicted label of the synthetic sample; Then convert the similarity into deviation: , in, As a constant, the deviation of all overlapping category synthetic samples is normalized: , in, is the total number of samples of overlapping categories, according to the threshold Delete deviation higher than The synthetic samples.

[0009] Furthermore, the client uses the private data of the current task and the processed synthetic data to update the loss function of the local model parameters: , in, CE () is the cross entropy loss function, KL () is the KL divergence function, For Clients k On Task t The model parameters, is the true label, Represents the original data With processed synthetic data A combination of is the weight coefficient, The client's model parameters in the previous round of tasks, is the predicted output.

[0010] The present invention also provides a dynamic federated continuous learning system for category overlapping scenarios, including a server and a client; The server is used to initialize the global model and send down parameters, initialize the generation model, receive model parameters, feature means and variances uploaded by the client, train the generation 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 the global model and synthetic data sent by the server, calculate the feature mean vector based on the global model using the real data of the new task and upload it, and update the local model parameters using private data and synthetic data and upload it.

[0011] Furthermore, the interaction process between the server and the client and the operation steps performed by each correspond to the steps of the dynamic federated continuous learning method for the category overlapping scenario.

[0012] Compared with the prior art, the present invention has the following advantages: The dynamic federated continuous learning method and system for category overlapping scenarios proposed in the present invention have many significant advantages. In terms of privacy protection and computational overhead, a generative model is used to generate data that simulates the global distribution characteristics of old task data. Combined with knowledge distillation technology, the direct use of old data is avoided, which not only protects data privacy, but also reduces the storage overhead and computational burden caused by the reuse of old data. In response to the problem of catastrophic forgetting, the data generated by the generative model is used to help the model review old task knowledge when learning new tasks, effectively reducing catastrophic forgetting. When dealing with category overlapping scenarios, the category adaptation mechanism based on data features accurately retains old category information by screening synthetic data, reduces concept drift, and enables the model to quickly adapt to dynamic data distribution, greatly enhancing the adaptability of the model in complex real-world scenarios. It can be widely used in multiple scenarios of distributed intelligent devices, and strongly promotes the application and development of federated continuous learning technology in practice. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the description and claims, serve to illustrate the embodiments of the invention. Where appropriate, the same reference numerals are used throughout the 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 present apparatus or method.

[0014] Figure 1 It is the technical solution flow chart and system of the present invention; Figure 2 Flowchart for generating model training; Figure 3 Flowchart for screening of synthetic data. DETAILED DESCRIPTION

[0015] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0016] like Figure 1 As shown, the present invention has two entities, a server and a client. Through the interaction between them, the present invention provides the following dynamic federated continuous learning method and system for category overlapping scenarios, including the following steps: Global model initialization: The server initializes the global model as the initial model of the first task and sends its model parameters to the client.

[0017] Initial task training: Client k uses the current task Private data , using the gradient descent method to adjust the model parameters In each iteration, by minimizing the loss function , the parameter update process is as follows: , in is the learning rate, r represents the current iteration round , , is the loss function with respect to the parameter The gradient of , CE() is the cross entropy loss function. Parameter update requires a fixed number of iterations. The updated model parameters are uploaded to the server. The server averages the aggregated model parameters to update the global model , the aggregation formula is as follows: , Where K is the total number of clients, represents the total number of samples of client k.

[0018] When the client uploads the model parameters for the last time, it uploads the feature mean and variance corresponding to each category to the server. The feature mean and variance are calculated as follows: The client model is divided into two parts: the feature extractor and classifier . Client Sample The feature representation is obtained by the feature extractor: , Calculate the feature mean for each category and variance : , in is the sample set of category c in client k, is the number of samples belonging to category c in the local data of client k, is the feature representation of sample i belonging to category c.

[0019] Generate model training: The server initializes the generative model based on the initial condition labels And the noise z extracted from the Gaussian distribution generates the initial synthetic data. Receive the global model trained well in the previous task and the mean of the client's features and variance After that, the feature mean of each category of the synthetic data is calculated in the same way and variance , the difference is the feature extractor used is part of the global model. Then, for each category, the feature mean and variance of the synthetic data are calculated with the loss uploaded by the client, which is defined as: , For each category, select the client with the greatest loss : , Calculate feature loss: , Then through the loss function Update the generated model parameters: , in is the batch normalization loss, and is the target statistic of the real data. Figure 2 .

[0020] Server generates synthetic data ,in is the number of synthetic samples. The updated global model is sent to the client.

[0021] Filtering synthetic data: The client receives the global model Afterwards, using real data from new tasks Get the feature mean vector for each category: , in is the feature mean vector of the new task category a in client k, is the number of samples of category a in client k, is the category in client k A sample set of For the global model The feature extractor part of Upload to the server and aggregate to get the global mean , the aggregation formula is as follows: , After that, the server's synthetic data is given to the global model to obtain the predicted label, that is, each synthetic sample There are corresponding prediction labels , whose label set is The label set of the new task data is ,so is a set of overlapping categories. For synthetic samples of overlapping categories, calculate their similarity with the global mean of the corresponding category: , in . Then convert the similarity into deviation: , Then the deviation of all overlapping category synthetic samples is normalized: , in is the total number of samples of overlapping categories. Delete deviation higher than Synthetic samples of . Figure 3 .

[0022] 7) The server processes the synthesized data Send to the client.

[0023] 8) The client uses the private data of the current task With synthetic data Update the local model parameters, the loss function is as follows: , Where CE() is the cross entropy loss function and KL() is the KL divergence function. Upload the updated model parameters Aggregate the global model to the server.

[0024] 9) Repeat steps 3)-7) to complete the training of subsequent tasks.

[0025] The present invention can effectively alleviate the catastrophic forgetting of previous tasks by using the method of data-free distillation without violating privacy. At the same time, it can adapt to the category overlapping scenarios in dynamic data environments, and propose a category adaptation mechanism based on data features, which can accurately retain old category information by screening synthetic data without outdated information.

[0026] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A dynamic federated continuous learning method for category overlapping scenarios, characterized in that: The following steps are involved: 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 current task private data and the gradient descent method to update the local model parameters. After completing a fixed round of iterations, the updated parameters are uploaded to the server. When the last upload of the initial task training is completed, the feature mean and variance corresponding to each category are calculated and uploaded at the same time. The server initializes the generative model and generates initial synthetic data based on the initial condition label and Gaussian distribution noise; after receiving the global model trained for the previous task and the feature mean and variance of the client, the feature mean and variance are calculated and the loss function is used to train the generative model, which is used to simulate the synthetic data of the global distribution characteristics of the old task data; Based on the updated global model, the client uses the real data of the new task to obtain the feature mean vector of each category and upload it. The server aggregates it to obtain the global mean, compares the deviation between the synthetic data of overlapping categories and 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, and then continuously repeats the steps from uploading feature statistical information to model update aggregation to achieve continuous learning.

2. The dynamic federated continuous learning method for category overlapping scenarios according to claim 1 is characterized in that: In the process of updating the local model parameters by the gradient descent method using the current task private data, each round of 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 model parameters, is the true label, Predict labels for the model.

3. The dynamic federated continuous learning method for category overlapping scenarios according to claim 1 is characterized in that: The feature mean and variance corresponding to each category are calculated as follows: The client model is divided into two parts: feature extractor and classifier , client sample The feature representation is obtained by the feature extractor: , Calculate the feature mean for each category and variance : , in is the sample set of category c in client k, is the number of samples belonging to category c in the local data of client k, is the feature representation of sample i belonging to category c, For Clients The feature mean of category c in For Clients The characteristic variance of class c in .

4. The dynamic federated continuous learning method for category overlapping scenarios according to claim 1 is characterized in that: Calculate the feature mean and variance and the loss function to train the generated model. The formula is: , 、 、 , For synthetic data categories c The characteristic mean and variance of is the total number of clients; For each category, select the client with the greatest loss : , Calculate feature loss: , Then through the loss function Update the generated model parameters: , in, is the batch normalization loss, and are the mean and variance of the generated data, and is the target statistic of the real data, is the weight coefficient, is the feature loss used to train the generative model.

5. The dynamic federated continuous learning method for category overlapping scenarios according to claim 1 is characterized in that: Based on the updated global model, the client uses the real data of the new task to obtain the feature mean vector of each category and upload it. The server aggregates to obtain the global mean, compares the deviation between the synthetic data of overlapping categories and the corresponding global mean, and deletes the synthetic data with high deviation. Specifically: After the client receives the global model, it uses the reality of the new task to obtain the feature mean vector of each category: , in, For new task categories a On the client side k The feature mean vector in , is the number of samples of category a in client k, Is the client k Medium Category A sample set of is the feature extractor part of the global model, Upload to the server and aggregate to get the global mean , For client samples, the aggregation formula is as follows: , After that, the server's synthetic data is given to the global model to obtain the predicted label, that is, each synthetic sample There are corresponding prediction labels , whose label set is , the label set of the new task data is ,so is a set of overlapping categories. For the synthetic samples of overlapping categories, calculate their similarity with the global mean of the corresponding category: , in, , , For synthetic data Feature representation after feature extraction, is the global mean corresponding to the predicted label of the synthetic sample; Then convert the similarity into deviation: , in, As a constant, the deviation of all overlapping category synthetic samples is normalized: , in, is the total number of samples of overlapping categories, according to the threshold Delete deviation higher than The synthetic sample of The set of deviations of synthetic samples for all overlapping classes.

6. The dynamic federated continuous learning method for category overlapping scenarios according to claim 1 is characterized in that: The loss function of the client using the private data of the current task and the processed synthetic data to update the local model parameters is: , in, CE () is the cross entropy loss function, KL () is the KL divergence function, For Clients k On Task t The model parameters, is the true label, Represents the original data With processed synthetic data A combination of is the weight coefficient, The client's model parameters in the previous round of tasks, is the predicted output.

7. A dynamic federated continuous learning system for overlapping category scenarios, characterized in that: Including server and client; The server is used to initialize the global model and send down parameters, initialize the generation model, receive model parameters, feature means and variances uploaded by the client, train the generation 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 the global model and synthetic data sent by the server, calculate the feature mean vector based on the global model using the real data of the new task and upload it, and update the local model parameters using private data and synthetic data and upload it.

8. The dynamic federated continuous learning system for category overlapping scenarios according to claim 7, characterized in that: The interaction process between the server and the client and the operation steps performed by each correspond to the steps of the dynamic federated continuous learning method for category overlapping scenarios described in claims 1-6.

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

  • User group and financial user group analysis method and device based on Gaussian mixture model

    CN115905648A

  • Remote sensing image segmentation method and system, storage medium and equipment

    CN119360025A

  • System and method for providing security in a distributed computation system utilizing containers

    US10397255B1