Federal active learning method for few sample data

By integrating active learning sample sampling technology and model integration into federated learning, the problems of high annotation cost and data privacy protection in deep learning model training with small sample data are solved, and efficient model performance improvement and cost reduction are achieved.

CN118536148APending Publication Date: 2024-08-23SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410450861.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-15
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In the era of big data, the small amount of sample data and high labeling costs make it difficult to effectively train deep learning models, especially in federated learning scenarios that require data privacy protection.

Method used

Integrate the sample sampling technology of active learning into the federated learning framework, build a new global model through model integration technology, only update the classifier module, and use the query committee to sample highly informative samples to reduce labeling costs and meet data privacy protection requirements.

Benefits of technology

It effectively reduces labeling costs and storage overhead, improves model convergence speed, is suitable for scenarios with few labels and data privacy protection, and improves model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536148A
    Figure CN118536148A
Patent Text Reader

Abstract

The invention discloses a federal active learning method for few sample data, and the method comprises the steps: enabling a neural network model to be reasonably divided into a feature extraction module and a classifier module, enabling a new global model to be connected in series with the feature extraction module in parallel through the classifier module obtained through the fine adjustment training of each client, the overhead of storage space and reasoning time can be effectively reduced. After features of unlabeled data samples are extracted through a feature extraction module, a group of prediction results are given through a plurality of classifier modules, and based on the inconsistency of the prediction results, high-information samples are selected and added into a labeled data set for federal learning training again, so that the labeling cost can be effectively reduced, and the performance of a neural network model is improved. The method is based on a model integration technology, is used for constructing a new federated learning global model to replace a query committee in active learning, and effectively meets collaborative training scenes lacking labels and needing data privacy protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to federated learning, active learning and deep neural network model technology, specifically to a federated active learning method for small sample data, and belongs to the field of computer and artificial intelligence. Background Art

[0002] On the one hand, in the era of big data, as people and various industries have a growing demand for data privacy, federated learning has been proposed as a distributed collaborative training machine learning paradigm that can protect data privacy and has been widely studied and applied. On the other hand, the improvement of artificial intelligence, especially deep learning model performance, depends to a certain extent on high-quality sample labels for supervised training.

[0003] However, the sample labeling cost is high due to the large amount of sample data and the fact that some samples require careful labeling by people with professional knowledge. Therefore, in practice, only a small number of data samples may be labeled, and most data samples are unlabeled.

[0004] Active learning is a special machine learning paradigm. Its core idea is to select the most valuable samples for labeling through learning models or algorithms. It is not necessary to label all samples in order to make the model achieve the expected accuracy or performance, which can effectively reduce the labeling cost. Summary of the invention

[0005] The present invention proposes a federated active learning method for small-sample data. By integrating the sample sampling technology of active learning into the federated learning framework, the method can not only meet the needs of data privacy protection, but also cope with the problem of few labels, thereby reducing the labeling cost.

[0006] To achieve the above object, the technical solution of the present invention is:

[0007] The federated active learning method for few-sample data includes the following steps:

[0008] S1. Traditional federated learning training: Each client participating in federated learning has a local labeled dataset D l The neural network model is trained collaboratively until the model converges under the current amount of labeled data and the global model W is obtained;

[0009] S2. Model performance test, performing performance test on W in step S1;

[0010] The benefits of steps S1 and S2 are that they make full use of existing labeled data to train the model, determine whether the model performance meets the requirements, avoid additional sample labeling work, and reduce labeling costs.

[0011] S3. Local fine-tuning training: The neural network model architecture is divided into two parts, namely the feature extraction module and the classifier module. The feature extraction module is close to the input end of the model and is used to extract the features of the data samples. The classifier module is close to the output end of the model and is used to classify the extracted features and obtain the prediction results. The fine-tuning training only trains the classifier model.

[0012] The benefit of this step is that only the classifier module is updated, which saves computational overhead and facilitates subsequent model integration operations.

[0013] S4. The central server connects the obtained set of classifier modules in parallel to the feature extraction module in a model integration manner to construct a new global model. The global model then plays the role of an active learning query committee and broadcasts the new global model to each client.

[0014] The benefit of this step is that the obtained set of classifier modules is used to construct a new global model using model integration technology to replace the role of the query committee in active learning. There is no need to save a set of local models as the query committee, thereby reusing the feature extraction module and saving storage overhead.

[0015] S5. Query committee sampling: Each client uses the new global model to perform active learning sampling in the form of query committees, without any labeled dataset D u A portion of the samples are sent to experts in related fields for annotation and sent to D l middle.

[0016] The benefit of this step is that using the new global model to perform active learning sampling in a query committee manner can sample highly informative samples, thereby accelerating the convergence of the model and reducing the labeling cost.

[0017] As a preferred embodiment, step S1 includes the following steps:

[0018] S11. If a global model has been retained before, use the previous global model, denoted as W0. Otherwise, initialize the federated learning global model and select an initial model W0 with parameters θ0.

[0019] S12. Local model training. In each federated learning training iteration t, the central server will use the current global model W t The parameter θ t Broadcast to all clients participating in the federated learning training. Each client C i Using local labeled datasets The local model is updated and trained, and the parameters are updated through the following objective function, as shown in formula (1);

[0020]

[0021] Among them, m i Is the client The number of samples, L is the loss function, which is used to measure the difference between the model prediction value and the actual label. x and y are samples and corresponding labels respectively;

[0022] S13. Model update aggregation: all clients participating in federated learning training update their local models and update the local model parameter differences. Upload to the central server, and the server uses a simple average or weighted average aggregation algorithm to update the global model parameters, as shown in formula (2);

[0023]

[0024] Where η is the learning rate, N is the number of clients, and w i is the client weight, the value of which usually depends on the number of samples in its local dataset or other factors;

[0025] S14. Repeat steps S1-2 and S1-3, iteratively performing local training and updating aggregation until the model converges.

[0026] As a preferred embodiment, if the step S2 has reached the expectation, the training is terminated; if it has not reached the expectation, the current global model parameters are retained and the next step is executed.

[0027] As a preferred embodiment, in step S3, each client has a labeled data set D l Fine-tune the training, freeze the feature extraction module parameters, and train the classifier module. After the fine-tuning training of each client is completed, upload the classifier module to the central server.

[0028] As a preferred embodiment, the local fine-tuning training in step S3 only trains and updates the classifier module, which facilitates the model integration operation in step S4.

[0029] As a preferred embodiment, in the model integration operation in step S4, the newly constructed global model is used to replace the role of the active learning query committee while reducing storage and reasoning overhead.

[0030] As a preferred embodiment, the specific sampling method of step S5 is to input the unlabeled data into the new global model, extract features through the feature extraction module, and then respectively input the features into a group of classifier modules, and then the group of classifier modules outputs a group of prediction values, and selects samples with larger differences in prediction values ​​as sampling samples.

[0031] As a preferred embodiment, for classification tasks, the difference in predicted values ​​can be measured by entropy, as shown in formula (3):

[0032]

[0033] Where C is the number of categories, p c It is the proportion predicted as category C. The higher the entropy H, the greater the prediction divergence of the sample.

[0034] As a preferred embodiment, for regression tasks, the difference in predicted values ​​can be measured using squared differences, as shown in formula (4):

[0035]

[0036] Where N represents the number of committee members or classifier modules, y i is the predicted value given by the i-th classifier module for the sample, It is the average value of all predicted values. The larger the variance Var is, the greater the prediction divergence for the sample is, and the process will return to step S1.

[0037] As a preferred embodiment, in the query committee sampling of step S5, the unlabeled samples will obtain a set of prediction values ​​through the newly constructed global model. Based on the prediction inconsistency between a set of prediction values, highly informative samples can be sampled for the next round of traditional federated learning training, thereby accelerating the improvement of model performance and reducing labeling costs.

[0038] Technical principle:

[0039] In the setting of federated learning, the present invention adopts model integration technology to integrate the classifier modules of a group of local models into a new global model to replace the role of the query committee in active learning, thereby sampling highly informative samples to improve model performance and reduce annotation costs.

[0040] Beneficial effects:

[0041] The present invention is a federated active learning method for few-sample data. By combining the idea of ​​query committee in active learning into the federated learning training framework through model integration technology, the traditional federated learning training framework is improved to make it suitable for a few-label environment. In addition, the storage and reasoning overhead can be effectively reduced. Based on the prediction inconsistency among query committee members, the uncertainty of samples is fully considered, the model convergence is accelerated, and the annotation cost is reduced. Specifically:

[0042] (1) The federated learning training framework has been improved to make it applicable not only to scenarios that require data privacy protection, but also to scenarios with few labels;

[0043] (2) Based on model integration technology, a new global model is constructed to replace the query committee in active learning, innovatively integrating the active learning concept into the federated learning framework. Compared with the traditional active learning query committee, which needs to save a group of models, it can effectively reduce storage and reasoning overhead;

[0044] (3) The sampling of unlabeled samples is based on the prediction inconsistency among the query committee members, that is, selecting the points with the greatest disagreement. This fully considers the uncertainty of the samples and can obtain highly informative samples, accelerate model convergence, and reduce labeling costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of a federated active learning method for few labels;

[0046] Figure 2 Schematic diagram of the division of deep neural network models;

[0047] Figure 3 Schematic diagram of model integration technology. DETAILED DESCRIPTION

[0048] The following is a detailed description of an embodiment of the present invention in conjunction with the accompanying drawings: This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiments.

[0049] refer to Figure 1 ,A federated active learning method for few labels includes the following steps:

[0050] S1. Each client participating in federated learning has a local labeled dataset D l The neural network model is trained collaboratively on the client until the model converges under the current amount of labeled data, and the global model W is obtained. Each client has a labeled dataset containing a small number of labeled samples and an unlabeled dataset containing a large number of unlabeled samples, as well as computing, communication and storage devices.

[0051] S11. If a global model has been retained before, use the previous global model, denoted as W0. Otherwise, initialize the federated learning global model and select an initial model W0 with parameters θ0. The global model W0 here refers to the deep neural network model. If the model parameters need to be initialized, use Gaussian distribution to sample values ​​near 0.

[0052] S12. Local model training. In each federated learning training iteration t, the central server will use the current global model W t The parameter θ t Broadcast to all clients participating in the federated learning training. Each client Ci Using local labeled datasets The local model is updated and trained, and the parameters are updated through the following objective function, as shown in formula (1). In addition, the number of local training times and the learning rate are kept consistent for all clients.

[0053]

[0054] Among them, m i Is the client L is the loss function, which is used to measure the difference between the model prediction value and the actual label. x and y are the samples and the corresponding labels respectively.

[0055] S13. Model update aggregation: all clients participating in federated learning training update their local models and update the local model parameter differences. Upload to the central server. The server uses a simple average or weighted average aggregation algorithm to update the global model parameters, as shown in formula (2).

[0056]

[0057] Where η is the learning rate, N is the number of clients, and w i is the client weight, and its value usually depends on the number of samples in its local dataset or other factors.

[0058] S14. Repeat steps S1-2 and S1-3, iteratively perform local training and update aggregation until the model converges. The standard for model convergence is that the model performance no longer improves or fluctuates within a small range above or below a certain value.

[0059] S2. Perform a performance test on W. If it meets expectations, end the training. If it does not meet expectations, keep the current global model parameters and execute step S3. The central server has test sets, computing, communication and storage devices.

[0060] S3. References Figure 2 The neural network model architecture of federated learning training is divided into two parts, namely the feature extraction module and the classifier module. The feature extraction module is close to the input end of the model and is used to extract the features of the data samples. It usually includes deep neural network model architectures such as convolutional layers, pooling layers, activation layers, and attention mechanism layers. The classifier module is close to the output end of the model and is used to classify the extracted features and obtain prediction results. The model architecture is relatively simple and only includes a fully connected layer. Each client in D l Fine-tuning training is performed on the , which means using a smaller learning rate and fewer local training times. In this embodiment, the learning rate and local training times in normal federated learning training are used. Freeze the feature extraction module parameters, train the classifier module, and upload the classifier module to the central server after fine-tuning training on each client.

[0061] S4. References Figure 3 , the central server will obtain a set of classifier modules and connect them in parallel to the feature extraction module by model integration to build a new global model. Then the global model plays the role of query committee in active learning and broadcasts the new global model to each client.

[0062] S5. References Figure 3 Each client uses the new global model to perform active learning sampling in the form of query committees, without any labeled dataset D u 10% of the total initial sample volume is sent to D for annotation by experts in related fields. l The specific sampling method is to feed the unlabeled data into the new global model, extract features through the feature extraction module, and then feed the features into a set of classifier modules respectively. After that, a set of classifier modules outputs a set of prediction values, and selects samples with large differences in prediction values ​​as sampling samples. For classification tasks, the difference in prediction values ​​can be measured by entropy, as shown in formula (3).

[0063]

[0064] Where C is the number of categories, p c is the proportion predicted as category C. The higher the entropy H, the greater the prediction divergence for the sample. For regression tasks, the difference in predicted values ​​can be measured using the squared difference, as shown in formula (4).

[0065]

[0066] Where N represents the number of committee members or classifier modules, y i is the predicted value given by the i-th classifier module for the sample, It is the average value of all predicted values. The larger the variance Var is, the greater the prediction divergence of the sample is. Return to step S1.

[0067] In the above embodiment, the federated active learning method for small sample data includes traditional federated learning training, model performance testing, local fine-tuning training, model integration and active learning sampling, which well combines federated learning with active learning, can effectively cope with collaborative training scenarios with few labels and data privacy requirements, effectively reduce annotation costs, and improve model performance.

[0068] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A federated active learning method for few-sample data, characterized by: The following steps are involved: S1. Traditional federated learning training: Each client participating in federated learning has a local labeled dataset D l The neural network model is trained collaboratively until the model converges under the current amount of labeled data and the global model W is obtained; S2. Model performance test, performing performance test on W in step S1; S3. Local fine-tuning training, which divides the neural network model architecture into two parts, namely the feature extraction module and the classifier module. The feature extraction module is close to the input end of the model and is used to extract the features of the data samples. The classifier module is close to the output end of the model and is used to classify the extracted features and obtain the prediction results. Only the parameters of the classifier module are updated; S4. The central server connects the obtained set of classifier modules in parallel to the feature extraction module in a model integration manner to construct a new global model. The global model then plays the role of an active learning query committee and broadcasts the new global model to each client. S5. Query committee sampling: Each client uses the new global model to perform active learning sampling in the form of query committees, without any labeled dataset D u A portion of the samples are sent to experts in related fields for annotation and sent to D l middle.

2. The federated active learning method for few-sample data according to claim 1, characterized in that: The step S1 comprises the following steps: S11. If there is a previously retained global model, use the previous global model, denoted as W0. Otherwise, initialize the federated learning global model and select an initial model W0 with parameters θ0. S12. Local model training. In each federated learning training iteration t, the central server will t The parameter θ t Broadcast to all clients participating in the federated learning training. Each client C i Using local labeled datasets The local model is updated and trained, and the parameters are updated through the following objective function, as shown in formula (1); Among them, m i Is the client The number of samples, L is the loss function, which is used to measure the difference between the model prediction value and the actual label. x and y are samples and corresponding labels respectively; S13. Model update aggregation: all clients participating in federated learning training update their local models and update the local model parameter differences. Upload to the central server, and the server uses a simple average or weighted average aggregation algorithm to update the global model parameters, as shown in formula (2); Where η is the learning rate, N is the number of clients, and w i is the client weight, the value of which usually depends on the number of samples in its local dataset or other factors; S14. Repeat steps S1-2 and S1-3, iteratively performing local training and updating aggregation until the model converges.

3. The federated active learning method for small sample data according to claim 1, characterized in that: If the step S2 has reached the expected result, the training is terminated; if it has not reached the expected result, the current global model parameters are retained and the next step is executed.

4. The method for federated active learning of small sample data according to claim 1, characterized in that: In step S3, each client has a labeled data set D l Fine-tune the training, freeze the feature extraction module parameters, and train the classifier module. After the fine-tuning training of each client is completed, upload the classifier module to the central server.

5. The method for federated active learning of small sample data according to claim 1, characterized in that: The local fine-tuning training in step S3 only trains and updates the classifier module, which facilitates the model integration operation in step S4.

6. The method for federated active learning of small sample data according to claim 1, characterized in that: The model integration operation in step S4 can not only use the newly constructed global model to replace the role of the active learning query committee, but also reduce storage and reasoning overhead.

7. The method for federated active learning of small sample data according to claim 1, characterized in that: The specific sampling method of step S5 is to send the unlabeled data into the new global model, extract features through the feature extraction module, and then send the features into a group of classifier modules respectively. After that, the group of classifier modules outputs a group of prediction values, and selects samples with larger differences in prediction values ​​as sampling samples.

8. The method for federated active learning of small sample data according to claim 7, characterized in that: For classification tasks, the difference in predicted values ​​can be measured by entropy, as shown in formula (3): Where C is the number of categories, p c It is the proportion predicted as category C. The higher the entropy H, the greater the prediction divergence of the sample.

9. The method for federated active learning of small sample data according to claim 7, characterized in that: For regression tasks, the difference in predicted values ​​can be measured using the squared difference, as shown in formula (4): Where N represents the number of committee members or classifier modules, y i is the predicted value given by the i-th classifier module for the sample, It is the average value of all predicted values. The larger the variance Var is, the greater the prediction divergence for the sample is, and the process will return to step S1.

10. The method for federated active learning of small sample data according to claim 1, characterized in that: In the query committee sampling of step S5, the unlabeled samples will obtain a set of prediction values ​​through the newly constructed global model. Based on the prediction inconsistency between a set of prediction values, highly informative samples can be sampled for the next round of traditional federated learning training, thereby accelerating the improvement of model performance and reducing labeling costs.