A personalized federated learning method and system
By employing optimal knowledge fusion on the server side and complementary distillation strategies on the client side, a personalized federated learning method is synergistically optimized. This addresses the lack of generalization ability caused by data heterogeneity, achieving a synergistic improvement in both personalization and generalization capabilities while protecting data privacy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
- Filing Date
- 2026-03-11
- Publication Date
- 2026-05-15
AI Technical Summary
Existing personalized federated learning methods struggle to effectively acquire and transfer global generalization knowledge across clients without compromising the personalized performance of the model when faced with data heterogeneity. This results in a lack of model generalization ability and an inability to balance the synergistic optimization of personalization and generalization capabilities.
A personalized federated learning approach is adopted, which introduces a collaborative learning mechanism between a globally shared classifier and a personalized classifier on the server side, combined with optimal knowledge fusion and knowledge distillation techniques, and introduces a complementary distillation strategy on the client side to achieve the transfer of globally optimal generalized knowledge and the collaborative optimization of local category-related knowledge.
Without compromising the model's individual performance, it effectively improves the model's generalization ability and robustness, solves the performance degradation problem caused by label offset and domain offset, and protects data privacy.
Smart Images

Figure CN121809601B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of federated learning technology, specifically to a personalized federated learning method and system. Background Technology
[0002] Federated learning, as a distributed machine learning paradigm, was initially designed to address the "data silo" problem, promoting multi-party data collaboration without the need for direct exchange of raw data. However, with continuous technological evolution and the rapid growth in the number of users, a single, generalized global model has become insufficient to meet the personalized service needs of various clients. Therefore, personalized federated learning has emerged. While sharing global knowledge, personalized federated learning optimizes the performance of local models for the specific data distribution and task requirements of each client. Compared to traditional federated learning, personalized federated learning effectively alleviates the challenges posed by data heterogeneity and significantly improves the performance of local models on specific clients.
[0003] As an efficient and practical technical approach, model decoupling is widely used in personalized federated learning. A typical method is to divide the model into two parts: a feature extractor and a classifier. The feature extractor is uploaded to the server for aggregation, while the classifier is kept locally to learn personalized features, such as FedRep and pFedMOE. This approach not only improves the model's personalization capabilities but also preserves rich shared knowledge, thus becoming a research hotspot in the field of personalized federated learning in recent years. However, due to the over-adaptation of the personalized classifier to local data, its generalization ability is greatly weakened. The generalization ability here is reflected in two aspects: (1) generalization knowledge that is beneficial to personalized adaptation; (2) global generalization knowledge across clients.
[0004] Existing research on personalized federated learning based on model decoupling has made some attempts to improve the generalization ability of personalized models, but the results have been unsatisfactory. For example, FedROD and DualFed introduce an additional shared classifier and use ensemble inference to integrate the output predictions of the personalized and shared classifiers, aiming to achieve both personalization and generalization. However, this integration leads to mutual influence between the personalized and shared classifiers, thus weakening the effect of ensemble inference and failing to effectively compensate for the lack of generalization ability of the personalized classifier. FML and MH-pFLID use mutual distillation to transfer knowledge from the shared model to the personalized model. However, this method only uses local data for knowledge transfer, only compensating for generalization knowledge that is beneficial to personalized adaptation. In addition, due to data heterogeneity issues, such as label shift caused by different label distributions between the source and target domains, domain shift caused by different data distributions between the source and target domains, and the "client drift" phenomenon generated by the average aggregation strategy, it is impossible to obtain a globally optimal model, thus further weakening the actual effect of the above methods. Prototype-based methods, such as FedProto, effectively avoid client drift by uploading feature prototypes instead of uploading models, but their generalization ability is greatly weakened.
[0005] Therefore, in highly heterogeneous personalized federated learning scenarios, existing methods struggle to effectively acquire and transfer global generalization knowledge across clients while ensuring personalized model performance. This results in a lack of generalization ability in personalized models and an inability to balance the synergistic optimization of personalization and generalization capabilities. Summary of the Invention
[0006] To address the aforementioned issues, this invention proposes a personalized federated learning method and system. Without compromising the model's personalized performance and privacy, it effectively compensates for the lack of generalization ability, thereby achieving synergistic optimization of generalization and personalization, and effectively addressing the adaptive challenges in label-shifted environments.
[0007] According to some embodiments, the present invention adopts the following technical solution:
[0008] A personalized federated learning method, applied to a server, includes:
[0009] Initialize a global shared model and a global category prototype set, and broadcast them to all participating clients. The global shared model includes a global shared feature extractor and a global shared classifier.
[0010] The updated global shared model is obtained by aggregating the shared models uploaded by each client, and the global category prototype set is obtained by aggregating the local category prototypes. For each global category prototype, an expert pool composed of shared classifiers from the source clients is constructed. Global optimal knowledge is generated through the optimal knowledge fusion mechanism, and the global shared classifier is further optimized through knowledge distillation.
[0011] The latest globally shared model and global category prototype set are broadcast to each client for iterative personalized federated learning until the preset number of communication rounds are reached, at which point the training process ends.
[0012] According to some embodiments, the present invention adopts the following technical solution:
[0013] A personalized federated learning method, applied to the client, includes:
[0014] Based on the received global shared model and global category prototype set;
[0015] A complementary distillation strategy is implemented to transfer generalization knowledge beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and to update the local shared model and generate local class prototypes.
[0016] Upload the updated shared model and local category prototypes to the server.
[0017] According to some embodiments, the present invention adopts the following technical solution:
[0018] A personalized federated learning system, applied to a server, includes:
[0019] The initialization module is configured to: initialize a global shared model and a global category prototype set, and broadcast them to each participating client, wherein the global shared model includes a global shared feature extractor and a global shared classifier;
[0020] The aggregation module is configured to: aggregate the shared models uploaded by each client to obtain an updated global shared model, and aggregate local category prototypes to obtain a global category prototype set; for each global category prototype, construct an expert pool composed of shared classifiers from the source clients, generate globally optimal knowledge through an optimal knowledge fusion mechanism, and further optimize the global shared classifier through knowledge distillation.
[0021] The iteration module is configured to broadcast the latest globally shared model and global category prototype set to each client, perform iterative personalized federated learning, and end the training process after reaching the preset number of communication rounds.
[0022] According to some embodiments, the present invention adopts the following technical solution:
[0023] A personalized federated learning system, applied to a client, includes:
[0024] The receiving module is configured as follows: a globally shared model and a global category prototype set based on the received data;
[0025] The update module is configured to: execute a complementary distillation strategy, which transfers generalization knowledge that is beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and updates the local shared model and generates local class prototypes.
[0026] The upload module is configured to upload the updated shared model and local category prototypes to the server.
[0027] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0028] 1. Addressing Data Heterogeneity: To address the label shift and heterogeneous data distribution problems commonly found in federated learning, this invention introduces a collaborative learning mechanism that combines personalized classifiers and globally shared classifiers. This enables the model to adapt to local label distribution differences in highly heterogeneous scenarios using personalized classifiers, while also leveraging the globally shared classifier to integrate optimal generalization knowledge across clients. This effectively mitigates the performance degradation caused by label shift in different heterogeneous environments.
[0029] 2. Enhance model robustness and generalization ability: In the face of complex and ever-changing application scenarios, this invention fully explores and integrates global generalization knowledge across clients through a prototype-based optimal knowledge fusion strategy on the server side; at the same time, it introduces a complementary distillation mechanism on the client side to collaboratively transfer the global optimal generalization knowledge and local category-related knowledge to the personalized model, effectively activating its generalization ability without destroying the personalized characteristics of the model, thereby improving the robustness and stability of the model in the presence of domain offset.
[0030] 3. Protecting data privacy: Since this invention does not require uploading any original local data or sensitive information directly related to the local data distribution during the entire training process, but only performs collaborative optimization through model parameters, prototype representation and distillation knowledge, it effectively reduces the risk of privacy leakage while achieving synergistic improvement in personalized and generalization performance, thus meeting the requirements for data security and privacy protection in federated learning scenarios. Attached Figure Description
[0031] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0032] Figure 1 This is a method framework diagram for Example 1.
[0033] Figure 2 This is a comparison chart showing the accuracy of the personalized federated learning algorithm of this embodiment with other federated learning algorithms in personalized testing on the CIFAR100 dataset.
[0034] Figure 3 This is a comparison chart showing the accuracy of the personalized federated learning algorithm of this embodiment in generalization tests with other federated learning algorithms on the CIFAR100 dataset.
[0035] Figure 4 This is a comparison chart showing the accuracy of the personalized federated learning algorithm of this embodiment with other federated learning algorithms in personalized testing on DomainNet data.
[0036] Figure 5 This is a comparison chart showing the accuracy of the personalized federated learning algorithm in this embodiment with other federated learning algorithms in the generalization test on DomainNet data. Detailed Implementation
[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0038] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0039] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0040] Example 1
[0041] One embodiment of the present invention provides a personalized federated learning method applied to a server, comprising:
[0042] Initialize a global shared model and a global category prototype set, and broadcast them to all participating clients. The global shared model includes a global shared feature extractor and a global shared classifier.
[0043] The updated global shared model is obtained by aggregating the shared models uploaded by each client, and the global category prototype set is obtained by aggregating the local category prototypes. For each global category prototype, an expert pool composed of shared classifiers from the source clients is constructed. Global optimal knowledge is generated through the optimal knowledge fusion mechanism, and the global shared classifier is further optimized through knowledge distillation.
[0044] The latest globally shared model and global category prototype set are broadcast to each client for iterative personalized federated learning until the preset number of communication rounds are reached, at which point the training process ends.
[0045] One embodiment of the present invention provides a personalized federated learning method applied to a client, comprising:
[0046] Based on the received global shared model and global category prototype set;
[0047] A complementary distillation strategy is implemented to transfer generalization knowledge beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and to update the local shared model and generate local class prototypes.
[0048] Upload the updated shared model and local category prototypes to the server.
[0049] The personalized federated learning method in this embodiment is particularly suitable for personalized model optimization tasks in medical imaging tasks where there are label and domain offsets, such as the lung nodule benign / malignant classification task scenario where there are differences in data distribution between different hospitals, different imaging devices, or different patient groups.
[0050] To address the problem that traditional federated learning methods lack effective fusion of global generalization knowledge and activation mechanisms for local model generalization capabilities, making it difficult to simultaneously balance personalized model performance and generalization ability in medical imaging tasks, this embodiment proposes a personalized federated learning method based on optimal knowledge fusion and complementary distillation. This method can acquire and transfer globally optimal generalization knowledge across clients without directly exchanging original medical imaging data (i.e., patients' chest computed tomography CT images). Combined with a local category-related complementary distillation mechanism, it achieves adaptive optimization of the personalized classifier, thereby effectively improving the classification performance and model robustness of each client in specific medical imaging tasks.
[0051] like Figure 1 As shown below, the specific implementation process of medical imaging tasks is explained from the perspectives of both the server and client sides. First, the parameters are defined, as shown in Table 1:
[0052] Table 1 Parameter Definition Table
[0053]
[0054] I. Server side
[0055] This embodiment designs a prototype-based optimal knowledge fusion mechanism on the server to obtain prototype-specific global optimal knowledge, and then uses knowledge distillation technology to transfer the global optimal knowledge to a global shared classifier, thereby realizing the acquisition and transfer of global optimal knowledge.
[0056] In summary, the server first performs traditional aggregation on the model and prototype, namely model aggregation in step S3 and prototype aggregation in step S4 below. Then, in order to obtain globally optimal knowledge for the aggregated shared classifier, the optimal logits knowledge fusion is obtained for each aggregated category prototype, and this knowledge is transferred to the aggregated shared classifier to obtain the optimal global shared classifier. The specific steps are as follows:
[0057] S1-1. Initialize the global shared model (including globally shared feature extractors) and globally shared classifier ) and global category prototype And at the start of each round, the current round... Global sharing model and global category prototype collection The broadcast is sent to all participating clients, among which Indicates the number of communication rounds;
[0058] S1-2, Receive shared models uploaded by each client. With local category prototype And record each category Corresponding prototype source client collection ;
[0059] S1-3. Based on the sample size weights, the shared model of all clients is averaged and aggregated to obtain the updated global shared model. ;
[0060] Specifically, the server performs a weighted average aggregation based on the sample size on the shared models uploaded by the client, expressed by the formula:
[0061]
[0062] in, Indicates the client The shared model.
[0063] S1-4. Local category prototypes uploaded by the client. Perform mean aggregation by category to obtain the global category prototype. The global category prototype is then distributed to each client for feature alignment.
[0064] Specifically, the server performs mean aggregation on the local category prototypes uploaded by the client, categorized by category:
[0065]
[0066] in, For the first Upload categories in wheel The client collection of the prototype, the global category prototype Used to depict categories The semantic center in the global feature space.
[0067] S1-5, For each category Based on the prototype source client collection Build an expert pool (Shared classifier from the prototype source client) (compose), and train the category Gated network To obtain the optimal fusion weights for the expert pool;
[0068] Specifically, for categories The server will create an expert pool by combining the shared classifiers from the prototype's source clients. Each shared classifier acts as an expert and uses a global category prototype. As input to the gating network, calculate the expert fusion weights. :
[0069]
[0070] in, For a class c gating network, Indicates belonging to a category The first in the pool of experts Experts (i.e., shared classifiers) The fusion weights and the size of the expert pool (i.e., the number of shared classifiers in the expert pool) is used to control the number of outputs of the gating network.
[0071] S1-6, Using the global category prototype As input, the output of the expert pool is fused using a gated network to form teacher logits, which serve as the globally optimal knowledge. The globally shared classifier is then updated through knowledge distillation. This enables the transfer of globally optimal knowledge to a globally shared classifier;
[0072] Specifically, the server will use the global category prototype. Input the data from each expert classifier and perform weighted fusion to obtain the categories. The teacher logits, i.e., the globally optimal knowledge, are expressed by the formula:
[0073]
[0074] The server-side uses teacher logits to perform knowledge distillation on the globally shared classifier. The distillation loss is defined as:
[0075] (5)
[0076] in, This is the distillation temperature coefficient. To make the global category prototype Input into the aggregated shared classifier The output logits obtained from it This represents the Kullback–Leibler divergence, used to measure... and The distribution differences between them This represents the distillation temperature coefficient, used to smooth the predicted distribution. This represents the normalization function, used to convert logits into a probability distribution. This is a temperature scaling factor used to maintain gradient scale stability during backpropagation.
[0077] By minimizing equation (5), the optimal knowledge across clients is migrated to a globally shared classifier.
[0078] S1-7. Repeat steps S1-2–S1-6 until the preset number of communication rounds is reached, then the training process ends.
[0079] II. Client
[0080] On the client side, in order to effectively utilize globally optimal knowledge to activate the generalization ability of the personalized classifier, this embodiment introduces a complementary distillation strategy. This strategy transfers generalization knowledge beneficial to the local class and global generalization knowledge across clients to the personalized classifier, thereby effectively activating the generalization ability of the personalized model. The specific steps are as follows:
[0081] S2-1, Client Receive globally shared model parameters broadcast by the server With global category prototype ;
[0082] S2-2, Freezing the client's shared model (including the shared feature extractor) and shared classifier Only update the personalized classifier. and with a shared classifier As a teacher, the output optimizes the personalized classifier through knowledge distillation;
[0083] This step, also known as local distillation, specifically involves freezing the shared feature extractor. and shared classifier The personalized classifier is updated using local task loss and local distillation loss. For the client local samples Personalized classifier With shared classifiers The outputs are as follows:
[0084]
[0085] The local task loss is defined as the cross-entropy loss, expressed by the formula:
[0086]
[0087] in, For the client The local sample set This is the cross-entropy loss function.
[0088] Distillation loss, expressed by the formula:
[0089]
[0090] This loss is used to inject generalized knowledge from the shared model into the personalized classifier.
[0091] The total loss function for this step is defined as:
[0092]
[0093] in, Used to control the intensity of local distillation.
[0094] S2-3, Based on the received global category prototype Construct a prototype input corresponding to the non-local category set for the personalized classifier. Perform cross-client prototype distillation to enhance the generalization ability of personalized models;
[0095] This step is also called non-local class prototype distillation; specifically, it freezes the shared feature extractor. and shared classifier Update the personalized classifier using non-local class prototype distillation loss. Define the client Non-local category collection for:
[0096]
[0097] in, For the client The set of categories that appear locally This is a global collection of categories.
[0098] Cross-client prototype distillation uses a non-local class distillation loss, defined as:
[0099] (11)
[0100] in, , These are the global category prototypes. Input into personalized categories and shared classifier The output logits obtained from it.
[0101] This mechanism enables personalized classifiers to achieve cross-client generalization capabilities without accessing non-local data.
[0102] S2-4, Freeze the Personalized Classifier Update the shared model And by minimizing the shared features and the corresponding global category prototype The mean squared error between them achieves prototype alignment at the feature level;
[0103] Specifically, freeze the personalized classifier The shared feature extractor is updated using local task loss and semantic consistency loss. and shared classifier During the shared model update phase, the shared classifier The output is Its local task loss is also defined as cross-entropy loss, expressed by the formula:
[0104]
[0105] Semantic consistency loss achieves feature space alignment by minimizing the mean squared error between shared features and the global class prototype.
[0106]
[0107] in, To use local samples Input to shared feature extractor Shared features extracted from them To belong to category The global category prototype, the loss constraint shares the feature extractor Learn consistent semantic representations across clients.
[0108] The total loss function for shared model updates in this phase is defined as:
[0109]
[0110] in, Used to control the strength of semantic alignment.
[0111] S2-5, Based on the updated shared feature extractor Aggregate local data by category to obtain a local category prototype set. The aggregation steps are as follows:
[0112] First, for the client Local dataset Using a shared feature extractor Feature extraction:
[0113]
[0114] Then, for each category Retrieve the local set of samples belonging to this category:
[0115]
[0116] in, This represents the number of samples from client k belonging to category c.
[0117] Then the local category prototype (the first) The mean of the feature in this category is defined as:
[0118]
[0119] Local category prototype The local shared model (local shared feature extractor and local shared classifier) is uploaded to the server.
[0120] To verify the effectiveness of the personalized federated learning method based on optimal knowledge fusion and complementary distillation proposed in this embodiment in complex heterogeneous scenarios, this embodiment conducted comparative experiments with several representative personalized federated learning algorithms on datasets with significant label and domain shifts. Specifically:
[0121] The datasets used are CIFAR100 and DomainNet. The CIFAR100 dataset for label offset consists of 60,000 color images, each 32×32 pixels in size, organized into 100 different categories, each containing 6,000 images. DomainNet for domain offset contains image datasets from six different domains: Real, Clipart, Painting, Sketch, Quickdraw, and Infograph. Each domain has significant differences in image style, texture, background complexity, and representation, and is often used to evaluate the model's generalization and adaptability in multi-domain distribution and domain offset scenarios. On the selected dataset, a task of classifying benign and malignant lung nodules based on chest computed tomography (CT) images is performed using a conventional CNN model consisting of three convolutional-pooling layers and two fully connected layers.
[0122] When setting the label offset, the CIFAR100 dataset was used for training and testing, and the data was partitioned using practical non-IID partitioning (α=0.1). When setting the domain offset, the DomainNet dataset was used for training and testing. During training, a total of 6 clients were used, each client having data from one domain, and the data from each client belonged to different domains.
[0123] Personalization and generalization tests were conducted separately. In the personalization test, the client's training and test sets came from the same distribution, while in the generalization test, the client's test set was consistent with the global data distribution. Representative personalized federated learning algorithms used for comparison included FedProto, MH-pFLID, FedRep, FedROD, and pFedMOE. To ensure fairness, all benchmark algorithms used the same network architecture, equipment, and hyperparameter settings as our method. Experimental results are as follows: Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown.
[0124] As can be seen, under the highly heterogeneous label setting of the CIFAR-100 dataset, different personalized federated learning algorithms show significant differences in personalization performance and generalization performance. Experimental results show that although some methods based on model decoupling can adapt well to the local label distribution, their generalization ability on non-local categories is significantly limited because the personalized classifier relies too much on local data.
[0125] In comparison, the method (Ours) in this embodiment achieved optimal performance in both personalization and generalization tests. This indicates that by obtaining globally optimal generalization knowledge across clients through a prototype-based optimal knowledge fusion mechanism on the server side, transferring it to a globally shared classifier through knowledge distillation, and then combining it with a complementary distillation strategy on the client side to collaboratively inject global generalization knowledge and local category-related knowledge into the personalized classifier, the performance degradation caused by label offset can be effectively mitigated, and a synergistic improvement in personalization performance and generalization ability can be achieved.
[0126] In the cross-domain setting of the DomainNet dataset, some personalized federated learning algorithms showed significant performance degradation when migrating between different domains, indicating that they still have shortcomings in cross-domain feature alignment and global knowledge utilization.
[0127] The method (Ours) in this embodiment exhibits stronger stability and generalization ability in this scenario. This is mainly due to the fact that the prototype-aware optimal knowledge fusion mechanism on the server side effectively alleviates the client drift problem, and the feature alignment and cross-client prototype distillation mechanism on the client side based on the global prototype enables the model to learn more consistent cross-domain representations, thereby significantly improving robustness in the domain offset scenario.
[0128] The experimental results above show that the method in this embodiment can improve both personalization performance and generalization ability without exposing the original data. This verifies the effectiveness and advancement of the personalized federated learning method based on optimal knowledge fusion and complementary distillation proposed in this embodiment in scenarios where label offset and domain offset coexist.
[0129] Example 2
[0130] One embodiment of the present invention provides a personalized federated learning system, including a server and a client. The system deployed on the server includes the following modules:
[0131] The initialization module is configured to: initialize a global shared model and a global category prototype set, and broadcast them to each participating client, wherein the global shared model includes a global shared feature extractor and a global shared classifier;
[0132] The aggregation module is configured to: aggregate the shared models uploaded by each client to obtain an updated global shared model, and aggregate local category prototypes to obtain a global category prototype set; for each global category prototype, construct an expert pool composed of shared classifiers from the source clients, generate globally optimal knowledge through an optimal knowledge fusion mechanism, and further optimize the global shared classifier through knowledge distillation.
[0133] The iteration module is configured to broadcast the latest globally shared model and global category prototype set to each client, perform iterative personalized federated learning, and end the training process after reaching the preset number of communication rounds.
[0134] The system deployed on the client includes the following modules:
[0135] The receiving module is configured as follows: a globally shared model and a global category prototype set based on the received data;
[0136] The update module is configured to: execute a complementary distillation strategy, which transfers generalization knowledge that is beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and updates the local shared model and generates local class prototypes.
[0137] The upload module is configured to upload the updated shared model and local category prototypes to the server.
[0138] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] 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.
[0140] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A personalized federated learning method, characterized in that, Applied to servers, including: Initialize a global shared model and a global category prototype set, and broadcast them to all participating clients. The global shared model is used for medical imaging tasks and includes a global shared feature extractor and a global shared classifier. The updated global shared model is obtained by aggregating the shared models uploaded by each client, and the global category prototype set is obtained by aggregating the local category prototypes. For each category, an expert pool composed of shared classifiers from the source clients is constructed. Global optimal knowledge is generated through the optimal knowledge fusion mechanism, and the global shared classifier is further optimized through knowledge distillation. The latest globally shared model and global category prototype set are broadcast to each client for iterative personalized federated learning until the preset number of communication rounds are reached, at which point the training process ends. The process of generating globally optimal knowledge through the optimal knowledge fusion mechanism involves taking the global category prototype as input, assigning fusion weights to each shared classifier in the expert pool through a gating network, and fusing the outputs of each classifier according to the weights to generate the globally optimal knowledge.
2. The personalized federated learning method as described in claim 1, characterized in that, The global shared classifier is further optimized through knowledge distillation, using the Kullback-Leibler divergence loss function to achieve the transfer of optimal knowledge across clients to the global shared classifier.
3. A personalized federated learning method, characterized in that, Applied to the client side, including: Based on the received global shared model and global category prototype set, wherein the global shared model is used for medical imaging tasks; A complementary distillation strategy is implemented to transfer generalization knowledge beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and to update the local shared model and generate local class prototypes. Upload the updated shared model and local category prototypes to the server; Specifically, the generalized knowledge beneficial to local categories is transferred to the personalized classifier, as follows: The shared feature extractor and shared classifier of the client are frozen, and the output of the shared classifier is used as the teacher signal to optimize the personalized classifier through knowledge distillation loss. The cross-client global generalization knowledge is transferred to the personalized classifier, specifically as follows: Based on the received global category prototype set, construct prototype inputs for non-local categories that do not appear locally on the client, use the output of the shared classifier for non-local category prototypes as the teacher signal, and optimize the personalized classifier through knowledge distillation loss. The update of the local shared model specifically refers to: Freeze the personalized classifier and jointly update the shared feature extractor and the shared classifier by minimizing the feature alignment loss between the shared features and the corresponding global class prototype, as well as the local task loss. The generation of the local category prototype is based on the updated shared feature extractor, which calculates the feature mean of the local data by category to obtain the local category prototype.
4. A personalized federated learning system, characterized in that, Applied to a server, employing a personalized federated learning method as described in any one of claims 1-2, comprising: The initialization module is configured to: initialize a global shared model and a global category prototype set, and broadcast them to each participating client, wherein the global shared model includes a global shared feature extractor and a global shared classifier; The aggregation module is configured to: aggregate the shared models uploaded by each client to obtain an updated global shared model, and aggregate local category prototypes to obtain a global category prototype set; for each category, construct an expert pool composed of shared classifiers from source clients, generate globally optimal knowledge through an optimal knowledge fusion mechanism, and further optimize the global shared classifier through knowledge distillation. The iteration module is configured to broadcast the latest globally shared model and global category prototype set to each client, perform iterative personalized federated learning, and end the training process after reaching the preset number of communication rounds.
5. A personalized federated learning system, characterized in that, Applied to the client side, the personalized federated learning method described in claim 3 includes: The receiving module is configured as follows: a globally shared model and a global category prototype set based on the received data; The update module is configured to: execute a complementary distillation strategy, which transfers generalization knowledge that is beneficial to the local class and global generalization knowledge across clients to the personalized classifier, respectively, and updates the local shared model and generates local class prototypes. The upload module is configured to upload the updated shared model and local category prototypes to the server.