A data selection method in federated learning scenarios

High-quality users are selected through privacy-preserving intersection technology and DPP algorithm, and deep learning and random response mechanisms are combined to calculate content diversity. This solves the privacy protection and resource consumption problems of high-quality data selection in federated learning, and improves model accuracy and convergence. speed.

CN112464269BActive Publication Date: 2024-09-24DEQING ALPHA INNOVATION RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011464915.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-14
Publication Date
2024-09-24
Estimated Expiration
2040-12-14

AI Technical Summary

Technical Problem

In federated learning, it is difficult for existing technologies to select high-quality training samples under the premise of privacy protection, resulting in low model accuracy and slow convergence speed, especially due to the problem that data cannot be directly accessed by third parties and computing resources are limited.

Method used

It uses privacy-preserving intersection technology (PSI) and dot matrix determinant (DPP)-based algorithm to select high-quality users, combines deep learning models to extract feature vectors and random response mechanisms for efficient content diversity calculations, and uses server-side log information dynamics Select users and data, and optimize user and data selection strategies.

Benefits of technology

It improves the accuracy of the model and accelerates the convergence speed of the model, while ensuring the protection of data privacy and reducing computing overhead and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112464269B
    Figure CN112464269B
Patent Text Reader

Abstract

A data selection method in a federated learning scenario, the method comprising filtering out users and data related to a task, user selection before training, user and data selection during training, and model training. The present invention adopts a vector sketch and a random response mechanism, and the user selection strategy is efficient and has privacy protection. At the same time, since server-side log information is used to dynamically select users, data is selected based on a gradient upper bound, and the influence of erroneous data on the gradient is taken into account, the data selection strategy is efficient and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data selection method in a federated learning scenario, which belongs to the field of data analysis and data quality assessment. Background Art

[0002] How to obtain a large amount of high-quality datasets has become a common bottleneck for many machine learning models and AI applications. This is not only because it is very expensive to collect and label a large number of samples, but also because privacy issues hinder data sharing in many fields (such as medicine and economics). The emergence of federated learning makes it possible for end users to jointly train network models using local data. In the process of federated learning, the quality of the user's local data affects the performance of the global model, and low-quality data (e.g., wrongly labeled data, non-uniformly distributed data) will seriously hinder the global model from achieving good results.

[0003] The present invention aims to select a set of high-quality training samples for a given federated learning task in a privacy-preserving manner under a given budget, thereby improving the accuracy of the model and accelerating the convergence of the model.

[0004] There has been a series of works on data selection in deep learning: 1) They proposed a variety of quality indicators, such as task relevance and content diversity, and tested the quality indicators of data samples, and selected data with high quality scores to participate in training. 2) Dynamically select training samples that are important to the model to form data batches during training to accelerate model convergence. Usually, the importance score is quantified by the gradient norm or loss value. But they cannot be directly used in federated learning: 1) Existing methods require direct access to all training samples, while in a federated system, data cannot be directly accessed by third parties. 2) Directly calculating the importance of each sample imposes unacceptable overhead on participants with limited resources. 3) Existing methods do not consider the impact of non-IID or erroneous samples on sample selection strategies, and may give higher importance to erroneous samples, thereby reducing model performance. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a privacy-preserving method for selecting a set of high-quality training samples for a given federated learning task, thereby improving the accuracy of the model and accelerating the convergence of the model. The method includes filtering out users and data related to the task, user selection before training, user and data selection during training, and model training.

[0006] As a preference: Task-related users and data filtering When a FL task arrives, the server first calculates the C k , the label set Y of k∈[K] k ={y k |(xk ,y k )∈D k The intersection of {(x k ,y k )|y k ∈Y k ∩Y} to filter out users with target category data. If the number of samples in the intersection set exceeds the minimum number of target models |{(x k ,y k )|y k ∈Y k ∩Y}|>v, then the user is related. In order to meet the privacy protection requirements, we use the privacy-preserving intersection technique (PSI).

[0007] As a preference: Pre-training user selection: The server further selects a high-quality user set (user subscript set Q) from the relevant user set using a dot matrix determinant (DPP) algorithm to maximize homogeneity and content diversity under the budget constraint B: max V(Q),st,∑ k∈Q,Q∈N′ b k ≤BV(Q) is the quality value of the selected user. Then, the server coordinates the selected users to start training the model. In this module, the following steps are mainly followed:

[0008] a) User selection based on homogeneity: The server prioritizes users whose data is evenly distributed and whose categories are not missing. When homogeneity is used as the criterion for selecting users, V μ (Q) = ∑ k∈Q μ k , μ k It is defined as the difference between the data distribution of user k and the uniform distribution, that is: To protect privacy, we calculate μ k We use an efficient and secure two-party computation protocol based on BGN homomorphic encryption to allow the server and each user to jointly compute using the server's public key. The server then greedily selects the user with the largest users until budget B is used up and find the best user set.

[0009] b) Diversity-based user selection: The server selects users with diverse data content to participate in model training. When content diversity is used as the indicator for selecting users, V(Q) = ρ(D), D∪ k∈Q D k , Where S(v i , v j ) is the calculation user C i , C jThe server greedily selects the next user with the lowest similarity to the current user set.

[0010] In order to calculate the content diversity of a dataset, we first need to extract the feature vector representation of the data. We use a deep learning model to extract features, such as using the VGG-16 network to extract the content feature vector of an image, and then calculate the content diversity of all the user's data. When the user's data volume M is large and the feature vector dimension l is high, the cost of calculating content diversity is very high O(M 2 l), and the existing calculation methods need to directly access the original data. Therefore, we propose an efficient privacy-preserving content diversity calculation method. This method constructs the features of each user dataset through a low-dimensional vector based on the JL transformation and uses a random response mechanism to protect the privacy of each sample. It is mainly divided into the following steps:

[0011] i. Constructing a dataset content sketch: User C k Locally generated content feature vector φ k ={φ k,i |i∈[U k ]}, then the server selects a mapping matrix w to convert φ k Mapped to a low-dimensional vector h(φ k,i )=sign(w·φ k,i ). The distortion caused by this mapping reduces the accuracy of diversity, but protects the privacy of the user's mapping vector to a certain extent. K The content vector sketch is

[0012] ii. Random response mechanism: To further protect the privacy of each data existence, we use a random response mechanism to generate the vector sketch h(φ k,i ) is represented by the perturbation vector by The probability of is 1, The probability of 0 is 0, and the probability of 1-f is f is a parameter that controls the degree of privacy defined by the user. The user then uses the perturbation vector to generate a perturbation sketch And Sent to the server, the server uses the perturbed sketch vector to calculate similarity And calculate content diversity At this point, the server's computing overhead for content diversity has been reduced by several orders of magnitude, and the user's data privacy has been protected.

[0013] C) User selection based on lattice determinant: When considering both homogeneity and diversity, the user selection problem is transformed into a DPP problem.i The homogeneity fraction is μ i , and user C j The similarity is S ij , we define the semi-positive definite matrix A [N′] =[A ij ] i,j∈[N′] , A ij =u i u j S ij , then the probability of the user being selected is P A (Q) = det(A Q ). When homogeneity increases and similarity decreases, the determinant increases, so DPP-based selection tends to select users with evenly distributed categories while avoiding users with highly similar content. Value function V d (Q) = det(A Q ), S Q =[S ij ] i,j∈Q We transform the user selection problem into a log-submodular problem and iteratively select the maximum P A (Q∪{k}) user C k .

[0014] As a preference: during the training process, users and data are selected as a given set of high-quality users, whose index set is Q∈[N′], |Q|=K. In order to further improve the model performance and reduce the training overhead, a ζ proportion of users are selected in each round of training iteration, and users select important data samples locally to participate in model training. An intuitive quantitative user C k The method of importance in round t is to calculate is the sample z k,i At the input and output of the last layer (L layer) of the model, the upper bound based on the gradient is used to select data. However, this method has a large computational cost when the model is complex and the amount of data is large. O(n·s), where n is the total amount of data and s is the number of model parameters θ∈R s To this end, we propose a strategy to dynamically select users based on server-side log information. Specifically, in round t, the server selects users based on the probability of being selected. Select m users, That is, we make users who have a greater impact on the model be selected with a higher probability. For each selected user C k , they locally calculate the importance of each data λ(z k,i , t-1), and then with probability (The gradient L2 norm of the wrong data is much larger than the gradient L2 norm of the correct data) Select those Data k,i ∈D k .

[0015] As a preference: the model is trained such that in each iteration, all selected users train their local models on the selected samples, and the server aggregates the model updates of the users to update the global model. The server repeats this process until the global optimal model θ is obtained. * .

[0016] The present invention designs an efficient data selection method for federated learning, improves the accuracy of the model and accelerates the convergence speed of the model. The advantages of the method proposed by the present invention are that the user selection strategy is efficient and has privacy protection due to the use of vector sketches and random response mechanisms; at the same time, due to the use of server-side log information to dynamically select users; data is selected based on the upper bound of the gradient, and the influence of erroneous data on the gradient is taken into account, so the data selection strategy is efficient and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 Flowchart of an efficient data selection system in federated learning scenarios. DETAILED DESCRIPTION

[0018] The present invention will be described in detail below with reference to the accompanying drawings: Figure 1 As shown, the data selection method in the federated learning scenario proposed in the present invention is mainly divided into the following modules: filtering out users and data related to the task, user selection before training, user and data selection during training, and model training.

[0019] (1) Task-related users and data filtering: When a FL task arrives, the server first calculates the C k , the label set Y of k∈[K] k ={y k |(x k ,y k )∈D k The intersection of {(x k ,y k )|y k ∈Y k ∩Y} to filter out users with target category data. If the number of samples in the intersection set exceeds the minimum number of target models |{(x k ,y k )|y k ∈Y k∩Y}|>v, then the user is relevant. To meet the privacy protection requirements, we use the Privacy Preserving Intersection (PSI) technique.

[0020] (2) Pre-training user selection: The server uses the dot-based determinant (DPP) algorithm to further select a high-quality user set (user subscript set Q) from the relevant user set to maximize homogeneity and content diversity under the budget constraint B: maxV(Q),st,∑ k∈Q,Q∈N′ b k ≤BV(Q) is the quality value of the selected user. Then, the server coordinates the selected users to start training the model. In this module, the following steps are mainly followed:

[0021] a) User selection based on homogeneity: The server prioritizes users whose data is evenly distributed and whose categories are not missing. When homogeneity is used as the criterion for selecting users, V μ (Q) = ∑ k∈Q μ k , μ k It is defined as the difference between the data distribution of user k and the uniform distribution, that is: To protect privacy, we calculate μ k We use an efficient and secure two-party computation protocol based on BGN homomorphic encryption to allow the server and each user to jointly compute using the server's public key. The server then greedily selects the user with the largest users until budget B is used up and find the best user set.

[0022] b) Diversity-based user selection: The server selects users with diverse data content to participate in model training. When content diversity is used as the indicator for selecting users, V(Q) = ρ(D), D∪ k∈Q D k , Where S(v i , v j ) is the calculation user C i , C j The server greedily selects the next user with the lowest similarity to the current user set.

[0023] In order to calculate the content diversity of a dataset, we first need to extract the feature vector representation of the data. We use a deep learning model to extract features, such as using the VGG-16 network to extract the content feature vector of an image, and then calculate the content diversity of all the user's data. When the user's data volume M is large and the feature vector dimension l is high, the cost of calculating content diversity is very high O(M 2l), and the existing calculation methods need to directly access the original data. Therefore, we propose an efficient privacy-preserving content diversity calculation method. This method constructs the features of each user dataset through a low-dimensional vector based on the JL transformation and uses a random response mechanism to protect the privacy of each sample. It is mainly divided into the following steps:

[0024] i. Constructing a dataset content sketch: User C k Locally generated content feature vector φ k ={φ k,i |i∈[U k ]}, then the server selects a mapping matrix w to convert φ k Mapped to a low-dimensional vector h(φ k,i )=sign(w·φ k,i ). The distortion caused by this mapping reduces the accuracy of diversity, but protects the privacy of the user's mapping vector to a certain extent. K The content vector sketch is

[0025] ii. Random response mechanism: To further protect the privacy of each data existence, we use a random response mechanism to generate the vector sketch h(φ k,i ) is represented by the perturbation vector by The probability of is 1, The probability of 0 is 0, and the probability of 1-f is f is a parameter that controls the degree of privacy defined by the user. The user then uses the perturbation vector to generate a perturbation sketch And Sent to the server, the server uses the perturbed sketch vector to calculate similarity And calculate content diversity At this point, the server's computing overhead for content diversity has been reduced by several orders of magnitude, and the user's data privacy has been protected.

[0026] (3) User selection based on lattice determinant: When considering both homogeneity and diversity, the user selection problem is transformed into a DPP problem. i The homogeneity fraction is μ i , and user C j The similarity is S ij , we define the semi-positive definite matrix A [N′] =[A ij ] i,j∈[N′] , A ij =u i u j S ij , then the probability of the user being selected is P A(Q) = det(A Q ). When homogeneity increases and similarity decreases, the determinant increases, so DPP-based selection tends to select users with evenly distributed categories while avoiding users with highly similar content. Value function V d (Q) = det(A Q ), S Q =[S ij ] i,j∈Q We transform the user selection problem into a ]og-submodule problem and iteratively select the method that maximizes P A (Q∪{k}) user C k .

[0027] (4) User and data selection during training: Given a selected set of high-quality users, whose index set is Q∈[N′], |Q|=K, in order to further improve model performance and reduce training overhead, a ζ proportion of users are selected in each training iteration, and users locally select important data samples to participate in model training. An intuitive quantitative user C k The method of importance in round t is to calculate is the sample z k,i At the input and output of the last layer (L layer) of the model, the upper bound based on the gradient is used to select data. However, this method has a large computational cost when the model is complex and the amount of data is large. O(n·s), where n is the total amount of data and s is the number of model parameters θ∈R s To this end, we propose a strategy to dynamically select users based on server-side log information. Specifically, in round t, the server selects users based on the probability of being selected. Select m users, That is, we make users who have a greater impact on the model be selected with a higher probability. For each selected user C k , they locally calculate the importance of each data λ(z k,i , t-1), and then with probability (The gradient L2 norm of the wrong data is much larger than the gradient L2 norm of the correct data) Select those Data k,i ∈D k .

[0028] (5) Model training: In each iteration, all selected users train their local models on the selected samples, and the server aggregates the model updates of the users to update the global model. The server repeats this process until the global optimal model θ is obtained. * .

Claims

1. A data selection method in a federated learning scenario, characterized in that The method includes filtering out users and data related to the task, selecting users before training, selecting users and data during training, and model training; the task-related user and data filtering is that when a FL task arrives, the server first calculates each user C k ,k∈[K],[K]={1,2,…,K} k ={y k |(x k ,y k )∈D k The intersection of {(x k ,y k )|y k ∈Y k ∩Y}, to filter out users with target category data. If the number of samples in the intersection set exceeds the minimum number of target models |(x k ,y k )|y k ∈(Y k ∩Y)|>v, then the user is related. In order to meet the privacy protection requirements, the privacy-preserving intersection technique (PSI) is used; the pre-training user selection: the server uses the dot matrix determinant (DPP) algorithm to further select a high-quality user set from the related user set, the user subscript set Q, to maximize homogeneity and content diversity under the budget constraint B: maxV(Q),st,∑ k∈Q,Q∈N ′b k ≤BV(Q) is the quality value of the selected user. Then, the server coordinates the selected users to start training the model, which is mainly divided into the following steps: a) User selection based on homogeneity: The server prioritizes users whose data is evenly distributed and whose categories are not missing. When homogeneity is used as the criterion for selecting users, V μ (Q) = ∑ k∈Q μ k , μ k It is defined as the difference between the data distribution of user k and the uniform distribution, that is: To protect privacy, we calculate μ k , using an efficient and secure two-party computing protocol based on BGN homomorphic encryption, the server and each user use the server's public key to jointly compute, and then the server greedily selects the user with the maximum users until the budget B is used up and the best user set is found, where N′ refers to the number of task-related users screened out, Y refers to the set of target categories, y∈Y refers to one of the target categories, and U k It is the dataset D k A collection of sample indices in ; b) Diversity-based user selection: The server selects users with diverse data content to participate in model training. When content diversity is used as the indicator for selecting users, Where S(v i ,v j ) is the calculation user C i ,C j The server greedily selects the next user with the lowest similarity to the current user set. In order to calculate the content diversity of the data set, we first need to extract the feature vector expression of the data, use the deep learning model to extract features, use the VGG-16 network to extract the content feature vector of the image, and then calculate the content diversity of all the user's data. When the user's data volume M is large and the feature vector dimension l is high, the cost of calculating content diversity is very high O(M 2 l), and the existing calculation methods need to directly access the original data. Therefore, an efficient privacy-preserving content diversity calculation method is adopted. This calculation method constructs the features of each user data set through a low-dimensional vector based on the JL transformation, and uses a random response mechanism to protect the privacy of each sample. It is mainly divided into the following steps: i. Constructing a dataset content sketch: User C k Locally generated content feature vector φ k ={φ k,i |i∈[U k ]}, then the server selects a mapping matrix w to convert φ k Mapped to a low-dimensional vector h(φ k,i )=sign(w·φ k,i ), the distortion caused by this mapping reduces the accuracy of diversity, but protects the privacy of the user's mapping vector to a certain extent. K The content vector sketch is ii. Random response mechanism: In order to further protect the privacy of each data existence, a random response mechanism is used to generate the vector sketch h(φ k,i ) is represented by the perturbation vector by The probability of is 1, The probability is 0, and the probability of h(φ k,i )[j], f is a user-defined parameter for controlling the degree of privacy, and then the user uses the perturbation vector to generate a perturbation sketch And Sent to the server, the server uses the perturbed sketch vector to calculate similarity And calculate content diversity At this point, the server's computing overhead for content diversity has been reduced by several orders of magnitude, and the user's data privacy has been protected; C) User selection based on lattice determinant: When considering both homogeneity and diversity, the user selection problem is transformed into a DPP problem. i The homogeneity fraction is μ i , and user C j The similarity is S ij , define a semi-positive definite matrix A [N′] =[A ij ] i,j∈[N′] , A ij =u i u j S ij , then the probability of the user being selected is P A (Q) = det(A Q ), when homogeneity increases and similarity decreases, the determinant increases. Therefore, DPP-based selection tends to select users with evenly distributed categories while avoiding users with highly similar content. The value function V d (Q) = det(A Q ), S Q =[S ij ] i,j∈Q .Convert the user selection problem into a log-submodule problem and iteratively select the maximum P A (Q∪{k}) user C k .

2. The data selection method in the federated learning scenario according to claim 1 is characterized in that In the training process, users and data are selected as a given set of high-quality users, whose index set is Q∈[N′], |Q|=K. In order to further improve the model performance and reduce the training overhead, a ζ proportion of users are selected in each round of training iteration, and users locally select important data samples to participate in model training. An intuitive quantitative user C k The method of importance in round t is to calculate is the sample z k,i In the input and output of the last layer (L layer) of the model, U k Refers to the dataset D k Here, we use the upper bound value based on the gradient to select data. However, this method has a large computational overhead when the model is complex and the amount of data is large. n is the total amount of data, and s is the number of model parameters θ∈R s To this end, a strategy based on server-side log information to dynamically select users is proposed. Specifically, in the tth round, the server selects the user according to the probability of being selected. Select m users, n k represents the number of samples of user k, that is, users with greater influence on the model are selected with a higher probability. For each selected user C k , they locally calculate the importance of each data λ(z k,i ,t-1), and then with probability Choose those Data k,i ∈D k , It refers to the median of the gradient norm of user k’s training samples in round t-1.

3. The data selection method in the federated learning scenario according to claim 1 is characterized in that The model training is that in each round of iteration, all selected users will train their local models on the selected samples, and the server summarizes the model updates of the user side to update the global model. The server repeats this process until the global optimal model θ is obtained. * .