Federal class-incremental image classification method based on malleable distillation and local class boosting

By employing plastic distillation and local class augmentation in federated incremental image classification, the problems of overfitting to local classes and old data are addressed, achieving more efficient model training and privacy protection, and improving the accuracy and adaptability of image classification.

CN118397318BActive Publication Date: 2026-11-27EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310574769.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2026-11-27
Estimated Expiration
2043-05-22

AI Technical Summary

Technical Problem

Existing federated incremental image classification frameworks suffer from overfitting to local categories and old data, resulting in low training efficiency and accuracy, and are unable to effectively cope with dynamic data changes.

Method used

We employ a method based on plastic distillation and local class augmentation. By decoupling the knowledge distillation of logits vectors, we reduce the strong constraints of the old model on the new task. We also perform class augmentation on the local client data through a mixup approach to alleviate the overfitting problem. At the same time, we only send the local model, rather than data or gradient information, in federated communication to ensure privacy protection.

Benefits of technology

It improves the model's adaptability and accuracy under dynamic data, reduces storage and computation costs, enhances privacy protection, improves the problem of knowledge forgetting, and improves the accuracy of image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397318B_ABST
    Figure CN118397318B_ABST
Patent Text Reader

Abstract

The application designs a federal class incremental image classification method based on plastic distillation and local class enhancement. The plasticity of the federal class incremental model is taken as the starting point, and two modules of plastic distillation and local class enhancement are respectively proposed. The application further improves the knowledge distillation method in class incremental learning, decouples the prediction expectation vector into label items and non-label items, and respectively performs distillation with different weight coefficients. At the same time, when selecting the teacher model, the plastic distillation does not use the global model of the last communication round, but uses the global model which has not been completely fitted to distill the model of the next incremental stage. The local class enhancement generates new classes through the mutual combination of local clients, and uses an independent class enhancement classifier for classification. The local class enhancement prevents the overfitting of the local model to the local class through a large number of generated new classes, and combines the aggregation and distribution of the multiple federal models to alleviate the heterogeneity problem under the federal learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a federated incremental image classification method based on plastic distillation and local class enhancement, belonging to the field of pattern recognition and classification technology. Background Technology

[0002] Image classification technology, a crucial area in computer vision, has made significant progress. It aims to enable computers to automatically recognize images and categorize them correctly. Traditional image classification models are typically trained offline, requiring a complete and mature dataset for training and a test set for evaluation. However, with the development of big data technology and the increasing complexity of application scenarios, traditional training methods have some drawbacks. In hospital pathology image diagnostic classification, new viral variants or viral infection diagnostic data streams often emerge. This necessitates adding the new medical dataset to the original dataset and retraining from scratch; otherwise, the model cannot accurately fit the data distribution. Furthermore, due to user data privacy concerns, collecting complete user data in medical image diagnosis is difficult. To address these challenges, researchers have proposed the concepts of federated learning and incremental learning. Federated learning is a distributed training framework focused on user privacy. Incremental learning, on the other hand, addresses streaming data, allowing training in batches or by task, enabling the model to automatically adapt to new data distributions without accessing old task data, thus avoiding retraining the entire dataset. Combining these two approaches allows models to better adapt to complex big data environments.

[0003] In federated incremental learning scenarios, medical case image classification models face a severe knowledge forgetting problem. In traditional federated learning, all example categories under the federated framework are known and fixed. However, real-world scenarios are typically dynamic, with local clients receiving new class data online. Existing federated learning methods usually require storing all training data for old classes on the local client side to obtain a global model through federated learning. Therefore, when new classes arrive at each client dynamically, the high storage and computational costs become a significant burden. Existing federated incremental learning methods alleviate the knowledge forgetting problem by decoupling model parameters and distributing task-specific model parameters, or by replaying local client examples on the server through gradient-based prototype communication mechanisms to select the optimal global model and guide the federated incremental model to better fit the data.

[0004] However, existing methods fail to effectively intervene in the client-side model training process. In federated incremental learning scenarios, clients are prone to overfitting to local categories and older data when training with local data. Furthermore, the heterogeneity of client-side data severely impacts the effective convergence of the global model, further exacerbating the knowledge forgetting problem. Even though existing methods employ different strategies to filter models, they cannot fundamentally alleviate the client-side local overfitting issue, resulting in low accuracy in the final image classification model. Summary of the Invention

[0005] Technical Problem: To address the issue of overfitting to local categories and old data in existing federated incremental image classification frameworks, which hinders efficient training, this invention provides a federated incremental image classification method based on plastic distillation and local class enhancement. It employs knowledge distillation based on decoupled logits vectors to implement regularization constraints of the old teacher model on the new model, and selects an incompletely fitted global model of the old task as the teacher model, thereby reducing the strong constraint of the old model on the new task training. Simultaneously, a mixup approach is used to enhance the categories of local client-private data, alleviating the overfitting problem of local categories by each client.

[0006] Technical Solution: First, a federated model is established based on the privacy requirements of each federated user, transforming the image data of each federated user into a labeled dataset suitable for model training. Second, the processed dataset is divided into training and testing datasets. If the dataset is limited, it can be used entirely for training. Then, before training begins, an additional classifier is added to each local client model for discriminative training of local class enhancement. Next, in the first round of incremental tasks, each client combines its private image samples using Mixup to obtain a large number of generated classes and labels, and uses the additional classifier for discriminative training of the generated classes. After the first round of incremental tasks, each client uploads its local model to the central server for aggregation. Each round of incremental tasks contains multiple global communication rounds. This invention updates the teacher model only in a fixed global communication round within each round of incremental tasks, generally selecting the global round before the last decay of the learning rate. In subsequent incremental tasks, local samples are input into the teacher model and local model respectively to obtain probability vectors, which are then decoupled into labeled and unlabeled groups, and distilled separately to constrain the training of the new model. In the testing step, the test dataset is input into the final global model for discrimination.

[0007] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0008] Existing federated incremental image classification methods send local data gradient information during federated communication, which can easily lead to user information leakage and reduce the privacy protection of the framework. Unlike existing methods, this invention does not send any data or gradient information related to user data; it only sends the local model to the client, thus ensuring absolute privacy protection of federated user data. Existing methods, in mitigating the problem of knowledge forgetting exacerbated by heterogeneity in federated learning, essentially achieve this through model selection, resulting in limited improvement. This invention directly intervenes in the training process of the local model, providing superior model plasticity while ensuring good model fitting, thereby automatically adjusting to the best-fitting global model during federated incremental processing.

[0009] This invention re-examines the role of knowledge distillation in federated incremental learning. By reducing the strong constraints of labeled items in knowledge distillation, it improves the plasticity of the new model during the learning process. Conversely, by increasing the proportion of unlabeled items in knowledge distillation, it better transfers rich knowledge from the old model to the new model. Attached Figure Description

[0010] Figure 1 This is a flowchart of the client training process in a federated incremental framework;

[0011] Figure 2 This is a flowchart of the server-side workflow in a federated incremental framework; Detailed Implementation

[0012] To more clearly describe the content of this invention, further explanation is provided below with reference to examples and accompanying drawings. The embodiments described below are not intended to limit the scope of this invention. The federated incremental image classification framework based on plastic distillation and local class enhancement of this invention includes the following steps:

[0013] Step 1: Divide the client images into a training set and a test set. The training set contains images {X}. i} N and the corresponding category label {Y i} N , where N is the total number of training samples;

[0014] Step 1.1: All training data are divided into a set of continuous incremental tasks. Where all represents the total number of incremental tasks. By N t For example and corresponding one-hot tags Composition. Y t Let represent the label space of the t-th task, where the label spaces of different tasks have no overlap;

[0015] Step 2: Configure K local clients and a global server S g ;

[0016] Step 2.1: Each local client constructs a local sample memory M to select m for the client's private legacy class. t Each sample is saved, and m t < <N t ;

[0017] Step 3: Add an additional independent classifier to the model for each local client, with input dimension V. in Consistent with the original model's ordinary classifier, the output dimension V out The square of the current number of client sample categories;

[0018] Step 3.1: In a data batch on the local client, randomly select two samples of different classes for class enhancement and assign them new labels. The specific steps of class enhancement are as follows:

[0019] Step 3.1.1: Randomly select two different categories, let's say a and b, corresponding to the input matrix x. a and x b The two are then mixed to obtain a new input matrix. Here, λ represents the random synthesis factor, which controls the influence ratio of the two original classes in the generated class. To obtain the best results, the value of the synthesis factor is limited to [0.4, 0.6].

[0020] Step 3.1.2: Let the category labels of the original class be y. a and y b The two are then mixed to generate the class category label. for: Where k represents the total number of categories in the current client, and y b >y a .

[0021] Step 3.1.3: Perform supervised training on the generated class input model with corresponding labels, minimizing the local class augmentation loss function Loss. classAug for: Where L represents the cross-entropy function. Meanwhile, within the same data batch, the classification loss of the original local image samples is... cl for: In the first round of incremental tasks, the total loss function is: Loss total =Loss cl +Loss classAug (5)

[0022] Step 4: After all clients complete local training, they send their local models to the server, which then aggregates them using federated averaging to obtain the global model.

[0023] Step 5: The server sends the global model to each local client, and each client updates the learning rate parameters according to the local training rounds and continues training;

[0024] Step 6: Before the model learning rate decays for the last time in the current incremental task, update the teacher model with the global model. As the teacher in knowledge distillation, the teacher model remains fixed.

[0025] Step 7: Each client inputs the original sample x into the local model (student model) and the teacher model respectively. The student model outputs the probability vector as follows: in This represents the student model's predicted probability for category i. The calculation method is as follows: Among them, z i This represents the model's logits output for class i. Similarly, the teacher model outputs a probability vector.

[0026] Step 7.1: This invention outputs the item p containing the category l label in the model's logits. l Let the sum of all unlabeled terms be p. \l The calculation method is as follows: The original distillation vector can be viewed as decomposing into a binary probability vector b = [p l ,p \l ].

[0027] Step 7.2: For unlabeled items, calculate the probability of each item in the unlabeled group. Defined as:

[0028] Step 7.3: The traditional definition of knowledge distillation is as follows: Where, p τ and p s Let represent the probability vectors output by the teacher model and the student model, respectively. Based on formulas (7) and (8), formula (9) can be decomposed as follows:

[0029] Step 7.4: The first two terms of formula (10) are the relative entropy of the sum of labeled and unlabeled terms, and the last term is the entropy between each unlabeled term. Therefore, traditional knowledge distillation can be written as: in, and Let and represent the unlabeled probability vectors output by the teacher model. To increase the proportion of unlabeled items in knowledge distillation, the knowledge distillation loss function is rewritten as follows: Wherein, α and β represent the distillation coefficients of the labeled item and the unlabeled item, respectively. In this invention, they are set to 1 and 8, respectively.

[0030] Step 8: Each client completes local training and uploads it to the server until the federated incremental training is complete. Experimental Design

[0031] Experimental Dataset Selection: The dataset used in this section is Tiny-Imagenet, a commonly used dataset in the field of machine learning image classification. Tiny-Imagenet is a public dataset provided by Stanford University, containing 200 classes, with each class containing 500 training images, 50 validation images, and 50 test images. Each image in Tiny-Imagenet has a resolution of 64×64 pixels. For incremental tasks, this paper selects 100 classes from Tiny-Imagenet for experiments, with each incremental task containing 10 classes. There is no overlap in classes across different incremental tasks.

[0032] Experimental Environment: The operating system used in this experiment is Red Hat 8.2.1-3, the main experimental environment is torch 1.7.0, and the GPU for deep training computation is RTX-3090. The backbone network used for CIFAR-100 and Tiny-Imagenet training is ResNet-18.

[0033] Federated Incremental Learning Setup: In the initial training phase, this paper sets up 30 local clients, and then adds 10 more local clients with each new incremental task. In each incremental task, 10 clients are randomly selected from the existing set of local clients for training. Each client learns from 6 classes randomly selected from the 10 classes in the current incremental task. This setup better reflects the complexity of real-world federated learning scenarios and satisfies the condition that real-world training datasets are not independent and identically distributed.

[0034] In the federated learning process, each incremental task consists of 10 global communication rounds. Within each round, each local client performs 20 rounds of local training. After each global communication, the global server receives all the client models selected for the current incremental task, performs federated averaging to obtain the global model, and then distributes it to each local client. The local clients then continue training for 20 rounds based on this global model. The sample memory size for each local model is set to 2000. All experiments in this paper are conducted under the above settings.

[0035] Training strategy: For CIFAR-100 and Tiny-ImageNet training, the batch size is 128, the SGD optimizer is used, the initial learning rate is 2.0, and the weight decay is 10. -5 The learning rate decays to 0.2, 0.04, and 0.008 times the initial learning rate at 100th, 150th, and 180th epochs of local training, respectively. The current epoch of local training is calculated using E... total =20×E global +E local E global E represents the number of global communication rounds that have been completed. local This indicates the local training round under the current global communication.

[0036] Comparison Algorithms: To verify the effectiveness of the proposed method, the comparative experiments used in this paper are the combination of mainstream incremental learning (iCaRL, Bic, PODnet, DDE, GeoDL, SS-IL) and federated averaging algorithm, as well as FCIL.

[0037] Evaluation Metric: The evaluation metric used in this paper is accuracy (Acc), which is the percentage of correctly predicted image categories in the test set out of the total number of images in the test set. Among them, E total This refers to the sum of the current federal incremental task test set and all previous incremental task test sets. Experimental results

[0038] Experimental results:

[0039] The comparative experiments on Tiny-ImageNet show that PDLCA achieves a comprehensive advantage over other federated incremental learning methods. In the first incremental task, PDLCA achieves an accuracy of 72.8%, in the fifth incremental task it achieves 56.0%, and in the final incremental task it achieves 46.3%. In contrast, FCIL achieves an accuracy of 73.4% in the first incremental task, 54.52% in the fifth incremental task, and 45.0% in the final task. PDLCA maintains its advantage in later incremental tasks on Tiny-ImageNet, and due to Tiny-ImageNet's larger pixel size and richer feature representation space, its good plasticity helps PDLCA achieve its advantage in all incremental tasks.

[0040] Experiments demonstrate that PDLCA exhibits better resistance to forgetting in long-term incremental tasks. This is primarily because plastic distillation and local class reinforcement enhance PDLCA's plasticity, enabling it to learn new knowledge more effectively while preserving existing knowledge. Plastic distillation, by increasing the proportion of unlabeled terms in the distillation loss, allows the old model to generate richer output alignments with the new model. Combined with the feature teacher model in the old incremental task, this imparts greater plasticity to the new model while transferring knowledge. Local class reinforcement, through a large number of generated classes, mitigates the model's overfitting to local classes, providing a broader learning space for subsequent incremental processes.

Claims

1. A federated incremental image classification method based on plastic distillation and local class enhancement, characterized in that, Includes the following steps: 1) Data collection: Based on the specific description of the federated incremental problem, the collected samples are transformed into a dataset that can be used for subsequent algorithm training, and divided into training set and test set; 2) Data partitioning: All training data are partitioned into a set of continuous incremental tasks. ,in This indicates the total number of incremental tasks. Depend on For example and corresponding one-hot tags composition; 3) In the first round of incremental tasks, two different classes of samples are randomly selected from a data batch of the local client, mixed to generate new samples, and assigned new labels for local class augmentation training; 4) Clients that have completed local training upload their local models to the server. The server then obtains the global model through federated averaging and sends it to each client. 5) The server updates the teacher model using the global model based on the current round. Since each incremental task round includes 10 rounds of global communication, and each client performs 20 rounds of local training under each round of global communication, each client will perform a total of 200 rounds of local training in an incremental task. Based on the current global communication, the number of local training rounds completed by each client can be determined, thereby determining the decay of the learning rate in the client. As the learning rate decays, each client model will gradually fit the local data. According to the federated incremental experiment settings, the teacher model is updated before the last decay of the learning rate and maintained until the next incremental task, until the next update of the teacher model, thereby reducing the overfitting of the teacher model to the old incremental task and giving the model higher plasticity in the new incremental task. 6) In subsequent incremental tasks, the client decouples the probability vectors of the teacher model into labeled and unlabeled groups, and performs knowledge distillation separately. Combined with training on the ordinary classification task of the current incremental task image, the specific process of plastic distillation is as follows: Input the original samples into the teacher model and student model respectively to obtain probability vectors. and The probability vector is decoupled into a labeled group and an unlabeled group, as shown in the following formula: (3) in, Represents the student model for categories The predicted probability, Represents the student model for categories The predicted probabilities for the unlabeled group are similarly calculated, as are the output probabilities of the teacher model. The label represents the corresponding label of the current sample, and N represents the total number of the current categories; the first two terms in formula (3) are the information entropy between the labeled and unlabeled items, and the last term is the entropy between each unlabeled item. Therefore, the decoupled knowledge distillation can be written as: (4) in, and These represent the distillation coefficients for labeled items and unlabeled items, respectively. 7) The final global model is used for discrimination during the testing phase.

2. The federated incremental image classification method based on plastic distillation and local class enhancement according to claim 1, characterized in that, Step 3) involves local class enhancement methods, including: first, performing a mixup based on a sample from the local client, using the following formula: (1) in, and These represent the input matrices of the original sample, The input matrix represents the new sample. The blending factor is a random number between [0.4, 0.6] used to achieve better class enhancement. The new sample label obtained by blending is calculated as follows: (2) in, and Indicates the original sample label, This indicates the total number of categories in the current client's original class; the generated classes and corresponding labels in step 3) are trained using independent class augmentation classifiers to ensure joint training without interfering with the original ordinary classification task; local class augmentation operations are only used in the first round of incremental tasks, and no further class augmentation operations are performed on local samples in subsequent incremental tasks.