Personalized federal learning method and system based on parameter adaptive decoupling
By using an adaptive decoupled federated learning method, and leveraging the Fisher information matrix and Kittler's minimum error threshold method, the problem of parameter partitioning in personalized federated learning is solved, achieving a balance between the personalization and generalization of the model, and improving the model's adaptability and generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-12
Smart Images

Figure CN122021801A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and distributed machine learning technology, and in particular to a personalized federated learning method and system based on parameter adaptive decoupling. Background Technology
[0002] With the widespread adoption of IoT devices and the improvement of privacy regulations, federated learning, as a distributed collaborative training paradigm that does not share raw data, has attracted widespread attention. Traditional federated learning frameworks update the global model by aggregating client parameters, aiming for a universal global model. In real-world scenarios, client data exhibits highly non-independent and identically distributed characteristics, and data heterogeneity causes drift: local models fitting local features will deviate from the global optimum, while forced aggregation will erase individual characteristics, resulting in poor local performance.
[0003] Existing personalized federated learning methods primarily address these challenges through regularization or model decoupling. Among these, mainstream model decoupling methods typically involve coarse-grained partitioning based on network layers (e.g., shared feature extractors, privatized classification heads). This rigid structural partitioning ignores the significant differences in the contribution of different parameters within the same layer to a specific task, making it difficult to adaptively handle the dynamic changes in parameter roles within deep neural networks.
[0004] To overcome the limitations of coarse-grained segmentation, some studies have attempted to perform finer-grained parameter-by-parameter segmentation based on parameter importance. However, these methods face the core challenge of determining the optimal segmentation threshold in practical applications. Setting the threshold too high results in too few personalized parameters, making it difficult for the model to adequately fit the unique features of the local data; setting the threshold too low leads to insufficient shared parameters, making the model prone to losing global generalization ability or even experiencing catastrophic forgetting. Therefore, how to adaptively determine the optimal segmentation threshold based on parameter distribution characteristics without manual intervention is a key technical bottleneck that urgently needs to be addressed to achieve efficient fine-grained parameter decoupling. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a personalized federated learning method and system based on parameter adaptive decoupling. This addresses the problem that existing technologies struggle to balance model stability and personalized adaptability in heterogeneous data environments. By adaptively decoupling model parameters into personalized sets and shared sets and optimizing them in stages, the invention achieves the goal of releasing personalization while anchoring universality.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a personalized federated learning method based on parameter adaptive decoupling, comprising the following steps: S1) Initialize global model parameters via the server; S2) The server selects the client participating in the training and sends the global model parameters to the client participating in the training. The client participating in the training uses the global model parameters as the initial parameters of its local model. S3) The client uses local data to calculate the Fisher information value of the local model parameters and performs hierarchical normalization. S4) The client performs a logarithmic transformation on the normalized Fisher information value, calculates the optimal logarithmic segmentation threshold using the Kittler minimum error threshold method, and obtains the original threshold by reverse mapping. A classification mask is then generated based on the original threshold. S5) The client executes a two-stage optimization strategy based on the classification mask, performs global constraint updates using shared parameters, and performs updates using personalized parameters with maximum entropy regularization. S6) The client uploads the updated local model parameters and the amount of training sample data to the server. The server performs weighted aggregation of the local model parameters of each client and updates the global model. (S7), repeat steps S2-S6) until the preset global training rounds are reached to obtain the final classification model.
[0007] Preferably, in step S1), the server simulates a non-independent and identically distributed scenario according to the Dirichlet distribution, and divides the training dataset into multiple clients, with each client having only a portion of the training dataset for each category.
[0008] Preferably, in step S1), the server initializes a deep neural network as a global model. And set the global training rounds, local training rounds, local learning rate, and regularization coefficient.
[0009] Preferably, in step S3), before training, the client first extracts a small batch of samples from the local training dataset and calculates the squared gradient of the cross-entropy loss function with respect to the local model parameters to approximate the Fisher information value; that is:
[0010] In the formula, Indicates Fisher's information value; Indicates the diagonal extraction operator; Fisher's Information Matrix; This represents the expectation operation; Indicates a small batch of samples; For the weight parameters of the client's local model, The input samples and their labels; Log-likelihood is the log probability output by the local model, used to measure the weight parameters of the local model. Below, data The credibility of its appearance.
[0011] Preferably, in step S3), the structure of the client's local model is identified and divided into multiple levels, and for each level... Fisher information value Perform minimum-maximum normalization independently, mapping it to... The interval is used to eliminate the difference in numerical magnitude between the convolution kernel parameters and the fully connected layer parameters, thus obtaining the normalized Fisher information value. .
[0012] Preferably, in step S4), the Kittler algorithm is used to traverse the thresholds within the log-Fischer vector domain to find the optimal threshold that minimizes the classification error probability. This threshold is used to separate the personalized parameters for high-sensitivity Fischer values from the shared parameters for low-sensitivity Fischer values. The Kittler algorithm is then used to calculate... The expression for the optimal logarithmic splitting threshold is:
[0013]
[0014] In the formula, This represents the optimal logarithmic splitting threshold; Indicated by threshold The minimum error criterion function after partitioning the log-Fischer vector; and These represent the threshold values respectively. Divide the prior probabilities of the two classes of parameter elements in the log-Fischer vector distribution; and These represent the variances of the logarithmic Fisher values for these two types of parameter elements, respectively. Denotes the independent variable that minimizes the function. .
[0015] Preferably, in step S4), the logarithmic optimal segmentation threshold is restored to the original threshold. The local model's normalized Fisher information is compared one by one with the original threshold to generate a binary mask; For each parameter in the client's local model, if its Fisher information value If it is, then mark it as a personalized parameter; otherwise, mark it as a shared parameter.
[0016] As a preferred option, the two-stage optimization strategy in step S5) is: The first stage of optimization: freeze the individual parameters and optimize the shared parameters only using SGD. The loss function for the first stage of shared parameter optimization includes cross-entropy loss and L2 regularization. The second stage of optimization involves freezing shared parameters and optimizing only individual parameters. The loss function for optimizing individual parameters in the second stage includes cross-entropy loss and maximum entropy regularization.
[0017] Preferably, in step S6), the server collects the update volume of the clients participating in this round, based on the number of local samples of each client. Perform a weighted average and update the global model, i.e.:
[0018] In the formula, For the updated global model; The number of clients participating in the training; The total number of samples from all clients participating in the training; For the first Updated local model parameters for each client; For the first Number of local dataset samples per client; Indicates the training rounds.
[0019] Secondly, the present invention provides a personalized federated learning system based on parameter adaptive decoupling, comprising: The server is used to initialize the global model and send the global model parameters to the clients participating in the training; at the same time, it receives the updated local model parameters uploaded by the clients and performs weighted aggregation with the amount of training sample data in this session to update the global model. Multiple clients are used to perform local model training based on the initialized global model, calculate Fisher information values of local model parameters using local data, and perform hierarchical normalization. The normalized Fisher information values are logarithmically transformed, and the optimal logarithmic splitting threshold is calculated using the Kittler minimum error thresholding method and back-mapped to obtain the original threshold. A classification mask is generated based on the original threshold. Then, a two-stage optimization strategy is executed based on the classification mask: global constraint updates are performed using shared parameters, and updates with maximum entropy regularization are performed using personalized parameters. The updated local model parameters and the amount of training sample data are then sent to the server.
[0020] The beneficial effects of this invention are as follows: 1. This invention introduces the Fisher information matrix as a metric for parameter importance, which can objectively reflect the sensitivity of parameters to local tasks based on the curvature characteristics of the underlying data distribution. 2. This invention combines Kittler's minimum error threshold method and adaptively calculates the optimal segmentation threshold based on the minimum error probability criterion. It can more accurately separate overlapping parameter distributions and find the optimal boundary between personalization and sharing without manual intervention. This ensures that the model can retain specific features that are crucial to local data, while effectively isolating general features, thus achieving automation and precision in parameter decoupling. 3. This invention solves the evaluation bias problem caused by the difference in parameter scale in multi-level networks. The hierarchical normalization mechanism used in this invention forces independent sensitivity normalization processing within each layer, eliminating the influence of scale differences between layers, ensuring the fairness of mask generation, and enabling the model to retain the most critical personalized parameters in each layer, maintaining the integrity of the network structure and the hierarchy of feature extraction. 4. This invention constructs a two-stage optimization system that complements robust anchoring and smooth generalization. In the first stage, L2 regularization is used to constrain shared parameters to prevent them from deviating from the global model, thus ensuring the model's generality. In the second stage, maximum entropy regularization is used to optimize personalized parameters, which adapts to local data while preventing the model from becoming overconfident and improving the model's generalization ability. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the method of Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of parameter sensitivity decoupling and mask generation in this invention. Detailed Implementation
[0022] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings: Example 1 like Figure 1 As shown in the figure, this embodiment presents a personalized federated learning method based on parameter adaptive decoupling, which includes the following steps: S1) Initialize global model parameters via the server; In this embodiment, the server specifies CIFAR-10 as the target dataset and simulates a non-independent and identically distributed scenario according to the Dirichlet distribution, dividing the training dataset into multiple clients, with each client having only a portion of the training dataset for each category.
[0023] In this embodiment, the server initializes a deep neural network as a global model. And set the global training rounds, local training rounds, local learning rate, and regularization coefficient.
[0024] S2) The server selects the clients participating in the training and sends the global model parameters to the clients participating in the training. The clients participating in the training use the global model parameters as the initial parameters of their local models; specifically, this includes the following steps: S21) At the beginning of each round of global communication, the server randomly selects clients to participate in this round of training according to the preset sampling rate; S22) The server will display the current global model parameters. Send to the selected client; S23) Each selected client receives global model parameters. and assign it to the local model. This serves as the starting point for this round of training.
[0025] S3) The client uses local data to calculate Fisher information values for local model parameters and performs hierarchical normalization; such as Figure 2 As shown, the specific steps include the following: S31) Before training, the client first extracts a small batch of samples from the local training dataset and calculates the squared gradient of the cross-entropy loss function with respect to the local model parameters to approximate the Fisher information value; that is:
[0026] In the formula, Indicates Fisher's information value; This represents the diagonal extraction operator, used to extract elements from the main diagonal to form a vector; Represents the Fisher information matrix; This represents the expectation operation; Represents a mini-batch sample set; For the weight parameters of the client's local model, The input samples and their labels; Log-likelihood is the log probability output by the local model, used to measure the weight parameters of the local model. Below, data Credibility of appearance; S32) Identify the structure of the client's local model, divide it into multiple levels, and for each level... Fisher information value Perform minimum-maximum normalization independently, mapping it to... The interval is used to eliminate the difference in numerical magnitude between the convolution kernel parameters and the fully connected layer parameters, thus obtaining the normalized Fisher information value. ,Right now: In the formula, For the first In the layer network Fisher information values for each parameter; and They represent the first The minimum and maximum values of Fisher information within a layer are determined; layer normalization eliminates the differences in gradient scale between different network layers, ensuring the accuracy of subsequent mask generation.
[0027] S4), the client's normalized Fisher information value The process involves performing a logarithmic transformation, calculating the optimal logarithmic segmentation threshold using the Kittler minimum error thresholding method, and then inversely mapping this threshold to obtain the original threshold. A classification mask is then generated based on the original threshold. The specific steps include: S41) Perform a logarithmic transformation on the normalized Fisher information values, that is: ; In the formula, Let be a log-Fischer vector. It is an extremely small constant; S42) Using the Kittler algorithm, the thresholds within the log-Fischer vector domain are traversed to find the optimal threshold that minimizes the classification error probability. This threshold is used to separate the personalized parameters of high-sensitivity Fischer values from the shared parameters of low-sensitivity Fischer values. The Kittler algorithm is then used to calculate... The expression for the optimal logarithmic splitting threshold is:
[0028]
[0029] In the formula, This represents the optimal logarithmic splitting threshold; Indicated by threshold The minimum error criterion function after partitioning the log-Fischer vector; and These represent the threshold values respectively. Divide the prior probabilities of the two classes of parameter elements in the log-Fischer vector distribution; and These represent the variances of the logarithmic Fisher values for these two types of parameter elements, respectively. Denotes the independent variable that minimizes the function. ; S43) Restore the log-optimal segmentation threshold to the original threshold. The local model's normalized Fisher information is compared one by one with the original threshold to generate a binary mask; For each parameter in the client's local model, if its Fisher information value If it is, then mark it as a personalized parameter; otherwise, mark it as a shared parameter. ; ; In the formula, For the first Personalized mask values for each parameter; No. Shared mask values for each parameter; For the first Fisher information values for each parameter; This is an indicator function that takes the value 1 when the condition is met, and 0 otherwise.
[0030] S5) The client executes a two-stage optimization strategy based on the classification mask, performing global constraint updates using shared parameters and introducing maximum entropy regularization for updates using personalized parameters; specifically as follows: The first stage of optimization: Freeze individual parameters and optimize shared parameters only using SGD. The loss function for shared parameters in the first stage includes cross-entropy loss and L2 regularization, i.e.:
[0031]
[0032] In the formula, Represents the shared parameter loss function; Represents cross-entropy loss; For regularization weights; For local model parameters; These are global model parameters; To share the mask, Indicates shared parameters, Indicates personalized parameters; This represents the Hadamard product, which is an element-wise multiplication operation. For the first The true label of each sample; For the first Predicted labels for each sample; The total number of categories for the classification task; The second stage of optimization: Freeze shared parameters and optimize only personalized parameters. The loss function for personalized parameter optimization includes cross-entropy loss and maximum entropy regularization term, that is:
[0033] In the formula, Optimize the loss function for personalized parameters; The total number of categories for the classification task; The regularization coefficient is used. For the first The true label of each sample; For the first Predicted labels for each sample.
[0034] S6) The client uploads the updated local model parameters and the amount of training sample data to the server. The server then performs weighted aggregation of the local model parameters from each client and updates the global model. This process includes the following steps: S61) The client uploads the updated local model and the number of local training samples to the server; S62) The server collects the update data from the clients participating in this round, based on the number of local samples for each client. Perform a weighted average and update the global model, i.e.:
[0035] In the formula, For the updated global model; The number of clients participating in the training; The total number of samples from all clients participating in the training; For the first Updated local model parameters for each client; For the first Number of local dataset samples per client; Indicates the training rounds.
[0036] (S7), repeat steps S2-S6) until the preset global training rounds are reached to obtain the final classification model.
[0037] Example 2 This embodiment provides a personalized federated learning system based on parameter adaptive decoupling, including: The server is used to initialize the global model and send the global model parameters to the clients participating in the training; at the same time, it receives the updated local model parameters uploaded by the clients and performs weighted aggregation with the amount of training sample data in this session to update the global model. Multiple clients are used to perform local model training based on the initialized global model, calculate Fisher information values of local model parameters using local data, and perform hierarchical normalization. The normalized Fisher information values are logarithmically transformed, and the optimal logarithmic splitting threshold is calculated using the Kittler minimum error thresholding method and back-mapped to obtain the original threshold. A classification mask is generated based on the original threshold. Then, a two-stage optimization strategy is executed based on the classification mask: global constraint updates are performed using shared parameters, and updates with maximum entropy regularization are performed using personalized parameters. The updated local model parameters and the amount of training sample data are then sent to the server.
[0038] The embodiments and descriptions above are merely illustrative of the principles and preferred embodiments of the present invention. Various changes and modifications may be made to the present invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed.
Claims
1. A personalized federated learning method based on parameter adaptive decoupling, characterized in that, Includes the following steps: S1) Initialize global model parameters via the server; S2) The server selects the client participating in the training and sends the global model parameters to the client participating in the training. The client participating in the training uses the global model parameters as the initial parameters of its local model. S3) The client uses local data to calculate the Fisher information value of the local model parameters and performs hierarchical normalization. S4) The client performs a logarithmic transformation on the normalized Fisher information value, calculates the optimal logarithmic segmentation threshold using the Kittler minimum error threshold method, and obtains the original threshold by reverse mapping. A classification mask is then generated based on the original threshold. S5) The client executes a two-stage optimization strategy based on the classification mask, performs global constraint updates using shared parameters, and performs updates using personalized parameters with maximum entropy regularization. S6) The client uploads the updated local model parameters and the amount of training sample data to the server. The server performs weighted aggregation of the local model parameters of each client and updates the global model. (S7), repeat steps S2-S6) until the preset global training rounds are reached to obtain the final classification model.
2. The personalized federated learning method based on parameter adaptive decoupling according to claim 1, characterized in that: In step S3), before training, the client first extracts a small batch of samples from the local training dataset and calculates the squared gradient of the cross-entropy loss function with respect to the local model parameters to approximate the Fisher information value; that is: ; In the formula, Indicates Fisher's information value; Indicates the diagonal extraction operator; Fisher's Information Matrix; This represents the expectation operation; Indicates a small batch of samples; For the weight parameters of the client's local model, The input samples and their labels; Log-likelihood is the log probability output by the local model, used to measure the weight parameters of the local model. Below, data The credibility of its appearance.
3. The personalized federated learning method based on parameter adaptive decoupling according to claim 2, characterized in that: In step S3), by identifying the structure of the client's local model, it is divided into multiple levels, and for each level... Fisher information value Perform minimum-maximum normalization independently, mapping it to... The interval is used to obtain the normalized Fisher information value.
4. The personalized federated learning method based on parameter adaptive decoupling according to claim 3, characterized in that: In step S4), each client performs a logarithmic transformation on the normalized Fisher information values to obtain a log-Fischer vector, i.e.: ; In the formula, Let be a log-Fischer vector. It is an extremely small constant.
5. The personalized federated learning method based on parameter adaptive decoupling according to claim 4, characterized in that: In step S4), the Kittler algorithm is used to traverse the thresholds in the log-Fischer vector domain to find the optimal threshold that minimizes the classification error probability. This threshold is used to separate the personalized parameters of high-sensitivity Fisher values from the shared parameters of low-sensitivity Fisher values.
6. The personalized federated learning method based on parameter adaptive decoupling according to claim 5, characterized in that: In step S4), the optimal logarithmic segmentation threshold is calculated using the Kittler algorithm. The expression is: ; ; In the formula, This represents the optimal logarithmic splitting threshold; Indicated by threshold The minimum error criterion function after partitioning the log-Fischer vector; and These represent the threshold values respectively. Divide the prior probabilities of the two classes of parameter elements in the log-Fischer vector distribution; and These represent the variances of the logarithmic Fisher values for these two types of parameter elements, respectively. Denotes the independent variable that minimizes the function. .
7. A personalized federated learning method based on parameter adaptive decoupling according to claim 6, characterized in that: In step S4), the log-optimal segmentation threshold is restored to the original threshold. The local model's normalized Fisher information is compared one by one with the original threshold to generate a binary mask; For each parameter in the client's local model, if its Fisher information value If it is, then mark it as a personalized parameter; otherwise, mark it as a shared parameter.
8. The personalized federated learning method based on parameter adaptive decoupling according to claim 1, characterized in that: In step S5), the two-stage optimization strategies are as follows: The first stage of optimization: freeze the individual parameters and optimize the shared parameters only using SGD. The loss function for the first stage of shared parameter optimization includes cross-entropy loss and L2 regularization. The second stage of optimization involves freezing shared parameters and optimizing only individual parameters. The loss function for optimizing individual parameters in the second stage includes cross-entropy loss and maximum entropy regularization.
9. A personalized federated learning method based on parameter adaptive decoupling according to claim 1, characterized in that: In step S6), the server collects the update data from the clients participating in this round, based on the number of local samples for each client. Perform a weighted average and update the global model, i.e.: ; In the formula, For the updated global model; The number of clients participating in the training; The total number of samples from all clients participating in the training; For the first Updated local model parameters for each client; For the first Number of local dataset samples per client; Indicates the training rounds.
10. A personalized federated learning system based on parameter adaptive decoupling, characterized in that, include: The server is used to perform global model initialization and send global model parameters to the clients participating in training; Simultaneously, the updated local model parameters uploaded by the client and the amount of training sample data are weighted and aggregated to update the global model; Multiple clients are used to perform local model training based on the initialized global model, calculate Fisher information values of local model parameters using local data, and perform hierarchical normalization. The normalized Fisher information values are logarithmically transformed, and the optimal logarithmic splitting threshold is calculated using the Kittler minimum error thresholding method and back-mapped to obtain the original threshold. A classification mask is generated based on the original threshold. Then, a two-stage optimization strategy is executed based on the classification mask: global constraint updates are performed using shared parameters, and updates with maximum entropy regularization are performed using personalized parameters. The updated local model parameters and the amount of training sample data are then sent to the server.