Personalized federal learning method and device based on asymmetric contribution relationship
By introducing an asymmetric contribution matrix and a proxy model update mechanism into personalized federated learning, we optimize the personalized models among clients, solve the problem of poor collaboration in existing methods, and achieve more efficient cross-client knowledge transfer and model accuracy.
Patent Information
- Application Number
- CN202511659615.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-17
AI Technical Summary
Existing personalized federated learning methods, due to differences in data distribution among clients and privacy protection constraints, cannot accurately identify the partners most beneficial to their own model optimization, resulting in poor collaboration effects. Furthermore, they fail to effectively capture asymmetric dependencies between clients, limiting the improvement of model performance.
By initializing the contribution relationship matrix and the personalized model, a proxy model is generated. The contribution relationship matrix and the personalized model are then optimized through client-side gradient training and server-side updates. Asymmetric contribution relationships are used to generate customized optimization directions for each client, enabling iterative updates of the personalized model.
While protecting data privacy, it accurately captures asymmetric dependencies between clients, improves the task accuracy of personalized models and the effect of cross-client knowledge transfer, and alleviates the performance bottleneck of existing methods.
Smart Images

Figure CN121543669A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a personalized federated learning method, apparatus, and computer program product based on asymmetric contribution relationships. Background Technology
[0002] In fields such as smart homes, connected vehicles, smart manufacturing, and smart healthcare, the increasing number of IoT devices and the rapid development of edge computing architectures have led to an exponential increase in edge-side data, raising data privacy and security concerns. Federated learning, as a distributed machine learning approach, allows clients to collaboratively train deep learning models without exposing raw data, offering the potential to protect data privacy.
[0003] In the basic framework of federated learning, traditional methods primarily focus on training a global model applicable to all participants on the server and then distributing this global model to each client. However, in real-world edge computing scenarios, due to differences in data sources and sampling methods, the data distribution among clients varies significantly, leading to data heterogeneity issues. To address this challenge, Personalized Federated Learning (PFL) has emerged. Its core objective is to customize a model for each client, enabling it to adapt to local data characteristics while also possessing a certain degree of generalization ability across participants.
[0004] While Personalization Failure (PFL) improves the level of personalization when deploying models on clients, the heterogeneity and invisibility of client data distribution remain key performance bottlenecks. To address this challenge, most PFL solutions construct the personalized model as a trade-off between global and local optimization. Within this framework, the global model provides generalization capabilities, while local training employs specific mechanisms to meet personalization needs. For example, some methods treat the global model as the meta-model foundation for personalized applications; others use it as a regularization term to constrain the personalized model; still others use the feature extractor of the global model as a shared backbone network for personalized training.
[0005] However, existing PFL methods still face two key technical problems in practical deployment:
[0006] (1) In a distributed learning environment, the data distribution between each client is naturally different, and due to the limitations of privacy protection mechanisms, it is difficult for clients to directly assess the potential benefits of collaborating with other devices. This opacity leads to a lack of quantitative basis when establishing collaborative relationships between clients, and clients cannot accurately identify the partners that are most beneficial to their own model optimization, thereby affecting the overall collaborative effect and reducing the task accuracy of the personalized models of each client.
[0007] (2) Most existing PFL methods are based on optimization strategies guided by a global model, which implicitly assume that the contribution relationship between each client is symmetrical. However, in real-world scenarios, the mutual influence between different clients often exhibits obvious asymmetric characteristics. This asymmetric relationship is particularly significant in complex data distribution environments, and existing methods have failed to effectively capture this dynamically changing collaborative characteristic, thus limiting the performance improvement of personalized models. Summary of the Invention
[0008] Therefore, the technical problem to be solved by the present invention is to overcome the problem of reduced task accuracy caused by insufficient modeling of the relationship between clients in the prior art.
[0009] To address the aforementioned technical problems, this invention provides a personalized federated learning method based on asymmetric contribution relationships, comprising: The server initializes the contribution relationship matrix and initializes a personalized model for each client; The personalized models for all clients are iteratively updated based on the contribution relationship matrix. The update steps for the personalized model in one communication round include: S1: The server generates a proxy model for each client based on the contribution relationship matrix and the personalized model for each client; S2: Each client downloads the corresponding personalized model and proxy model from the server, calculates the gradient of the personalized model based on the local dataset, and trains the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. S3: If the current communication round is greater than 1, the server updates the contribution relationship matrix based on the gradient of the personalized models of all clients. S4: The server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the agent model trained by each client and the personalized model trained by each client. S5: The server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's data according to the personalized model of each client; Once the total number of communication rounds is reached, the updated personalized model for each client is output.
[0010] Preferably, the method for constructing the contribution relationship matrix is as follows: The element in the k-th row and j-th column of the contribution relationship matrix represents the contribution weight of the j-th client to the k-th client, where... , For the number of clients; The contribution weight of the j-th client to the k-th client is represented as the product of the L-2 norm of the gradient of the personalized model of the k-th client on the j-th client's data and the task weight of the j-th client to the k-th client.
[0011] Preferably, the server generates a proxy model for each client based on the contribution relationship matrix and the personalized model for each client, using the following method: The proxy model for the k-th client is generated using the following formula: ; in, For the proxy model of the k-th client, For the number of clients, Let be the contribution weight of the k-th client to the j-th client. Let be the contribution weight of the k-th client to the i-th client. For the personalized model of the j-th client, .
[0012] Preferably, the agent model is trained using a local dataset to obtain the trained agent model, as shown in the formula: ; in, The proxy model trained for the k-th client, For the proxy model of the k-th client, The learning rate used to train the agent model for the client. Let the gradient of the agent model for the k-th client be defined on the data of the k-th client. For the local dataset of the kth client, , This represents the number of clients.
[0013] Preferably, the server updates the contribution relationship matrix based on the gradients of the personalized models of all clients, as follows: The server updates the contribution weight of the j-th client to the k-th client in the current communication round based on the approximate negative gradient direction of the personalized model of the k-th client in the previous communication round on the j-th client's data, and the gradient of the personalized model of the k-th client in the current communication round. The formula is as follows: ; in, Let be the contribution weight of the j-th client to the k-th client. The update step size for contribution weights, For the update step size of the personalized model, Let be the gradient of the personalized model for the k-th client. For the personalized model of the kth client, For the local dataset of the kth client, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
[0014] Preferably, the server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the proxy model trained by each client and the personalized model trained by each client, using the following method: The server calculates the difference between the parameters of the trained proxy model of the j-th client and the parameters of the personalized model of the k-th client, and obtains the approximate negative gradient direction of the personalized model of the k-th client on the j-th client's data based on the difference.
[0015] Preferably, the approximate negative gradient direction of the personalized model of the k-th client on the data of the j-th client is obtained based on the difference, and the method is as follows: The following formula is used to calculate the approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data: ; in, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. Let be the difference between the parameters of the trained proxy model for the j-th client and the parameters of the personalized model for the k-th client. , This represents the number of clients.
[0016] Preferably, the server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's personalized model on each client's data, as follows: The server updates the personalized model of the k-th client based on the approximate negative gradient direction of the personalized model of the k-th client on the data of the j-th client and the contribution weight of the j-th client to the k-th client, using the following formula: ; in, For the personalized model of the kth client, For the update step size of the personalized model, Let be the contribution weight of the j-th client to the k-th client. Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
[0017] The present invention also provides a personalized federated learning device based on asymmetric contribution relationships, comprising: The initialization module is used by the server to initialize the contribution relationship matrix and to initialize a personalized model for each client. The personalized model update module is used to iteratively update the personalized models for all clients based on the contribution relationship matrix, including: The proxy model aggregation unit is used by the server to generate a proxy model for each client based on the contribution relationship matrix and the personalized model of each client. The client training unit is used by each client to download the corresponding personalized model and proxy model from the server, calculate the gradient of the personalized model based on the local dataset, and train the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. The contribution relationship update unit is used to update the contribution relationship matrix of all clients based on the gradient of the personalized model if the current communication round is greater than 1. The approximate negative gradient direction calculation unit is used by the server to calculate the approximate negative gradient direction of each client's personalized model on each client's data, based on the agent model trained by each client and the personalized model trained by each client. The personalized model update unit is used by the server to update the corresponding personalized model based on the approximate negative gradient direction and contribution relationship matrix of each client's personalized model on each client's data. The output module is used to output the updated personalized model for each client after the total number of communication rounds has been reached.
[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described personalized federated learning method based on asymmetric contribution relationships.
[0019] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: This invention discloses a personalized federated learning method based on asymmetric contribution relationships. It fully considers the asymmetric contribution relationships between clients in the optimization objective, generates a proxy model for each client using these relationships, and then updates the contribution relationship matrix and personalized models comprehensively through the gradients of the personalized models of each client and the proxy models trained using local datasets. This allows each client to generate optimization directions for multiple models, rather than just training a single local model. This invention fully utilizes the computing power and storage resources of the server, maintains the contribution relationships between clients and personalized models on the server side, and provides customized proxy models for each client's needs through an adaptive learning mechanism. This greatly alleviates the performance bottleneck caused by insufficient modeling of client relationships in previous methods, solves the problem that existing solutions cannot capture complex client dependencies, achieves accurate cross-client knowledge transfer while protecting data privacy, and improves the accuracy of clients in processing their respective tasks. Attached Figure Description
[0020] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of a personalized federated learning method based on asymmetric contribution relationships according to the present invention. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0022] Reference Figure 1 As shown, the first embodiment of the present invention provides a personalized federated learning method based on asymmetric contribution relationships, including: The server initializes the contribution relationship matrix and initializes a personalized model for each client; The personalized models for all clients are iteratively updated based on the contribution relationship matrix. The update steps for the personalized model in one communication round include: S1: The server generates a proxy model for each client based on the contribution relationship matrix and the personalized model for each client; S2: Each client downloads the corresponding personalized model and proxy model from the server, calculates the gradient of the personalized model based on the local dataset, and trains the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. S3: If the current communication round is greater than 1, the server updates the contribution relationship matrix based on the gradient of the personalized models of all clients. S4: The server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the agent model trained by each client and the personalized model trained by each client. S5: The server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's data according to the personalized model of each client; Once the total number of communication rounds is reached, the updated personalized model for each client is output.
[0023] Specifically, each client Having a local privacy dataset Personalized federated systems Multiple personalized models are trained jointly by a client and a server. The global optimization objective is as follows: ; in, Represents the personalized model for the k-th client. Dataset of the j-th client Experience and risk; To quantify the task weight of the j-th client to the k-th client; , This represents the number of clients.
[0024] This invention introduces a reparameterization technique that encapsulates the product of the model variation norm and the task weights into a new parameter called the contribution weight. .
[0025] Preferably, the method for constructing the contribution relationship matrix is as follows: The element in the k-th row and j-th column of the contribution relationship matrix represents the contribution weight of the j-th client to the k-th client; The contribution weight of the j-th client to the k-th client is represented as the product of the L-2 norm of the gradient of the personalized model of the k-th client on the j-th client's data and the task weight of the j-th client to the k-th client.
[0026] The formula for the contribution weight of the k-th client to the j-th client is expressed as: ; in, Let be the contribution weight of the j-th client to the k-th client. Let the task weight of the j-th client be relative to that of the k-th client. Let the gradient of the personalized model for the k-th client be defined on the data of the j-th client. For the personalized model of the kth client, For the local dataset of the j-th client, It is an L-2 norm.
[0027] Depend on The matrix formed by the pairwise relationships is called the contribution matrix. : .
[0028] Therefore, the optimization formula for each personalized model can be obtained: ; in, This is the learning rate.
[0029] The method for the server to initialize the contribution relationship matrix and initialize a personalized model for each client is as follows: Contribution matrix initialized with all 1s on the server And randomly initialize a personalized model for each client. .
[0030] In a personalized federated system, the server and each client optimize each client's personalized model T times through T communication rounds. The following is a detailed introduction to the optimization of the personalized model using one communication round as an example.
[0031] In S1, the server generates a proxy model for each client based on the contribution relationship matrix and each client's personalized model. Essentially, the proxy model is a weighted aggregation of multiple personalized models into an intermediate model based on each client's contribution weight, serving as a proxy for multiple tasks.
[0032] Specifically, the proxy model for the k-th client is generated using the following formula. : ; in, For the proxy model of the k-th client, For the number of clients, Let be the contribution weight of the k-th client to the j-th client. Let be the contribution weight of the k-th client to the i-th client. This is the personalized model for the j-th client.
[0033] Subsequently, the server will use the proxy model. and personalized models Distribute to the corresponding clients.
[0034] In S2, taking the k-th client as an example, the k-th client downloads the corresponding personalized model from the server. and proxy model Calculate the gradient of the personalized model based on the local dataset. Simultaneously, the agent model is trained using a local dataset through several steps to obtain a fully trained agent model. .
[0035] Specifically, the agent model is trained using a local dataset to obtain the trained agent model, as shown in the formula: ; in, The proxy model trained for the k-th client, For the proxy model of the k-th client, The learning rate used to train the agent model for the client. Let the gradient of the agent model for the k-th client be defined on the data of the k-th client. This is the local dataset for the k-th client.
[0036] Subsequently, all clients upload the gradients of their corresponding personalized models and the trained proxy models to the server; the server receives the trained proxy models uploaded by all clients. and personalized model gradient .
[0037] In S4, the server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the agent model trained by each client and the personalized model trained by each client. The method is as follows: The server will receive Subtract the agent model parameters The personalized model parameters are obtained Individual model changes: ; After directionalizing the model changes, we approximate the negative gradient direction of each personalized model on each client's data.
[0038] The approximate negative gradient direction of the personalized model of the k-th client on the j-th client's data. For example, the calculation method is as follows: The server calculates the difference between the parameters of the trained proxy model for the j-th client and the parameters of the personalized model for the k-th client. According to the difference Obtain the approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data. .
[0039] The approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data is obtained based on the difference, using the following method: The following formula is used to calculate the approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data: ; in, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. The difference between the parameters of the agent model that has been trained for the j-th client and the parameters of the personalized model for the k-th client.
[0040] In S5, the server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's personalized model on each client's data. The method is as follows: The server updates the personalized model of the k-th client based on the approximate negative gradient direction of the personalized model of the k-th client on the data of the j-th client and the contribution weight of the j-th client to the k-th client, using the following formula: ; in, For the personalized model of the kth client, For the update step size of the personalized model, Let be the contribution weight of the j-th client to the k-th client. Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
[0041] Since the optimization method of the above personalized model is based on contribution relationship optimization, the goal is for the personalized model to learn the knowledge of other clients and thus perform well on local data. Therefore, the optimization objective of contribution relationship is... yes: ; in, Represents the personalized model for the k-th client. Dataset of the kth client Experience and risk.
[0042] According to the chain rule, we can obtain right The partial derivatives are: ; in, This is the update step size for the personalized model.
[0043] Therefore, in S3, the server updates the contribution relationship matrix based on the gradients of the personalized models of all clients, as follows: The server updates the contribution weight of the j-th client to the k-th client in the current communication round based on the approximate negative gradient direction of the personalized model of the k-th client in the previous communication round on the j-th client's data, and the gradient of the personalized model of the k-th client in the current communication round. The formula is as follows: ; in, Let be the contribution weight of the j-th client to the k-th client. The update step size for contribution weights, For the update step size of the personalized model, Let be the gradient of the personalized model for the k-th client. For the personalized model of the kth client, For the local dataset of the kth client, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
[0044] The server calculates the approximate negative gradient direction only in the first communication round. Therefore, starting from the second communication round, before updating the approximate negative gradient direction, the server updates the contribution relationship matrix based on the approximate negative gradient direction of the previous communication round.
[0045] The overall algorithm flow of this invention is shown in Table 1.
[0046] Table 1. Algorithm Flow
[0047] In the following embodiments, the method of the present invention is referred to as FedCASE. The applicant compared two traditional federated learning methods, FedAvg and FedProx, with several advanced personalized federated learning methods, including Per-FedAvg, FedRep, FedCP, FedFomo, FedAMP, FedPHP, and FedALA. Table 2 provides a brief overview of these methods.
[0048] Table 2. Introduction to Comparison Methods
[0049] In the second embodiment, a simple 4-layer convolutional neural network (CNN) is used as the basic skeleton. The applicant considered label-skewed heterogeneous tasks and conducted experiments on four datasets to test the method of the present invention.
[0050] The datasets used include FashionMNIST, Cifar10, Cifar100, and TinyImageNet. FashionMNIST, Cifar10, Cifar100, and TinyImageNet are commonly used image classification datasets in the federated learning field, with 10, 10, 100, and 200 classes respectively. In this embodiment, the data for each client is divided into 75% (training set) and 25% (test set).
[0051] The experimental analysis in this embodiment uses the same evaluation metric: reporting the average highest test accuracy and its standard deviation across three runs. All methods used in the comparison underwent 300 rounds of communication with 20 clients. For local agent model training, this embodiment sets the batch size to 10 and the training rounds to 1. The optimizer used is SGD. The learning rate... , and All are set to 0.005, 0.05, and 0.02. The initial value of the contribution relationship is set to 1, and its value range is constrained to the interval [0,5].
[0052] The experimental results for the label-skewed heterogeneous task are shown in Table 3. Experimental results based on four image datasets (FMNIST, Cifar10, Cifar100, and TinyImagenet) demonstrate that the FedCASE framework exhibits optimal performance across multiple tasks. On the Cifar10, Cifar100, and TinyImagenet datasets, FedCASE achieves the highest classification accuracy. Particularly in the more complex Cifar100 and TinyImagenet tasks, its advantage over the second-place method reaches 0.69% and 0.85%, respectively, significantly outperforming the traditional method FedAvg (with a performance gap of up to 28%). Although all personalized methods perform similarly on the simple task (FMNIST), FedCASE's lead continues to widen as task complexity increases. This validates the effectiveness of its client-side dependency modeling and confirms the framework's superiority and robustness in handling heterogeneous data scenarios.
[0053] Table 3. Experimental results of the label skew heterogeneity task
[0054] In the second embodiment, a simple 4-layer convolutional neural network (CNN) is used as the basic skeleton. The applicant considered feature shift heterogeneous tasks and evaluated the method of the present invention on the Digit5 and PACS datasets.
[0055] Digit5 and PACS are multi-domain learning datasets, containing image data from 5 and 4 domains, respectively. In this embodiment, the different domains are evenly distributed among 20 clients, with each client belonging to only one domain. The data for each client is divided into 75% (training set) and 25% (test set).
[0056] The experimental analyses in this embodiment all used the same evaluation metric, namely, reporting the average highest test accuracy and its standard deviation across three runs. All methods used in the comparison underwent 300 rounds of communication. For local agent model training, the batch size was set to 10, and the number of training rounds was 1. The optimizer used was SGD, and the learning rate was... , and All are set to 0.005, 0.05, and 0.02. The initial value of the contribution relationship is set to 1, and its value range is constrained to the interval [0,5].
[0057] The experimental results for the feature distribution shift scenario are shown in Table 4. It can be seen that FedCASE demonstrates significant advantages in multi-domain learning tasks. On the Digit5 dataset, FedCASE leads all compared methods with an accuracy of 98.52%, a 0.8 percentage point improvement over the traditional method FedAvg (97.72%). On the more challenging PACS dataset, FedCASE achieves an accuracy of 71.86%, nearly 4 percentage points higher than the second-place FedALA (67.95%), significantly outperforming other personalized methods. Notably, FedCASE achieves maximum performance gain on the complex cross-domain task PACS while maintaining the high accuracy of Digit5 by modeling the contribution relationships between clients, validating its effectiveness and versatility in handling feature distribution shifts.
[0058] Table 4. Experimental results of the feature-shift heterogeneous task.
[0059] In summary, extensive experimental comparisons with various advanced methods have verified the superior performance of the method presented in this invention. The method exhibits significant advantages in scenarios involving label distribution skew and feature distribution shift.
[0060] Unlike previous learning methods that enhance the generalization ability of local models through global knowledge, this invention presents a personalized federated learning method based on asymmetric contribution relationships. This method fully considers the asymmetric contribution relationships between clients in the optimization objective, generating a proxy model for each client using these relationships. Then, by combining the gradients of the personalized models on each client with the proxy models trained on local datasets, the contribution relationship matrix and personalized models are comprehensively updated. This allows each client to generate optimization directions for multiple models, rather than just training a single local model. This invention fully utilizes the server's computing power and storage resources, maintaining the contribution relationships between clients and personalized models on the server side. Through an adaptive learning mechanism, it provides customized proxy models for each client's needs, greatly alleviating the performance bottlenecks caused by insufficient modeling of client relationships in previous methods. It also solves the problem of existing solutions failing to capture complex client dependencies, achieving accurate cross-client knowledge transfer while protecting data privacy, and improving the accuracy of clients in handling their respective tasks.
[0061] Based on the aforementioned personalized federated learning method based on asymmetric contribution relationships, this invention also provides a personalized federated learning apparatus based on asymmetric contribution relationships, comprising: The initialization module is used by the server to initialize the contribution relationship matrix and to initialize a personalized model for each client. The personalized model update module is used to iteratively update the personalized models for all clients based on the contribution relationship matrix, including: The proxy model aggregation unit is used by the server to generate a proxy model for each client based on the contribution relationship matrix and the personalized model of each client. The client training unit is used by each client to download the corresponding personalized model and proxy model from the server, calculate the gradient of the personalized model based on the local dataset, and train the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. The contribution relationship update unit is used to update the contribution relationship matrix of all clients based on the gradient of the personalized model if the current communication round is greater than 1. The approximate negative gradient direction calculation unit is used by the server to calculate the approximate negative gradient direction of each client's personalized model on each client's data, based on the agent model trained by each client and the personalized model trained by each client. The personalized model update unit is used by the server to update the corresponding personalized model based on the approximate negative gradient direction and contribution relationship matrix of each client's personalized model on each client's data. The output module is used to output the updated personalized model for each client after the total number of communication rounds has been reached.
[0062] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described personalized federated learning method based on asymmetric contribution relationships.
[0063] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A personalized federated learning method based on asymmetric contribution relationships, characterized in that, include: The server initializes the contribution relationship matrix and initializes a personalized model for each client; The personalized models for all clients are iteratively updated based on the contribution relationship matrix. The update steps for the personalized model in one communication round include: S1: The server generates a proxy model for each client based on the contribution relationship matrix and the personalized model for each client; S2: Each client downloads the corresponding personalized model and proxy model from the server, calculates the gradient of the personalized model based on the local dataset, and trains the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. S3: If the current communication round is greater than 1, the server updates the contribution relationship matrix based on the gradient of the personalized models of all clients. S4: The server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the agent model trained by each client and the personalized model trained by each client. S5: The server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's data according to the personalized model of each client; Once the total number of communication rounds is reached, the updated personalized model for each client is output.
2. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The method for constructing the contribution relationship matrix is as follows: The element in the k-th row and j-th column of the contribution relationship matrix represents the contribution weight of the j-th client to the k-th client, where... , For the number of clients; The contribution weight of the j-th client to the k-th client is represented as the product of the L-2 norm of the gradient of the personalized model of the k-th client on the j-th client's data and the task weight of the j-th client to the k-th client.
3. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The server generates a proxy model for each client based on the contribution relationship matrix and the personalized model for each client, using the following method: The proxy model for the k-th client is generated using the following formula: ; in, For the proxy model of the k-th client, For the number of clients, Let be the contribution weight of the k-th client to the j-th client. Let be the contribution weight of the k-th client to the i-th client. For the personalized model of the j-th client, .
4. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The agent model is trained using the local dataset, resulting in the fully trained agent model, as shown in the formula: ; in, The proxy model trained for the k-th client, For the proxy model of the k-th client, The learning rate used to train the agent model for the client. Let the gradient of the agent model for the k-th client be defined on the data of the k-th client. For the local dataset of the kth client, , This represents the number of clients.
5. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The server updates the contribution relationship matrix based on the gradients of the personalized models of all clients, using the following method: The server updates the contribution weight of the j-th client to the k-th client in the current communication round based on the approximate negative gradient direction of the personalized model of the k-th client in the previous communication round on the j-th client's data, and the gradient of the personalized model of the k-th client in the current communication round. The formula is as follows: ; in, Let be the contribution weight of the j-th client to the k-th client. The update step size for contribution weights, For the update step size of the personalized model, Let be the gradient of the personalized model for the k-th client. For the personalized model of the kth client, For the local dataset of the kth client, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
6. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The server calculates the approximate negative gradient direction of each client's personalized model on each client's data based on the agent model trained by each client and the personalized model trained by each client. The method is as follows: The server calculates the difference between the parameters of the trained proxy model of the j-th client and the parameters of the personalized model of the k-th client, and obtains the approximate negative gradient direction of the personalized model of the k-th client on the j-th client's data based on the difference.
7. A personalized federated learning method based on asymmetric contribution relationships according to claim 6, characterized in that, The approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data is obtained based on the difference, using the following method: The following formula is used to calculate the approximate negative gradient direction of the personalized model for the k-th client on the j-th client's data: ; in, Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. Let be the difference between the parameters of the trained proxy model for the j-th client and the parameters of the personalized model for the k-th client. , This represents the number of clients.
8. The personalized federated learning method based on asymmetric contribution relationships according to claim 1, characterized in that, The server updates the corresponding personalized model based on the approximate negative gradient direction and contribution matrix of each client's data, using the following method: The server updates the personalized model of the k-th client based on the approximate negative gradient direction of the personalized model of the k-th client on the data of the j-th client and the contribution weight of the j-th client to the k-th client, using the following formula: ; in, For the personalized model of the kth client, For the update step size of the personalized model, Let be the contribution weight of the j-th client to the k-th client. Let be the approximate negative gradient direction of the personalized model for the k-th client on the data of the j-th client. , This represents the number of clients.
9. A personalized federated learning device based on asymmetric contribution relationships, characterized in that, include: The initialization module is used by the server to initialize the contribution relationship matrix and to initialize a personalized model for each client. The personalized model update module is used to iteratively update the personalized models for all clients based on the contribution relationship matrix, including: The proxy model aggregation unit is used by the server to generate a proxy model for each client based on the contribution relationship matrix and the personalized model of each client. The client training unit is used by each client to download the corresponding personalized model and proxy model from the server, calculate the gradient of the personalized model based on the local dataset, and train the proxy model using the local dataset to obtain the trained proxy model; all clients upload the gradient of their corresponding personalized model and the trained proxy model to the server. The contribution relationship update unit is used to update the contribution relationship matrix of all clients based on the gradient of the personalized model if the current communication round is greater than 1. The approximate negative gradient direction calculation unit is used by the server to calculate the approximate negative gradient direction of each client's personalized model on each client's data, based on the agent model trained by each client and the personalized model trained by each client. The personalized model update unit is used by the server to update the corresponding personalized model based on the approximate negative gradient direction and contribution relationship matrix of each client's personalized model on each client's data. The output module is used to output the updated personalized model for each client after the total number of communication rounds has been reached.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of a personalized federated learning method based on asymmetric contribution relationships as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Personalized federated learning based on model parameter clustering
CN118469038A