Federal learning method and device, equipment, storage medium and program product
By performing subspace decomposition of low-rank adaptive gradients and applying differential privacy noise in federated learning, combined with noise reparameterization on the server side, the problem of reduced model accuracy caused by noise amplification is solved, thereby improving model accuracy and optimizing computation and communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-17
AI Technical Summary
In federated learning, directly adding differential privacy noise to the low-rank adaptive gradient on the client's local machine leads to a decrease in model accuracy.
On the client side, the low-rank adaptive gradient is dynamically decomposed into mutually orthogonal subspaces, and differential privacy noise is applied in different subspaces. Combined with the server side, the noisy low-rank adaptive gradient is aggregated and the noise is reparameterized to control the noise amplification effect.
It effectively suppresses noise amplification effects, improves model accuracy, and controls computational and communication overhead while optimizing data and privacy heterogeneity.
Smart Images

Figure CN121882166A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to a federated learning method, apparatus, device, storage medium, and program product. Background Technology
[0002] Federated learning, a distributed machine learning approach, allows participants to collaboratively train a model without sharing data. It has gained significant attention in recent years, especially given the increasing importance of data privacy and security. Federated learning enables multiple participants to collaboratively train a model without sharing the original data by retaining training data locally on the client side and only transmitting model updates to a central server for aggregation. However, model gradient updates can still potentially leak sensitive information. Attackers can reconstruct the original training data from exposed gradients through member inference attacks or gradient inversion attacks.
[0003] In related technologies, adding differential privacy to the client-side local low-rank adaptive gradient and applying it to federated learning can avoid privacy leaks. However, directly adding differential privacy noise to the client-side local low-rank adaptive gradient (matrices A and B) can significantly reduce model accuracy when the aggregated B matrix is multiplied by the A matrix. This is because matrix multiplication amplifies the noise, leading to the accumulation of noise cross terms.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a federated learning method, apparatus, device, storage medium, and program product that at least partially overcomes the problem of reduced model accuracy caused by adding differential privacy noise in related technologies.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to one aspect of this disclosure, a federated learning method is provided, applied to a client, comprising: acquiring a first global model and first low-rank adaptive parameters sent by a server; training the first global model based on client data and the first low-rank adaptive parameters to determine a noisy low-rank adaptive gradient; uploading the noisy low-rank adaptive gradient to the server, so that the server aggregates and calculates the noisy low-rank adaptive gradients uploaded by each client to determine a second low-rank adaptive parameter and a second global model; receiving the second global model and the second low-rank adaptive parameter sent by the server to enter the next iteration, until a predefined stopping condition is met.
[0008] In some embodiments, training the first global model based on client data and the first low-rank adaptive parameters to determine the noisy low-rank adaptive gradient includes: dynamically decomposing the gradient matrix of the first low-rank adaptive parameters into mutually orthogonal subspaces; differential privacy noise is applied to the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient.
[0009] In some embodiments, the step of dynamically decomposing the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces and differentially applying privacy noise to the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient includes: calculating the gradient matrix of the first low-rank adaptive parameter; projecting the gradient matrix to the principal component subspace and the residual subspace using a projection matrix; and applying weak noise and strong noise to the principal component subspace and the residual subspace, respectively, to determine the noisy low-rank adaptive gradient.
[0010] According to another aspect of this disclosure, a federated learning method is also provided, applied to a server, comprising: sending a first global model and first low-rank adaptive parameters to each client; obtaining noisy low-rank adaptive gradients sent by each client, wherein the noisy low-rank adaptive gradients are determined by the client based on training the first global model using client data and the first low-rank adaptive parameters; aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client to determine a second low-rank adaptive parameter and a second global model; and distributing the second global model and the second low-rank adaptive parameter to each client to enter the next iteration, until a predefined stopping condition is met.
[0011] In some embodiments, before sending the first global model and the first low-rank adaptive parameters to each client, the method further includes: initializing the first global model, configuring the first low-rank adaptive parameters, and determining the target client set based on a bi-objective clustering algorithm that combines privacy similarity and data distribution similarity.
[0012] In some embodiments, determining the second low-rank adaptive parameter and the second global model after aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client includes: aggregating the noisy low-rank adaptive gradients uploaded by each client according to a secure aggregation protocol; reparameterizing the aggregated noisy low-rank adaptive gradients using singular value decomposition to determine the second low-rank adaptive parameter; and updating the first global model according to the second low-rank adaptive parameter to obtain the second global model.
[0013] According to another aspect of this disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the federated learning method described in any of the preceding claims by executing the executable instructions.
[0014] According to another aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the federated learning method described in any of the preceding claims.
[0015] According to another aspect of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the federated learning method of any of the above.
[0016] The federated learning method provided in the embodiments of this disclosure involves the client acquiring a first global model and first low-rank adaptive parameters sent by the server; training the first global model based on client data and the first low-rank adaptive parameters to determine a noisy low-rank adaptive gradient; uploading the noisy low-rank adaptive gradient to the server, so that the server aggregates and calculates the noisy low-rank adaptive gradients uploaded by each client to determine a second low-rank adaptive parameter and a second global model; and receiving the second global model and second low-rank adaptive parameters from the server to enter the next iteration until a predefined stopping condition is met. This disclosure, by adding noise to the low-rank adaptive gradient on the client side and combining it with aggregation of the noisy low-rank adaptive gradient on the server side, can effectively suppress the noise amplification effect and solve the problem of reduced model accuracy caused by directly adding differential privacy noise to the low-rank adaptive gradient locally on the client.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0019] Figure 1 This diagram illustrates a federated learning system architecture according to an embodiment of the present disclosure; Figure 2 This illustration shows a flowchart of a federated learning method applied to a client in an embodiment of this disclosure; Figure 3A flowchart illustrating a specific example of a federated learning method applied to a client in this disclosure embodiment is shown. Figure 4 A flowchart illustrating another specific example of a federated learning method applied to a client in this disclosure embodiment is shown; Figure 5 A flowchart illustrating a specific example of a federated learning method according to an embodiment of this disclosure is shown. Figure 6 This illustration shows a flowchart of a federated learning method applied to a server in an embodiment of this disclosure; Figure 7 A flowchart illustrating a specific example of a federated learning method applied to a server in this disclosure embodiment is shown. Figure 8 A flowchart illustrating yet another specific example of a federated learning method applied to a server in this disclosure embodiment is shown. Figure 9 A flowchart illustrating another specific example of a federated learning method applied to a server in this disclosure embodiment is shown. Figure 10 A schematic diagram of a federated learning device applied to a client is shown in an embodiment of this disclosure; Figure 11 This illustration shows a schematic diagram of a federated learning device applied to a server in an embodiment of this disclosure; Figure 12 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0020] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0021] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0022] To facilitate understanding, before introducing the embodiments of this disclosure, the following explanations are provided for several terms involved in the embodiments of this disclosure: Large Language Models (LLMs) Differential Privacy (DP) Federated Learning; Low-Rank Adaptation (LoRA) Singular Value Decomposition (SVD)
[0023] The specific implementation methods of the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0024] Figure 1 A schematic diagram of an exemplary application system architecture to which the federated learning method of the embodiments of this disclosure can be applied is shown. For example... Figure 1 As shown, the system architecture may include a client group 101, a privacy protection control terminal 102, and a server terminal 103.
[0025] The aforementioned client group comprises multiple clients, such as Client 1, Client 2, and Client N. These clients can be deployed on user devices or edge nodes to perform local LoRA fine-tuning. Each client includes a subspace decomposition module and an adaptive noise injection module.
[0026] Optionally, the aforementioned clients are participants in the federated model training process. These clients are entities that possess local data and participate in the training. They can take various forms, including: terminal devices (including but not limited to smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, wearable devices, augmented reality devices, virtual reality devices, etc., for example, these devices locally store user data, calculate model updates, and upload them to a central server); and institutions or organizations (including but not limited to banks, enterprises, or medical institutions, for example, multiple banks collaborating to train a risk control model while protecting data privacy, each acting as an independent participant). It should be noted that all participants store the original data locally and do not share it externally; they only transmit encrypted model parameters or gradient updates to the server.
[0027] In one example of this disclosure, the client obtains a first global model and first low-rank adaptive parameters sent by the server; trains the first global model based on the client data and the first low-rank adaptive parameters to determine a noisy low-rank adaptive gradient; uploads the noisy low-rank adaptive gradient to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model; receives the second global model and the second low-rank adaptive parameters sent by the server to enter the next iteration until a predefined stopping condition is met.
[0028] The aforementioned privacy protection control panel is used to manage the overall privacy budget. and client privacy parameters distribute.
[0029] In one example disclosed herein, the aforementioned privacy control dynamically adjusts the privacy budget based on the scarcity of client data and model uncertainty. : ,in, For the client Data uncertainty entropy value, Given its sample size, clip(x,1,10) represents clipping x to the interval [1,10]. After each round of aggregation, the server calculates the privacy utility ratio (model accuracy improvement / privacy cost) for each client. By allocating the privacy budget, the participation of clients with scarce data is increased (e.g., their contribution weight increases by 50% if they only have 100 samples), thereby improving the overall privacy budget utilization and achieving the desired effect within the total budget. Under certain conditions, the model accuracy can be improved, overcoming the problem of privacy waste or insufficient protection caused by static privacy allocation.
[0030] The aforementioned server-side coordinated federated training process includes a bi-cluster sampling module, a model aggregation module, and a noise reparameterization module. The bi-cluster sampling module is used to construct a dual similarity metric matrix, performing bi-clustering on the privacy similarity and data distribution similarity matrices; spectral clustering generates client clusters and intra-cluster priority sampling.
[0031] Optionally, the aforementioned server is a central server, serving as the core coordinator, not merely a storage server. The central server acts as the coordination hub in the federated learning architecture, its primary responsibility being to aggregate model updates from participants rather than storing the original data. The central server does not access the original data; it only processes encrypted intermediate results (such as gradients or parameters), ensuring data privacy. It is a dedicated server responsible for coordination tasks.
[0032] In one example of this disclosure, the server sends a first global model and first low-rank adaptive parameters to each client; obtains the noisy low-rank adaptive gradient sent by each client, wherein the noisy low-rank adaptive gradient is determined by the client based on training the first global model using client data and the first low-rank adaptive parameters; aggregates and calculates the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model; and distributes the second global model and the second low-rank adaptive parameters to each client to enter the next iteration until a predefined stopping condition is met.
[0033] In one example of this disclosure, the above system adopts a three-stage processing flow: the first stage is the initialization and sampling stage: the server configures global parameters and performs bi-cluster sampling to select clients; the second stage is the local training stage: the client performs subspace gradient calculation and noise injection; the third stage is the aggregation and reparameterization stage: the server aggregates gradients and performs noise reparameterization.
[0034] Those skilled in the art will know that Figure 1 The number of clients, networks, and servers shown is merely illustrative; any number of terminal devices, privacy protection control terminals, and servers can be included as needed. This disclosure does not limit the scope of the embodiments.
[0035] Figure 2 This illustration shows a flowchart of a federated learning method applied to a client in an embodiment of this disclosure, such as... Figure 2 As shown, the federated learning method applied to the client provided in this embodiment includes the following steps: S202, obtain the first global model and the first low-rank adaptive parameters sent by the server.
[0036] It should be noted that the first global model mentioned above can be the initial global model, which is uniformly defined and distributed by the server during the initialization phase. The efficient fine-tuning method for low-rank adaptive parameters described above injects two trainable low-rank matrices (A and B) into the frozen pre-trained model. Based on the low-rank adaptive parameters, communication compression is achieved, making the communication only the aggregated gradient. For example, obtaining the server-initialized global large language model and LoRA adapter (… , (Matrix), configure federated learning parameters.
[0037] S204, Train the first global model based on client data and the first low-rank adaptive parameters, and determine the noisy low-rank adaptive gradient.
[0038] It should be noted that the client data mentioned above can be stored locally on the client. The training described above can be performed locally.
[0039] S206, upload the noisy low-rank adaptive gradient to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model.
[0040] It should be noted that the above-mentioned noise addition can be achieved by adding noise to the input matrix.
[0041] S208: Receive the second global model and the second low-rank adaptive parameters sent by the server and proceed to the next iteration until the predefined stopping condition is met.
[0042] It should be noted that proceeding to the next iteration can be a repetition of steps S202-S206. For example, the second global model is trained based on client data and the second low-rank adaptive parameters to determine the noisy low-rank adaptive gradient, and the next round of training begins. The predefined stopping condition can be that iteration stops when a preset number of iterations is reached or the global model achieves a preset performance on the validation data.
[0043] This disclosure effectively suppresses noise amplification, controls computational and communication overhead, and solves the problem of reduced model accuracy caused by directly adding differential privacy noise to the low-rank adaptive gradient on the client side and then aggregating the noisy low-rank adaptive gradient on the server side.
[0044] In one embodiment of this disclosure, such as Figure 3 As shown, the federated learning method provided in this embodiment can determine the noisy low-rank adaptive gradient through the following steps. By decoupling the subspace, it can accurately achieve the directional allocation of noise energy: S302, dynamically decomposes the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces; S304 applies differential privacy noise to the differentiation of mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient.
[0045] In one embodiment of this disclosure, such as Figure 4 As shown, the federated learning method provided in this embodiment dynamically decomposes the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces; differential privacy noise is applied to the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient, which includes the following steps: S402, calculate the gradient matrix of the first low-rank adaptive parameter.
[0046] For example, calculate the gradient matrix of the first low-rank adaptive parameter. A, B.
[0047] S404 projects the gradient matrix onto the principal component subspace and the residual subspace using the projection matrix.
[0048] For example, through the projection matrix , Project the gradient onto the principal component subspace. and residual subspace .
[0049] S406, apply weak noise and strong noise to the principal component subspace and residual subspace respectively, and determine the noisy low-rank adaptive gradient.
[0050] For example, in Apply noise ~N(0, ²), in Apply noise ~N(0, ²), where > Upload the noisy gradient to the server.
[0051] This disclosure achieves principal component space protection by applying weak noise to the principal component subspace and enhances privacy of the residual space by applying strong noise to the residual subspace.
[0052] Figure 5 A flowchart illustrating a specific example of a federated learning method according to an embodiment of this disclosure is shown, such as... Figure 5 As shown, the federated learning method provided in this embodiment includes the following steps: S501, local training on the client side; S502, Client calculates LoRA gradient A, B; S503, the client performs dynamic subspace decomposition: by decomposing the gradient covariance matrix through eigenvalue decomposition, an orthogonal projection matrix is generated. ( ); S5041, the client dynamically projects the LoRA gradient onto the principal component subset space, using P... p Projected onto S p S p The primary component is the molecular space; S5042, the client dynamically projects the LoRA gradient onto the residual subspace, using P r Projected onto S r S r For residual subspace; S5051, Client to S p Apply weak noise: ; S5052, Client to S r Increase noise: ; S506, The client generates noisy gradients ΔA and ΔB; S507, the client uploads the noisy gradient to the server; S508, server-side aggregation of client-side gradients; S509, The server performs truncated SVD on the aggregate gradient (product matrix): UΣV T =ΔΒΔΑ; S510, Server-Side Parameterization: ; S511, the server updates the global model.
[0053] S5041 and S5042 constitute S504; S5051 and S5052 constitute S505.
[0054] In a specific instance, the triggering condition for the S503 client-side local subspace decomposition mentioned above is that the client completes local forward / backward propagation and obtains the original LoRA gradient matrix. and ( For the hidden layer dimension, (Rank LoRA). Its execution can be performed by the subspace decomposition module of the aforementioned client. Processing actions include: flattening the gradient matrix into a vector. ; Calculate the covariance matrix of the gradient vector. Perform eigenvalue decomposition: Sort by eigenvalue in descending order and select the top... 1 eigenvector ( , (Empirical coefficients) constitute the principal component subspace projection matrix The remaining eigenvectors form the projection matrix of the residual subspace. Orthogonality verification: Calculate Ensure its norm Otherwise, perform eigenvalue decomposition again. The output is the projection matrix. , This is used to project gradients onto an orthogonal subspace. Client-local subspace decomposition can separate the principal components of the gradient (which typically contain important semantic information) from the residual components (which are susceptible to noise), laying the foundation for differentiated noise injection.
[0055] In another specific example, S5051, S5052, and S503 above constitute subspace adaptive noise injection. The trigger condition is that after the subspace projection matrix calculation is completed, the execution entity can be the aforementioned client-side adaptive noise injection module. The processing actions include: converting the original gradient... Projected onto two subspaces: Principal component subspace: Residual subspace: According to privacy budget Calculate the reference noise scale ( , ); Apply differentiated noise injection: for Add weak noise ,in ;right Add strong noise ,in Reconstructing the noisy gradient: ,in , ;Will Remodeled into matrix form , The output result satisfies... - Noisy LoRA gradient for differential privacy , By employing subspace adaptive noise injection, we can significantly suppress the overall noise impact while protecting important gradient components within the same privacy budget (theoretical analysis shows that the noise power is reduced to that of traditional methods). ).
[0056] In another specific instance, S5051, S5052, and S503 above refer to server-side noise reparameterization, triggered by the server receiving noise from all clients. , After gradient updates, the main execution can be performed by the server-side noise reparameterization module. The processing actions include: aggregating client-side gradients. , ; Calculate the product matrix Perform truncated singular value decomposition (SVD): ,in Retain key components; reparameterize: update ,renew Update global model parameters. Output: The reparameterized LoRA matrix, preserving the statistical properties of privacy noise. Noise reparameterization eliminates noise interaction terms. At the same time maintain - Differential privacy guarantee.
[0057] This disclosure reduces noise power compared to traditional methods under the same privacy budget; the server-side SVD calculation frequency is reduced to once every 5 rounds, which reduces computational overhead.
[0058] Figure 6This document illustrates a flowchart of a federated learning method applied to a server in an embodiment of this disclosure, as shown below. Figure 6 As shown in the embodiments of this disclosure, the federated learning method applied to the server includes the following steps: S602, sends the first global model and the first low-rank adaptive parameters to each client; S604, Obtain the noisy low-rank adaptive gradient sent by each client, wherein the noisy low-rank adaptive gradient is determined by the client based on the client data and the first low-rank adaptive parameter when training the first global model. S606, after aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client, the second low-rank adaptive parameters and the second global model are determined. S608 distributes the second global model and the second low-rank adaptive parameters to each client to enter the next iteration until the predefined stopping condition is met.
[0059] This disclosure effectively suppresses noise amplification and synergistically optimizes data and privacy heterogeneity by adding noise to low-rank adaptive gradients on the client side and aggregating the noisy low-rank adaptive gradients on the server side, while controlling computational and communication overhead.
[0060] In one embodiment of this disclosure, such as Figure 7 As shown, the federated learning method applied to the server provided in this embodiment of the disclosure further includes the following steps before sending the first global model and the first low-rank adaptive parameters to each client: S702, initialize the first global model and configure the first low-rank adaptive parameters; S704 determines the target client set based on a dual-objective clustering algorithm that combines privacy similarity and data distribution similarity.
[0061] It should be noted that the aforementioned privacy similarity can be quantified using a privacy similarity matrix, and the aforementioned data distribution similarity can be quantified using a data distribution similarity matrix.
[0062] This disclosure utilizes a dual-objective clustering algorithm based on privacy similarity and data distribution similarity to effectively optimize data and privacy heterogeneity while controlling computational and communication overhead.
[0063] In one embodiment of this disclosure, such as Figure 8 As shown in the embodiments of this disclosure, the federated learning method applied to the server-side, after aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client, determines the second low-rank adaptive parameters and the second global model, including the following steps: S802 aggregates the noisy low-rank adaptive gradients uploaded by each client according to the secure aggregation protocol; S804, the aggregated noisy low-rank adaptive gradient is reparameterized for noise through singular value decomposition to determine the second low-rank adaptive parameter; S806, based on the second low-rank adaptive parameters, updates the first global model to obtain the second global model.
[0064] This disclosure, when performing differential privacy-preserving LoRA fine-tuning on large language models under a federated learning framework, effectively suppresses noise amplification effects and synergistically optimizes data and privacy heterogeneity by combining dynamic subspace orthogonal projection on the client side with noise reparameterization on the server side, while controlling computational and communication overhead.
[0065] Figure 9 A flowchart illustrating another specific example of a federated learning method applied to a server in this disclosure is shown, such as... Figure 9 As shown in the embodiments of this disclosure, the federated learning method applied to the server includes the following steps: S901 collects data from all clients; S9021, Calculate the privacy similarity matrix, calculate the client... Privacy budget similarity ; S9022, Calculate the data distribution similarity matrix, client. Local data category distribution vector ( (For the number of categories), calculate cosine similarity. ; S903, Construct a joint similarity graph (matrix): ( (Weight coefficients), Output: Symmetric similarity matrix ( (Total number of clients) S904, spectral clustering generates K clusters; S905, each iteration; S906, select clusters based on privacy budget quotas; S907, within the cluster, m clients are sampled in a weighted manner according to sample size; S908 participated in this round of training.
[0066] Through the above S901-S908, dual-cluster client sampling can be achieved.
[0067] S9021, S9022, and S903 are the construction of dual similarity metric matrices, triggered by either before the start of federated learning or by re-clustering every T=5 rounds, and can be executed by the aforementioned server dual clustering sampling module. By constructing dual similarity metric matrices, the dual similarity between clients in terms of privacy requirements and data distribution can be quantified, providing a basis for clustering.
[0068] The above S904 is a client cluster generated by spectral clustering, triggered by obtaining the joint similarity matrix. Subsequently, the execution can be performed by the aforementioned server-side bi-clustering sampling module, and the processing actions include: calculating the degree matrix. ( (As a vector of all 1s); construct the normalized Laplace matrix. Solve The former eigenvectors ( Arrange the eigenvectors into a matrix. ;right row vector execution Clustering by the mean clustering algorithm forms Client clusters The output is the client-side clustering partition. By generating client clusters through spectral clustering, clients with similar privacy requirements and complementary data distributions can be grouped together, reducing distribution conflicts during aggregation.
[0069] S905, S906, and S907 above refer to intra-cluster priority sampling, triggered at the start of each federated iteration, and executed by the aforementioned server-side bi-cluster sampling module. The processing actions include: cluster selection: allocating sampling probabilities according to privacy budget quotas. (Prioritize large clusters with sufficient privacy budget); Client sampling: from selected clusters In, according to the proportion of sample size Sampling with replacement One client ( For the client Sample size); privacy budget boundaries: To ensure the privacy budget remains within a reasonable range; dynamic adjustment: if a cluster is not selected for three consecutive rounds, its priority weight increases by 20%. The output is the set of clients participating in this round of training. By prioritizing sampling within clusters, it is possible to ensure that the privacy noise levels of participating clients in each round are similar and that their data distributions are complementary, thereby optimizing noise distribution consistency and reducing model bias.
[0070] Based on the same inventive concept, this disclosure also provides two federated learning devices, as described in the following embodiments. Since the principle by which these devices solve the problem is similar to that of the method embodiments described above, the implementation of these devices can refer to the implementation of the method embodiments described above, and repeated details will not be repeated.
[0071] Figure 10 This illustration shows a schematic diagram of a federated learning device applied to a client in an embodiment of this disclosure, such as... Figure 10 As shown, the device includes: an information acquisition module 1001, a training noise-adding module 1002, an information uploading module 1003, and an information receiving module 1004.
[0072] Among them, the information acquisition module 1001 is used to acquire the first global model and the first low-rank adaptive parameters sent by the server.
[0073] The training noise-adding module 1002 is used to train the first global model based on client data and the first low-rank adaptive parameters, and to determine the noise-adding low-rank adaptive gradient.
[0074] The information upload module 1003 is used to upload the noisy low-rank adaptive gradient to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradient uploaded by each client to determine the second low-rank adaptive parameter and the second global model.
[0075] The information receiving module 1004 is used to receive the second global model and the second low-rank adaptive parameters sent by the server to enter the next round of iteration until the predefined stopping condition is met.
[0076] In one example of this disclosure, the training noise module is further configured to: dynamically decompose the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces; apply differential privacy noise to the differential subspaces to determine the noisy low-rank adaptive gradient.
[0077] In one example of this disclosure, the training noise-adding module is further configured to: calculate the gradient matrix of the first low-rank adaptive parameter; project the gradient matrix onto the principal component subspace and the residual subspace using a projection matrix; and apply weak noise and strong noise to the principal component subspace and the residual subspace, respectively, to determine the noisy low-rank adaptive gradient.
[0078] It should be noted that the information acquisition module 1001, the training noise-adding module 1002, and the information uploading module 1003 correspond to S202 to S206 in the method embodiment. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above method embodiment. It should be noted that the above modules, as part of the device, can be executed in a computer system such as a set of computer-executable instructions.
[0079] Figure 11 This illustration shows a schematic diagram of a federated learning device applied to a server in an embodiment of this disclosure, such as... Figure 11 As shown, the device includes: an information sending module 1101, a noise-added information acquisition module 1102, an aggregation calculation module 1103, and an information distribution module 1104.
[0080] The information sending module 1101 is used to send the first global model and the first low-rank adaptive parameters to each client.
[0081] The noise information acquisition module 1102 is used to acquire the noise-added low-rank adaptive gradient sent by each client, wherein the noise-added low-rank adaptive gradient is determined by the client based on the client data and the first low-rank adaptive parameter when training the first global model.
[0082] The aggregation calculation module 1103 is used to aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model.
[0083] The information delivery module 1104 is used to send the second global model and the second low-rank adaptive parameters to each client to enter the next round of iteration until the predefined stopping condition is met.
[0084] In one example of this disclosure, the federated learning device applied to the server further includes an initialization module for initializing a first global model, configuring a first low-rank adaptive parameter, and determining a target client set based on a bi-objective clustering algorithm of privacy similarity matrix and data distribution similarity.
[0085] In one example of this disclosure, the above-mentioned aggregation calculation module is further configured to: aggregate the noisy low-rank adaptive gradients uploaded by each client according to the secure aggregation protocol; perform noise reparameterization on the aggregated noisy low-rank adaptive gradients through singular value decomposition to determine the second low-rank adaptive parameters; and update the first global model according to the second low-rank adaptive parameters to obtain the second global model.
[0086] It should be noted that the aforementioned information sending module 1101, noise-added information acquisition module 1102, aggregation calculation module 1103, and information distribution module 1104 correspond to S602 to S608 in the method embodiment. The examples and application scenarios implemented by these modules and their corresponding steps are the same, but they are not limited to the content disclosed in the above method embodiment. It should also be noted that these modules, as part of the apparatus, can be executed in a computer system, such as a set of computer-executable instructions.
[0087] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0088] The following reference Figure 12 To describe an electronic device 1200 according to such an embodiment of the present disclosure. Figure 12 The electronic device 1200 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0089] like Figure 12 As shown, the electronic device 1200 is manifested in the form of a general-purpose computing device. The components of the electronic device 1200 may include, but are not limited to: at least one processing unit 1210, at least one storage unit 1220, and a bus 1230 connecting different system components (including storage unit 1220 and processing unit 1210).
[0090] The storage unit stores program code that can be executed by the processing unit 1210, causing the processing unit 1210 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.
[0091] For example, the processing unit 1210 can execute the following steps of the above method embodiment: obtain the first global model and the first low-rank adaptive parameters sent by the server; train the first global model according to the client data and the first low-rank adaptive parameters to determine the noisy low-rank adaptive gradient; upload the noisy low-rank adaptive gradient to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model; receive the second global model and the second low-rank adaptive parameters sent by the server to enter the next iteration until the predefined stopping condition is met.
[0092] For example, the processing unit 1210 may perform the following steps in the above method embodiment: dynamically decompose the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces; apply differential privacy noise to the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient.
[0093] For example, the processing unit 1210 can perform the following steps of the above method embodiment: calculate the gradient matrix of the first low-rank adaptive parameter; project the gradient matrix to the principal component subspace and the residual subspace through the projection matrix; apply weak noise and strong noise to the principal component subspace and the residual subspace respectively, and determine the noisy low-rank adaptive gradient.
[0094] For example, the processing unit 1210 can execute the following steps of the above method embodiment: sending the first global model and the first low-rank adaptive parameters to each client; obtaining the noisy low-rank adaptive gradient sent by each client, wherein the noisy low-rank adaptive gradient is determined by the client based on training the first global model according to client data and the first low-rank adaptive parameters; determining the second low-rank adaptive parameters and the second global model after aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client; and sending the second global model and the second low-rank adaptive parameters to each client to enter the next iteration until the predefined stopping condition is met.
[0095] For example, the processing unit 1210 may execute the following steps of the above method embodiment: initialize the first global model and configure the first low-rank adaptive parameters; determine the target client set according to the dual-objective clustering algorithm of privacy similarity matrix and data distribution similarity.
[0096] For example, the processing unit 1210 can perform the following steps in the above method embodiment: aggregate the noisy low-rank adaptive gradients uploaded by each client according to the secure aggregation protocol; perform noise reparameterization on the aggregated noisy low-rank adaptive gradients through singular value decomposition to determine the second low-rank adaptive parameters; and update the first global model according to the second low-rank adaptive parameters to obtain the second global model.
[0097] Storage unit 1220 may include readable media in the form of volatile storage units, such as random access memory (RAM) 12201 and / or cache 12202, and may further include read-only memory (ROM) 12203.
[0098] Storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0099] Bus 1230 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0100] Electronic device 1200 can also communicate with one or more external devices 1240 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1200, and / or any device that enables electronic device 1200 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1250. Furthermore, electronic device 1200 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1260. As shown, network adapter 1260 communicates with other modules of electronic device 1200 via bus 1230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0101] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0102] In particular, according to embodiments of this disclosure, the process described above with reference to the flowchart can be implemented as a computer program product, which includes a computer program that, when executed by a processor, implements the above-described federated learning method.
[0103] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the methods described above is stored thereon. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0104] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0105] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.
[0106] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0107] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0108] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0109] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0110] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0111] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A federated learning method, characterized in that, Applied to the client side, including: Obtain the first global model and the first low-rank adaptive parameters sent by the server; The first global model is trained based on client data and the first low-rank adaptive parameters to determine the noisy low-rank adaptive gradient. The noisy low-rank adaptive gradient is uploaded to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model. The system receives the second global model and the second low-rank adaptive parameters from the server and proceeds to the next iteration until a predefined stopping condition is met.
2. The federated learning method according to claim 1, characterized in that, The step of training the first global model based on client data and the first low-rank adaptive parameters, and determining the noisy low-rank adaptive gradient, includes: The gradient matrix of the first low-rank adaptive parameter is dynamically decomposed into mutually orthogonal subspaces. Differential privacy noise is applied to the differential subspaces of the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient.
3. The federated learning method according to claim 2, characterized in that, The step of dynamically decomposing the gradient matrix of the first low-rank adaptive parameter into mutually orthogonal subspaces and applying differential privacy noise to the mutually orthogonal subspaces to determine the noisy low-rank adaptive gradient includes: Calculate the gradient matrix of the first low-rank adaptive parameter; The gradient matrix is projected onto the principal component subspace and the residual subspace using a projection matrix; Weak noise and strong noise are applied to the principal component subspace and the residual subspace, respectively, to determine the noisy low-rank adaptive gradient.
4. A federated learning method, characterized in that, Applied to the server side, including: Send the first global model and the first low-rank adaptive parameters to each client; Obtain the noisy low-rank adaptive gradient sent by each client, wherein the noisy low-rank adaptive gradient is determined by the client based on the client data and the first low-rank adaptive parameter when training the first global model. After aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client, the second low-rank adaptive parameters and the second global model are determined. The second global model and the second low-rank adaptive parameters are distributed to each client to enter the next iteration until the predefined stopping condition is met.
5. The federated learning method according to claim 4, characterized in that, Before sending the first global model and the first low-rank adaptive parameters to the respective clients, the method further includes: Initialize the first global model and configure the first low-rank adaptive parameters; The target client set is determined based on a dual-objective clustering algorithm that combines privacy similarity and data distribution similarity.
6. The federated learning method according to claim 4, characterized in that, The process of aggregating and calculating the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model includes: The noisy low-rank adaptive gradients uploaded by each client are aggregated according to the secure aggregation protocol. The aggregated noisy low-rank adaptive gradient is reparameterized for noise through singular value decomposition to determine the second low-rank adaptive parameter. The second global model is obtained by updating the first global model based on the second low-rank adaptive parameters.
7. A federated learning device, characterized in that, Applied to the client side, including: The information acquisition module is used to acquire the first global model and the first low-rank adaptive parameters sent by the server. The training noise-adding module is used to train the first global model based on client data and the first low-rank adaptive parameters, and to determine the noise-adding low-rank adaptive gradient. The information upload module is used to upload the noisy low-rank adaptive gradient to the server so that the server can aggregate and calculate the noisy low-rank adaptive gradient uploaded by each client to determine the second low-rank adaptive parameter and the second global model. The information receiving module is used to receive the second global model and the second low-rank adaptive parameters sent by the server to enter the next round of iteration until the predefined stopping condition is met.
8. A federated learning device, characterized in that, Applied to the server side, including: The information sending module is used to send the first global model and the first low-rank adaptive parameters to each client. The noise information acquisition module is used to acquire the noise-added low-rank adaptive gradient sent by each client, wherein the noise-added low-rank adaptive gradient is determined by the client based on the client data and the first low-rank adaptive parameter when training the first global model. The aggregation calculation module is used to aggregate and calculate the noisy low-rank adaptive gradients uploaded by each client to determine the second low-rank adaptive parameters and the second global model. The information delivery module is used to send the second global model and the second low-rank adaptive parameters to each client to enter the next round of iteration until the predefined stopping condition is met.
9. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the federated learning method of any one of claims 1 to 6 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the federated learning method according to any one of claims 1 to 6.
11. A computer program product, comprising: A computer program or instruction, characterized in that, when executed by a processor, the computer program or instruction implements the federated learning method according to any one of claims 1 to 6.