A grouping federated learning method based on lottery theory and differential privacy

By adopting a grouped federated learning method based on lottery theory and differential privacy, the client pruning rate and data grouping are adaptively adjusted, which solves the problems of excessive computation and communication overhead and privacy threats in federated learning on edge clients, and achieves efficient training and security protection of the model.

CN119066708BActive Publication Date: 2026-02-17HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411160020.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2026-02-17
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

Existing federated learning solutions face challenges when deployed on resource-constrained edge clients, including difficulties in model aggregation due to non-independent and identically distributed client data, excessive computational and communication overhead, and privacy threats.

Method used

We employ a grouped federated learning method based on lottery theory and differential privacy. By adaptively adjusting the client's pruning rate and data grouping, we reduce the client's computational and communication overhead and protect the client's privacy through differential privacy. This method includes steps such as random pruning, iterative pruning-parameter initialization, and global federated learning training.

Benefits of technology

While ensuring model performance and security, it reduces client-side computation and communication overhead, improves model convergence and privacy security, and adapts to non-independent and identically distributed data environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066708B_ABST
    Figure CN119066708B_ABST
Patent Text Reader

Abstract

The application discloses a grouping federated learning method based on a lottery theory and differential privacy, and belongs to the computer field.The method groups clients based on client data distribution and computing power, reduces the computing cost of weak computing power clients, guarantees the convergence of a federated learning model, and reduces training time; the lottery theory pruning process is dispersed to each client group of the federated learning, each client group only performs a pruning stage, and the computing cost and communication cost of the client are effectively reduced; in addition, a pruning rate dynamic adjustment strategy is designed, the framework adjusts the pruning rate dynamically, a differential privacy budget allocation strategy is designed accordingly, and the privacy security of the system is guaranteed; and finally, the method provided by the application can effectively improve the model performance of the federated learning and reduce the computing and communication cost under the premise of non-independent and identically distributed data and protection of the privacy of the clients.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of computer, more particularly, relates to a grouping federated learning method based on lottery theory and differential privacy. BACKGROUND

[0002] With the strengthening of data protection regulations in various countries, enterprises face stricter legal requirements when handling user data, forming "data silos". Federated learning provides a solution for cross-institutional data cooperation, which enables distributed clients to locally save raw data while cooperating to train deep learning models. For example, financial institutions, medical institutions, e-commerce platforms, and monitoring security in smart city scenarios all have massive private data. Specifically, financial institutions and medical institutions can jointly analyze the economic benefits of medical insurance through federated learning; monitoring videos and images between different factories can establish a more intelligent fire identification model through federated learning. However, existing federated learning solutions face three difficulties when deployed on resource-constrained edge clients: the non-independent and identically distributed situation of client data is more serious, making it difficult to aggregate the model; federated learning has too much computational and communication overhead for edge clients; federated learning faces privacy threats such as member reasoning and reconstruction attacks. SUMMARY

[0003] In view of the above defects or improvement needs of the prior art, the present application provides a grouping federated learning method based on lottery theory and differential privacy, aiming to reduce the computational and communication overhead of clients under the premise of ensuring the performance and security of the federated learning model.

[0004] To achieve the above-mentioned purpose, according to the first aspect of the present application, a grouping federated learning method based on lottery theory and differential privacy is provided, comprising:

[0005] S1, the server distributes an initial global model M0 to all clients, each client randomly prunes M0 to adaptively adjust the pruning rate, so that the local training time of each client is less than a time threshold, and the pruning rate is returned to the server;

[0006] S2, the server groups all clients according to the pruning rate of each client under a preset constraint, aiming to minimize the class data imbalance degree of all client groups; the preset constraint includes: the pruning rate of any client n is less than the pruning rate upper limit of the client group it belongs to, the pruning rate upper limit of the client group increases in turn, and the number of training samples in the data set of any client n is not less than a number threshold;

[0007] S3, sequentially performing lottery theory-based iterative pruning-parameter initialization operations on ; wherein, for the i-th client group The iterative pruning-parameter initialization operation based on lottery theory includes:

[0008] A1, the server will use the current global model W i Distributed to Each client in the process performs τ rounds of differential privacy-based federated learning to obtain the updated W. i ;

[0009] A2, the server calculates the single pruning rate p. r For the updated W i Perform unstructured pruning; if the pruning rate reaches... To obtain the target pruning rate, structured pruning and parameter initialization are performed to obtain W. i+1 Otherwise, return A1;

[0010] S4, the server will W k+1 The data is sent to all clients for training using differential privacy-based global federated learning to obtain the final global model.

[0011] According to a second aspect of the present invention, an electronic device is provided, comprising: a computer-readable storage medium and a processor;

[0012] The computer-readable storage medium is used to store executable instructions;

[0013] The processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method as described in the first aspect.

[0014] According to a third aspect of the invention, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to perform the method as described in the first aspect.

[0015] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects:

[0016] The method provided by this invention groups clients based on client data distribution and computing power, reducing the computational overhead for clients with weak computing power. This ensures the convergence of the federated learning model while reducing training time. Furthermore, the lottery theory pruning process is distributed across each client group in the federated learning process, with each client group performing only one pruning stage, effectively reducing the computational and communication overhead of the clients. In addition, this invention designs a dynamic pruning rate adjustment strategy. Based on the dynamic adjustment of the pruning rate, the framework correspondingly designs a differential privacy budget allocation strategy to ensure the privacy and security of the system. In summary, the method provided by this invention can effectively improve the model performance of federated learning and reduce computational and communication overhead while protecting client privacy, even with non-independent and identically distributed data. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 One of flowcharts of a grouping federated learning method based on lottery theory and differential privacy provided for an embodiment of the present application;

[0018] Figure 2 The second flowchart of the grouping federated learning method based on lottery theory and differential privacy provided for an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0020] The embodiment of the present application provides a grouping federated learning method based on lottery theory and differential privacy, as shown in the formula (1), which comprises the steps of: Figure 1

[0021] S1, the server distributes an initial global model M0 to all clients, and each client respectively performs random pruning on M0 to adaptively adjust the pruning rate, so that the local training time of each client is less than a time threshold, and the pruning rate is returned to the server;

[0022] Specifically, in step S1, the server distributes the global model M0 to each client, and the client trains the model locally using a small amount of data to measure the local training time; the server determines the upper limit threshold of the single round training time according to the training time of all clients; the client adaptively sets the pruning rate by random pruning according to the training time threshold, reduces the local training time of the client, thereby reducing the training time of the federated learning, and guarantees the convergence of the federated learning and reduces the training time;

[0023] Wherein, the client receives the upper limit of the single round training time set by the server, if the current measured training time of the client exceeds the time limit, the pruning rate is adjusted upward and the random structured pruning is executed locally to reduce the model, and the training time is measured again. Repeat the above process until the training time is less than the time limit, and the pruning rate at this time is the adaptive pruning rate.

[0024] The server distributes an initial global model M0 to all clients. For any client n, use the local data set D n to train M0 using a batch, record the training time of a batch π, and calculate the local training time of the client n as

[0025]

[0026] where r denotes the number of local training rounds, π denotes the training time of one batch, q n denotes the number of training samples of the dataset of client n, and b denotes the batchsize of local training. The client will upload the local training set q n to the server. In particular, the hardware configuration of some clients may not be sufficient for training, and a training timeout message is sent to the server.

[0027] The server calculates the time difference between the time of issuing the model and receiving the message returned by the client to obtain the communication time of client n as Thus, the single-round federated learning time of client n is The server sets a maximum time threshold T for the single-round federated learning time of the client, and the communication time and the time threshold T are issued to all clients respectively.

[0028] The client n locally performs random structured pruning to estimate the adaptive pruning rate. Specifically, the client n locally trains a batch to calculate The pruning rate is gradually increased until to obtain the adaptive pruning rate p n . Then all clients send the adaptive pruning rate to the server.

[0029] S2, the server groups all clients according to the pruning rates of the clients under the preset constraints, with the objective of minimizing the class data imbalance degree of all client groups; the preset constraints include that the pruning rate of any client n is less than the upper limit of the pruning rate of the client group to which the client n belongs, the upper limit of the pruning rate of the client group is sequentially and sequentially increased, and the number of training samples in the dataset of any client n is not less than a number threshold;

[0030] Specifically, the server groups the clients according to the client data distribution and the pruning rate, and sets the number of groups, the upper limit of the pruning rate of each group, and the lower limit of the number of datasets of the client group to group the clients. The constraint condition is that the pruning rate of the selected client is less than the upper limit of the pruning rate of each group and the number of datasets of the client group is greater than the number threshold, and the upper limit of the pruning rate of the client group is sequentially and sequentially increased, and the class imbalance index (QCID) of the divided client group is minimized under the constraint condition.

[0031] The client grouping problem is converted to the following optimization objective:

[0032]

[0033]

[0034] where Dn is the dataset of client n n There are B class label data, using vector α n =[α (n,1) ,α (n,2) ,...,α (n,b) ,...,α (n,B) ] to represent the data label distribution of D n , α (n,b) ≥0 and represents a client group divided out, represents the class data imbalance degree of the client group, n and n' respectively represent two clients in the client group , q n represents the number of training samples in D n , p M represents the upper limit of pruning rate of the client group , q represents the lower limit of the number of dataset samples of the client group , p n represents the pruning rate of client n, q n′ represents the number of training samples in D n` , a n' represents the data label distribution of client n'. Since the more uniform the data class distribution of the client group and the data set reaches a certain scale, the faster the federated learning model converges, and in order to make the training time of each client group similar to improve the training efficiency, the optimization goal is to minimize The constraint condition is the pruning rate and the number of dataset of each group, and the upper limit of the pruning rate of the client group increases in turn.

[0035] Solving the above optimization problem obtains the client grouping set It can be understood that the existing methods can be used to solve the above optimization problem, such as simulated annealing algorithm, genetic algorithm, particle swarm optimization algorithm, etc.

[0036] It can be understood that since the upper limit of the pruning rate of each client group increases in turn, in , the upper limit of the pruning rate of is the lowest, that is, the computing and communication ability is the strongest, and correspondingly, the pruning rate of is the highest.

[0037] S3, sequentially performs the lottery theory-based iterative pruning-parameter initialization operation on ; wherein, for the i-th client group , the iterative pruning-parameter initialization operation includes:

[0038] A1, the server sends the current global model W i to each client in to obtain an updated W i through τ rounds of federated learning based on differential privacy. i That is, the server sends the current global model W to each client in i , each client trains it respectively, adds noise and returns it to the server for aggregation, and the server updates W i to the aggregated model, and again performs the above operations of sending, training, adding noise, returning and aggregating until the preset training round τ is reached.

[0039] A2, the server performs unstructured pruning on the updated W r according to the single pruning rate p i , and if the pruning rate reaches the target pruning rate of , the server performs structured pruning and parameter initialization to obtain W i+1 ; otherwise, return to A1.

[0040] Specifically, the low-pruning-rate client group first participates in structured iterative pruning based on lottery theory. The server first initializes the single pruning rate, and after a certain number of rounds of federated learning training, prunes the global model according to the single pruning rate. The iterative pruning process continues until the global model reaches the target pruning rate of this group, and then the model parameters are reset to the initialization state, and the next client group is switched to participate in pruning in the order of increasing pruning rate.

[0041] In the above method, the pruning rate of the first client group is the lowest, i.e., the computing and communication capabilities are the strongest. In this order, the client groups participate in an "iterative pruning-parameter initialization" phase based on lottery theory in turn.

[0042] As shown in Figure 2 , in the i-th "iterative pruning-parameter initialization" phase based on lottery theory, the client group participating in pruning is This phase includes:

[0043] The server sends the current global model W i to the client group , and the client trains it and adds noise to return it to the server. The server aggregates the models returned by each client and updates W i to the aggregated model, and again performs the above operations of sending, training, adding noise, returning and aggregating until the preset training round τ is reached. The server performs unstructured pruning on the updated W rThe unstructured pruning is performed, and is respectively issued to each client, and the above process is repeated until the global model reaches the target pruning rate of the client group. Then, the server aggregates each model based on the lottery theory to perform structured pruning and parameter initialization, that is, the non-structured pruning mask is reorganized into a structured pruning mask. After the structured pruning, the model parameters are reset to obtain W i+1 . According to W i+1 , the above "iterative pruning-parameter initialization" operation is performed on the next client group.

[0044] Preferably, in the iterative pruning-parameter initialization operation, after the first training round in A1 is executed, the operation further includes:

[0045] determining whether the global accuracy of the pruned W i is lower than an accuracy threshold, and if yes, reducing p r , otherwise keeping p r unchanged.

[0046] Specifically, in the above iterative pruning-parameter initialization operation, the server performs global model pruning every interval of federated learning training rounds, and if the accuracy of the pruned model decreases by more than a threshold, the single-iteration pruning rate is reduced.

[0047] In the above process, the client locally trains the model W i , adds noise according to a privacy budget e p , and uploads the updated model and local model accuracy. The server aggregates the updates and calculates the global accuracy. Then the model is issued to start the next round of federated learning.

[0048] Every τ federated training rounds, the server prunes the global model W r by a pruning rate p i , and if the global accuracy of the pruned model decreases too much, the iterative pruning rate p r is reduced, and the pruning process is repeated until the global model reaches the target pruning rate to obtain the pruned global model W i+1 . According to the lottery pruning process, the server initializes the parameters of the global model W i+1 , and issues the model to the client group and starts the next pruning stage.

[0049] It can be understood that the server prunes the global model W r by a pruning rate p i ​After pruning, it needs to be returned to each client of the client group, trained and added noise by each client, and returned to the server again, so that the server can judge the global accuracy of the model. Therefore, the above judgment operation is performed after the first training round in A1 is returned.

[0050] Preferably, in the iterative pruning-parameter initialization operation, the differential privacy noise added in each training round is adjusted dynamically according to the differential privacy budget parameter e p Determination;

[0051] Wherein, e0 is a preset global differential privacy budget, p i is the current global model pruning rate, p i+1 is the target pruning rate of the client group.

[0052] Specifically, in the above pruning process, in order to ensure that the client local training model produces model updates, the client adds differential privacy noise to the model updates to protect data privacy and security, and the privacy budget is negatively related to the single iteration pruning rate.

[0053] Since the single round pruning rate p r is dynamically adjusted in the federated learning pruning process, the remaining training rounds are calculated and the differential privacy budget is adaptively allocated to ensure privacy security.

[0054] That is, in order to achieve the target pruning rate, more federated learning rounds are required, so the remaining differential privacy budget is dynamically allocated to the remaining rounds. In the federated learning pruning process in step S3, the client's private data information is no longer retained in the model parameters after the global model parameters are reset, so the differential privacy budget of the client group is also reset.

[0055] In one round of federated learning training, the single round iteration pruning rate is p r , and the expected training round is The differential privacy budget parameter e Since the single iteration pruning rate p r may decrease in operation S2, the remaining training round r and the differential privacy budget parameter e p need to be dynamically adjusted according to p r to ensure the privacy security of the client data.

[0056] S4, the server sends W k+1 to all clients for global federated learning training based on differential privacy to obtain the final global model.

[0057] Specifically, after pruning, the pruned structure sparse global model Wk+1 The server sends it to all clients for global federated learning training based on differential privacy to fine-tune the model W k After all clients participate in fine-tuning training, the training is completed after a fixed number of rounds r, and the final global model is obtained. That is, the server sends the globally structured sparse model W k+1 to all clients, and all clients participate in federated learning training and reset the differential privacy budget.

[0058] It can be understood that the above global federated learning training based on differential privacy means that each client trains the model W k+1 issued by the server and adds differential privacy noise and returns it to the server.

[0059] Preferably, in step S4, the differential privacy budget parameter e p ` is a fixed value.

[0060] Specifically, all clients participate in federated learning training for a fixed number of times, and a fixed differential privacy budget is used in each round.

[0061] In the federated learning fine-tuning training of S4, since the server resets the model parameters in the pruning stage, the differential privacy parameters of the clients need to be reset, all clients participate in federated learning training for a fixed number of times, and a fixed differential privacy budget is used in each round. The differential privacy parameter is set to

[0062] It can be understood that when the above method is used for medical image recognition, the private data set of each client is a medical image, and accordingly, the final global model obtained in step S4 can be directly used for medical image recognition. When the above method is used for video monitoring, the private data set of the client is the monitoring image collected by the monitoring device connected thereto, and accordingly, the final global model obtained in step S4 can be directly used for monitoring image recognition.

[0063] An electronic device is provided, comprising: a computer readable storage medium and a processor;

[0064] The computer readable storage medium is used to store executable instructions.

[0065] The processor is used to read the executable instructions stored in the computer readable storage medium, and execute the method as described in any of the above embodiments.

[0066] An electronic device is provided, comprising: a computer readable storage medium and a processor;

[0067] It is to be understood that the above description is intended to be illustrative and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the application should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.

Claims

1. A method for group federated learning based on lottery ticket theory and differential privacy, characterized in that, Comprise: S1, the server sends the initial global model to all clients Each client respectively performs random pruning to adaptively adjust the pruning rate, so that the local training time of each client is less than the time threshold, and returns the pruning rate to the server. ​ S2, the server groups all the clients according to the pruning rates of the clients, under preset constraints, to minimize the class data imbalance degree of all the client groups; the preset constraints include: the pruning rate of any client is less than the pruning rate upper limit of the client group to which the client belongs, the pruning rate upper limit of the client group increases sequentially in order, and the number of training samples in the dataset of any client is not less than a number threshold; S3, sequentially to perform an iteration-pruning-parameter initialization operation based on lottery theory; wherein, for the i-th client group the iteration-pruning-parameter initialization operation based on lottery theory comprises: A1, the server sends the current global model to each client in The round of federated learning based on differential privacy updates the local model ;​ A2, the server is based on the single pruning rate. For the updated Perform unstructured pruning; if the pruning rate reaches... To obtain the target pruning rate, structured pruning and parameter initialization are performed. Otherwise, return A1; S4, the server will send to all clients for global federated learning training based on differential privacy, and get the final global model.

2. The method of claim 1, wherein, In the iterative pruning-parameter initialization operation, after the first training round in A1 is completed, the operation further comprises: Judging after pruning If the overall accuracy is below the accuracy threshold, then adjust the setting accordingly. Otherwise keep constant.

3. The method of claim 1 or 2, wherein, In the iterative pruning-parameter initialization operation, the differential privacy noise added in each round of training is determined according to a differential privacy budget parameter determined; wherein, ; is a pre-set global differential privacy budget, , is a current global model pruning rate, is a target pruning rate.

4. The method of claim 1 or 2, wherein, The differential privacy budget parameter in each round of training in step S4 is a fixed value.

5. The method of claim 1, wherein, In the iterative pruning-parameter initialization operation, when the client uploads the trained and noise-added model to the server, the accuracy of the model is also uploaded to the server.

6. The method of claim 1, wherein, In step S1, for any client , the time threshold is the difference between the client single round federated learning time threshold and the communication time of the client .

7. An electronic device, comprising: Comprise: A computer readable storage medium and a processor; The computer readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer readable storage medium, and execute the method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the processor execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Efficient personalized federal learning system and method

    CN114492847A

  • Method for protecting user data privacy and resisting hostile attackers under federated learning

    CN116502223A