Personalized federal learning method and system based on shared model
Through the personalized federated learning method of the shared model, the client adaptively aggregates the shared model and updates it, and combines the personalized prototype regular terms to solve the problem of degradation in data non-independent and homogeneous distribution scenarios, and achieves the improvement of the robustness and adaptability of the model.
Patent Information
- Application Number
- CN202510471061.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-04-15
AI Technical Summary
In the non-independent homogeneous distribution of data (Non-IID) scenario, existing federated learning methods are difficult to take into account the personalized needs of each client, resulting in degradation of local tasks and problems such as high computing and communication overhead, increased model complexity, and excessive state dependence.
Using the personalized federated learning method of shared models, the global model and global class prototype are initialized by the server side, and the client adaptively aggregates the shared model and updates it. Combining the personalized prototype regular terms, it reduces state dependence and communication overhead, and realizes the effective integration of global knowledge and local characteristics.
Improve the performance of the personalized model, protect client privacy, realize the robustness and adaptability of the model in complex scenarios, and reduce state dependence and communication overhead.
Smart Images

Figure CN120494124A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of federated learning technology, and specifically relates to a personalized federated learning method and system based on a shared model. Background Art
[0002] Federated learning, as a distributed machine learning framework, enables multi-client collaborative training of global models while protecting user data privacy. However, in scenarios where data is not independent and identically distributed (IID), the global model struggles to accommodate the individual needs of each client, resulting in reduced performance for local tasks. Therefore, personalized federated learning, which combines global knowledge with local data characteristics to generate customized models for each client, has become a current research hotspot.
[0003] Currently, some research combines public and private models, enabling each client to perform personalized adjustments based on the global model. However, this approach struggles to effectively handle situations where data distribution varies significantly between clients. Other approaches implement personalized learning by introducing a personalization layer on top of the global model, but this can increase model complexity and computational and communication overhead. Another approach uses adaptive local aggregation, but parameter adjustments during the aggregation process can be overly dependent on local data, resulting in slow convergence of the global model. If feature information is separated through conditional policies, and the appropriate feature sharing and adjustment between the global and client-side local models is achieved by controlling the conditional policies, data imbalance or inconsistency can affect the effectiveness of the conditional policies and, in turn, personalization. Other research has explored personalized federated learning through feature alignment and classifier collaboration. However, feature alignment can be affected by data heterogeneity and non-IID data, resulting in poor alignment results. Classifier collaboration can also increase communication overhead, especially when the number of clients is large.
[0004] The patent document "Personalized Federated Learning Method Based on Hybrid Expert Model" (CN112560991A) discloses a method for dynamically fusing a global classification layer with a personalized classification layer through a gating mechanism. This method uses the output of a feature extraction layer to optimize gating decisions, balancing the conflict between global and local knowledge to a certain extent. However, this requires the client to continuously maintain intermediate states during training, resulting in insufficient adaptability in large-scale mobile federated environments and limited expressiveness when processing high-dimensional data. This method is particularly susceptible to compatibility issues with stateless clients, hindering personalization effectiveness. The hybrid expert model divides the local model into a feature extraction layer and a classification layer through a layered approach, using the feature extraction layer as a fixed base layer. Essentially, only the classification layer achieves personalization, i.e., the personalized classification layer.
[0005] The patent document "Personalized Federated Learning Method and System for Hybrid Multi-Stage Private Models" (CN117708877A) discloses correcting local training biases through prototype learning regularization terms and weighted fusion of historical and personalized models to preserve global information. However, its multi-stage hybrid mechanism requires frequent transmission of local prototypes and model parameters. Its limitation and essence lies in its reliance solely on weighted aggregation of local models from different historical periods. Furthermore, client prototypes are essentially generated from personalized models trained by local models. The prototype aggregation process is highly sensitive to the distribution of client data and can easily introduce bias in scenarios with imbalanced categories, affecting the representativeness of the global prototype.
[0006] Hybrid multi-stage private models and hybrid expert models are both continuously improved upon local models to achieve personalization, aiming to learn global knowledge. Applying these methods to shared models is meaningless because shared models merely serve as a medium for sharing information. Personalized models are constructed by weighted aggregation of shared models, a process that already incorporates the knowledge of each client, i.e., global knowledge. Furthermore, traditional personalized federated learning solutions (such as model fine-tuning and multi-task learning) often face the following challenges: excessive reliance on local fine-tuning can lead to loss of global knowledge and reduced generalization capabilities; complex model structures or multi-stage training processes increase client resource consumption; and some methods require the client to store intermediate states for a long time, making them difficult to adapt to dynamically changing mobile environments.
[0007] Therefore, there is an urgent need for an efficient and lightweight personalized federated learning method that can effectively integrate global knowledge and local features while reducing state dependence and communication overhead, so as to improve the robustness and adaptability of the model in complex scenarios. Summary of the Invention
[0008] In view of the defects in the prior art, the purpose of the present invention is to provide a personalized federated learning method and system for sharing models.
[0009] The personalized federated learning method of the shared model provided by the present invention includes: Step S1: The server saves and initializes the client's shared model, global model, and global class prototype, and the client initializes the local learning weight vector; Step S2: The server sends the shared model of other clients to a client. The client sets the local global model as the shared model and trains and updates it, and uploads the trained shared model and local class prototype to the server. Step S3: The server calculates the global class prototype and the global model based on all received shared models and local class prototypes; Repeat steps S2 and S3 to traverse all clients.
[0010] Preferably, in step S1, according to the similarity of data distribution among N clients, the local learning weight vector is , the shared model is , the global model is , the global class prototype is ; in, It represents the proportion of knowledge that client i plans to learn from the shared model of client j, compared with the shared models of other clients. Personalized model for client i The contribution of each is the same, i=1, 2,…,N, j=1, 2,…,N.
[0011] Preferably, in step S2, the server sends the shared models of other clients to client i. , global model and the global class prototype of category j , and at the same time, client i sets its local shared model to , = .
[0012] The personalization model is divided into presentation layer and prediction layer h( ); Where x represents the input space; is the presentation layer parameter; Represents the decision layer parameters.
[0013] Client i only updates its own shared model , freeze the client i download except Other shared models for clients other than , i≠j.
[0014] Preferably, in step S2, the client i performs a training step including: Step S2.1: Calculate the personalized model : =
[0015] in, represents the proportion of knowledge that client i plans to learn from the shared model of client j; Represents a shared model.
[0016] Step S2.2: Calculate the local class prototype of category j in client i : =
[0017] Where x represents the input space; y represents the label space of the category; Represents the local dataset of client i The number of samples belonging to category j in ; g( ) represents feature extraction of sample (x, y) in client i; It is the presentation layer parameter.
[0018] Step S2.3: Calculate local experience loss : = +λ(r) +
[0019] in, represents the classification loss function; r represents the current training round; λ(r)=(cos(rπ / R)+1) / 2, which represents a monotonically decreasing function with respect to r; R represents the total number of training rounds; μ represents the coefficient of the proximal term; = , represents the proximal center; represents the regularization term coefficient; represents the regularization loss term; Represents the global class prototype of category j; Indicates the number of class prototypes in the current input space x; represents the learning weight vector of client i; Represents the input space x through the personalized model The output space obtained after calculation.
[0020] Step S2.4: Update the shared model :
[0021] in, Represents the model learning rate.
[0022] Step S2.5: Update the learning weight vector :
[0023] in, Represents the weight learning rate.
[0024] Preferably, step S3 includes: Step S3.1: Calculate the global class prototype of category j : =
[0025] in, represents the set of clients that have data samples of category j; represents the number of clients with data samples of category j; Represents the number of category j in all data samples; Represents the local dataset of client i The number of samples belonging to category j in ; Represents the local class prototype of category j in client i.
[0026] Step S3.2: Calculate the global model : =
[0027] in, Represents the local dataset of client i quantity; represents the shared model of client i; N represents the total number of clients; n= , represents the sum of the dataset sizes of N clients.
[0028] A personalized federated learning system for a shared model provided by the present invention includes: a server and N clients.
[0029] The client includes a shared model, a global model, and a global class prototype.
[0030] The server saves and initializes the client's shared model, global model, and global class prototype, and the client initializes the local learning weight vector.
[0031] The server sends the shared model of other clients to a client. The client sets the local global model as the shared model and trains and updates it, and uploads the trained shared model and local class prototype to the server.
[0032] The server calculates the global class prototype and the global model based on all received shared models and local class prototypes.
[0033] The server iterates over all clients, repeatedly sending shared models, training updates, and computations.
[0034] Preferably, the N clients learn the weight vector locally based on the similarity of data distribution between the clients. , the shared model is , the global model is , the global class prototype is ; in, It represents the proportion of knowledge that client i plans to learn from the shared model of client j, compared with the shared models of other clients. Personalized model for client i The contribution of each is the same, i=1, 2,…,N, j=1, 2,…,N.
[0035] Preferably, the server sends the shared models of other clients to client i , global model and the global class prototype of category j , and at the same time, client i sets its local shared model to , = .
[0036] The personalization model is divided into presentation layer and prediction layer h( ); Where x represents the input space; is the presentation layer parameter; Represents the decision layer parameters.
[0037] Client i only updates its own shared model , freeze the client i download except Other shared models for clients other than , i≠j.
[0038] Preferably, the client i triggers a training module, including: Module M2.1, Calculation Personalization Model : =
[0039] in, represents the proportion of knowledge that client i plans to learn from the shared model of client j; Represents a shared model.
[0040] Module M2.2, calculate the local class prototype of category j in client i : =
[0041] Where x represents the input space; y represents the label space of the category; Represents the local dataset of client i The number of samples belonging to category j in ; g( ) represents feature extraction of sample (x, y) in client i; It is the presentation layer parameter.
[0042] Module M2.3, Calculating Local Experience Loss : = +λ(r) +
[0043] in, represents the classification loss function; r represents the current training round; λ(r)=(cos(rπ / R)+1) / 2, which represents a monotonically decreasing function with respect to r; R represents the total number of training rounds; μ represents the coefficient of the proximal term; = , represents the proximal center; represents the regularization term coefficient; represents the regularization loss term; Represents the global class prototype of category j; Indicates the number of class prototypes in the current input space x; represents the learning weight vector of client i; Represents the input space x through the personalized model The output space obtained after calculation.
[0044] Module M2.4, update shared model :
[0045] in, Represents the model learning rate.
[0046] Module M2.5, update learning weight vector :
[0047] in, Represents the weight learning rate.
[0048] Preferably, the server calculates and obtains the global class prototype and the global model, including: Module M3.1, calculate the global class prototype of category j : =
[0049] in, represents the set of clients that have data samples of category j; represents the number of clients with data samples of category j; Represents the number of category j in all data samples; Represents the local dataset of client i The number of samples belonging to category j in ; Represents the local class prototype of category j in client i.
[0050] Module M3.2, Calculation of Global Model : =
[0051] in, Represents the local dataset of client i quantity; represents the shared model of client i; N represents the total number of clients; n= , represents the sum of the dataset sizes of N clients.
[0052] Compared with the prior art, the present invention has the following beneficial effects: 1. The personalized model of the present invention is composed of a set of unique weighted aggregation and sharing models. By adopting the method of adaptively aggregating the personalized model on the client, the privacy of the client is protected, the knowledge sharing problem in federated learning is solved, and the performance of the personalized model is improved.
[0053] 2. The present invention solves the offset problem in client-side local model training by adopting a personalized prototype regularization module. The obtained personalized prototype contains richer global information than the client, enabling it to learn more global knowledge and achieve better algorithm performance.
[0054] 3. While reducing state dependence and communication overhead, the present invention achieves an effective fusion of global knowledge and local characteristics, breaking through the local limitation. The entire model is personalized to improve the robustness and adaptability of the model in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings: Figure 1 Flowchart of the personalized federated learning method for shared models. DETAILED DESCRIPTION
[0056] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0057] To address the problem of statistical heterogeneity in federated learning, a personalized federated learning method for shared models is proposed. Each client trains a shared model with rich personalized and global information under the guidance of a local personalized prototype. At the same time, it uses its own unique set of learning weight information to adaptively learn from other shared models, thereby achieving the personalization process of each client. Figure 1 For example, it includes: Step S1: The server saves and initializes the shared model of N clients , global model , and the global class prototype Client i (i=1,2,…,N) initializes its local learning weight vector .
[0058] Specifically, according to the similarity of data distribution between clients, Represents that client i plans to learn a certain proportion of knowledge from client j’s shared model, which is also used as a shared model Personalized model for client i contribution.
[0059] Step S2: The server sends the shared models of other clients to client i, i.e. , global model and the global class prototype of category j At the same time, client i sets its local sharing model to ,Right now = Then, client i performs the following training steps: Step S2.1: Calculate the personalized model , the specific calculation expression is: =
[0060] In a hybrid multi-stage private model, the current local model and historical local models are weighted together to create a new model. This model is then trained using local data to create a personalized model. This personalized model is derived by adaptively weighting and aggregating shared models from all clients, overcoming local limitations. Furthermore, personalization at the model level personalizes the entire model.
[0061] Step S2.2: Compute the local class prototype of category j , the specific calculation expression is: =
[0062] Among them, x represents the input space and y represents the category label space. Represents the local dataset of client i The number of samples belonging to category j in g( ) represents feature extraction of sample (x, y) in client i, where is its presentation layer parameter.
[0063] We divide the personalization model into the presentation layer and prediction layer h( ). Where x represents the input space, Presentation layer parameters, represents the decision layer parameters. Therefore, the local class prototype here is calculated by the representation layer in the personalized model, generated by a personalized model aggregated from the shared models of all clients. Therefore, the resulting personalized prototype contains richer global information than the original one and has a better regularization effect.
[0064] Step S2.3: Calculate local experience loss , the specific calculation expression is: = +λ(r) +
[0065] in, represents the classification loss function, such as cross-entropy loss. r is the current training epoch. μ and λ(r) are the proximal term coefficients, where λ(r) is a monotonically decreasing function with respect to r and is defined as λ(r) = (cos(rπ / R) + 1) / 2, where R is the total number of training epochs. is the proximal center, which we define as = , is the regularization coefficient. is the regularization loss term, where we use the loss between the local class prototype and the global class prototype distance to assess the loss of this item. Represents the local class prototype of category j in client i. Indicates the number of class prototypes in the current input space x. represents the learning weight vector of client i. Represents the input space x through the personalized model The output space obtained after calculation.
[0066] Step S2.4: Update the shared model , the specific update expression is:
[0067] in, Represents the model learning rate. It should be noted that in the local update phase, client i only updates its own shared model , freeze other shared models downloaded (i≠j).
[0068] Steps S2.1-S2.5 all belong to the local update phase of client i. = It is the initialization operation before the local update phase of client i. S2.4 is the local update phase after initialization. Update operation performed on the starting point. The client i downloads is Client i does not train or update the shared models of other clients except .
[0069] Step S2.5: Update the learning weight vector , the specific update expression is:
[0070] in, Represents the weight learning rate.
[0071] The weights to be learned from other clients are adaptively determined based on the similarity between the local data distribution and that of other clients. This means that the personalized model is aggregating a shared model with a unique set of weights, eliminating the blind learning of global knowledge that could lead to training divergence. This set of weights is retained only locally on the client, preventing other clients from accessing the client's personalized model, thus protecting client privacy.
[0072] Step S2.6: Upload the shared model and local class prototypes .
[0073] Step S3: The server calculates and obtains the global class prototype and global model, specifically performing the following steps: Step S3.1: Calculate the global class prototype of category j , the specific calculation expression is: =
[0074] in, is the set of clients that have data samples of category j, that is, Indicates the number of clients. represents the number of category j in all data samples.
[0075] Step S3.2: Calculate the global model , the specific calculation expression is: =
[0076] in, Represents the local dataset of client i quantity, represents the sharing model of client i, N represents the total number of clients, n= , represents the sum of the dataset sizes of N clients.
[0077] Repeat steps S2 and S3 above. From the perspective of a single client, this process is repeated continuously to continuously train a better model. From a global perspective, in each round of training, the server sends the model to all clients simultaneously, and all clients perform this local training simultaneously. The same process is repeated in the next round of training.
[0078] The addition of personalized prototype regularization allows it to learn more global knowledge. Furthermore, the personalized prototype contains richer knowledge to guide the training of the shared model. This results in a high-performance personalized model and better algorithm performance.
[0079] The present invention also provides a personalized federated learning system for a shared model, which can be implemented by executing the process steps of the personalized federated learning method for a shared model. That is, those skilled in the art can understand the personalized federated learning method for a shared model as a preferred implementation of the personalized federated learning system for a shared model.
[0080] A personalized federated learning system for a shared model provided by the present invention includes: a server and N clients.
[0081] The client includes a shared model, a global model, and a global class prototype.
[0082] The server saves and initializes the client's shared model, global model, and global class prototype, and the client initializes the local learning weight vector.
[0083] The server sends the shared model of other clients to a client. The client sets the local global model as the shared model and trains and updates it, and uploads the trained shared model and local class prototype to the server.
[0084] The server calculates the global class prototype and the global model based on all received shared models and local class prototypes.
[0085] The server iterates over all clients, repeatedly sending shared models, training updates, and computations.
[0086] In more preferred embodiments, the N clients learn the weight vector locally based on the similarity of data distribution between the clients. , the shared model is , the global model is , the global class prototype is ; in, It represents the proportion of knowledge that client i plans to learn from the shared model of client j, compared with the shared models of other clients. Personalized model for client i The contribution of each is the same, i=1, 2,…,N, j=1, 2,…,N.
[0087] In more preferred embodiments, the server sends the shared models of other clients to client i. , global model and the global class prototype of category j , and at the same time, client i sets its local shared model to , = .
[0088] The personalization model is divided into presentation layer and prediction layer h( ); Where x represents the input space; is the presentation layer parameter; Represents the decision layer parameters.
[0089] Client i only updates its own shared model , freeze the client i download except Other shared models for clients other than , i≠j.
[0090] In more preferred embodiments, the client i triggers the training module, including: Module M2.1, Calculation Personalization Model : =
[0091] in, represents the proportion of knowledge that client i plans to learn from the shared model of client j; Represents a shared model.
[0092] Module M2.2, calculate the local class prototype of category j in client i : =
[0093] Where x represents the input space; y represents the label space of the category; Represents the local dataset of client i The number of samples belonging to category j in ; g( ) represents feature extraction of sample (x, y) in client i; It is the presentation layer parameter.
[0094] Module M2.3, Calculating Local Experience Loss : = +λ(r) +
[0095] in, represents the classification loss function; r represents the current training round; λ(r)=(cos(rπ / R)+1) / 2, which represents a monotonically decreasing function with respect to r; R represents the total number of training rounds; μ represents the coefficient of the proximal term; = , represents the proximal center; represents the regularization term coefficient; represents the regularization loss term; Represents the global class prototype of category j; Indicates the number of class prototypes in the current input space x; represents the learning weight vector of client i; Represents the input space x through the personalized model The output space obtained after calculation.
[0096] Module M2.4, update shared model :
[0097] in, Represents the model learning rate.
[0098] Module M2.5, update learning weight vector :
[0099] in, Represents the weight learning rate.
[0100] In more preferred embodiments, the server calculates and obtains the global class prototype and the global model, including: Module M3.1, calculate the global class prototype of category j : =
[0101] in, represents the set of clients that have data samples of category j; represents the number of clients with data samples of category j; Represents the number of category j in all data samples; Represents the local dataset of client i The number of samples belonging to category j in ; Represents the local class prototype of category j in client i.
[0102] Module M3.2, Calculation of Global Model : =
[0103] in, Represents the local dataset of client i quantity; represents the shared model of client i; N represents the total number of clients; n= , represents the sum of the dataset sizes of N clients.
[0104] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.
[0105] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A personalized federated learning method for a shared model, characterized by: include: Step S1: The server saves and initializes the client's shared model, global model, and global class prototype, and the client initializes the local learning weight vector; Step S2: The server sends the shared model of other clients to a client. The client sets the local global model as the shared model and trains and updates it, and uploads the trained shared model and local class prototype to the server. Step S3: The server calculates the global class prototype and the global model based on all received shared models and local class prototypes; Repeat steps S2 and S3 to traverse all clients.
2. The personalized federated learning method of the shared model according to claim 1, characterized in that In step S1, based on the similarity of data distribution among N clients, the local learning weight vector is , the shared model is , the global model is , the global class prototype is ; in, It represents the proportion of knowledge that client i plans to learn from the shared model of client j, compared with the shared models of other clients. Personalized model for client i The contribution of each is the same, i=1, 2,…,N, j=1, 2,…,N.
3. The personalized federated learning method of the shared model according to claim 2, characterized in that In step S2, the server sends the shared models of other clients to client i. , global model and the global class prototype of category j , and at the same time, client i sets its local shared model to , = ; The personalization model is divided into presentation layer and prediction layer h( ); Where x represents the input space; is the presentation layer parameter; Represents the decision layer parameters; Client i only updates its own shared model , freeze the client i download except Other shared models for clients other than , i≠j.
4. The personalized federated learning method of the shared model according to claim 3, characterized in that In step S2, the client i performs a training step, including: Step S2.1: Calculate the personalized model : = in, represents the proportion of knowledge that client i plans to learn from the shared model of client j; Represents a shared model; Step S2.2: Calculate the local class prototype of category j in client i : = Where x represents the input space; y represents the label space of the category; Represents the local dataset of client i The number of samples belonging to category j in ; g( ) represents feature extraction of sample (x, y) in client i; is the presentation layer parameter; Step S2.3: Calculate local experience loss : = +λ(r) + in, represents the classification loss function; r represents the current training round; λ(r)=(cos(rπ / R)+1) / 2, which represents a monotonically decreasing function with respect to r; R represents the total number of training rounds; μ represents the coefficient of the proximal term; = , represents the proximal center; represents the regularization term coefficient; represents the regularization loss term; Represents the global class prototype of category j; Indicates the number of class prototypes in the current input space x; represents the learning weight vector of client i; Represents the input space x through the personalized model The output space obtained after calculation; Step S2.4: Update the shared model : in, Represents the model learning rate; Step S2.5: Update the learning weight vector : in, Represents the weight learning rate.
5. The personalized federated learning method of the shared model according to claim 2, characterized in that The step S3 comprises: Step S3.1: Calculate the global class prototype of category j : = in, represents the set of clients that have data samples of category j; represents the number of clients with data samples of category j; Represents the number of category j in all data samples; Represents the local dataset of client i The number of samples belonging to category j in ; represents the local class prototype of category j in client i; Step S3.2: Calculate the global model : = in, Represents the local dataset of client i quantity; represents the shared model of client i; N represents the total number of clients; n= , represents the sum of the dataset sizes of N clients.
6. A personalized federated learning system for shared models, characterized by: include: Server and N clients; The server saves and initializes the client's shared model, global model, and global class prototype, and the client initializes the local learning weight vector; The server sends the shared model of other clients to a client. The client sets the local global model as the shared model and trains and updates it. It then uploads the trained shared model and local class prototype to the server. The server calculates the global class prototype and global model based on all received shared models and local class prototypes; The server iterates over all clients, repeatedly sending shared models, training updates, and computations.
7. The personalized federated learning system of the shared model according to claim 6, characterized in that The N clients learn the weight vector locally based on the similarity of data distribution between the clients: , the shared model is , the global model is , the global class prototype is ; in, It represents the proportion of knowledge that client i plans to learn from the shared model of client j, compared with the shared models of other clients. Personalized model for client i The contribution of each is the same, i=1, 2,…,N, j=1, 2,…,N.
8. The personalized federated learning system of the shared model according to claim 7, characterized in that: The server sends the shared models of other clients to client i , global model and the global class prototype of category j , and at the same time, client i sets its local shared model to , = ; The personalization model is divided into presentation layer and prediction layer h( ); Where x represents the input space; is the presentation layer parameter; Represents the decision layer parameters; Client i only updates its own shared model , freeze the client i download except Other shared models for clients other than , i≠j.
9. The personalized federated learning system of the shared model according to claim 8, characterized in that The client i triggers the training module, including: Module M2.1, Calculation Personalization Model : = in, represents the proportion of knowledge that client i plans to learn from the shared model of client j; Represents a shared model; Module M2.2, calculate the local class prototype of category j in client i : = Where x represents the input space; y represents the label space of the category; Represents the local dataset of client i The number of samples belonging to category j in ; g( ) represents feature extraction of sample (x, y) in client i; is the presentation layer parameter; Module M2.3, Calculating Local Experience Loss : = +λ(r) + in, represents the classification loss function; r represents the current training round; λ(r)=(cos(rπ / R)+1) / 2, which represents a monotonically decreasing function with respect to r; R represents the total number of training rounds; μ represents the coefficient of the proximal term; = , represents the proximal center; represents the regularization term coefficient; represents the regularization loss term; Represents the global class prototype of category j; Indicates the number of class prototypes in the current input space x; represents the learning weight vector of client i; Represents the input space x through the personalized model The output space obtained after calculation; Module M2.4, update shared model : in, Represents the model learning rate; Module M2.5, update learning weight vector : in, Represents the weight learning rate.
10. The personalized federated learning system of the shared model according to claim 7, characterized in that The server calculates and obtains the global class prototype and the global model, including: Module M3.1, calculate the global class prototype of category j : = in, represents the set of clients that have data samples of category j; represents the number of clients with data samples of category j; Represents the number of category j in all data samples; Represents the local dataset of client i The number of samples belonging to category j in ; represents the local class prototype of category j in client i; Module M3.2, Calculation of Global Model : = in, Represents the local dataset of client i quantity; represents the shared model of client i; N represents the total number of clients; n= , represents the sum of the dataset sizes of N clients.
Citation Information
Patent Citations
Personalized federated learning method based on hybrid expert model
CN112560991A
Federal learning method based on dynamic affinity polymerization and related equipment
CN116306986A
Personalized federal learning method and system of mixed multi-stage private model
CN117708877A
Personalized federal learning method based on prototype alignment learning
CN118674015A
Federal learning model fine tuning method and system for heterogeneous data
CN119599097A
Cited By
Dual-classification head voiceprint recognition training method based on federal learning
CN121171233A
Federal learning method, system and device
CN121562738A
Federated learning methods, systems, and devices
CN121562738B
Personalized federal learning method and system
CN121809601A
A personalized federated learning method and system
CN121809601B