Federal incremental learning method based on feature distillation and prototype
Through feature distillation and class prototype federated class incremental learning methods, the problem of federated learning degradation in a dynamic environment is solved, and efficient incremental learning and class prototype adaptability are achieved, saving computing and storage Resources, alleviating the drift of class prototypes.
Patent Information
- Application Number
- CN202411085596.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-08
AI Technical Summary
When facing a dynamic environment, the existing federated incremental learning technology leads to a decline in the classification performance of old data, high computing power and storage space requirements, and the existing drift compensation strategy is not applicable to distributed systems, resulting in inefficiency of the system. and class prototype drift is inaccurate.
Using the federal class incremental learning method based on feature distillation and class prototype, the feature extractor knowledge of the old model is retained and the classifier weights of the old category are updated only by initializing the feature distillation and prototype enhancement strategies in the training and incremental learning stages. , prevent new category data corruption, update the global class prototype of the old category to enhance adaptability.
It realizes that there is no need to save old data locally, saves computing costs and storage space, balances old knowledge retention and new knowledge learning, alleviates the problem of class prototype drift, and enhances the adaptability and reliability of incremental learning.
Smart Images

Figure CN119026006A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated class incremental learning, and in particular to a federated class incremental learning method based on feature distillation and class prototypes. Background Art
[0002] With the widespread popularity of the Internet of Things, hundreds of millions of devices around the world continue to generate massive amounts of data, placing unprecedented demands on data processing and analysis. Due to data security and privacy issues, devices are often unable to share data with other devices. Against this background, federated learning came into being, which is a distributed learning system. Devices participating in federated learning use local data to train local models, and the central server collects and aggregates local models to achieve the purpose of multi-device collaborative training of shared models. However, federated learning often assumes that training data and test data come from the same and fixed categories, but the actual environment is open and dynamic. If training is only performed on new types of data, it will seriously affect the model's classification performance on old types of data, that is, it will cause catastrophic forgetting problems. Therefore, it is necessary to design a suitable federated incremental learning strategy to meet the challenges of incremental environments.
[0003] The existing federated incremental learning technology has the following technical problems: (1) The old class data is retained locally. As the number of classes continues to increase, the computing power and storage space of the local device are required to be high; (2) The existing drift compensation strategies are mostly suitable for centralized systems. Due to the heterogeneity of system structure and data, they are not suitable for distributed systems; (3) The federated learning aggregation strategy will aggravate the drift of class prototypes. If the class prototype is corrected after each aggregation, on the one hand, the existing drift compensation strategy is relatively complex and time-consuming, which will lead to inefficiency of the entire system; on the other hand, the results of predicting drift based on neural networks or predicting drift based on new class data are inaccurate. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a federated class incremental learning method based on feature distillation and class prototypes, which improves the existing technology, alleviates the catastrophic forgetting problem, and enhances the adaptability and reliability of the incremental learning strategy.
[0005] To achieve the above object, the technical solution adopted by the present invention is: to provide a federated class incremental learning method based on feature distillation and class prototype, the steps comprising:
[0006] When user S1 receives task t for the first time, it enters the initialization training phase, which includes the following steps:
[0007] S1.1 The server initializes the training model and sends it to the user;
[0008] S1.2 After user k performs local training on the local data set to obtain the initial local model, he uploads it to the server;
[0009] S1.3 The server collects the initial local models and aggregates them to obtain the initial global model ω t,r Then it is sent to the user for the next round of local training of r times;
[0010] S1.4 loops through S1.2-S1.3 to iteratively update the initial global model ω t,r Until the performance converges, the local training of task t is completed and the initial model ω is obtained t ;
[0011] S2 calculates the class prototype of each category c and prototype enhancement Using class prototypes Select local sample data and upload the class prototype set to the server and local sample data, the prototype enhancement amplitude Saved locally in the user's computer.
[0012] S3 server aggregation class prototype set Get the global class prototype set {e c}; The server collects the local sample data and constructs a shared data set S;
[0013] When the S4 user receives a new task, the system enters the incremental learning phase, which includes the following steps:
[0014] S4.1 The server freezes the model obtained after the previous task iteration update until the performance converges as the old model, and adds |C to the fully connected layer of the old model copy. new | neuron nodes as the new classification model for the new task, and the old model, the new classification model and the global class prototype set {e c} is sent to the user; the new classification model has |C new |+|C old | output nodes, |C old | is the total amount of the old category, |C new | is the number of new categories;
[0015] S4.2 The user performs local training on the new classification model using feature distillation and prototype enhancement strategies, obtains the new local model, and uploads it to the server;
[0016] S4.3 The server collects new local models and performs aggregation operations to obtain a new global model;
[0017] S4.4 The server fine-tunes the new global model classifier based on the shared data set S, and sends the fine-tuned new global model to the user for the next round of local training;
[0018] S4.5 executes S4.2-S4.4 in a loop, iteratively updates the new global model until the performance converges, and obtains a new model;
[0019] S5 The user calculates the new class prototype and the enhancement range of the new class prototype of the new class, selects the new class sample data using the new class prototype, and uploads the new class prototype and the new class sample data to the server;
[0020] The S6 server aggregates the new class prototype to obtain the new class global class prototype, which supplements the global class prototype set {e c}, the server collects the new class sample data and supplements the shared dataset S. At the same time, the server updates the global class prototype of the old category based on the shared dataset.
[0021] Preferably, the initial local model in step S1.2 uses a local loss function L local Perform local training, the local loss function L local By the cross entropy loss function L CE constitute:
[0022]
[0023] Among them, f represents the feature extractor, θ represents the classifier, Represents the local dataset that accepts the task for the first time, For the local dataset The size of p c is the probability that the model predicts that the sample is of category c, is an indicator function that takes the value 1 if · is true, and 0 otherwise.
[0024] Preferably, the initial global model ω in step S1.3 t,r The calculation process of the new global model is the same as that described in step 4.3, where the initial global model ω t,r :
[0025]
[0026] in, For the local dataset The size of
[0027] Preferably, the class prototype in step S2 The calculation process of the new class prototype in step S5 is the same, wherein the class prototype The calculation is as follows:
[0028] The data of each category are respectively input into the initial model ω t , calculate the mean of the local eigenvectors:
[0029]
[0030] in, is the set of categories c in the local dataset;
[0031] The prototype enhancement amplitude in step S2 The calculation process of the new class prototype enhancement amplitude in step S5 is the same, wherein the prototype enhancement amplitude By calculating the average class variance of the local feature vector:
[0032]
[0033] Where d is the dimension of the feature space, is the covariance matrix of the eigenvector of the data output of category c, Tr(·) represents the matrix trace operation, is the set of all data categories of task t that user k is exposed to.
[0034] Preferably, the local sample data in step S2 and the new sample data in step S5 are selected in the same way, wherein the local sample data selection process is as follows:
[0035] The user uses the L2 norm to measure the local feature vector corresponding to the data belonging to category c and the initial class prototype The similarity between them is sorted:
[0036]
[0037] The first M data with the highest similarity are selected as the local sample data, where the size of M is much smaller than the total number of data of category c.
[0038] Preferably, step S3 global class prototype e c The calculation process of the new class global class prototype is the same as that in step S6, wherein the global class prototype e c :
[0039]
[0040] Preferably, the loss function used in the new local model training in step S4.1 is:
[0041] L local =L CE +L ft +L orotoAug
[0042] Among them, L CE is the cross entropy loss for training new task data, L ft is the characteristic distillation loss, L protoAug is the prototype enhancement loss;
[0043] The cosine similarity is used to measure the difference between the features output by the new and old models, which is used as the feature distillation loss L ft :
[0044]
[0045] The user sets the amount of data N of the old category, uses Gaussian noise n~N(0,1) and the prototype enhancement amplitude of the old category Generates a prototype around the global class c Fluctuating, independent and identically distributed pseudo-eigenvectors
[0046]
[0047] The pseudo-eigenvector Input the classifier and calculate the prototype enhancement loss:
[0048]
[0049] Preferably, the process of fine-tuning the new global model classifier in step S4.4 is as follows:
[0050] The server fine-tunes a new global model classifier in each round using the shared dataset:
[0051]
[0052] in represents the frozen feature extractor, |S| represents the size of the shared dataset, [:|C old |] means that only the classifier weights related to the old categories are updated.
[0053] Preferably, the updating of the global class prototype of the old category in step S6 is performed as follows:
[0054] First, the server selects the shared dataset belonging to category c o ∈C old The sample data is input into the feature extractor f of the new model respectively. t and the feature extractor f of the old model t-1 , and obtain the eigenvector z i,t and z i,t-1 , the relative drift of the eigenvector is calculated as:
[0055]
[0056] Calculate the eigenvector z i,t-1 With the old global class prototype The distance is used to measure the weight w of the relative drift of the feature vector i :
[0057]
[0058] Where σ is the standard deviation of the Gaussian kernel;
[0059] Use the drift mean of the feature vector to approximate the global class prototype The semantic drift of is:
[0060]
[0061] Update the global class prototype of the old category:
[0062]
[0063] The above technical solution has the following advantages or beneficial effects:
[0064] (1) There is no need to save old data locally, saving computing costs and storage space; (2) By using feature distillation loss and prototype enhancement loss in the local training process of the incremental learning stage, the knowledge learned by the feature extractor of the old model is retained, and the stability of retaining old knowledge and the plasticity of learning new knowledge are balanced; (3) During the fine-tuning of the new global model classifier, only the classifier weights of the old category are updated to prevent the training results of the new category data from being destroyed during fine-tuning; the fine-tuning of the new global model classifier alleviates the drift problem of the class prototype; (4) The global class prototype of the old category is updated to enhance the adaptability and reliability of the global class prototype of the old category. When training the next task, the updated global class prototype is used to calculate a suitable pseudo feature vector.
[0065] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present invention and should not be regarded as limiting the scope of the present invention.
[0067] Figure 1 It is an overall flow chart of the technical solution of the present invention;
[0068] Figure 2 A schematic diagram of local training for a user of the present invention;
[0069] Figure 3 A schematic diagram of a model fine-tuning strategy for a server of the present invention;
[0070] Figure 4 Schematic diagram of the class prototype update strategy of the server of the present invention. DETAILED DESCRIPTION
[0071] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0072] The embodiment of the present invention proposes a federated class incremental learning method and system based on feature distillation and class prototype, such as Figure 1 Shown is an overall flow chart of the present invention.
[0073] The federated learning system consists of a server and K users. Each user undergoes a sequence of T image classification tasks. The data category of the tth task is Where C is the set of all possible data categories. Data categories do not overlap between different tasks, and each user can only access the data belonging to the task during the training of the task. In the scenario of federated learning, users participating in collaborative training are affected by factors such as personal preferences, geographical distribution, and data collection capabilities of devices, and the stored data has the characteristics of non-independent and identically distributed.
[0074] The present invention proposes a federated class incremental learning method based on feature distillation and class prototype, the steps comprising:
[0075] When user S1 receives task t for the first time, it enters the initialization training phase, which includes the following steps:
[0076] S1.1 The server initializes the training model and sends it to the user; the neural network structure involved in the training is represented by ω t,r ={f t,r ,θ t,r}, where f is the feature extractor and θ is the classifier;
[0077] S1.2 User k pairs of local data sets in represents the dataset used by user k during the tth task. After local training to obtain the initial local model, it is uploaded to the server;
[0078] The initial local model uses the cross entropy loss function L CE To perform local training:
[0079]
[0080] Among them, f represents the feature extractor, θ represents the classifier, Represents the local dataset that accepts the task for the first time, For the local dataset The size of p c is the probability that the model predicts that the sample is of category c, is an indicator function that takes the value 1 if · is true, and 0 otherwise.
[0081] S1.3 The server collects the initial local models and aggregates them to obtain the initial global model ω t,r Then it is sent to the user for the next round of local training of r times;
[0082] The initial global model ω t,r The calculation is as follows:
[0083]
[0084] in, For the local dataset The size of
[0085] S1.4 loops through S1.2-S1.3 to iteratively update the initial global model ω t,r Until the performance converges, the local training of task t is completed and the initial model ω is obtained t ;
[0086] S2 calculates the class prototype of each category c and prototype enhancement Using class prototypes Select local sample data and upload the class prototype set to the server and local sample data, the prototype enhancement amplitude Saved locally in the user's computer.
[0087] The class prototype The calculation process is as follows:
[0088] The data of each category are respectively input into the initial model ω t , calculate the mean of the local feature vector and obtain the class prototype
[0089]
[0090] in, is the set of categories c in the local dataset;
[0091] The prototype enhancement magnitude By calculating the average class variance of the local feature vector:
[0092]
[0093] Where d is the dimension of the feature space, is the covariance matrix of the eigenvector of the data output of category c, Tr(·) represents the matrix trace operation, is the set of all data categories of task t that user k is exposed to.
[0094] The local sample data selection process is as follows:
[0095] The user uses the L2 norm to measure the local feature vector corresponding to the data belonging to category c and the initial class prototype The similarity between them is sorted:
[0096]
[0097] The top M data with the highest similarity are selected as the local sample data, where the size of M is much smaller than the total number of data in category c, and the ratio is 0.03, that is, a small amount of local data is uploaded to the server; during the uploading process to the server, the local sample data is denoised and masked for privacy and security protection.
[0098] S3 server aggregation class prototype set Get the global class prototype set {e c}; The server collects the local sample data and constructs a shared data set S;
[0099] Among them, the global class prototype e c The calculation is as follows:
[0100]
[0101] When the S4 user receives a new task, the system enters the incremental learning phase, which includes the following steps:
[0102] S4.1 The server freezes the model obtained after the previous task iteration update until the performance converges as the old model (for example, when receiving a new task for the first time, freeze the initial model ω t as the old model), add |C to the fully connected layer of the old model copy new| neuron nodes as the new classification model for the new task, and the old model, the new classification model and the global class prototype set {e c} is sent to the user; the new classification model has |C new |+|C old | output nodes, |C old | is the total amount of the old category, |C new | is the number of new categories;
[0103] S4.2 The user performs local training on the new classification model using feature distillation and prototype enhancement strategies. The process is as follows Figure 2 As shown, after obtaining the new local model, upload it to the server;
[0104] The loss function used in the new local model training is:
[0105] L local =L CE +L ft +L protoAug ,
[0106] Among them, L CE is the cross entropy loss for training new task data, L ft is the characteristic distillation loss, L protoAug is the prototype enhancement loss;
[0107] The feature distillation loss retains the features extracted by the old model, alleviates the catastrophic forgetting problem, and uses cosine similarity to measure the difference between the features output by the new and old models as the feature distillation loss L ft ,
[0108]
[0109] The user uses the global class prototype sent by the server c The magnitude of the prototype enhancement of the old category stored locally by the user Generate rich pseudo-feature vectors of old categories Specifically, the user sets the data volume N of the old category, uses Gaussian noise n~N(0,1) and the prototype enhancement amplitude of the old category Generates a prototype around the global class c Fluctuating, independent and identically distributed pseudo-eigenvectors
[0110]
[0111] The pseudo-eigenvector Input the classifier and calculate the prototype enhancement loss:
[0112]
[0113] S4.3 The server collects the new local model and performs aggregation operation with the initial global model ω described in step S1.3 t,r The calculation process is the same. The weights are calculated according to the size of the training data set, and the weighted sum of the local models is divided by the sum of the sizes of the training data sets to obtain the new global model.
[0114] S4.4 The server fine-tunes the new global model classifier based on the shared dataset S. The fine-tuning strategy is as follows: Figure 3 As shown, the fine-tuned new global model is sent to the user for the next round of local training;
[0115] The process of fine-tuning the new global model classifier is as follows:
[0116] The server fine-tunes the new global model classifier in each round using the shared dataset S:
[0117]
[0118] in represents the frozen feature extractor, |S| represents the size of the shared dataset, [:|C old |] means that only the classifier weights related to the old categories are updated to prevent the training results of the new category data from being destroyed during fine-tuning.
[0119] If the pseudo-eigenvector is reliable, and the fine-tuning process will not change the parameters of the classifier too much; if the pseudo feature vector is unreliable, and the fine-tuning process will correct the training results of the new local model.
[0120] S4.5 executes S4.2-S4.4 in a loop, iteratively updates the new global model until the performance converges, and obtains a new model;
[0121] S5 The user calculates the new class prototype of the new category and the enhancement amplitude of the new class prototype, which is the same as the class prototype described in step S2 And the prototype enhancement magnitude The calculation process is the same, the new class prototype calculation process: input the data of each new category into the model that is iteratively updated to convergence performance, and calculate the mean of the local feature vector; the new class prototype enhancement amplitude calculation process: calculate the average class variance of the local feature vector; use the new class prototype to select new class sample data, the selection process is the same as the local sample data selection process in step S2, and upload the new class prototype and new class sample data to the server;
[0122] S6 The server aggregates the new class prototype (with the global class prototype e in step S3) cThe calculation process is the same, and the prototypes of each category are summed and averaged to obtain the new global class prototype, which supplements the global class prototype set {e c}, the server collects the new class sample data and supplements the shared data set S. Since the pseudo feature vector is used in the training process of the new model, its calculation method uses the global class prototype, so the global class prototype needs to be adjusted as the training model changes. The global class prototype of the old category is updated based on the shared data set. The update process is as follows: Figure 4 shown.
[0123] Update the global class prototype of the old class as follows:
[0124] First, the server selects the shared dataset belonging to category c o ∈C old The sample data {(x i ,y i )|y i =c o}, and input them into the feature extractor f of the new model respectively t (i.e., the feature extractor of the current task) and the feature extractor f of the old model t-1 (i.e., the feature extractor of the previous task), and obtain the feature vector z i,t and z i,t-1 , the relative drift of the eigenvector is calculated as:
[0125]
[0126] Using the relative drift of the feature vector, estimate the category c o The global class prototype The amount of semantic drift due to the feature vector and the global class prototype There are differences between them. Each sample involved in the estimation of semantic drift should have different measurement capabilities. The feature vector z is calculated. i,t-1 With the old global class prototype (i.e., the global class prototype of the previous task), when the feature vector z i,t-1 With the old global class prototype The closer it is, the stronger its measurement ability is, the greater its proportion in weighted average, and the weight w of the relative drift of the eigenvector is i :
[0127]
[0128] Where σ is the standard deviation of the Gaussian kernel;
[0129] Use the drift mean of the feature vector to approximate the global class prototype The semantic drift of is:
[0130]
[0131] Update the global class prototype of the old category:
[0132]
[0133] When a new task begins, the initial classification model and the updated global class prototype set are sent to the user, and steps S4-S6 are repeated.
[0134] The above technical solution has the following advantages or beneficial effects: there is no need to save old data locally, saving computing costs and storage space; by adopting feature distillation loss and prototype enhancement loss in the local training process of the incremental learning stage, the knowledge learned by the feature extractor of the old model is retained, and the stability of retaining old knowledge and the plasticity of learning new knowledge are balanced; in the process of fine-tuning the global model classifier, only the classifier weights of the old category are updated, preventing the training results of the new category data from being destroyed during fine-tuning; the fine-tuning of the new global model classifier alleviates the drift problem of the class prototype; the global class prototype of the old category is updated, which enhances the adaptability and reliability of the global class prototype of the old category, and when training the next task, the updated global class prototype is used to calculate a suitable pseudo-feature vector.
[0135] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A federated class incremental learning method based on feature distillation and class prototype, the steps comprising: When user S1 receives task t for the first time, it enters the initialization training phase, which includes the following steps: S1.1 The server initializes the training model and sends it to the user; S1.2 After user k performs local training on the local data set to obtain the initial local model, he uploads it to the server; S1.3 The server collects the initial local models and aggregates them to obtain the initial global model ω t,r Then it is sent to the user for the next round of local training of r times; S1.4 loops through S1.2-S1.3 to iteratively update the initial global model ω t,r Until the performance converges, the local training of task t is completed and the initial model ω is obtained t ; S2 calculates the class prototype of each category c and prototype enhancement Using class prototypes Select local sample data and upload the class prototype set to the server and local sample data, the prototype enhancement amplitude Saved locally in the user's computer. S3 server aggregation class prototype set Get the global class prototype set {e c }; The server collects the local sample data and constructs a shared data set S; When the S4 user receives a new task, the system enters the incremental learning phase, which includes the following steps: S4.1 The server freezes the model obtained after the previous task iteration update until the performance converges as the old model, and adds |C to the fully connected layer of the old model copy. new | neuron nodes as the new classification model for the new task, and the old model, the new classification model and the global class prototype set {e c } is sent to the user; the new classification model has |C new |+|C old | output nodes, |C old | is the total amount of the old category, |C new | is the number of new categories; S4.2 The user performs local training on the new classification model using feature distillation and prototype enhancement strategies, obtains the new local model, and uploads it to the server; S4.3 The server collects new local models and performs aggregation operations to obtain a new global model; S4.4 The server fine-tunes the new global model classifier based on the shared data set S, and sends the fine-tuned new global model to the user for the next round of local training; S4.5 executes S4.2-S4.4 in a loop, iteratively updates the new global model until the performance converges, and obtains a new model; S5 The user calculates the new class prototype and the enhancement range of the new class prototype of the new class, selects the new class sample data using the new class prototype, and uploads the new class prototype and the new class sample data to the server; The S6 server aggregates the new class prototype to obtain the new class global class prototype, which supplements the global class prototype set {e c }, the server collects the new class sample data and supplements the shared dataset S. At the same time, the server updates the global class prototype of the old category based on the shared dataset.
2. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: The initial local model in step S1.2 uses the local loss function L local Perform local training, the local loss function L local By the cross entropy loss function L CE constitute: Among them, f represents the feature extractor, θ represents the classifier, Represents the local dataset that accepts the task for the first time, For the local dataset The size of p c is the probability that the model predicts that the sample is of category c, is an indicator function that takes the value 1 if · is true, and 0 otherwise.
3. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: The initial global model ω described in step S1.3 t,r The calculation process of the new global model is the same as that described in step 4.3, where the initial global model ω t,r : in, For the local dataset The size of 4. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: Step S2: Class prototype The calculation process of the new class prototype in step S5 is the same, wherein the class prototype The calculation is as follows: The data of each category are respectively input into the initial model ω t , calculate the mean of the local eigenvectors: in, is the set of categories c in the local dataset; The prototype enhancement amplitude in step S2 The calculation process of the new class prototype enhancement amplitude in step S5 is the same, wherein the prototype enhancement amplitude By calculating the average class variance of the local feature vector: Where d is the dimension of the feature space, is the covariance matrix of the eigenvector of the data output of category c, Tr(·) represents the matrix trace operation, is the set of all data categories of task t that user k is exposed to.
5. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: The local sample data in step S2 and the new sample data in step S5 are selected in the same way, wherein the local sample data selection process is as follows: The user uses the L2 norm to measure the local feature vector corresponding to the data belonging to category c and the initial class prototype The similarity between them is sorted: The first M data with the highest similarity are selected as the local sample data, where the size of M is much smaller than the total number of data of category c.
6. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: Step S3 Global class prototype e c The calculation process of the new class global class prototype is the same as that in step S6, wherein the global class prototype e c :
7. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: The loss function used in the new local model training in step S4.1 is: L local =L CE +L ft +L protoAug Among them, L CE is the cross entropy loss for training new task data, L ft is the characteristic distillation loss, L protoAug is the prototype enhancement loss; The cosine similarity is used to measure the difference between the features output by the new and old models, which is used as the feature distillation loss L ft : The user sets the amount of data N of the old category, uses Gaussian noise n~N(0,1) and the prototype enhancement amplitude of the old category Generates a prototype around the global class c Fluctuating, independent and identically distributed pseudo-eigenvectors The pseudo-eigenvector Input the classifier and calculate the prototype enhancement loss:
8. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: The process of fine-tuning the new global model classifier described in step S4.4 is as follows: The server fine-tunes a new global model classifier in each round using the shared dataset: in represents the frozen feature extractor, |S| represents the size of the shared dataset, [:|C old |] means that only the classifier weights related to the old categories are updated.
9. The method for federated class incremental learning based on feature distillation and class prototype according to claim 1, characterized in that: Step S6 describes updating the global class prototype of the old category, and the process is as follows: First, the server selects the shared dataset belonging to category c o ∈C old The sample data is input into the feature extractor f of the new model respectively. t and the feature extractor f of the old model t-1 , and obtain the eigenvector z i,t and z i,t-1 , the relative drift of the eigenvector is calculated as: Calculate the eigenvector z i,t-1 With the old global class prototype The distance is used to measure the weight w of the relative drift of the feature vector i : Where σ is the standard deviation of the Gaussian kernel; Use the drift mean of the feature vector to approximate the global class prototype The semantic drift of is: Update the global class prototype of the old category:
Citation Information
Patent Citations
Personalized federal learning method based on decoupling knowledge distillation
CN117152480A
Image classification method based on federal knowledge distillation and ensemble learning
CN117523291A
System and method for classification of sensitive data using federated semi-supervised learning
EP4336413A1
Cited By
Material microscopy image prediction method based on improved sample-free incremental learning
CN119741538A
Traceable federal incremental learning method based on grouping feature aggregation
CN120087503A
Maritime work equipment driving motor fault increment classification method
CN120470417A
A fault incremental classification method for marine equipment driving motor
CN120470417B
Hypertension prediction method and system based on reinforcement learning and incremental learning
CN120853954A
