Personalized federal learning method based on server dynamic combination optimization

By dividing deep neural networks into global modules and personalized modules, and using server-side dynamic combination optimization, the problem of excessive computing volume of resource-constrained devices and global information loss is solved, efficient personalized federated learning is achieved, and the model's performance and training efficiency under non-independent and homogeneous data is improved.

CN120509505APending Publication Date: 2025-08-19ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510351905.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing personalized federated learning method has too high computational volume and memory usage under non-independent and homogeneous data, resulting in limited resource-constrained device participation capabilities, severe global information loss, and degradation of model performance.

Method used

Deep neural networks are divided into global modules and personalized modules. Through dynamic combination testing and matching on the server side, the client only trains personalized modules, and the central server optimizes the combination model and issues it. The optimal model is trained locally on the client side, reducing the computational amount and memory usage, and retaining common knowledge across clients.

Benefits of technology

Significantly reduce the burden on client computing, improve resource utilization efficiency, improve training efficiency and model accuracy, enhance performance under non-independent and same-distributed data, and improve the performance and reliability of federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509505A_ABST
    Figure CN120509505A_ABST
Patent Text Reader

Abstract

The invention provides a personalized federal learning method based on server dynamic combination optimization, which comprises the following steps that: firstly, a central server initializes a global model and issues the global model to a client, and the client trains a personalized model based on local data and uploads parameters; then, the central server receives the parameters and forms a public data set, loads a global model set and divides the data set; then, the central server generates a combination model and tests performance, records indexes, and sorts and selects an optimal combination model; and finally, the central server issues the optimal combination model to the client for local reasoning, the optimal combination model is output after a convergence condition is reached, and training is continued if the convergence condition is not reached. According to the method, the combined test is migrated to the central server, so that the calculation burden of the client is remarkably reduced, the global model and the personalized model are dynamically matched, cross-client common knowledge is reserved, global information loss is reduced, the method is excellent in performance under non-independent identically distributed data, and the performance and reliability of federal learning are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology, and in particular to a personalized federated learning method based on server-side dynamic combination optimization. Background Art

[0002] Federated learning is a distributed machine learning paradigm designed to enable collaborative model training across multiple devices or data sources while protecting data privacy. Unlike traditional centralized machine learning, federated learning allows data to remain on local devices without uploading to a central server, effectively protecting user privacy and meeting data security regulations. The Federated Averaging Algorithm is an algorithm used in federated learning. It consists of a central server and multiple clients participating in federated training. It performs local training on multiple devices or clients in parallel and then averages the model updates of these devices to achieve global model optimization.

[0003] Comparative Document: Personalized Federated Learning Method and System Based on Parameter Similarity, Patent No.: CN119294559A. This invention dynamically identifies the key parameters of the client model and then constructs a set of similar clients to achieve accurate personalized aggregation of key parameters, solving the problem of mismatch between the global model and local data distribution under non-independent and identically distributed (Non-IID) data.

[0004] Existing clients need to record gradients, parameter amplitudes, and sensitivity matrices, and perform weighted accumulation of critical matrices in each round of training. This results in computational complexity and memory usage that are 2-3 times that of conventional federated learning, limiting the participation of resource-constrained devices. Furthermore, global knowledge is only transferred through the average aggregation of non-critical parameters, failing to fully utilize common information across clients, exacerbating catastrophic forgetting and easily leading to degraded model performance. Summary of the Invention

[0005] To address the performance degradation of existing personalized federated learning methods under data heterogeneity, this paper proposes a personalized federated learning method based on server-side dynamic combination optimization. This method divides the local model into a global module and a personalized model. Through server-side dynamic combination testing and matching, it captures client-side personalized features and integrates global knowledge. This method is suitable for federated training of deep feedforward neural networks and effectively mitigates the negative impact of non-independent and identically distributed (Non-IID) data.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a personalized federated learning method based on server-side dynamic combination optimization, characterized by comprising:

[0007] S1. The central server initializes a global model and sends it to each client. The global model includes a global module and a personalized module. The client receives the global model and trains a personalized model based on the local dataset. The global module does not participate in the training. The trained personalized model parameters are uploaded to the central server.

[0008] S2. The central server receives and stores the client's personalized model parameters; the central server loads the pre-trained global module set and prepares the public dataset;

[0009] S3. The central server combines each client personalized module with the global module set to generate a combined model; tests and records all combined model performance indicators;

[0010] S4. Rank the performance of the combination models corresponding to each client, and select the optimal combination model for the client;

[0011] S5. The central server sends the corresponding optimal combination model to each client. The client receives the optimal combination model and performs local training. The training ends when the set convergence condition is met. If the convergence condition is not met, the training returns to S2 until the convergence condition is met.

[0012] Furthermore, the global model of the i-th client is expressed as:

[0013]

[0014] in represents the global model of round t, Represents the global module divided in the global model, Represents the personalized modules divided from the global model;

[0015] The training goal of the personalized model is to minimize the loss function of local data and update the local data using the stochastic gradient descent method. The calculation formula is:

[0016]

[0017] Among them, η is the learning rate, which is used to control the step size of the parameters; D i is the local dataset of client i; represents the personalized module parameters of the i-th client after the t-1-th iteration; Represents the loss function L about gradient.

[0018] Furthermore, the personalized module parameters are expressed as:

[0019]

[0020] Wherein, Φ represents the personalized module parameter set of all clients, and n represents the number of clients;

[0021] The global module set is represented as:

[0022] θ=(θ1,θ2,...,θ m )

[0023] Wherein, θ represents the global module parameter set of all central servers, and m is the number of global modules.

[0024] Furthermore, for each client, the central server combines the personalized model with each of the global models to form the combined model, which is expressed as:

[0025]

[0026] Among them, M ij represents the combined model, represents the i-th client personalization module, θ j Represents j said global modules, generating a total of n×m said combination models.

[0027] Furthermore, the public dataset is divided into model training and test sets and model similarity matching sets in a 4:1 ratio, with 70% of the model training and test sets used for model training and 30% used for testing accuracy.

[0028] Furthermore, the performance index of the combined model is tested on the model similarity matching set. Specifically, the similarity between the personalized model and the global model is calculated using the cosine similarity function. The calculation formula is:

[0029]

[0030] Among them, D a represents the model similarity matching set, P represents the size of the public dataset, is the jth global module parameter after adjustment, The personalized model of the i-th client at data point x p The logits output on Represents the jth global model at data point χ p The logits output on .

[0031] Furthermore, the performance ranking formula in M3 is:

[0032]

[0033] in, is the optimal combination model for client i, It is the similarity between the client's personalized module and the optimal global module.

[0034] Furthermore, the loss function used in the client local training in S5 is as follows:

[0035]

[0036] Among them, L local (M i ;D i ) represents the client's local loss function; |D i | represents the size of the client's local dataset, that is, the number of data samples; y represents each sample in the local dataset; CE(f(M i ), y) represents the cross entropy loss function; λ is the regularization coefficient, which is used to control the update amplitude of personalized parameters to prevent local overfitting and constrain the change amplitude of personalized parameters to avoid overfitting when the amount of local data is small; The personalized module parameters of the previous round of training are constrained to improve the stability of training by changing the parameters.

[0037] Compared with the prior art, the advantages of the present invention are:

[0038] 1. By migrating combined testing to a central server, the present invention allows clients to train only personalized models, reducing computational effort from testing multiple global modules to a single training run. This significantly reduces the burden on edge devices and avoids excessive growth in computational effort and memory usage. This is particularly true for resource-constrained devices. By optimizing client tasks, the central server can support more device participation, improving resource utilization efficiency and device participation in federated learning methods.

[0039] 2. This invention uses a central server to centrally optimize the combination of a global model and a personalized model, regularly updates the global model and reuses it to avoid repeated training. The global model only needs to be updated on the central server, while the client focuses on optimizing the personalized model. This method significantly reduces computational redundancy and improves training efficiency. In particular, it can accelerate the training process and reduce training time in scenarios with large data volumes and high training complexity.

[0040] 3. The present invention retains common knowledge across clients by dynamically matching the global model, significantly reducing the global information loss caused by local optimization. The central server accurately adjusts the optimal way of model combination so that each client can obtain the data processing model that best suits its local task. This optimization can effectively improve the model's performance on non-independent and identically distributed (Non-IID) data and enhance the accuracy of task execution, ultimately improving the performance and reliability of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0042] Figure 1 Schematic diagram of the workflow of the personalized federated learning method of the present invention;

[0043] Figure 2 A schematic diagram of the steps for generating a personalized model of the present invention;

[0044] Figure 3 Schematic diagram of the steps for generating the optimal combination model of the present invention. DETAILED DESCRIPTION

[0045] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0046] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0047] The present invention provides a personalized federated learning method based on server-side dynamic combination optimization, such as Figure 1 shown.

[0048] The entire deep neural network is divided into two modules: the global module θ i and Personalization Module The global module is the carrier of global knowledge and reflects the collaborative nature of clients in federated learning; the personalized module retains the personalized information of the local model and performs classification tasks.

[0049] The deep neural network can be any artificial intelligence model. This example only focuses on the model parameter optimization problem between the server and the client. It is divided into the following five steps:

[0050] S1. Client training personalized module

[0051] The server initializes a global model and sends it to each client.

[0052] Local training phase: Each client divides the global model received in this round into a global module and a personalized module, namely in represents the global model of round t, Represents the global module divided in the global model, Represents the personalized module divided from the global model. The personalized module is trained on the local dataset, keeping the global module fixed. The training goal is to minimize the loss function of the local data, and the local data is updated by stochastic gradient descent:

[0053]

[0054] Among them, η is the learning rate, which is used to control the step size of the parameters; D i is the local dataset of client i; represents the personalized module parameters of the i-th client after the t-1-th iteration; Represents the loss function L about gradient.

[0055] Upload personalized module: The client uploads the trained personalized module parameters to the server. The client also uploads the characteristics of local data distribution (such as data statistics) to help the server better select the global module. This step can be referred to Figure 1 .

[0056] S2. Server receives and prepares for testing

[0057] (1) Receiving personalized modules: The server receives personalized module parameters from all clients and obtains a personalized module set. Where n is the number of clients, Personalized modules for each client;

[0058] (2) Storage module parameters: The server stores each client's personalized module parameters in memory or database for subsequent use;

[0059] (3) Prepare global modules: The server loads the pre-trained global module set θ = (θ1, θ2, ..., θ m ), where m is the number of global modules, θ i Represents the global module of each client. A global module can be a few layers of a neural network (such as a feature extraction layer) or a complete model.

[0060] (4) Prepare the proxy dataset: pThe dataset is divided into two parts: one for model training and testing, and the other for model similarity matching. 80% of the dataset is used for model training and testing, and 20% is used for model similarity matching. In addition, 70% of the dataset is used for model training, and 30% is used for accuracy testing.

[0061] S3, server-side combination test

[0062] (1) Combination generation: For each client i, the server generates its personalized module With each global module θ i Combine to form a model A total of n×m combination models are generated.

[0063] (2) Similarity matching: Test the performance of the client model and each combination model on the dataset used for model similarity matching, and record the performance indicators of each combination as follows:

[0064] Using cosine similarity function Calculate the similarity between two models. Cosine similarity is a method that measures the similarity between two vectors by calculating the cosine value of the angle between them. The calculated value range is [-1, 1], with a value of 1 representing complete identity, a value of 0 representing orthogonal (unrelated), and a value of -1 representing complete opposites. This function is used to calculate the similarity between the personalized module and the global module under the same data input. The formula is as follows:

[0065]

[0066] Among them, D a represents the model similarity matching set, A represents the size of the public dataset, is the jth global module parameter after adjustment, The personalized model of the i-th client at data point x p The logits output on Represents the jth global model at data point χ p The logits output on this step is referenced. Figure 3 .

[0067] S4. Select the optimal combination model

[0068] Performance sorting: For each client i, the server sorts all combinations M according to the performance index. ij Sort

[0069]

[0070] in, is the optimal combination model for client i, It is the similarity between the client's personalized module and the optimal global module.

[0071] S5: Send the optimal model and perform local inference and training on the client

[0072] The server sends the optimal model of each client Send it to the corresponding client, and the client uses the optimal model Perform local inference.

[0073] The loss function is as follows:

[0074]

[0075] Among them, Llocal(M i ;D i ) represents the client's local loss function; |D i | represents the size of the client's local dataset, that is, the number of data samples; y represents each sample in the local dataset; CE(f(M i ), y) represents the cross entropy loss function; λ is the regularization coefficient, which is used to control the update amplitude of personalized parameters to prevent local overfitting and constrain the change amplitude of personalized parameters to avoid overfitting when the amount of local data is small; The personalized module parameters of the previous round of training are constrained to improve the stability of training by changing the parameters.

[0076] The model performance is judged based on the loss function calculated by the optimal combination model. If the model meets the predetermined convergence condition, the client will output the final optimal combination model result. If the convergence condition is not met, the client will return to step S2 and continue training until the optimal combination model meets the convergence condition. This iterative process ensures that the optimal combination model can be gradually optimized, ultimately achieving efficient distributed learning while protecting data privacy;

[0077] By migrating combinatorial testing to the server side, this method significantly reduces the client's computational burden and efficiently integrates global knowledge. At the same time, this solution is significantly superior to traditional federated learning methods in terms of accuracy, training efficiency, and communication costs. Its core innovation is dynamic module matching on the server side, which provides reliable technical support for the actual implementation of federated learning.

[0078] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0079] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A personalized federated learning method based on server-side dynamic combination optimization, characterized in that: include: S1. The central server initializes a global model and sends it to each client. The global model includes a global module and a personalized module. The client receives the global model and trains a personalized model based on the local data set. The global module does not participate in the training; the trained personalized model parameters are uploaded to the central server. S2. The central server receives and stores the client's personalized model parameters; the central server loads the pre-trained global module set and prepares the public dataset; S3. The central server combines each client personalized module with the global module set to generate a combined model; tests and records all combined model performance indicators; S4. Rank the performance of the combination models corresponding to each client, and select the optimal combination model for the client; S5. The central server sends the corresponding optimal combination model to each client. The client receives the optimal combination model and performs local training. The training ends when the set convergence condition is met. If the convergence condition is not met, the training returns to S2 until the convergence condition is met.

2. A personalized federated learning method based on server-side dynamic combination optimization according to claim 1, characterized in that: The global model of the i-th client is expressed as: Among them represents the global model of round t, Represents the global module divided in the global model, Represents the personalized modules divided from the global model; The training goal of the personalized model is to minimize the loss function of the local data and update the local data using the stochastic gradient descent method. The calculation formula is: Among them, η is the learning rate, which is used to control the step size of the parameters; D i is the local dataset of client i; represents the personalized module parameters of the i-th client after the t-1-th iteration; Represents the loss function L about gradient.

3. The personalized federated learning method based on server-side dynamic combination optimization according to claim 2, characterized in that: The personalized modules for all clients are represented as: Wherein, Φ represents the personalized module parameter set of all clients, n represents the number of clients, is the personalized module of the i-th client; The global module set is represented as: θ=(θ1,θ2,...,θ m ) Wherein, θ represents the global module parameter set of all central servers, and m is the number of global modules.

4. The personalized federated learning method based on server-side dynamic combination optimization according to claim 3, characterized in that: For each client, the central server combines the personalized model with each of the global models to form the combined model, which is expressed as: Among them, M ij represents the combined model, represents the i-th client personalization module, θ j Represents j said global modules, generating a total of n×m said combination models.

5. The personalized federated learning method based on server-side dynamic combination optimization according to claim 4, characterized in that: The public dataset is divided into a model training and test set and a model similarity matching set in a 4:1 ratio, with 70% of the model training and test sets used for model training and 30% used for testing accuracy.

6. The personalized federated learning method based on server-side dynamic combination optimization according to claim 5, characterized in that: The combined model performance index is tested on the model similarity matching set. Specifically, the similarity between the personalized model and the global model is calculated using the cosine similarity function. The calculation formula is: Among them, D a represents the model similarity matching set, A represents the size of the public dataset, is the jth global module parameter after adjustment, The personalized model of the i-th client at data point x p The logits output on Represents the jth global model at data point χ p The logits output on .

7. A personalized federated learning method based on server-side dynamic combination optimization according to claim 1 or 6, characterized in that: The performance ranking formula in M3 is: in, is the optimal combination model for client i, It is the similarity between the client's personalized module and the optimal global module.

8. The personalized federated learning method based on server-side dynamic combination optimization according to claim 6, characterized in that: The loss function used in the client local training in S5 is as follows: Among them, L local (M i ;D i ) represents the client's local loss function; |D i | represents the size of the client's local dataset, that is, the number of data samples; y represents each sample in the local dataset; CE(F(M i ), y) represents the cross entropy loss function; λ is the regularization coefficient, which is used to control the update amplitude of personalized parameters to prevent local overfitting and constrain the change amplitude of personalized parameters to avoid overfitting when the amount of local data is small; The personalized module parameters of the previous round of training are constrained to improve the stability of training by changing the parameters.

Citation Information

Patent Citations

  • Personalized federal learning method and system based on parameter similarity

    CN119294559A