Privacy-protected decentralized collaborative learning method, system and computer device

By incorporating Gaussian noise perturbation into decentralized collaborative learning and utilizing Shapley values ​​to evaluate gradient contributions, we address the issues of data heterogeneity and privacy leakage, improve the robustness and privacy protection capabilities of the model, and achieve faster model convergence and better generalization performance.

CN119783857BActive Publication Date: 2025-11-04SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510058574.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-11-04
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

Existing decentralized collaborative learning methods struggle to simultaneously improve the robustness and privacy protection of the global model when faced with data heterogeneity and privacy breaches. In particular, malicious attackers can infer private data through gradient information.

Method used

A differential privacy mechanism is used to add Gaussian noise to the local gradient and cross gradient information to perturb them, and the contribution of the perturbation is evaluated using the Shapley value. Weights are allocated through the communication topology, and gradients are aggregated reasonably to update the model.

Benefits of technology

It effectively protects client privacy data, reduces the impact of noise on model usability, improves the convergence speed and generalization performance of the global model, and enhances the robustness and learning performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783857B_ABST
    Figure CN119783857B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers and relates to a privacy-protected decentralized cooperative learning method and system and a computer device. The method comprises the following steps: each client calculates a local gradient by using local data and a current local model, generates Gaussian noise and adds the noise to the local gradient for disturbance; the current local model is sent to neighbors; each client calculates a corresponding cross gradient by using data and a local model of neighbors, injects Gaussian noise into the gradient for disturbance, and transmits the disturbed gradient back to the corresponding neighbor; each client calculates a Shapley value of neighbors and itself, determines a weight during aggregation, and aggregates the disturbed local gradient and the cross gradient; a current local model is updated according to the aggregated gradient to obtain a latest local model; and the iteration is performed for multiple times until a preset learning round number is reached or a loss value reaches a specified threshold. The application protects the privacy data of the client, improves the performance of a global model, and accelerates the convergence of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology and relates to a decentralized collaborative learning method, system, and computer device with privacy protection. Background Technology

[0002] Collaborative learning utilizes the local data and computing power of edge devices to train learning models or parameters, and then shares and merges these updated parameters through communication between the devices, forming a collaborative edge intelligent system. Based on the communication topology, collaborative learning can be divided into centralized and decentralized collaborative learning. In centralized collaborative learning, edge devices need to constantly communicate with the central server. When the number of edge devices is massive or in the billions, this increases the resource consumption of the central server. Furthermore, when the central server becomes unreliable, the entire learning process becomes difficult. Therefore, decentralized collaborative learning has emerged. Decentralized collaborative learning refers to edge devices not relying on any central node, but achieving distributed model training through point-to-point communication and collaboration. In decentralized collaborative learning, due to the different environments and data collection preferences of each edge device, the training data between different edge devices differs greatly in order of magnitude, number of categories, and acquired features, resulting in data heterogeneity, i.e., non-independently identically distributed (Non-IID) data.

[0003] The non-independent and identically distributed nature of data affects the capabilities of decentralized collaborative learning and increases the learning difficulty. Therefore, the problem of non-independent and identically distributed data has become a key research focus in decentralized collaborative learning. Although existing decentralized learning algorithms avoid direct sharing of raw data through local training and gradient exchange, thereby reducing the risk of sensitive information leakage, privacy protection remains a significant challenge. Research shows that malicious attackers can still infer and extract privacy-sensitive information from shared model parameters or gradients, thus posing a threat to privacy and security. Therefore, how to simultaneously address the issues of data heterogeneity and privacy leakage in decentralized learning and improve the robustness of the global model is an issue that needs to be studied.

[0004] While patent CN118966384A, concerning a robust decentralized collaborative learning method, system, computer device, and medium, discloses a method where the client calculates cross gradients for its neighbors and directly transmits the calculated cross gradients back to the corresponding neighbors, this patent suffers from privacy data leakage. Existing research indicates that attackers can construct virtual data and minimize the difference between the virtual gradient (the gradient obtained from the virtual data as input) and the shared real gradient, thereby making the virtual data approximate the original private training data and allowing attackers to analyze the client's private data, resulting in privacy data leakage. To address this issue, this invention improves upon patent CN118966384A by incorporating a differential privacy mechanism to protect client data and utilizing the Shapley value to mitigate the negative impact of noise on data usability. Summary of the Invention

[0005] To address the aforementioned shortcomings and improvement needs of existing technologies, this invention provides a privacy-preserving decentralized collaborative learning method. This invention utilizes a differential privacy mechanism to introduce Gaussian noise into the local gradient and cross-gradient information of each client, effectively protecting the local privacy data of each client. To mitigate the impact of noise, this invention employs Shapley values ​​to fairly evaluate the contribution of the perturbed local gradient and the received perturbed cross-gradient to the global learning objective, thereby improving the robustness of the global model and ensuring its learning performance.

[0006] One of the technical solutions provided by this invention to solve its technical problem is:

[0007] A privacy-preserving decentralized collaborative learning method, characterized in that the method includes the following steps:

[0008] (1) Each client uses local data and the current local model to calculate the local gradient;

[0009] (2) Each client generates Gaussian noise and adds the generated Gaussian noise to the local gradient to perturb it, thereby obtaining the perturbated local gradient;

[0010] (3) Based on the communication topology, each client sends its current local model to its neighbors;

[0011] (4) After each client receives the local model of its neighbor, it uses the local data and the local model of its neighbor to calculate the corresponding cross gradient;

[0012] (5) Each client generates Gaussian noise for the cross gradient of each neighbor and adds the Gaussian noise to the cross gradient to perturb it in order to protect its own privacy data, and then sends the perturbed cross gradient back to the corresponding neighbor.

[0013] (6) Based on the perturbed local gradient and the received perturbed cross gradient, each client uses the validation set to calculate the Shapley values ​​of its neighbors and itself, thereby determining the weights assigned to each client.

[0014] (7) Each client aggregates the perturbed local gradient and the perturbed cross gradient according to the weights allocated in step (6), obtains the aggregated gradient, and updates the current local model according to the aggregated gradient to obtain the latest local model.

[0015] (8) Repeat steps (1) to (7) until the preset number of learning rounds is reached or the loss value reaches the specified threshold, then stop learning.

[0016] Furthermore, in step (2), the method for noise perturbation of the local gradient includes:

[0017] Clipping the local gradient:

[0018]

[0019] in, It is the local gradient of client i after the t-th round of pruning; Let be the local gradient of client i in round t; C is a pre-set pruning threshold, and min{} represents taking the minimum value of the set. Represents the local gradient The square value of the L2 norm;

[0020] Obtain the local gradient after clipping Then, Gaussian noise is injected into the clipped local gradient:

[0021]

[0022] in, It is the local gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d.

[0023] Furthermore, in step (5),

[0024] Clipping of cross gradients:

[0025]

[0026] in, It is the clipped cross gradient; The client uses local data. The cross gradient is calculated for neighbor j; C is a pre-set clipping threshold; min{} represents taking the minimum value of the set. Represents cross gradient The square value of the L2 norm;

[0027] After obtaining the clipped cross gradient, Gaussian noise is injected into the clipped cross gradient:

[0028]

[0029] in, It is the cross gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d.

[0030] Furthermore, in step (6), each client calculates its own and its neighbors' Sharpe values ​​using the validation set as follows:

[0031] make Represents a set of N clients. This represents the set containing client i and its neighbors; Let be the characteristic function of cooperative games, representing the set The contribution of clients in decentralized collaborative learning tasks; It is a set A random permutation or combination of clients in the process;

[0032] The feature function v is defined as follows:

[0033]

[0034] in, This represents the validation dataset reflecting the global learning objective, stored by each client. To verify the number of samples in the dataset, data samples For indicator functions;

[0035] Representation Model In data samples The prediction results above; It aggregates each client in round t. of The obtained model, The model is obtained based on the perturbation gradient contributed by client j to client i in round t.

[0036] Client Shapley value in round t Defined as:

[0037]

[0038] in, For set Length;

[0039] By normalization, the normalized Shapley value in the interval [0,1] is obtained.

[0040] Shapley value after normalization Measurement Client Contribute in round t.

[0041] Further, in step (6), the weights assigned to each client are determined based on the obtained Shapley values ​​of the clients:

[0042]

[0043] in, For the client The weight value in round t; ω i,j Let the connection weights correspond to the communication topology between client i and client j. Let be the normalized Shapley value calculated for client i for client k in round t.

[0044] Furthermore, in step (7), for each client i, the method for aggregating the local gradient of the perturbation and the cross gradient information of the perturbation from the neighbors is as follows:

[0045]

[0046] in, It is the cross gradient received by client i after noise perturbation from neighbor j. For the client The weight value in round t; The gradient after aggregation for client i;

[0047] The aggregated gradient is obtained for each client i. Then, the local model is updated. The update process includes:

[0048] First, update the momentum:

[0049]

[0050] in, Let be the momentum transferred from neighbor j to client i; for client j, α is the momentum factor. Let be the momentum vector of client j in the (t-1)th round;

[0051] Then update the local model:

[0052]

[0053] in, The updated local model for client i The model for the t-th round of transmission from neighbor j to client i, i.e. The local model of client j in round t-1, where γ is the learning rate.

[0054] A privacy-preserving decentralized collaborative learning system, the system comprising:

[0055] The model sending and receiving module is used by the client to send local model information and perturbed cross gradient information to the neighbor, and to receive local model information and perturbed cross gradient information sent by the neighbor.

[0056] The model training module is used by the client to train the local gradient based on local data and local model, and to add Gaussian noise to the local gradient to obtain the perturbed local gradient; the cross gradient is trained based on local data and the local models of the neighbors, and to add Gaussian noise to obtain the perturbed cross gradient.

[0057] The computation module is used by each client to calculate the client's Shapley value based on the perturbed local gradient and the perturbed cross gradient transmitted from the neighbor, using a global validation set. The weights corresponding to gradient aggregation are determined based on the client's Shapley value. Then, the perturbed local gradient and cross gradient are aggregated to obtain the final gradient, and the local model is updated based on the obtained final gradient. After multiple iterations, learning stops when a pre-set number of learning rounds is reached or the loss value reaches a specified threshold.

[0058] A computer-readable medium storing a computer program that is read and executed by a processor to implement the privacy-preserving decentralized collaborative learning method.

[0059] A computer device includes at least one processor and a computer-readable medium, wherein a computer program in the computer-readable medium is read and executed by the processor to implement the privacy-preserving decentralized collaborative learning method.

[0060] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] This invention uses a differential privacy mechanism to add noise to cross-gradient information, thereby effectively protecting the privacy of client data and reducing the risk of privacy leakage. It also combines the Shapley value technique to reasonably measure the contribution of the perturbed gradient to the global learning task, thereby reducing the impact of noise on model usability. While protecting privacy, it improves model performance, enhances the model's generalization and inference capabilities, and accelerates model convergence.

[0062] Compared to patent "CN118966384A Robust Decentralized Collaborative Learning Method and System, Computer Equipment and Medium", this invention allows clients to generate Gaussian noise to interfere with cross-gradients and local gradients before sending them to their neighbors using a differential privacy mechanism, thus preventing attackers from accessing gradient information. However, the introduction of noise reduces the availability of cross-gradients transmitted by the client, thereby affecting the convergence speed and generalization performance of the global model. Therefore, this invention uses the Shapley value to measure the perturbed cross-gradients and local gradients, thereby mitigating the negative impact of noise. This balances privacy protection and model performance within the decentralized learning framework, improving the convergence speed, inference, and generalization performance of the global model while ensuring the protection of client privacy data. Attached Figure Description

[0063] Figure 1 This is the overall framework of a privacy-preserving decentralized collaborative learning method disclosed in Embodiment 1 of the present invention;

[0064] Figure 2 This is the average training loss map (MNIST dataset) of the method in Embodiment 1 of the present invention;

[0065] Figure 3 The average training loss map of the method in Embodiment 1 of this invention (CIFAR-10 dataset);

[0066] Figure 4 This is a test accuracy diagram of the method in Embodiment 1 of the present invention (MNIST dataset);

[0067] Figure 5 This is a test accuracy diagram of the method in Embodiment 1 of the present invention (CIFAR-10 dataset). Detailed Implementation

[0068] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0069] Example 1: A privacy-preserving decentralized collaborative learning method, such as Figure 1 As shown, it includes the following steps:

[0070] (1) Each client uses local data and the current local model to calculate the local gradient; specifically, the local data is image data or text data; the local model is a commonly used neural network model, such as a convolutional neural network model, VGG model, etc.

[0071] (2) Each client generates Gaussian noise and adds the generated Gaussian noise to the local gradient to perturb it, thereby obtaining the perturbated local gradient;

[0072] (3) Based on the communication topology, each client sends its current local model to its neighbors;

[0073] (4) After each client receives the local model of its neighbor, it uses the local data and the local model of its neighbor to calculate the corresponding cross gradient;

[0074] (5) Each client generates Gaussian noise for the cross gradient of each neighbor and adds the Gaussian noise to the cross gradient to perturb it in order to protect its own privacy data, and then sends the perturbed cross gradient back to the corresponding neighbor.

[0075] (6) Based on the perturbed local gradient and the received perturbed cross gradient, each client uses the validation set to calculate the Shapley values ​​of its neighbors and itself, thereby determining the weights assigned to each client.

[0076] (7) Each client aggregates the perturbed local gradient and the perturbed cross gradient according to the weights allocated in step (6), obtains the aggregated gradient, and updates the current local model according to the aggregated gradient to obtain the latest local model.

[0077] (8) Repeat steps (1) to (7) until the preset number of learning rounds is reached or the loss value reaches the specified threshold, then stop learning.

[0078] In step (2) of this embodiment, the method for noise perturbation of the local gradient includes:

[0079] Clipping the local gradient:

[0080]

[0081] in, It is the local gradient of client i after the t-th round of pruning; Let be the local gradient of client i in round t; C is a pre-set pruning threshold, and min{} represents taking the minimum value of the set. Represents the local gradient The square value of the L2 norm;

[0082] Obtain the local gradient after clipping Then, Gaussian noise is injected into the clipped local gradient:

[0083]

[0084] in, It is the local gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d.

[0085] In step (5) of this embodiment,

[0086] Clipping of cross gradients:

[0087]

[0088] in, It is the clipped cross gradient; The client uses local data. The cross gradient is calculated for neighbor j; C is a pre-set clipping threshold; min{} represents taking the minimum value of the set. Represents cross gradient The square value of the L2 norm;

[0089] After obtaining the clipped cross gradient, Gaussian noise is injected into the clipped cross gradient:

[0090]

[0091] in, It is the cross gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d.

[0092] In step (6) of this embodiment, each client calculates the Shapley value of its neighbors and itself using the validation set as follows:

[0093] After receiving the cross-gradients of the perturbations from its neighbors, each client calculates its own and its neighbors' Shapley values ​​based on the collected gradient information and validation set. This measures the client's contribution to the global learning objective and provides appropriate weights for perturbation gradient aggregation. The Shapley value is an important technique in cooperative game theory; its core idea is to allocate rewards based on each client's contribution to the overall cooperation. The Shapley value is calculated as follows:

[0094] make Represents a set of N clients. This represents the set containing client i and its neighbors; Let be the characteristic function of cooperative games, representing the set The contribution of clients in decentralized collaborative learning tasks; It is a set A random permutation or combination of clients in the process;

[0095] The feature function v is defined as follows:

[0096]

[0097] in, This represents the validation dataset reflecting the global learning objective, stored by each client. To verify the number of samples in the dataset, data samples For indicator functions;

[0098] Representation Model In data samples The prediction results above; It aggregates each client in round t. of The obtained model, The model is obtained based on the perturbation gradient contributed by client j to client i in round t.

[0099] Client Shapley value in round t Defined as:

[0100]

[0101] in, For set Length;

[0102] By normalization, the normalized Shapley value in the interval [0,1] is obtained.

[0103] Shapley value after normalization Measurement Client Contribute in round t.

[0104] In step (6), the weights assigned to each client are determined based on the obtained Shapley values ​​of the clients:

[0105]

[0106] in, For the client The weight value in round t; ω i,jLet the connection weights correspond to the communication topology between client i and client j. Let be the normalized Shapley value calculated for client i for client k in round t.

[0107] In step (7), for each client i, the method for aggregating the local gradient of the perturbation and the cross gradient information of the perturbation from the neighbors is as follows:

[0108]

[0109] in, It is the cross gradient received by client i after noise perturbation from neighbor j. For the client The weight value in round t; The gradient after aggregation for client i;

[0110] The aggregated gradient is obtained for each client i. Then, the local model is updated. The update process includes:

[0111] First, update the momentum:

[0112]

[0113] in, Let be the momentum transferred from neighbor j to client i; for client j, α is the momentum factor. Let be the momentum vector of client j in the (t-1)th round;

[0114] Then update the local model:

[0115]

[0116] in, The updated local model for client i The model for the t-th round of transmission from neighbor j to client i, i.e. The local model of client j in round t-1, where γ is the learning rate.

[0117] Example 2: A privacy-preserving decentralized collaborative learning system, the system comprising:

[0118] The model sending and receiving module is used by the client to send local model information and perturbed cross gradient information to the neighbor, and to receive local model information and perturbed cross gradient information sent by the neighbor.

[0119] The model training module is used by the client to train the local gradient based on local data and local model, and to add Gaussian noise to the local gradient to obtain the perturbed local gradient; the cross gradient is trained based on local data and the local models of the neighbors, and to add Gaussian noise to obtain the perturbed cross gradient.

[0120] The computation module is used by each client to calculate the client's Shapley value based on the perturbed local gradient and the perturbed cross gradient transmitted from the neighbor, using a global validation set. The weights corresponding to gradient aggregation are determined based on the client's Shapley value. Then, the perturbed local gradient and cross gradient are aggregated to obtain the final gradient, and the local model is updated based on the obtained final gradient. After multiple iterations, learning stops when a pre-set number of learning rounds is reached or the loss value reaches a specified threshold.

[0121] Example 3: A computer-readable medium storing a computer program that is read and executed by a processor to implement the method described in Example 1.

[0122] Example 4: A computer device, characterized in that it includes at least one processor and a computer-readable medium as described in Example 1, wherein a computer program in the computer-readable medium is read and executed by the processor to implement the method described in Example 1.

[0123] In a specific embodiment, the datasets used in this invention are the MNIST and CIFAR-10 datasets. The MNIST dataset is a handwritten digit image dataset containing 70,000 handwritten digit images of 10 categories from 0 to 9, of which 60,000 are training images and 10,000 are test images. The CIFAR-10 dataset contains 60,000 color images of 10 categories: airplane, car, bird, cat, deer, dog, frog, horse, boat, and truck, of which 50,000 are training images and 10,000 are test images.

[0124] This invention selected the DP-DPSGD, MUFFLIATO, DP-CGA, and DP-NET-FLEET algorithms for experimental verification of training set loss values ​​and test accuracy values. DP-DPSGD is a decentralized learning algorithm combining differential privacy mechanisms and distributed SGD methods, but it does not consider the non-independent and identically distributed nature of data among clients. MUFFLIATO allows each client to add Gaussian noise to its local stochastic gradient and uses a multi-round gossip averaging mechanism to ensure model performance, but this method also does not consider the heterogeneity of data among clients. DP-NET-FLEET combines the NET-FLEET algorithm with a Gaussian mechanism to further ensure data security. In the DP-CGA algorithm, each client perturbs its cross-gradient information with Gaussian noise before sharing it with its neighbors, thus preventing the leakage of local privacy data. Although the DP-NET-FLEET and DP-CGA algorithms consider the heterogeneity of data among clients, they do not fairly measure the contribution of each client to the global learning objective. In addition, in the experimental setup, the communication topology between clients is a fully connected graph, and the total number of clients is 10.

[0125] The privacy budget ε was set to 0.1 for the MNIST dataset and 1 for the CIFAR-10 dataset. Experimental results for the training set loss values ​​under these settings are as follows: Figures 2-3 As shown, where Figure 2 The results show the reduction in training loss values ​​for the MNIST dataset; Figure 3 The results show the reduction in training loss values ​​for the CIFAR-10 dataset. (From Figure -) Figure 3 As can be seen, with the increase of the number of training rounds, the training loss of all methods decreases on the MNIST and CIFAR-10 datasets. However, the method proposed in this invention (PDSL) is significantly better than existing methods, gradually converging with fewer rounds and reaching the minimum value.

[0126] With different privacy budget settings—0.08, 0.1, and 0.3 for the MNIST dataset, and 0.5, 0.7, and 1 for the CIFAR-10 dataset—the test accuracy results are as follows: Figure 4 - As shown in 5, where Figure 4 The results show the test accuracy values ​​for the MNIST dataset after 180 training epochs. Figure 5 The results are the test accuracy values ​​for the CIFAR-10 dataset after 200 training epochs. From Figures 4-5As can be seen, the method proposed in this invention (PDSL) can achieve good test accuracy, indicating that the method of this invention can effectively improve the performance of decentralized collaborative learning and enhance model robustness while protecting privacy.

[0127] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus DRAM (RDRAM), and interface DRAM (DRDRAM), etc.

[0128] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A privacy-preserving decentralized collaborative learning method, characterized in that, The method includes the following steps: (1) Each client uses local data and the current local model to calculate the local gradient; (2) Each client generates Gaussian noise and adds the generated Gaussian noise to the local gradient to perturb it, thereby obtaining the perturbated local gradient; (3) Based on the communication topology, each client sends its current local model to its neighbors; (4) After each client receives the local model of its neighbor, it uses the local data and the local model of its neighbor to calculate the corresponding cross gradient; (5) Each client generates Gaussian noise for the cross gradient of each neighbor and adds the Gaussian noise to the cross gradient to perturb it in order to protect its own privacy data, and then sends the perturbed cross gradient back to the corresponding neighbor. (6) Based on the perturbed local gradient and the received perturbed cross gradient, each client uses the validation set to calculate the Shapley values ​​of its neighbors and itself, thereby determining the weights assigned to each client. (7) Each client aggregates the perturbed local gradient and the perturbed cross gradient according to the weights allocated in step (6), obtains the aggregated gradient, and updates the current local model according to the aggregated gradient to obtain the latest local model. (8) Repeat steps (1) to (7) until the preset number of learning rounds is reached or the loss value reaches the specified threshold, then stop learning; In step (2), the method for noise perturbation of the local gradient includes: Clipping the local gradient: in, It is the local gradient of client i after the t-th round of pruning; Let be the local gradient of client i in round t; C is a pre-set pruning threshold, and min{} represents taking the minimum value of the set. Represents the local gradient The square value of the L2 norm; Obtain the local gradient after clipping Then, Gaussian noise is injected into the clipped local gradient: in, It is the local gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d; In step (5), Clipping of cross gradients: in, It is the clipped cross gradient; The client uses local data. The cross gradient is calculated for neighbor j; C is a pre-set clipping threshold; min{} represents taking the minimum value of the set. Represents cross gradient The square value of the L2 norm; After obtaining the clipped cross gradient, Gaussian noise is injected into the clipped cross gradient: in, It is the cross gradient after noise perturbation; It follows a Gaussian distribution, σ 2 For noise variance; It is an identity matrix of dimension d; In step (7), for each client i, the method for aggregating the local gradient of the perturbation and the cross gradient information of the perturbation from the neighbors is as follows: in, It is the cross gradient received by client i after noise perturbation from neighbor j. For the client The weight value in round t; The gradient after aggregation for client i; The aggregated gradient is obtained for each client i. Then, the local model is updated. The update process includes: First, update the momentum: in, Let be the momentum transferred from neighbor j to client i; for client j, α is the momentum factor. Let be the momentum vector of client j in the (t-1)th round; Then update the local model: in, Update the local model for client i. The model for the t-th round of transmission from neighbor j to client i, i.e. Let γ be the local model of client j in round t-1, and γ be the learning rate.

2. The privacy-preserving decentralized collaborative learning method according to claim 1, characterized in that, In step (6), each client calculates its own and its neighbors' Sharpe values ​​using the validation set as follows: make Represents a set of N clients. This represents the set containing client i and its neighbors; Let be the characteristic function of cooperative games, representing the set The contribution of clients in decentralized collaborative learning tasks; It is a set A random permutation or combination of clients in the process; The feature function v is defined as follows: in, This represents the validation dataset reflecting the global learning objective, stored by each client. To verify the number of samples in the dataset, data samples For indicator functions; Representation Model In data samples The prediction results above; It aggregates each client in round t. of The obtained model, The model is obtained based on the perturbation gradient contributed by client j to client i in round t. Client Shapley value in round t Defined as: in, For set Length; By normalization, the normalized Shapley value in the interval [0,1] is obtained. Shapley value after normalization Measurement Client Contribute in round t.

3. The privacy-preserving decentralized collaborative learning method according to claim 2, characterized in that, In step (6), the weights assigned to each client are determined based on the obtained Shapley values ​​of the clients: in, For the client The weight value in round t; ω i,j Let the connection weights correspond to the communication topology between client i and client j. Let be the normalized Shapley value calculated for client i for client k in round t.

4. A privacy-preserving decentralized collaborative learning system, wherein the decentralized collaborative learning system implements the decentralized collaborative learning method according to any one of claims 1-3 when running, characterized in that, The system includes: The model sending and receiving module is used by the client to send local model information and perturbed cross gradient information to the neighbor, and to receive local model information and perturbed cross gradient information sent by the neighbor. The model training module is used by the client to train the local gradient based on local data and local model, and add Gaussian noise to the local gradient to obtain the perturbed local gradient; the cross gradient is trained based on local data and neighboring local models, and Gaussian noise is added to obtain the perturbed cross gradient. The computation module is used by each client to calculate the client's Shapley value based on the perturbed local gradient and the perturbed cross gradient transmitted from the neighbor, using a global validation set. The weights corresponding to gradient aggregation are determined based on the client's Shapley value. Then, the perturbed local gradient and cross gradient are aggregated to obtain the final gradient, and the local model is updated based on the obtained final gradient. After multiple iterations, learning stops when a pre-set number of learning rounds is reached or the loss value reaches a specified threshold.

5. A computer-readable medium, characterized in that, The computer-readable medium stores a computer program that is read and executed by a processor to implement the method as described in any one of claims 1-3.

6. A computer device, characterized in that, The device includes at least one processor and the computer-readable medium of claim 5, wherein a computer program in the computer-readable medium is read and executed by the processor to implement the method of any one of claims 1-3.

Citation Information

Patent Citations

  • Self-adaptive asynchronous federated learning method with local privacy protection

    CN112818394A

  • Federal learning privacy protection method based on adaptive differential privacy

    CN116340990A