A client update conflict coordination method and system, electronic equipment and storage medium
By constructing and correcting the complete equivalent weight update amount on the server side, the problem of conflicting update directions on the client side in federated learning is solved, and more stable model aggregation and updating are achieved, which is suitable for fine-tuning of federated parameters for heterogeneous clients.
Patent Information
- Application Number
- CN202611136598.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-11-03
AI Technical Summary
In federated learning, low-rank adaptation updates from different clients may conflict in direction, causing updates to cancel each other out, the convergence process to be unstable, and it is difficult to accurately reflect the true impact of updates on the model weight space.
On the server side, the global base model and low-rank adaptation parameters are initialized. After the client performs local low-rank factor fine-tuning, the server constructs a complete equivalent weight update and performs conflict detection and projection correction to ensure consistency in the update direction. Finally, weighted aggregation and global model updates are performed.
It improves the aggregation stability and synergistic effect of fine-tuning federated parameters for heterogeneous clients, reduces the risk of mutual cancellation of update directions, accurately reflects the impact of client updates on the model weight space, and meets the data privacy protection requirements of federated learning.
Smart Images

Figure CN123030206A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and machine learning technology, and in particular to a client update conflict coordination method, system, electronic device, and storage medium. Background Technology
[0002] Large language models, visual language models, and other foundational models typically require fine-tuning for downstream tasks. Due to the large number of parameters in the complete model, directly training and uploading all model parameters on each client incurs high computational, storage, and communication overhead. Efficient parameter fine-tuning mechanisms such as low-rank adaptation introduce a small number of trainable low-rank adaptation parameters into some linear layers of the foundation model, achieving task adaptation while keeping the main parameters of the foundation model largely unchanged. Therefore, they are suitable for integration with federated learning for model fine-tuning scenarios across clients and domains where the original data is not shared.
[0003] During the efficient fine-tuning of federated parameters, there may be significant differences in data distribution, task preferences, sample size, label space, domain characteristics, and local computing resources among different clients. The dynamic low-rank adaptation parameterization mechanism allows different clients to use different rank values, different low-rank adaptation parameter structures, or different adaptation capabilities according to their local resources and task needs. This avoids all clients being limited by a uniform minimum resource configuration and improves the flexibility of heterogeneous clients participating in federated fine-tuning.
[0004] However, low-rank adaptation updates uploaded by different clients may conflict in direction during the server aggregation phase. For example, one client's update direction might benefit its local task or domain data, while another client's update direction might be opposite. If the server directly averages or weights these updates, it could lead to updates canceling each other out, unstable convergence, decreased global model fitness, or weakening of some clients' effective contributions during aggregation. Furthermore, since different clients may have different low-rank values, parameter shapes, or adaptation structures, directly judging conflicts based on low-rank factors, local slices, or block parameters makes it difficult to accurately reflect the true impact of the client's update on the original model's weight space.
[0005] Therefore, it is necessary to update or map the low-rank adaptation parameters uploaded by the client to the full equivalent weight update on the server side, and perform conflict detection, projection correction and re-aggregation between clients under the same matrix dimension. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a client update conflict coordination method, system, electronic device, and storage medium. This invention handles update direction conflicts between clients based on complete equivalent weight update amounts during the server aggregation phase, thereby improving the aggregation stability and collaborative effect of efficient fine-tuning of heterogeneous client federation parameters.
[0007] In a first aspect, the present invention provides a client update conflict coordination method, comprising:
[0008] The server is used to initialize the global base model and the corresponding global low-rank adaptation parameters, and the global base model parameters and global low-rank adaptation parameters are then distributed to multiple clients.
[0009] The client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information.
[0010] The server receives low-rank adaptation parameter update information uploaded by each client and constructs the complete equivalent weight update amount for each client based on the previous round of global equivalent adaptation weight and the current client update.
[0011] The server performs conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients.
[0012] When it is determined that there is a conflict in the update direction of any two clients, the projection correction is performed on the complete equivalent weight update of the corresponding clients to obtain the corrected complete equivalent weight update of the clients.
[0013] The server performs weighted aggregation on the corrected client-side complete equivalent weight update to obtain the global equivalent update. Based on the global equivalent update, the server updates the global equivalent adaptation weight and the global left and right low-rank factors, and then sends them to the client for the next round of federated training.
[0014] Preferably, the client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information, including:
[0015] The client receives the complete parameters of the global basic model, the global left and right low-rank factors of each adaptation layer in the previous round, and the adaptation layer configuration and rank constraint information sent by the server.
[0016] The client locally loads and freezes the backbone weights of the global basic model, and based on the global low-rank factor issued by the server, obtains the client's local initial left and right low-rank factors according to the client's own computing power and local task feature mapping.
[0017] The client obtains local data and inputs the local data into the frozen basic model backbone to perform forward propagation to calculate the task loss. During training, the gradient of the basic model backbone parameters is hidden, and only the gradient backpropagation of the low-rank adaptation parameters is enabled. Backpropagation only updates the local left and right low-rank factors of each layer, and training is terminated after iterating to the preset local training rounds or triggering the local early stopping condition.
[0018] Based on the local left and right low-rank factors after training and the global left and right low-rank factors in this round, the client generates low-rank adaptation parameter update information, which includes the local left and right low-rank factors in this round and the increments of the local left and right low-rank factors.
[0019] Preferably, the server receives low-rank adaptation parameter update information uploaded by each client, and constructs the complete equivalent weight update amount for each client based on the previous round of global equivalent adaptation weight and the current client update, including:
[0020] Calculate the local equivalent adaptation weight based on the local left and right low-rank factors uploaded by the client.
[0021] The single-layer equivalent weight update amount is calculated based on the local equivalent adaptation weight of this round and the global equivalent adaptation weight of the previous round.
[0022] Client The equivalent weight update amounts of all adaptation layers are combined in layer order to form the client. The complete equivalent weight update amount.
[0023] Preferably, the server performs conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients, including:
[0024] The server obtains the set of all participating clients in this round, and performs layer-by-layer calculation of the inner product of the equivalent weight update amount of a single layer for any pair of clients, and calculates the trace of the inner product, and sums the traces of all adapted layers to obtain the equivalent inner product of the complete equivalent weight update amount of the two clients.
[0025] Determine whether there is a conflict in the update directions of the two clients based on the equivalent inner product of the complete equivalent weight update amounts of the two clients.
[0026] Preferably, the determination of whether there is a conflict in the update directions of the two clients is based on the equivalent inner product of the complete equivalent weight update amounts of the two clients; including:
[0027] If the equivalent inner product of the complete equivalent weight updates of the two clients If the value is less than 0, then the client is considered... and There is a conflict in the update direction;
[0028] If the cosine similarity of the equivalent inner product of two clients is less than or equal to a preset threshold, then the client is determined to be... and There is a conflict in the update direction, namely:
[0029] τ;
[0030] In the formula, For the client and Cosine similarity of equivalent inner products; The matrix is defined by the Frobenius norm; τ is a preset threshold. For the client and The equivalent inner product of the complete equivalent weight update quantity; Clients respectively and The complete equivalent weight update amount.
[0031] Preferably, when it is determined that the update directions of any two clients conflict, a projection correction is performed on the complete equivalent weight update of the corresponding clients to obtain the corrected complete equivalent weight update of the clients, including:
[0032] When it is determined that there is a conflict in the update directions of two clients, the conflicting component along the update direction of the other client is subtracted from the complete equivalent weight update of the corresponding client to obtain the corrected complete equivalent weight update of the corresponding client, that is:
[0033]
[0034] In the formula, For the client Corrected full equivalent weight update amount; It is a minimal nonnegative stability constant; For the client The squared Frobenius norm of the complete equivalent weight update;
[0035] If any client conflicts with multiple clients simultaneously, each conflicting client will be processed sequentially according to a preset order. After each round of correction, the complete equivalent weight of the current correction will be updated. As the new input to be corrected, the projection correction is performed iteratively. After all conflict pairings are processed, the final corrected complete equivalent weight update is obtained.
[0036] If there is no conflict in the update direction between the two clients, the original complete equivalent weight update amount is output.
[0037] Preferably, the server performs weighted aggregation on the corrected client-side complete equivalent weight update to obtain the global equivalent update, and updates the global equivalent adaptation weights and global left and right low-rank factors based on the global equivalent update, before sending them to the client for the next round of federated training, including:
[0038] We use the corrected client-side complete equivalent weight update amount for weighted aggregation to obtain the global equivalent update amount;
[0039] The global equivalent adaptation weight for this round is calculated based on the global equivalent update amount and the global equivalent adaptation weight of the previous round.
[0040] Mapping the current round's global equivalent adaptation weights back to the low-rank parameter space yields the current round's global left and right low-rank factors.
[0041] Secondly, the present invention provides a client update conflict coordination system, including a server and multiple clients;
[0042] The server is configured with a parameter initialization module, an equivalent update quantity construction module, a conflict detection module, a projection correction module, and an aggregation update module; each client is configured with a client training module; wherein:
[0043] The parameter initialization module is used to initialize the global base model and the corresponding global low-rank adaptation parameters, and to distribute the global base model parameters and global low-rank adaptation parameters to multiple clients;
[0044] The client training module is used to perform local left and right low-rank factor fine-tuning using local data from the client to obtain low-rank adaptation parameter update information;
[0045] The equivalent update quantity construction module is used to receive the low-rank adaptation parameter update information uploaded by each client through the server, and construct the complete equivalent weight update quantity corresponding to each client based on the previous round of global equivalent adaptation weight and the current client update.
[0046] The conflict detection module is used to perform conflict detection on the complete equivalent weight update amount of different clients through the server, and to determine whether there is a conflict in the update direction of any two clients;
[0047] The projection correction module is used to perform projection correction on the complete equivalent weight update of the corresponding client when it is determined that there is a conflict in the update direction of any two clients, so as to obtain the corrected complete equivalent weight update of the client.
[0048] The aggregation update module is used to perform weighted aggregation of the corrected client complete equivalent weight update amount through the server to obtain the global equivalent update amount, and update the global equivalent adaptation weight and global left and right low-rank factors according to the global equivalent update amount, and then send it to the client for the next round of federated training.
[0049] Thirdly, the present invention provides an electronic device, comprising:
[0050] At least one processor;
[0051] and a memory communicatively connected to the at least one processor;
[0052] The memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, it implements the client update conflict coordination method.
[0053] Fourthly, the present invention provides a computer storage medium storing a computer program, which, when executed by a processor, implements the client update conflict coordination method.
[0054] The beneficial effects of this invention are as follows:
[0055] 1. This invention handles update conflicts between clients during the server aggregation stage, which can reduce the risk of different client update directions canceling each other out;
[0056] 2. This invention performs conflict detection based on the complete equivalent weight update, which can more accurately reflect the true impact of client updates on the model weight space;
[0057] 3. This invention retains non-conflicting components in client updates through projection correction, weakens conflicting components, and improves the stability of aggregate updates;
[0058] 4. This invention is applicable to scenarios where client-side low-rank values are inconsistent, parameter sizes are different, or adaptation capabilities are different, allowing for efficient fine-tuning of federated parameters. It does not require clients to share original data, thus meeting the data privacy protection requirements of federated learning. Attached Figure Description
[0059] Figure 1 This is a flowchart illustrating the method of an embodiment of the present invention;
[0060] Figure 2 This is a structural framework diagram of the system according to an embodiment of the present invention;
[0061] In the diagram, 10 represents the server and 20 represents the client.
[0062] 101 - Parameter initialization module; 102 - Equivalent update quantity construction module; 103 - Collision detection module; 104 - Projection correction module; 105 - Aggregation update module; 201 - Client training module. Detailed Implementation
[0063] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:
[0064] like Figure 1 As shown, this embodiment provides a client update conflict coordination method. The method is implemented based on a server and multiple clients, and includes:
[0065] S1: Initialize the global base model and the corresponding global low-rank adaptation parameters using the server, and distribute the global base model parameters and global low-rank adaptation parameters to multiple clients.
[0066] S2: The client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information.
[0067] S3: Receive the low-rank adaptation parameter update information uploaded by each client through the server, and construct the complete equivalent weight update amount corresponding to each client based on the previous round of global equivalent adaptation weight and the current client update.
[0068] S4: The server performs conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients.
[0069] S5: When it is determined that there is a conflict in the update direction of any two clients, the projection correction is performed on the complete equivalent weight update of the corresponding clients to obtain the corrected complete equivalent weight update of the clients.
[0070] S6: The server performs weighted aggregation on the corrected client-side complete equivalent weight update to obtain the global equivalent update, and updates the global equivalent adaptation weight and global left and right low-rank factors based on the global equivalent update, and then sends it to the client for the next round of federated training.
[0071] In this embodiment, in step S1, the server can maintain basic model parameters, global low-rank adaptation parameters, the previous round of global equivalent adaptation weights, and the current communication round identifier. The basic model parameters can be frozen during federated training, or they can be updated only on the server using equivalent adaptation weights.
[0072] The server distributes the current global basic model parameters, global low-rank adaptation parameters, adaptation layer configuration, rank constraint information, and training round information to each client based on the list of participating clients.
[0073] In this embodiment, in step S2, the client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information, including:
[0074] S21: The client receives the complete parameters of the global basic model and the previous round of each adaptation layer from the server. Global left and right low-rank factors , And adaptation layer configuration and rank constraint information;
[0075] S22: The client locally loads and freezes the backbone weights of the global base model. Based on the distributed global low-rank factor, the client's initial local left and right low-rank factors are obtained by mapping the client's own computing power and local task characteristics, that is:
[0076] ;
[0077] ;
[0078] In the formula, , The first The client number Local initial left and right low-rank factors of the layer adaptation layer; The rank-truncation projection matrix; For the first The client number The low rank value of the layer adaptation layer; This indicates the transpose operation.
[0079] And based on the first Global left and right low-rank factors of the layer adaptation layer , Calculate the global equivalent fit weight from the previous round, i.e.:
[0080] ;
[0081] In the formula, the subscript Indicates the global scope; The weights are the global equivalent adaptation weights of the previous round in the l-th layer.
[0082] S23: The client obtains local data and inputs it into the frozen base model backbone to perform forward propagation to calculate the task loss. During training, the gradients of the base model backbone parameters are masked. Gradient backpropagation is enabled only for low-rank adaptation parameters; backpropagation only updates the local left and right low-rank factors of each layer, and training is terminated after iterating to the preset local training rounds or triggering the local early stopping condition.
[0083] ;
[0084] ;
[0085] In the formula, The learning rate; The attenuation coefficient; , These are the first-order momentum estimators for the left and right low-rank factors, respectively; , These are the second-order momentum estimators for the left and right low-rank factors, respectively; This represents the numerical stability constant of the optimizer.
[0086] S24: The client generates low-rank adaptation parameter update information based on the local left and right low-rank factors after training and the global left and right low-rank factors in this round.
[0087] The low-rank adaptation parameter update information includes the local left and right low-rank factors for this round. , And the local left and right low-rank factor increments , ,Right now:
[0088] ;
[0089] ;
[0090] In the formula, , For the first Global left and right low-rank factors of the layer adaptation layer.
[0091] In this embodiment, in step S3, the server receives the low-rank adaptation parameter update information uploaded by each client, and constructs the complete equivalent weight update amount corresponding to each client based on the previous round of global equivalent adaptation weight and the current client update, including:
[0092] S31: Based on the local left and right low-rank factors uploaded by the client. , Calculate the local equivalent adaptation weight, i.e.:
[0093] ;
[0094] In the formula, For this round of client t No. Local equivalent adaptation weights for the layer adaptation layer.
[0095] S32: Calculate the single-layer equivalent weight update amount based on the local equivalent adaptation weights of this round and the global equivalent adaptation weights of the previous round, i.e.:
[0096] ;
[0097] In the formula, For the client No. The equivalent weight update amount of a single layer in the layer adaptation layer.
[0098] S33: Client The equivalent weight update amounts of all adaptation layers are combined in layer order to form the client. Complete equivalent weight update .
[0099] In this embodiment, step S4 involves the server performing conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients, including:
[0100] S41: The server obtains the set of all participating clients in this round, and performs layer-by-layer calculation of the inner product of the equivalent weight update amount of each single layer for any pair of clients, calculates the trace of the inner product, and sums the traces of all adapted layers to obtain the equivalent inner product of the complete equivalent weight update amounts of the two clients, that is:
[0101] ;
[0102] In the formula, For the client and The equivalent inner product; inner product term traces; This is a transpose operation; For the client The single-layer equivalent weight update amount.
[0103] S42: Determine whether there is a conflict in the update directions of the two clients based on the equivalent inner product of the complete equivalent weight update amounts of the two clients; including:
[0104] If the equivalent inner product of the complete equivalent weight updates of the two clients If the value is less than 0, then the client is considered... and There is a conflict in the update direction;
[0105] If the cosine similarity of the equivalent inner product of two clients is less than or equal to a preset threshold, then the client is determined to be... and There is a conflict in the update direction, namely:
[0106] τ;
[0107] In the formula, For the client and Cosine similarity of equivalent inner products; τ is the Frobenius norm of the matrix; τ is the preset threshold.
[0108] In some embodiments, the client may be determined based on whether the conflict intensity is greater than a conflict threshold or whether the reverse update ratio exceeds a set proportion. and There is a conflict in the update direction.
[0109] In this embodiment, in step S5, when it is determined that there is a conflict in the update directions of any two clients, a projection correction is performed on the complete equivalent weight update amount of the corresponding client to obtain the corrected complete equivalent weight update amount of the client, including:
[0110] S51: When it is determined that there is a conflict in the update directions of two clients, the conflict component along the update direction of the other client is subtracted from the complete equivalent weight update amount of the corresponding client to obtain the corrected complete equivalent weight update amount of the corresponding client, that is:
[0111]
[0112] In the formula, For the client Corrected full equivalent weight update amount; It is a minimal nonnegative stability constant; For the client The squared Frobenius norm of the complete equivalent weight update.
[0113] S52: If any client conflicts with multiple clients simultaneously, each conflicting client will be processed in a preset order. After each round of correction, the complete equivalent weight of the current correction will be updated. As the new input to be corrected, the projection correction is performed iteratively. After all conflict pairings are processed, the final corrected equivalent weight update is obtained.
[0114] S53: If there is no conflict in the update direction between the two clients, output the original complete equivalent weight update amount.
[0115] In this embodiment, in step S6, the server performs weighted aggregation on the corrected client-side complete equivalent weight update to obtain the global equivalent update, and updates the global equivalent adaptation weights and global left and right low-rank factors based on the global equivalent update, before sending them to the client for the next round of federated training, including:
[0116] S61: Use the corrected client-side complete equivalent weight update amount for weighted aggregation to obtain the global equivalent update amount, i.e.:
[0117] ;
[0118] In the formula, This is the global equivalent update amount; For the client The weighted aggregation coefficient; The number of clients participating in the training;
[0119] S62: Calculate the current round's global equivalent adaptation weight based on the global equivalent update amount and the previous round's global equivalent adaptation weight, i.e.:
[0120] ;
[0121] In the formula, For this round, globally equivalent weights are adapted.
[0122] S63: Map the global equivalent adaptation weights of this round back to the low-rank parameter space to obtain the global left and right low-rank factors of this round. , ,Right now:
[0123] Global equivalent adaptation weights for each layer in this round Perform singular value decomposition Take the front Singular value truncation is used to construct the global left and right low-rank factors for this round. , ,Right now:
[0124] ;
[0125] ;
[0126] In the formula, It is a left singular vector matrix; It is a singular value diagonal matrix; It is a right singular vector matrix; , These represent the left singular vector matrix taking the first part of the vector. Take the first part of the truncated left singular submatrix and right singular vector matrix formed by the columns. The truncated right singular submatrix formed by rows; This indicates extracting the top left corner of the singular value diagonal matrix. Singular value diagonal submatrices.
[0127] like Figure 2As shown, another embodiment of this application provides a client update conflict coordination system, including a server 10 and multiple clients 20;
[0128] The server 10 is configured with a parameter initialization module 101, an equivalent update quantity construction module 102, a conflict detection module 103, a projection correction module 104, and an aggregation update module 105; each client 20 is configured with a client training module 201; wherein:
[0129] The parameter initialization module 101 is used to initialize the global basic model and the corresponding global low-rank adaptation parameters, and to distribute the global basic model parameters and global low-rank adaptation parameters to multiple clients.
[0130] The client training module 201 is used to perform local left and right low-rank factor fine-tuning using local data from the client to obtain low-rank adaptation parameter update information.
[0131] The equivalent update quantity construction module 102 is used to receive the low-rank adaptation parameter update information uploaded by each client through the server, and construct the complete equivalent weight update quantity corresponding to each client according to the previous round of global equivalent adaptation weight and the current client update.
[0132] The conflict detection module 103 is used to perform conflict detection on the complete equivalent weight update amount of different clients through the server, and determine whether there is a conflict in the update direction of any two clients.
[0133] The projection correction module 104 is used to perform projection correction on the complete equivalent weight update amount of the corresponding client when it is determined that there is a conflict in the update direction of any two clients, so as to obtain the corrected complete equivalent weight update amount of the client.
[0134] The aggregation update module 105 is used to perform weighted aggregation of the corrected client complete equivalent weight update amount through the server to obtain the global equivalent update amount, and update the global equivalent adaptation weight and global left and right low-rank factors according to the global equivalent update amount, and then send it to the client for the next round of federated training.
[0135] In this embodiment, the server can maintain basic model parameters, global low-rank adaptation parameters, previous round global equivalent adaptation weights, and the current communication round identifier. The basic model parameters can be frozen during federated training or updated only on the server using equivalent adaptation weights.
[0136] The server distributes the current global basic model parameters, global low-rank adaptation parameters, adaptation layer configuration, rank constraint information, and training round information to each client based on the list of participating clients.
[0137] In this embodiment, the client training module 201 performs local left and right low-rank factor fine-tuning using the client's local data to obtain low-rank adaptation parameter update information, including:
[0138] The client receives the complete parameters of the global basic model and the previous round of each adaptation layer from the server. Global left and right low-rank factors , , as well as adaptation layer configuration and rank constraint information.
[0139] The client locally loads and freezes the backbone weights of the global base model. Based on the distributed global low-rank factor, the client's initial local left and right low-rank factors are obtained by mapping the client's own computing power and local task characteristics, that is:
[0140] ;
[0141] ;
[0142] In the formula, , The first The client number The initial left and right low-rank factors of the layer adaptation layer; The rank-truncation projection matrix; For the first The client number The low rank value of the layer adaptation layer; This indicates the transpose operation.
[0143] And based on the first Global left and right low-rank factors of the layer adaptation layer , Calculate the global equivalent fit weight from the previous round, i.e.:
[0144] ;
[0145] In the formula, the subscript Indicates the global scope; The weights are the global equivalent adaptation weights of the previous round in the l-th layer.
[0146] The client acquires local data and inputs it into the frozen base model backbone to perform forward propagation and calculate the task loss. During training, the gradients of the base model backbone parameters are masked. Gradient backpropagation is enabled only for low-rank adaptation parameters; backpropagation only updates the local left and right low-rank factors of each layer, and training is terminated after iterating to the preset local training rounds or triggering the local early stopping condition.
[0147] ;
[0148] ;
[0149] In the formula, The learning rate; The attenuation coefficient; , These are the first-order momentum estimators for the left and right low-rank factors, respectively; , These are the second-order momentum estimators for the left and right low-rank factors, respectively; This represents the numerical stability constant of the optimizer.
[0150] The client generates low-rank adaptation parameter update information based on the local left and right low-rank factors after training and the global left and right low-rank factors in this round.
[0151] The low-rank adaptation parameter update information includes the local left and right low-rank factors for this round. , And the local left and right low-rank factor increments , ,Right now:
[0152] ;
[0153] ;
[0154] In the formula, , For the first Global left and right low-rank factors of the layer adaptation layer.
[0155] In this embodiment, the equivalent update quantity construction module 102 constructs the local left and right low-rank factors uploaded by the client. , Calculate the local equivalent adaptation weight, i.e.:
[0156] ;
[0157] In the formula, For this round of client t No. Local equivalent adaptation weights for the layer adaptation layer.
[0158] The equivalent update quantity construction module 102 calculates the single-layer equivalent weight update quantity based on the local equivalent adaptation weight of the current round and the global equivalent adaptation weight of the previous round, that is:
[0159] ;
[0160] In the formula, For the client No. The equivalent weight update amount of a single layer in the layer adaptation layer.
[0161] The equivalent update quantity construction module 102 will connect the client The equivalent weight update amounts of all adaptation layers are combined in layer order to form the client. Complete equivalent weight update .
[0162] In this embodiment, the conflict detection module 103 performs conflict detection on the complete equivalent weight update amounts of different clients through the server, and determines whether there is a conflict in the update directions of any two clients, including:
[0163] The conflict detection module 103 obtains the set of all participating clients in this round, and performs layer-by-layer calculation of the inner product of the equivalent weight update amount of each single layer for any pair of clients, calculates the trace of the inner product, and sums the traces of all adapted layers to obtain the equivalent inner product of the complete equivalent weight update amounts of the two clients, that is:
[0164] ;
[0165] In the formula, For the client and The equivalent inner product; inner product term traces; This is a transpose operation; For the client The single-layer equivalent weight update amount.
[0166] The conflict detection module 103 determines whether there is a conflict in the update directions of the two clients based on the equivalent inner product of the complete equivalent weight update amounts of the two clients; including:
[0167] If the equivalent inner product of the complete equivalent weight updates of the two clients If the value is less than 0, then the client is considered... and There is a conflict in the update direction;
[0168] If the cosine similarity of the equivalent inner product of two clients is less than or equal to a preset threshold, then the client is determined to be... and There is a conflict in the update direction, namely:
[0169] τ;
[0170] In the formula, For the client and Cosine similarity of equivalent inner products; τ is the Frobenius norm of the matrix; τ is the preset threshold.
[0171] In some embodiments, the client may be determined based on whether the conflict intensity is greater than a conflict threshold or whether the reverse update ratio exceeds a set proportion. and There is a conflict in the update direction.
[0172] In this embodiment, when the projection correction module 104 determines that there is a conflict in the update directions of any two clients, it performs projection correction on the complete equivalent weight update amount of the corresponding clients to obtain the corrected complete equivalent weight update amount of the clients, including:
[0173] When it is determined that there is a conflict in the update directions of two clients, the conflicting component along the update direction of the other client is subtracted from the complete equivalent weight update of the corresponding client to obtain the corrected complete equivalent weight update of the corresponding client, that is:
[0174]
[0175] In the formula, For the client Corrected full equivalent weight update amount; It is a minimal nonnegative stability constant; For the client The squared Frobenius norm of the complete equivalent weight update.
[0176] If any client conflicts with multiple clients simultaneously, each conflicting client will be processed sequentially according to a preset order. After each round of correction, the complete equivalent weight of the current correction will be updated. As the new input to be corrected, the projection correction is performed iteratively. After all conflict pairings are processed, the final corrected equivalent weight update is obtained.
[0177] If there is no conflict in the update direction between the two clients, the original complete equivalent weight update amount is output.
[0178] In this embodiment, the aggregation update module 105 performs weighted aggregation of the corrected client-side complete equivalent weight update amount through the server to obtain the global equivalent update amount, updates the global equivalent adaptation weights and global left and right low-rank factors according to the global equivalent update amount, and then sends them to the client for the next round of federated training, including:
[0179] We use the corrected client-side complete equivalent weight update amount for weighted aggregation to obtain the global equivalent update amount, i.e.:
[0180] ;
[0181] In the formula, This is the global equivalent update amount; For the client The weighted aggregation coefficient; This represents the number of clients participating in the training.
[0182] The global equivalent adaptation weight for this round is calculated based on the global equivalent update amount and the global equivalent adaptation weight of the previous round, that is:
[0183] ;
[0184] In the formula, The weights are adapted to the global equivalent weights for this round.
[0185] Mapping the current round's globally equivalent adaptation weights back to the low-rank parameter space yields the current round's global left and right low-rank factors. , ,Right now:
[0186] Global equivalent adaptation weights for each layer in this round Perform singular value decomposition Take the front Singular value truncation is used to construct the global left and right low-rank factors for this round. , ,Right now:
[0187] ;
[0188] ;
[0189] In the formula, It is a left singular vector matrix; It is a singular value diagonal matrix; It is a right singular vector matrix; , These represent the left singular vector matrix taking the first part of the vector. Take the first part of the truncated left singular submatrix and right singular vector matrix formed by the columns. The truncated right singular submatrix formed by rows; This indicates extracting the top left corner of the singular value diagonal matrix. Singular value diagonal submatrices.
[0190] Three embodiments of this application provide an electronic device, including:
[0191] At least one processor;
[0192] and a memory communicatively connected to the at least one processor;
[0193] The memory stores a computer program that can be executed by the at least one processor, wherein the computer program, when executed by the at least one processor, implements the client update conflict coordination method.
[0194] The fourth embodiment of this application provides a computer storage medium storing a computer program that, when executed by a processor, implements the client update conflict coordination method.
[0195] The embodiments and descriptions above are merely illustrative of the principles and preferred embodiments of the present invention. Various changes and modifications may be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed.
Claims
1. A client update conflict coordination method, characterized in that, include: The server is used to initialize the global base model and the corresponding global low-rank adaptation parameters, and the global base model parameters and global low-rank adaptation parameters are then distributed to multiple clients. The client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information. The server receives low-rank adaptation parameter update information uploaded by each client and constructs the complete equivalent weight update amount for each client based on the previous round of global equivalent adaptation weight and the current client update. The server performs conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients. When it is determined that there is a conflict in the update direction of any two clients, the projection correction is performed on the complete equivalent weight update of the corresponding clients to obtain the corrected complete equivalent weight update of the clients. The server performs weighted aggregation on the corrected client-side complete equivalent weight update to obtain the global equivalent update. Based on the global equivalent update, the server updates the global equivalent adaptation weight and the global left and right low-rank factors, and then sends them to the client for the next round of federated training.
2. The method according to claim 1, characterized in that: The client performs local left and right low-rank factor fine-tuning based on local data to obtain low-rank adaptation parameter update information, including: The client receives the complete parameters of the global basic model, the global left and right low-rank factors of each adaptation layer in the previous round, and the adaptation layer configuration and rank constraint information sent by the server. The client locally loads and freezes the backbone weights of the global basic model, and based on the global low-rank factor issued by the server, obtains the client's local initial left and right low-rank factors according to the client's own computing power and local task feature mapping. The client obtains local data and inputs the local data into the frozen basic model backbone to perform forward propagation to calculate the task loss. During training, the gradient of the basic model backbone parameters is hidden, and only the gradient backpropagation of the low-rank adaptation parameters is enabled. Backpropagation only updates the local left and right low-rank factors of each layer, and training is terminated after iterating to the preset local training rounds or triggering the local early stopping condition. Based on the local left and right low-rank factors after training and the global left and right low-rank factors in this round, the client generates low-rank adaptation parameter update information, which includes the local left and right low-rank factors in this round and the increments of the local left and right low-rank factors.
3. The method according to claim 2, characterized in that: The server receives low-rank adaptation parameter update information uploaded by each client, and constructs the complete equivalent weight update for each client based on the previous round of global equivalent adaptation weights and the current client update, including: Calculate the local equivalent adaptation weight based on the local left and right low-rank factors uploaded by the client. The single-layer equivalent weight update amount is calculated based on the local equivalent adaptation weight of this round and the global equivalent adaptation weight of the previous round. Client The equivalent weight update amounts of all adaptation layers are combined in layer order to form the client. The complete equivalent weight update amount.
4. The method according to claim 3, characterized in that: The server performs conflict detection on the complete equivalent weight update amounts of different clients to determine whether there is a conflict in the update directions of any two clients, including: The server obtains the set of all participating clients in this round, and performs layer-by-layer calculation of the inner product of the equivalent weight update amount of a single layer for any pair of clients, and calculates the trace of the inner product, and sums the traces of all adapted layers to obtain the equivalent inner product of the complete equivalent weight update amount of the two clients. Determine whether there is a conflict in the update directions of the two clients based on the equivalent inner product of the complete equivalent weight update amounts of the two clients.
5. The method according to claim 4, characterized in that: Determine whether there is a conflict in the update directions of the two clients based on the equivalent inner product of the complete equivalent weight update amounts of the two clients; including: If the equivalent inner product of the complete equivalent weight updates of the two clients If the value is less than 0, then the client is considered... and There is a conflict in the update direction; If the cosine similarity of the equivalent inner product of two clients is less than or equal to a preset threshold, then the client is determined to be... and There is a conflict in the update direction, namely: t; In the formula, For the client and Cosine similarity of equivalent inner products; The matrix is defined by the Frobenius norm; τ is a preset threshold. For the client and The equivalent inner product of the complete equivalent weight update quantity; For clients and The complete equivalent weight update amount.
6. The method according to claim 5, characterized in that: When it is determined that the update directions of any two clients conflict, a projection correction is performed on the complete equivalent weight update of the corresponding clients to obtain the corrected complete equivalent weight update of the clients, including: When it is determined that there is a conflict in the update directions of two clients, the conflicting component along the update direction of the other client is subtracted from the complete equivalent weight update of the corresponding client to obtain the corrected complete equivalent weight update of the corresponding client, that is: In the formula, For the client Corrected full equivalent weight update amount; It is a minimal nonnegative stability constant; For the client The squared Frobenius norm of the complete equivalent weight update; If any client conflicts with multiple clients simultaneously, each conflicting client will be processed sequentially according to a preset order. After each round of correction, the complete equivalent weight of the current correction will be updated. As the new input to be corrected, the projection correction is performed iteratively. After all conflict pairings are processed, the final corrected complete equivalent weight update is obtained. If there is no conflict in the update direction between the two clients, the original complete equivalent weight update amount is output.
7. The method according to claim 6, characterized in that: The server performs a weighted aggregation of the corrected client-side complete equivalent weight updates to obtain the global equivalent update quantity. Based on this global equivalent update quantity, the server updates the global equivalent adaptation weights and global left and right low-rank factors, and then distributes the updated weights to the client for the next round of federated training, including: We use the corrected client-side complete equivalent weight update amount for weighted aggregation to obtain the global equivalent update amount; The global equivalent adaptation weight for this round is calculated based on the global equivalent update amount and the global equivalent adaptation weight of the previous round. Mapping the current round's global equivalent adaptation weights back to the low-rank parameter space yields the current round's global left and right low-rank factors.
8. A client update conflict coordination system, comprising a server and multiple clients; The server is configured with a parameter initialization module, an equivalent update quantity construction module, a conflict detection module, a projection correction module, and an aggregation update module; each client is configured with a client training module; characterized in that: The parameter initialization module is used to initialize the global base model and the corresponding global low-rank adaptation parameters, and to distribute the global base model parameters and global low-rank adaptation parameters to multiple clients; The client training module is used to perform local left and right low-rank factor fine-tuning using local data from the client to obtain low-rank adaptation parameter update information; The equivalent update quantity construction module is used to receive the low-rank adaptation parameter update information uploaded by each client through the server, and construct the complete equivalent weight update quantity corresponding to each client based on the previous round of global equivalent adaptation weight and the current client update. The conflict detection module is used to perform conflict detection on the complete equivalent weight update amount of different clients through the server, and to determine whether there is a conflict in the update direction of any two clients; The projection correction module is used to perform projection correction on the complete equivalent weight update of the corresponding client when it is determined that there is a conflict in the update direction of any two clients, so as to obtain the corrected complete equivalent weight update of the client. The aggregation update module is used to perform weighted aggregation of the corrected client complete equivalent weight update amount through the server to obtain the global equivalent update amount, and update the global equivalent adaptation weight and global left and right low-rank factors according to the global equivalent update amount, and then send it to the client for the next round of federated training.
9. An electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, wherein the computer program, when executed by the at least one processor, implements the client update conflict coordination method as described in any one of claims 1-7.
10. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the client update conflict coordination method as described in any one of claims 1-7.
