A federated active learning method based on heterogeneous client perception

By calibrating the model decision boundary through client-side heterogeneous perception sampling and alignment loss function, the model training interference problem caused by non-independent and identically distributed (IID) in federated active learning is solved, and efficient data selection and high-quality model training are achieved.

CN115688914BActive Publication Date: 2025-10-03ZHEJIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211393730.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2025-10-03
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

When client data in existing federated active learning methods are not independent and identically distributed, model training is easily disturbed, resulting in low-information sample selection, which affects model accuracy and efficiency.

Method used

Through client-side heterogeneous perception sampling, the consistency results of model predictions are recorded, the cognitive change amount is used to guide sample selection, and an alignment loss function is designed to calibrate the model decision boundary. The training process is optimized by combining data freezing and wake-up mechanisms.

Benefits of technology

In a non-independent and identically distributed client environment, the information content of sample selection and model training efficiency are increased, and the model accuracy and computing performance are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0003932376180000022
    Figure BDA0003932376180000022
  • Figure BDA0003932376180000029
    Figure BDA0003932376180000029
  • Figure BDA0003932376180000041
    Figure BDA0003932376180000041
Patent Text Reader

Abstract

The present invention discloses a federated active learning method based on heterogeneous client perception. In the initial round, the client uses cross-entropy loss to perform local model training on its own private data; after completing local training, it uploads local updates to the server; the server performs aggregation to obtain a new round of global model, and sends it to all clients. Before the client receives the new global model and starts local training, it performs a sampling operation. In addition to the first round, local training not only calculates the cross-entropy loss, but the client will also classify the extracted unlabeled subsets based on the cognitive fluctuation information recorded in the previous round, and additionally calculate an alignment loss term to calibrate the decision boundary of the model to avoid wasting labeling budget on inaccurate models. The present invention solves the problem that existing federated active learning methods fail in heterogeneous scenarios. On the one hand, it more effectively measures the amount of sample information, and on the other hand, it can train a more accurate model, thereby reducing the cognitive fluctuation of the model to improve model performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a federated active learning method in the field of machine learning, and in particular to a federated active learning method based on client heterogeneous perception sampling. Background Art

[0002] Active learning learns a model by identifying the most informative unlabeled data and querying its labels from human experts. This approach addresses the difficulty in training high-quality models in machine learning due to insufficient labeled data, which is often caused by the high cost of labeling. However, due to limitations in manpower and the size of unlabeled corpora, each data owner performing active learning individually is often insufficient to achieve acceptable model accuracy. Distributed active learning addresses this issue by leveraging multiple users to collaborate on data labeling and model training. However, in this distributed paradigm, raw data is directly shared between users, leading to concerns about data privacy.

[0003] Federated active learning extends active learning to federated learning with multiple clients and a single server. Specifically, each client labels its own unlabeled data, uses the labeled data for local model training, and learns a shared global model through multiple rounds of communication with the server about model parameters rather than raw data. This overcomes limitations in data size and manpower, while alleviating concerns about data privacy.

[0004] Current federated active learning approaches deploy traditional active learning methods in a federated fashion. For example, these approaches employ data collection strategies based on uncertainty, diversity, and expected model variation. These approaches maintain good performance when client data follows an independent and identical distribution (IID). However, real-world client data often follows a non-IID distribution, making client model training and sampling susceptible to interference from other clients. These existing strategies often overlook the cognitive variations in models caused by heterogeneous clients, resulting in the selection of low-information samples and failures in federated active learning. Summary of the Invention

[0005] The purpose of the present invention is to address the shortcomings of the existing technology and provide a federated active learning method based on client heterogeneous perception sampling to solve the performance optimization of federated active learning when the client data follows non-independent and identically distributed (IID) and achieve efficient data selection and high-quality model training under limited client annotation budget.

[0006] The technical solution adopted by the present invention is as follows: a federated active learning method based on heterogeneous client perception, comprising the following steps:

[0007] (1) The client performs local model training on its own private data. After each local training, it infers each unlabeled sample and records the consistency of the model's predictions to capture cognitive fluctuations.

[0008] (2) After client k completes local training, it uploads the local update To the server; the server performs aggregation according to the formula to obtain a new round of global model ω r , and send it to all clients;

[0009]

[0010] Where N represents the total tag set size of all clients, represents the label set size of client k local training;

[0011] (3) Before the client receives the new global model and starts the next round of local training, the client counts the model predictions in consecutive rounds based on the information recorded in step (1) to see whether they are consistent and calculates the cumulative change

[0012] (4) The client calculates the amount of cumulative change and the budget Greedily select data from the unlabeled set and label it as Get an updated set of tags and the unlabeled set The formula is as follows:

[0013]

[0014]

[0015] (5) After the sampling is completed, the client uses the captured cognitive information to temporarily replace the model with overconfident or relatively simple zero-fluctuation samples. Move to dormant set Get the updated dormant set and unlabeled set; expressed as the following formula:

[0016]

[0017]

[0018] Only when there is no label set The size is less than the given wakeup threshold When Random wake-up T a Partially frozen data to the unlabeled pool;

[0019] (6) Complete federated active learning repeats steps (1) to (5) until the specified round or performance threshold is met; before each local training, except the first round, each client k will randomly sample a size of Subset of replace Participate in the follow-up process.

[0020] The present invention has the following beneficial effects:

[0021] 1. This paper proposes a novel and effective federated active learning method based on client heterogeneous perception sampling. It finds that unlike traditional active learning, the model cognition frequently changes due to the aggregation operations between heterogeneous clients.

[0022] 2. The present invention uses the cognitive changes of the model to measure the heterogeneity of the client to guide the selection of high-information samples; to avoid wasting budget, the present invention designs an alignment loss based on cognitive changes to calibrate the decision boundary of the model.

[0023] 3. The present invention designs a data freezing and awakening mechanism with subset sampling to optimize computing performance. In essence, it uses cognitive fluctuations to temporarily exclude overconfident and relatively unlabeled data from reasoning.

[0024] 4. Extensive experiments show that the proposed method has significant improvements over current baseline algorithms on typical image classification datasets for active learning and federated learning, especially when the data distribution and annotation behavior vary between different clients. DETAILED DESCRIPTION

[0025] The technical solution of the present invention is now further described with reference to specific implementations and examples.

[0026] The specific embodiments of the present invention and their implementation process are as follows:

[0027] Step 1: The client performs local model training on its own private data. After each local training, it performs inference on each unlabeled sample and records the consistency of the model's predictions to capture cognitive fluctuations. The specific operations are:

[0028] (1) First, use Indicates that client k is in its label set The model checkpoints after continuous updates of e rounds are calculated. Accordingly, Represents sample x after e rounds of training i The predicted label of . Among them, Represents x i The output after softmax activation in the last layer, where c represents a category.

[0029] (2) Secondly, for each Client k is of size Unlabeled set of Make an inference and record the prediction results When x i When two consecutive inference results are inconsistent, the local model has a cognitive change An E-dimensional vector EV is used to record the historical cognitive changes of each sample in E rounds. Therefore, in the rth communication round, client k has i Cognitive fluctuations It can be calculated as follows:

[0030]

[0031]

[0032] in, is an indicator function, and the first

[0033] In step 1, the loss of the first round of client-side local training is the classification loss based on cross entropy; the remaining rounds use a new loss function with an alignment loss term. The alignment loss term is used to calibrate the model decision boundary, specifically:

[0034] (1) In round r, client k changes its cognition based on the unlabeled samples Is there a greater-than-average cognitive change? Divide the unlabeled set into two categories (category j∈{0,1}), the formula is as follows:

[0035]

[0036]

[0037]

[0038] (2) We will use the current model Sample x i The feature (output before the softmax layer) is expressed as Therefore, we can use cosine similarity cos(·) to calculate the sample x i The feature output on the current model is different from the feature output on the trained local model. The distance d between the feature outputs on loc , and the trained global model ω r-1 The gap d between the feature outputsglo , which can be expressed as the following formula:

[0039]

[0040]

[0041] (3) Finally, we define the alignment loss in the following formula to align the decision boundary of the model for small EV samples with the local model, while the decision boundary of large EV samples is close to the global model.

[0042]

[0043] where τ represents a temperature parameter. In addition, if Then d * (x i ) means d loc (x i ), otherwise it means d glo (x i ). For each stochastic gradient descent (SGD), we randomly sample data from the unlabeled set to calculate the alignment loss, with a batch size equal to the labeled data of the current training. Therefore, the updated loss function is as follows.

[0044]

[0045] where μ is a hyperparameter that controls the weight of the alignment loss, and l class represents the basic Cross-Entropy classification loss. Therefore, the client objective function is transformed into the following:

[0046]

[0047] Step 2: After client k completes local training, it uploads the local update To the server; the server performs aggregation according to the formula to obtain a new round of global model ω r , and sent to all clients.

[0048]

[0049] Where N is the total tag set size of all clients, represents the label set size for local training of client k.

[0050] Step 3: Before the client receives the new global model and starts the next round of local training, the client counts the model predictions in consecutive rounds based on the information recorded in step (1) to see if they are consistent and calculates the cumulative change.

[0051] Step 4: The client calculates the budget based on the size of the cumulative change and the marking Greedily select data from the unlabeled set and label it as Get an updated set of tags and the unlabeled set The formula is as follows:

[0052]

[0053]

[0054] Step 5: After sampling is completed, the client uses the captured cognitive information to temporarily replace the model with overconfident or relatively simple zero-fluctuation samples. Move to dormant set Get the updated dormant set and unlabeled set. It can be expressed as the following formula:

[0055]

[0056]

[0057] Only when there is no label set The size is less than the given wakeup threshold We will start from Random wake-up T a Partially frozen data to the untagged pool, e.g. and

[0058] There are two reasons for zero fluctuations: first, the local model is overconfident and consistently gives the same prediction. Second, the examples are relatively simple, so annotation budget is not wasted. Our method temporarily prevents the model from looking at these overconfident examples until the unlabeled set is exhausted, reducing time consumption and alleviating the model's overconfidence.

[0059] Step 6: Complete federated active learning Repeat steps (1) to (5) until the specified round or performance threshold is met. Before each local training, except for the first round, each client k will randomly sample a size of Subset of replace Participate in subsequent processes.

Claims

1. A federated active learning method based on heterogeneous client perception, characterized in that: The following steps are involved: (1) The client performs local model training on its own private data; each time local training is completed, each unlabeled sample is inferred and the consistency result of the model's prediction is recorded to capture cognitive fluctuations; in step (1), the loss of the first round of client local training is a classification loss based on cross entropy; the remaining rounds are new loss functions with an alignment loss term added; the alignment loss term is used to calibrate the model decision boundary; (2) After client k completes local training, it uploads the local update to the server; The server performs aggregation according to the formula to obtain a new round of global model ω r , and send it to all clients; Where N represents the total tag set size of all clients, represents the label set size for local training of client k; (3) Before the client receives the new global model and starts the next round of local training, the client counts the model predictions in consecutive rounds based on the information recorded in step (1) to see whether they are consistent and calculates the cumulative change (4) The client calculates the amount of cumulative change and the budget Greedily select data from the unlabeled set and label it as Get an updated set of tags and the unlabeled set The formula is as follows: (5) After the sampling is completed, the client uses the captured cognitive information to temporarily replace the model with overconfident or relatively simple zero-fluctuation samples. Move to dormant set Get the updated dormant set and unlabeled set; expressed as the following formula: Only when there is no label set The size is less than the given wakeup threshold When Random wake-up T a Partially frozen data to the unlabeled pool; (6) Complete federated active learning repeats steps (1) to (5) until the specified round or performance threshold is met; before each local training, except the first round, each client k will randomly sample a size of Subset of replace Participate in the follow-up process.

2. The federated active learning method based on heterogeneous client perception according to claim 1 is characterized in that: The step (1) includes the following sub-steps: (1.1) Use Indicates that client k is in its label set The model checkpoint after continuous update of e rounds, Represents sample x after e rounds of training i The predicted label of ; where Represents x i In the output after the softmax activation of the last layer, c represents a certain category; (1.2) For each Client k is of size Unlabeled set of Make an inference and record the prediction results When x i When two consecutive inference results are inconsistent, the local model has a cognitive change An E-dimensional vector EV is used to record the historical cognitive changes of each sample in E rounds; therefore, in the rth communication round, client k has i Cognitive fluctuations Calculated as follows: in, is an indicator function, and the first 3. The federated active learning method based on heterogeneous client perception according to claim 1 is characterized in that: In step (1), the model decision boundary is calibrated using the alignment loss term, specifically: (A) In round r, client k’s cognitive changes based on unlabeled samples Is there a greater-than-average cognitive change? Divide the unlabeled set into two categories Category j∈{0,1}, the formula is as follows: (B) The current model Sample x i The characteristic representation of The current model Sample x i The feature is the output before the softmax layer; the cosine similarity cos(·) is used to calculate the sample x i The feature output on the current model is different from the feature output on the trained local model. The distance d between the feature outputs on loc , and the trained global model ω r-1 The gap d between the feature outputs glo , expressed as the following formula: (C) Finally, the alignment loss is defined in the following formula to align the decision boundary of the model of small EV samples with the local model, while the decision boundary of large EV samples is close to the global model; where τ represents a temperature parameter; in addition, if Then d * (x i ) means d loc (x i ), otherwise it means d glo (x i ); For each stochastic gradient descent SGD, data is randomly sampled from the unlabeled set to calculate the alignment loss, and the batch size is equal to the labeled data of the current training; therefore, the updated loss function is as follows; where μ is a hyperparameter that controls the weight of the alignment loss, and l class represents the basic Cross-Entropy classification loss; therefore, the client objective function is transformed into the following: