Efficient federal incremental learning method and system based on auxiliary generator

By introducing auxiliary generators and double loss compensation mechanisms in federated learning, the i.i.d. dataset is built and the global best model is selected, which solves the problems of high storage overhead, high computing consumption and catastrophic forgetting in federated learning, and improves the performance and stability of the model.

CN119513601AInactive Publication Date: 2025-02-25CHONGQING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411568176.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are problems such as high storage overhead, high computing consumption and catastrophic forgetting in federated learning, which restricts its widespread application.

Method used

Efficient federated incremental learning method based on auxiliary generators is adopted to alleviate the catastrophic forgetting problems of local and global models through the client's dual loss compensation mechanism, the construction and consistency processing of auxiliary generators, the construction of i.i.d. datasets of proxy servers and global model selection.

Benefits of technology

It effectively avoids catastrophic forgetting of local models, improves the performance of the model on old knowledge, solves catastrophic forgetting caused by global class imbalance, and improves the overall performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513601A_ABST
    Figure CN119513601A_ABST
Patent Text Reader

Abstract

The invention relates to an efficient federal incremental learning method and system based on an auxiliary generator, and belongs to the technical field of artificial intelligence. The method comprises the following steps: S1, a client relieves disastrous forgetting of a local model by using a dual-loss compensation mechanism; s2, the client constructs an auxiliary generator, and learns knowledge distribution of local data; s3, the proxy server executes consistency on the auxiliary generator to avoid mode collapse of the auxiliary generator; s4, the proxy server uses the uploaded auxiliary generator to construct an i. I. D. Data set, and catastrophic forgetting caused by global class imbalance is relieved; and S5, the proxy server selects an optimal global model on the established i. I. D. Data set, and the problem of disastrous forgetting of the global model is solved. According to the technical scheme, the defect that a large amount of storage overhead needs to be consumed in a traditional method is overcome, and a comprehensive solution for disastrous forgetting is provided from the local angle and the global angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology and relates to an efficient federated incremental learning method and system based on an auxiliary generator. Background Art

[0002] Since its introduction, Federated Learning has demonstrated great potential and value in data privacy protection, legal compliance, and efficient model training with its unique distributed machine learning framework design. It has not only attracted widespread attention in academia, but has also gradually found practical application scenarios in the industry, becoming a bridge to connect data islands and maximize the value of information. Federated learning, also known as joint learning, is centered on allowing multiple participants or computing nodes to collaboratively complete the training of machine learning models without directly sharing their original data. This feature is undoubtedly a revolutionary advancement for sensitive data-intensive industries such as healthcare, finance, and the Internet of Things. It not only protects data privacy and security, but also promotes knowledge sharing and model optimization.

[0003] The core advantage of federated learning is that it can effectively solve the problem of data silos. In the traditional machine learning model, data often needs to be processed centrally, which not only increases the risk of data leakage, but also limits the effective use of data resources. Federated learning uses distributed computing to process data locally, exchanging only model parameters or updating information, thereby achieving knowledge aggregation and iterative optimization of models without exposing the original data. This decentralized learning model has greatly promoted cross-institutional and cross-domain data cooperation and accelerated the innovation and application of AI technology. As the inheritance and development of federated learning, federated incremental learning can acquire knowledge in dynamic data and realize the ability of sustainable learning, further promoting the development of this technology field.

[0004] However, with the rapid development of federated learning and its related technologies, a series of challenges have emerged, becoming bottlenecks that restrict its widespread application. The primary problem is high storage overhead. Since federated learning involves multiple participants, each participant needs to store a certain amount of local data sets to support model training. In addition, the frequent exchange and update of model parameters has led to a surge in overall physical storage demand, which has put tremendous pressure on hardware resources. Especially when dealing with large-scale data sets, storage costs have become a burden that cannot be ignored.

[0005] Secondly, high computing consumption is also a major problem facing federated learning. In order to ensure data privacy, federated learning usually uses encryption technology to process data, including homomorphic encryption and differential privacy. Although these operations enhance security, they also significantly increase computational complexity, resulting in longer training time and huge consumption of computing resources. In addition, the frequent transmission and aggregation of model parameters also consumes a lot of network resources, further exacerbating the computing burden.

[0006] Furthermore, existing federated learning is unable to solve the problem of catastrophic forgetting. Catastrophic forgetting refers to the fact that the acquisition of new knowledge in the continuous learning process of the model often leads to the forgetting of old knowledge. This is a common problem in the field of deep learning. Under the federated learning framework, since the data distribution of each participant may vary greatly and the model update is based on local data, how to effectively alleviate catastrophic forgetting from a global perspective has become an urgent problem to be solved. Most of the current research only starts from the single perspective of the local client or the global server, lacking a comprehensive solution, resulting in large performance fluctuations in the continuous learning process of the model and the catastrophic forgetting phenomenon is still serious. Summary of the invention

[0007] In view of this, the purpose of the present invention is to provide an efficient federated incremental learning method and system based on an auxiliary generator, which can overcome the catastrophic forgetting problem of the model in federated incremental learning and improve the accuracy of the model in classifying old knowledge during continuous learning.

[0008] In order to achieve the above object, the present invention provides the following technical solutions:

[0009] An efficient federated incremental learning method based on an auxiliary generator, the method comprising the following steps:

[0010] S1. The client uses a double loss compensation mechanism to alleviate the catastrophic forgetting of the local model;

[0011] S2, the client builds an auxiliary generator to learn the knowledge distribution of local data;

[0012] S3, the proxy server enforces consistency on the auxiliary generator to avoid mode collapse of the auxiliary generator;

[0013] S4, the proxy server uses the uploaded auxiliary generator to construct an iid dataset to alleviate the catastrophic forgetting caused by global class imbalance;

[0014] S5. The proxy server selects the best global model on the constructed iid dataset.

[0015] Further, in step S1, it specifically includes:

[0016] S11, using class-aware gradient compensation loss to normalize the learning and forgetting rates between new and old classes;

[0017] S12. Use the class semantic relationship distillation loss to extract the semantic relationship between the new and old classes, and smoothly transition the learning process from the old class to the new class.

[0018] Further, in step S2, it specifically includes:

[0019] S21, before each training, the auxiliary generator network generates the knowledge data learned in the previous round of global training;

[0020] S22, mixing the generated data with the local data of this time to train the auxiliary generator network;

[0021] S23. Upload the trained generator and discriminator of the auxiliary generator network to the proxy server.

[0022] Further, in step S3, it specifically includes:

[0023] S31, replaying the knowledge of the auxiliary generator network uploaded to the proxy server;

[0024] S32, the proxy server performs FedAvg aggregation on the uploaded auxiliary generators. FedAvg aggregation refers to the aggregation process of the Federated Averaging algorithm;

[0025] S33, training the aggregated auxiliary generator network on the previously replayed data;

[0026] S34. When new data is detected, a new output node is added to the classifier to achieve the function of identifying new classes.

[0027] Further, in step S4, it specifically includes:

[0028] S41, using the uploaded auxiliary generator to replay knowledge and generate a series of old knowledge;

[0029] S42, using the aggregated global model, classify and identify the old knowledge, and calculate the probability value of the category to which it belongs through the softmax function;

[0030] S43. Select category data with a fixed category number threshold K, construct an iid data set, and overcome global class imbalance.

[0031] Further, in step S5, it specifically includes:

[0032] S51. On the constructed iid data set, using the previously aggregated and currently aggregated global models, select the global model with the best performance on the data set and return it to the client;

[0033] S52: The client uses the returned global best old model to overwrite the current local model and conduct the next round of training.

[0034] The beneficial effects of the present invention are:

[0035] The present invention utilizes a dual-loss auxiliary forgetting compensation mechanism to train a local model, which can avoid catastrophic forgetting of the local model and improve the performance of the model on old knowledge; the auxiliary generator is transmitted to the proxy server for execution consistency, which solves the problem of mode collapse in its training process; the proxy server receives the auxiliary generator uploaded by the client and uses it to construct an iid data set, which can solve the problem of global class imbalance and the global catastrophic forgetting caused by class imbalance; the proxy server determines and selects the best performing global model to cope with the problem of global catastrophic forgetting and improves the performance of the model.

[0036] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0038] Figure 1 It is a schematic diagram of the process of the present invention;

[0039] Figure 2 It is the overall framework diagram of the method of the present invention;

[0040] Figure 3 Qualitative analysis comparison chart using different incremental task settings on Dataset 1;

[0041] Figure 4 A qualitative analysis comparison chart using different incremental task settings on Dataset 2. DETAILED DESCRIPTION

[0042] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.

[0043] Figure 1It is a flow chart of the method of the present invention. As shown in the figure, the present invention provides an efficient federated incremental learning method and system based on auxiliary generators, including: the local client downloads the initial global model or the aggregated global model from the central server to update the local local model; the local client uses its own data to train the local model and additional auxiliary generators using the double-loss auxiliary forgetting compensation mechanism; the local model is uploaded to the central server for aggregation; the auxiliary generator is transmitted to the proxy server for consistency execution, and is used to construct an iid data set (i.e., an independent and identically distributed data set, which is an important concept in machine learning and statistics) to determine and select the best performing global model; the aggregated model and the auxiliary generator are returned to the client to obtain the next round of global model update.

[0044] In this embodiment, three essential concepts are involved in the method of the present invention:

[0045] The first concept is Federated Learning (FL). Traditional federated learning aims to coordinate a central server and multiple clients to jointly train a global model without requiring data to leave the local server. It mainly solves the following problems:

[0046]

[0047] Where N is the number of clients, p i >0, and∑ i p i =0, p i represents the data ratio of client i to the total data.

[0048] In addition, F i :R d →R is the expected loss on the data distribution of client i, expressed as follows:

[0049]

[0050] Where i = 1, ..., N, ξ i is a random data sample selected according to the distribution of customer i, is the model weight w and the sample ξ i The loss function of .

[0051] The second concept is Federated Class Incremental Learning (FCIL). The category data in the local client of FL is usually dynamically updated in the form of data streams and incorporated into the training of the local model. This means that the model can gradually expand its knowledge base as new data is added, without losing previously learned information even if the entire model is not retrained. More specifically, in the FCIL framework, there are K local clients Data flow D = {D 1 ,D 2 ,...,D m} Dynamically enter the model framework, each client C i , receiving a specific private task T i , Task T i The data in D i Usually different from the data on other nodes. Assume that the model has trained the tth incremental task in the rth round, where the lth client C l Selected to participate in the current round of federation aggregation. FedAvg is usually selected as the aggregation algorithm, and the basic formula is as follows:

[0052]

[0053] Aggregation Model Θ r,t is the global model in FL. Based on this, we formulate the objective function in FCIL as the following problem:

[0054]

[0055] Among them, n i =|D i |It is C i is the number of samples in , and n is the total number of samples.

[0056] The third concept: Auxiliary Classifier GAN (ACGAN) is a variant of Generative Adversarial Network (GAN) that introduces the concept of auxiliary classifier. ACGAN aims to generate labeled data that is both real and of a specific category. This method usually generates images with category information, allowing the generator to generate samples belonging to the specified category of data. For the discriminator, we hope that the classification can be correct and can correctly distinguish between real and fake data; for the generator, we also hope that the classification can be correct, but the discriminator cannot correctly distinguish between fake data.

[0057] The present invention proposes a method to stabilize the training of a local ACGAN network, that is, to perform model consistency on a proxy server. When the local client detects that the model acquires new knowledge, the present invention enhances the model in the proxy server by adding a new output classification node. In addition, the present invention migrates the classification layer of the ACGAN network from the local client to the proxy server and initializes an auxiliary discriminator on the proxy server. Subsequently, pseudo data is generated using the auxiliary generator, and the pseudo data is used to train the ACGAN in the proxy server, which enables the ACGAN network to learn the same content before and after aggregation, and no mode collapse phenomenon occurs.

[0058] In this embodiment, the present invention provides an efficient federated incremental learning method and system framework based on auxiliary generators, which comprehensively solves the catastrophic forgetting problem in the federated learning model from both local and global perspectives through the dual loss mechanism of the local client, the construction of the auxiliary generator network ACGAN, the consistency of the ACGAN network, the average entropy task detection, the proxy server to build independent and identically distributed data sets, and the selection of the global optimal model. The framework is divided into five parts, such as Figure 2 As shown:

[0059] 1. The first part is the double loss mechanism:

[0060] This part includes the client using the dual loss mechanism to train the local model. In order to alleviate the catastrophic forgetting problem caused by the different learning and forgetting rates between the new and old classes, the rates are normalized. In addition, the semantic relationship between the new and old classes is extracted to alleviate the catastrophic forgetting in the transition from the old class to the new class.

[0061] 2. The second part is the auxiliary client generator ACGAN:

[0062] Each client will build an auxiliary generator locally and use the local data set to train the auxiliary generator so that it can learn the knowledge distribution in the local data for subsequent generation and playback.

[0063] 3. The third part is the consistency of the server execution auxiliary generator:

[0064] The model is enhanced by adding a new output classification node in the proxy server, and the auxiliary generator is used to generate pseudo data to train the ACGAN discriminator.

[0065] 4. The fourth part builds the iid data set for the proxy server:

[0066] In the proxy server, the auxiliary generator network uploaded by the client is used to generate learned data of different categories and construct independent and identically distributed data sets for subsequent model selection.

[0067] 5. The fifth part selects the global best old model for the proxy server:

[0068] On the proxy server, the constructed iid dataset is used to test the aggregated global model, and the best old model among all global models is selected and returned to the undergraduate client to initialize the local model in the client.

[0069] The following explains the overall data processing and interaction process of this framework from the perspective of the entire framework process.

[0070] 1) Double Loss Forgetting Compensation Mechanism: When client C iWhen learning the tth incremental task, it receives two data sets. One is the new category training data from the incremental task, and the other is the data generated by the generator in the previous round. Represents the training samples in each batch, and the batch belongs to a subset of the set of new category data and generated data. The loss function of the local client in each batch is:

[0071]

[0072] where Θ r,t It can be the model passed from the server to the client, or the model of the client in the previous round of training. n represents the number of samples in each batch. is Θ r,t The predicted value, D CE (·;·) is the binary cross entropy loss.

[0073] Due to the category imbalance between the server and the client during the transition phase between learning new and old category data, this can cause local knowledge drift. This phenomenon may lead to severe local catastrophic forgetting of the model for old categories. To solve this problem, the present invention introduces a generative adversarial network on the local client, retaining the generator of the previous round to review old knowledge while learning new information. In addition, the present invention adopts class-aware gradient compensation loss and class semantic relationship distillation loss to solve the gradient propagation problem caused by the imbalance between the server model and local categories, ensuring a smooth transition of the semantic relationship between old and new categories throughout the incremental task.

[0074] 2) Locally construct auxiliary generator ACGAN: In order to protect data privacy and avoid additional storage overhead in the FCIL environment, this paper introduces a generative adversarial network ACGAN on the local client. The generator of ACGAN can generate images with specified category labels while considering the authenticity and category labels of the images, which gives it a great advantage in multi-category generation tasks.

[0075] In this paper, the classification module, discriminator and generator of ACGAN are denoted as C, D and G respectively, and their parameters are θ C ,θ D and θ G z represents a random noise vector, c represents its category label, and the distribution is recorded as p z and p c .y c is the true category label. The generator receives z and c as input, and its loss function includes authenticity loss and category loss. Both types of losses can be implemented using binary cross entropy loss, as shown below:

[0076]

[0077] Therefore, the loss function of the generator can be written as:

[0078]

[0079] The loss function of the discriminator also includes authenticity loss and category loss. The two types of loss functions are expressed as follows:

[0080]

[0081] Therefore, the loss function of the discriminator is:

[0082]

[0083] Therefore, the loss function of ACGAN can be expressed as:

[0084]

[0085] 3) Execute auxiliary generation network consistency: such as Figure 2 As shown, when the local client calculates the loss function and uploads the model, it is necessary to determine whether to start learning a new category. The present invention calculates the average entropy through the following calculation formula to monitor the arrival of new tasks.

[0086]

[0087] Where 1(·) is the entropy function. Since current theoretical knowledge cannot accurately quantify the change of average entropy with respect to the arrival of new categories, the threshold E is set. avg =1.2. Significant changes have occurred and the conditions are met When the local client receives new category data, it is inferred that the local client is receiving new category data. Therefore, the model in the proxy server is enhanced by adding a new output classification node. In addition, the classification layer is migrated from the local client to the proxy server and the auxiliary discriminator is initialized on the proxy server. Subsequently, pseudo data is generated using the auxiliary generator and the pseudo data is used to train the ACGAN in the proxy server.

[0088] 4) Constructing an iid independent and identically distributed dataset: In the rth round of global training, each client uploads its auxiliary generator to the proxy server, and these auxiliary generators generate learned local data, respectively, through the local model Θ r,tThe feature extractor extracts the features of the generated data and evaluates the extracted features through the softmax function to obtain the probability distribution of the category. The category corresponding to the maximum probability value in the calculated probability distribution vector is the category most likely predicted by the model. A larger probability value indicates that the generated data contains the most feature information. Sort by the size of the predicted value of each category, select the top K maximum probability values ​​of each category, and construct an iid data set.

[0089] 5) The proxy service selects the best global model: Whenever a client detects the entry of a new task, after completing the first round of global training for the new task, the proxy server uses the constructed iid dataset to evaluate the old model saved in the previous round of tasks and the currently aggregated global model, selects the model with the best result as the optimal model, and sends it to all clients.

[0090] In this example, the proposed solution is compared with the most advanced solutions for solving catastrophic forgetting of models, including GLFC, iCaRL, BiC, and SS-IL.

[0091] Compared with other models, in order to prove the effectiveness of the federated learning model proposed in the present invention in overcoming catastrophic forgetting, this embodiment is compared on the large dataset CIFAR-100. The experimental results obtained are shown in Table 1, where "Δ" represents the degree of improvement in the accuracy of the model proposed in the present invention relative to other methods.

[0092] Table 1

[0093]

[0094] The experimental results in the table show that under the same experimental settings, the average accuracy of the model proposed by the present invention is 3% to 18.1% higher than that of the existing class increment method. The experimental results show that under the federated learning framework, the model of the present invention can effectively alleviate the catastrophic forgetting problem that occurs in each local client in deep learning, and the participating clients can collaboratively train the global class increment model. At the same time, compared with other methods, this training method obtains a higher accuracy of the global class increment model.

[0095] In addition, this embodiment explores the impact of the number of incremental tasks in FCIL on model performance. Specifically, the present invention uses different incremental task settings (T = 5, 10, 20) on different data sets to perform qualitative analysis. The forgetting curve of the old knowledge model is obtained, such as Figure 3 and Figure 4 shown.

[0096] The blue curve is the experimental result of DLA-FCIL, which is higher than the curves of other algorithms (indicated by other colors), indicating that the model of the present invention performs well in different incremental task scenarios. By introducing an auxiliary generator in the local client, uploading it to the proxy server, constructing old knowledge that conforms to IID, and selecting the optimal old class for training in the local client, the local and global catastrophic forgetting problems can be effectively solved.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. An efficient federated incremental learning method based on an auxiliary generator, characterized by: The method comprises the following steps: S1. The client uses a double loss compensation mechanism to alleviate the catastrophic forgetting of the local model; S2, the client builds an auxiliary generator to learn the knowledge distribution of local data; S3, the proxy server enforces consistency on the auxiliary generator to avoid mode collapse of the auxiliary generator; S4, the proxy server uses the uploaded auxiliary generator to construct an iid dataset to alleviate the catastrophic forgetting caused by global class imbalance; S5. The proxy server selects the best global model on the constructed iid dataset.

2. According to claim 1, an efficient federated incremental learning method based on an auxiliary generator is characterized in that: In step S1, it specifically includes: S11, using class-aware gradient compensation loss to normalize the learning and forgetting rates between new and old classes; S12. Use the class semantic relationship distillation loss to extract the semantic relationship between the new and old classes, and smoothly transition the learning process from the old class to the new class.

3. The efficient federated incremental learning method based on auxiliary generator according to claim 2, characterized in that: In step S2, it specifically includes: S21, before each training, the auxiliary generator network generates the knowledge data learned in the previous round of global training; S22, mixing the generated data with the local data of this time to train the auxiliary generator network; S23. Upload the trained generator and discriminator of the auxiliary generator network to the proxy server.

4. The efficient federated incremental learning method based on auxiliary generator according to claim 3 is characterized by: In step S3, it specifically includes: S31, replaying the knowledge of the auxiliary generator network uploaded to the proxy server; S32, the proxy server will perform FedAvg aggregation on the uploaded auxiliary generator; S33, training the aggregated auxiliary generator network on the previously replayed data; S34. When new data is detected, a new output node is added to the classifier to achieve the function of identifying new classes.

5. The efficient federated incremental learning method based on auxiliary generator according to claim 4, characterized in that: In step S4, it specifically includes: S41, using the uploaded auxiliary generator to replay knowledge and generate a series of old knowledge; S42, using the aggregated global model, classify and identify the old knowledge, and calculate the probability value of the category to which it belongs through the softmax function; S43. Select category data with a fixed category number threshold K, construct an iid data set, and overcome global class imbalance.

6. The efficient federated incremental learning method based on auxiliary generator according to claim 5, characterized in that: In step S5, it specifically includes: S51. On the constructed iid data set, using the previously aggregated and currently aggregated global models, select the global model with the best performance on the data set and return it to the client; S52: The client uses the returned global best old model to overwrite the current local model and conduct the next round of training.

7. An efficient federated incremental learning system based on an auxiliary generator, characterized by: The system adopts the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Continuous learning method for federated learning

    CN113657607A