Dynamic personalized federal learning method based on adaptive gradient constraint

By using hierarchical Fisher information quantization and dynamic parameter partitioning with adaptive gradient constraints, the problems of inflexible personalized policies and model convergence difficulties caused by differential privacy pruning in federated learning are solved, achieving efficient training and privacy protection on non-independent and identically distributed data.

CN121835957APending Publication Date: 2026-04-10SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies suffer from inflexible personalized strategies and model convergence difficulties due to differential privacy pruning on non-independent and identically distributed data. This is especially true in federated learning, where it is difficult to improve model accuracy and convergence performance while ensuring privacy and security.

Method used

The parameters are quantized using hierarchical Fisher information, and dynamic parameter partitioning is performed. An adaptive gradient constraint local training mechanism is constructed, and different regularization constraints are applied to personalized and shared parameters. Gradient pruning is performed in combination with differential privacy mechanism to achieve adaptive gradient constraint and personalized update.

Benefits of technology

By using dynamic parameter partitioning and adaptive gradient constraints, the model's adaptability and convergence speed under non-independent and identically distributed data are improved, gradient distortion is reduced, and the model's accuracy and convergence performance under privacy protection are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835957A_ABST
    Figure CN121835957A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic personalized federated learning method based on adaptive gradient constraint. The method specifically comprises the following steps: system modeling: constructing a federated learning system comprising a central server and a plurality of clients; dynamic parameter division: quantizing parameter information amount by using hierarchical Fisher information, and dynamically generating masks to divide parameters into personalized parameters and shared parameters; model initialization: performing hybrid initialization on a local model in combination with local historical parameters and global parameters; self-adaptive constraint training: in local training, regularizing personalized parameters to retain local features, and regularizing shared parameters to approach a cutting boundary; and differential privacy protection and aggregation: performing cutting and noise addition on the local update, and then uploading the local update to a server for aggregation. According to the method, the adaptability of the model to non-independent identically distributed data is improved through a dynamic personalized strategy, the robustness of the model to differential privacy cutting operation is enhanced through adaptive gradient constraint, and the convergence performance and accuracy of the model are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed machine learning and privacy computing, and particularly to model optimization and privacy protection in federated learning, specifically a dynamic personalized federated learning method based on adaptive gradient constraints. Background Technology

[0002] With the widespread adoption of mobile devices and the improvement of computing power, machine learning faces severe challenges in terms of data privacy protection. To address the data silo problem, McMahan et al. (McMahan B, Moore E, Ramage D, et al. Communication-Efficient Learning of Deep Networks from Decentralized Data[C]. AISTATS, 2017) proposed the Federated Learning framework (FedAvg), which allows clients to train models locally and only upload parameter updates, thereby collaboratively training a global model without sharing the original data. However, McMahan et al. mainly focused on the scenario of independent and identically distributed (IID) data. On non-independent and identically distributed (Non-IID) data, the performance of a single global model will significantly decrease.

[0003] To address the challenges posed by Non-IID data, researchers have proposed personalized federated learning methods. For example, Arivazhagan et al. (Arivazhagan MG, Aggarwal V, Morshed AA, et al. Federated Learning with Personalization Layers[J]. arXiv preprint arXiv:1912.00818,2019) proposed the FedPer algorithm, which divides deep neural networks into base layers and personalization layers. The base layers are updated by server aggregation, while the personalization layers are trained only locally. However, Arivazhagan et al. adopted a static parameter partitioning strategy based on network layers. This coarse-grained partitioning method lacks flexibility, ignores the dynamic differences in the information content of different parameters under different data distributions, and cannot achieve precise personalization at the parameter level.

[0004] In terms of privacy and security in federated learning, to prevent privacy leaks such as member inference attacks, Geyer et al. (Geyer RC, Klein T, Nabi M. Differentially Private Federated Learning: A Client Level Perspective[J]. NIPS, 2017) proposed a differentially private federated learning method, which involves gradient clipping and adding Gaussian noise to the client's update before aggregation. However, Geyer et al. used a fixed clipping threshold and did not investigate the impact of the gradient clipping operation itself on the model's convergence direction. Since the update magnitudes of different parameters vary significantly, forced uniform clipping can lead to severe distortion in the update direction and magnitude of high-magnitude parameters (which often contain important information), resulting in difficulty in model convergence or even divergence. Therefore, how to improve the convergence performance of the model on non-independent and identically distributed data through dynamic parameter partitioning and adaptive gradient constraints while ensuring differential privacy and security is a challenging problem. Summary of the Invention

[0005] The purpose of this invention is to propose a dynamic personalized federated learning method based on adaptive gradient constraints, which solves the problems of inflexible personalization strategies and convergence difficulties caused by differential privacy pruning in existing technologies, and improves the accuracy and convergence performance of the model while ensuring privacy and security.

[0006] The objective of this invention is achieved as follows: The method utilizes hierarchical Fisher information to quantify the information content of parameters and perform dynamic parameter partitioning, constructs an adaptive gradient constraint local training mechanism, applies different regularization constraints to individual parameters and shared parameters respectively, and finally combines differential privacy mechanism to complete the federated learning process.

[0007] The specific method is as follows: A dynamic personalized federated learning method based on adaptive gradient constraints includes the following steps: Step 1: Construct a federated learning system model. The system consists of one central server and M clients. Each client has a local private dataset. The central server is responsible for distributing global model parameters and aggregating updates from the clients. The clients and the server communicate via a wireless network. Step 2: Before each round of global training begins, the client evaluates the importance of the local model parameters, quantifies the information content of each layer parameter using hierarchical Fisher information, and generates a dynamic parameter partitioning mask based on the amount of information. Step 3: The client uses the generated dynamic parameters to partition the mask, and combines the local personalized parameters retained from the previous round with the latest globally shared parameters received from the server to perform a mixed initialization of the local model in the current round; Step 4: The client constructs a local training task with adaptive gradient constraints, divides the model parameters into two parts: personalized and shared, establishes optimization objective functions with different regularization terms for each part, and solves to obtain the updated local model parameters. Step 5: The client applies differential privacy protection mechanism to the locally updated model parameters, calculates the parameter update amount, performs adaptive gradient clipping on the update amount, adds Gaussian noise, and finally uploads the processed update amount to the central server. Step 6: The central server receives the updates uploaded by all clients participating in the training, updates the global model parameters using the aggregation algorithm, and distributes the new global model parameters to each client; it then determines whether the maximum number of training rounds has been reached. If it has, the process ends; otherwise, it proceeds to the next training round.

[0008] Furthermore, the federated learning system in step 1 includes A number of clients, represented as a set. Each client The local dataset we have is ,in This represents the number of data samples. The system's global objective is to minimize the weighted average loss function across all clients:

[0009] in It is a client The local empirical loss function is defined as follows: This is the cross-entropy loss function.

[0010] Furthermore, the method for calculating the parameter information in step 2 is based on the Fisher Information Matrix. For each parameter in the model... Its empirical Fisher information value The calculation formula is Considering the significant differences in gradient magnitudes between different layers (such as convolutional layers and fully connected layers) in deep neural networks, in order to eliminate inter-layer bias, the gradient magnitude of the first layer is... The parameters of each layer are subjected to hierarchical normalization to obtain normalized Fisher values. :

[0011] in They are the first The maximum and minimum values ​​of the layer parameter Fisher's value, To prevent constants with a denominator of zero.

[0012] Furthermore, in step 2, two binary masks are generated based on the normalized Fisher value. and Set an importance threshold. (For example, a value of 0.5). Mask For parameters with high information content, when hour, Otherwise, it is 0; mask For parameters with low information content, when hour, Otherwise, it is 0.

[0013] Furthermore, the hybrid initialization formula for the local model in step 3 is:

[0014] in It represents the Hadamah accumulation. It is the first The local model at the start of the training round. It is the model trained locally in the previous round (including local personalized features). This is a global model distributed by the server. Through this formula, parameters with high Fisher values ​​retain local knowledge, while parameters with low Fisher values ​​receive global knowledge.

[0015] Furthermore, in step 4, in order to facilitate subsequent differential privacy pruning, local training is decomposed into two sub-problems.

[0016] For the mask Corresponding personalized parameters Construct the first loss function:

[0017] in This is the regularization coefficient, which constrains the personalized parameters to not deviate from the local historical state.

[0018] For the mask corresponding shared parameters Construct the second loss function:

[0019] in This is a preset gradient clipping threshold. This constraint forces the norm of the shared parameter update to actively approximate the threshold. This minimizes directional distortion caused by forced shearing.

[0020] Furthermore, the specific process of differential privacy processing in step 5 is as follows: First, calculate the parameter update amount:

[0021] Then proceed Norm clipping yields Due to the adaptive constraints in step 4, the clipping ratio here is close to 1. Finally, Gaussian noise is added. To obtain the final number of updates uploaded. .

[0022] Furthermore, in step 6, the central server uses a federated averaging algorithm (FedAvg) to aggregate the update quantity, and the global parameter update formula is:

[0023] Repeat the above steps until the convergence condition is met.

[0024] The positive effects of this invention are: This invention achieves dynamic and personalized parameter partitioning through hierarchical Fisher information, adaptively preserving highly informative parameters rich in local features while avoiding interference from global noise, thus improving the model's adaptability to non-independent and identically distributed data. Simultaneously, the adaptive gradient constraint mechanism proposed in this invention applies differentiated regularization strategies to different types of parameters, particularly encouraging the updates of shared parameters to approach the pruning boundary. This effectively mitigates the information loss and gradient distortion caused by gradient pruning operations in differential privacy, significantly improving the model's convergence speed and final accuracy under differential privacy protection. Attached Figure Description

[0025] Figure 1 This is an overall flowchart of a dynamic personalized federated learning method based on adaptive gradient constraints.

[0026] Figure 2 This is a schematic diagram illustrating the principle of dynamic parameter partitioning and mask generation.

[0027] Figure 3 This is a logical diagram of adaptive gradient constraint local training.

[0028] Figure 4 This is a comparison chart of the convergence performance of the method of this invention and existing mainstream federated learning methods (FedAvg, FedPer, etc.) on non-independent and identically distributed data. Detailed Implementation

[0029] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0030] like Figure 1As shown, this invention first utilizes hierarchical Fisher information to quantify the parameter information content and perform dynamic parameter partitioning, constructing an adaptive gradient-constrained local training mechanism. Different regularization constraints are applied to individual parameters and shared parameters respectively. Finally, a differential privacy mechanism is combined to complete the federated learning process, specifically including the following steps: Step 1: Construct a federated learning system model. The system consists of one central server and M clients. Each client has a local private dataset. The central server is responsible for distributing global model parameters and aggregating updates from the clients. The clients and the server communicate via a wireless network. Step 2: Before each round of global training begins, such as... Figure 2 As shown, the client evaluates the importance of local model parameters, uses hierarchical Fisher information to quantify the information content of each layer parameter, and generates a dynamic parameter partitioning mask based on the amount of information. Step 3: The client uses the generated dynamic parameters to partition the mask, and combines the local personalized parameters retained from the previous round with the latest globally shared parameters received from the server to perform a mixed initialization of the local model in the current round; Step 4: The client constructs a local training task with adaptive gradient constraints, such as... Figure 3 As shown, the model parameters are divided into two parts: personalized and shared. Optimization objective functions containing different regularization terms are established for each part, and the updated local model parameters are obtained by solving these functions. Step 5: The client applies differential privacy protection mechanism to the locally updated model parameters, calculates the parameter update amount, performs adaptive gradient clipping on the update amount, adds Gaussian noise, and finally uploads the processed update amount to the central server. Step 6: The central server receives the updates uploaded by all clients participating in the training, updates the global model parameters using the aggregation algorithm, and distributes the new global model parameters to each client; it then determines whether the maximum number of training rounds has been reached. If it has, the process ends; otherwise, it proceeds to the next training round.

[0031] Furthermore, the federated learning system in step 1 includes A number of clients, represented as a set. Each client The local dataset we have is ,in This represents the number of data samples. The system's global objective is to minimize the weighted average loss function across all clients:

[0032] in It is a client The local empirical loss function is defined as follows: This is the cross-entropy loss function.

[0033] Furthermore, the method for calculating the parameter information in step 2 is based on the Fisher Information Matrix. For each parameter in the model... Its empirical Fisher information value The calculation formula is Considering the significant differences in gradient magnitudes between different layers (such as convolutional layers and fully connected layers) in deep neural networks, in order to eliminate inter-layer bias, the gradient magnitude of the first layer is... The parameters of each layer are subjected to hierarchical normalization to obtain normalized Fisher values. :

[0034] in They are the first The maximum and minimum values ​​of the layer parameter Fisher's value, To prevent constants with a denominator of zero.

[0035] Furthermore, in step 2, two binary masks are generated based on the normalized Fisher value. and Set an importance threshold. (For example, a value of 0.5). Mask For parameters with high information content, when hour, Otherwise, it is 0; mask For parameters with low information content, when hour, Otherwise, it is 0.

[0036] Furthermore, the hybrid initialization formula for the local model in step 3 is:

[0037] in It represents the Hadamah accumulation. It is the first The local model at the start of the training round. It is the model trained locally in the previous round (including local personalized features). This is a global model distributed by the server. Through this formula, parameters with high Fisher values ​​retain local knowledge, while parameters with low Fisher values ​​receive global knowledge.

[0038] Furthermore, in step 4, in order to facilitate subsequent differential privacy pruning, local training is decomposed into two sub-problems.

[0039] For the mask Corresponding personalized parameters Construct the first loss function:

[0040] in This is the regularization coefficient, which constrains the personalized parameters to not deviate from the local historical state.

[0041] For the mask corresponding shared parameters Construct the second loss function:

[0042] in This is a preset gradient clipping threshold. This constraint forces the norm of the shared parameter update to actively approximate the threshold. This minimizes directional distortion caused by forced shearing.

[0043] Furthermore, the specific process of differential privacy processing in step 5 is as follows: First, calculate the parameter update amount:

[0044] Then proceed Norm clipping yields Due to the adaptive constraints in step 4, the clipping ratio here is close to 1. Finally, Gaussian noise is added. To obtain the final number of updates uploaded. .

[0045] Furthermore, in step 6, the central server uses a federated averaging algorithm (FedAvg) to aggregate the update quantity, and the global parameter update formula is:

[0046] Repeat the above steps until the convergence condition is met.

[0047] Figure 4 This is a comparison graph of the accuracy convergence of the present invention and other methods on non-independent and identically distributed data, where the solid line curve marked with a square represents the present invention. From Figure 4 As can be seen from the above, the method of the present invention can achieve higher model accuracy and faster convergence speed than other methods, especially in the early and middle stages of training. This shows that the dynamic personalized federated learning method based on adaptive gradient constraints can effectively alleviate the model performance degradation caused by non-independent and identically distributed data, and the method is feasible.

Claims

1. A dynamic personalized federated learning method based on adaptive gradient constraints, characterized in that, Includes the following steps: Step 1: Construct a federated learning system model, which consists of one central server and M clients. It represents a collection of clients, each with its own local private dataset, while the central server is responsible for distributing global model parameters and aggregating updates from the clients; Step 2: At the beginning of each round of global training, the client uses hierarchical Fisher information to quantify the information content of local model parameters, and generates a dynamic parameter partitioning mask based on the information content to divide the model parameters into personalized parameters and shared parameters. Step 3: The client uses the generated dynamic parameters to divide the mask, and combines it with the local personalized parameters from the previous round and the globally shared parameters received from the server to initialize the local model for the current round. Step 4: The client builds a local training model with adaptive gradient constraints, and applies different regularization constraint strategies to the personalized parameters and shared parameters for local training and updates to obtain the updated local model parameters. Step 5: The client applies a differential privacy protection mechanism to the locally updated model parameters, prunes the update amount and adds Gaussian noise, and then uploads the processed update amount to the central server. Step 6: The central server receives the updates uploaded by all participating clients, updates the global model parameters using the aggregation algorithm, and distributes the new global model parameters to each client; it then determines whether the maximum number of training rounds has been reached. If it has, the process ends and the final personalized federated learning model is obtained; otherwise, it proceeds to the next round of training.

2. The dynamic personalized federated learning method based on adaptive gradient constraints as described in claim 1, characterized in that, The specific method for quantifying parameter information using hierarchical Fisher information in step 2 is as follows: Calculate model parameters. In local dataset The squared gradient of the log-likelihood function on the given surface yields the empirical Fisher value vector. , of which The Fisher values ​​for each parameter are expressed as follows: Furthermore, the parameters of each layer are subjected to hierarchical normalization processing to calculate the first... Layer stratification Fisher value : ,in, Indicates parameters In the The relative importance within a layer, with values ​​ranging from [0,1].

3. The dynamic personalized federated learning method based on adaptive gradient constraints as described in claim 1, characterized in that, The method for generating the dynamic parameter partitioning mask in step 2 is as follows: setting a threshold. Two binary masks are generated based on the layered Fisher values ​​of each parameter. and For the mask If the parameter corresponds to the Fisher value but ,otherwise For the mask If the corresponding Fisher value of the parameter ,but ,otherwise ,in, Used to identify highly informative personalized parameters that need to be retained. Used to identify low-information shared parameters that need to be updated from the global model.

4. The dynamic personalized federated learning method based on adaptive gradient constraints as described in claim 1, characterized in that, The specific formula for local model initialization in step 3 is as follows: ,in, For the client In the The initial local parameters of the wheel, Representing Hadamaji, These are the local parameters from the previous round. This step involves downloading global parameters from the server for the current round; by doing so, information-rich high-Fischer value parameters are retained as personalized parts, and low-Fischer value parameters are updated using global parameters.

5. The dynamic personalized federated learning method based on adaptive gradient constraints as described in claim 1, characterized in that, The regularization constraint strategy applied to the personalized parameters in step 4 is as follows: Construct a first loss function that includes cross-entropy loss and parameter update constraints. : ,in Represents personalized parameters, For hyperparameters; minimize Update the personalization parameters to keep them close to the previous local state in order to preserve unique local knowledge.

6. The dynamic personalized federated learning method based on adaptive gradient constraints according to claim 1, characterized in that, The regularization constraint strategy applied to the shared parameters in step 4 is as follows: Construct a second loss function that includes cross-entropy loss and bounded regularization term. : ,in Represents shared parameters. For hyperparameters, For gradient clipping boundaries; by minimizing Update the shared parameters to adjust their update amount. Norm Approaches Clipping Boundary This reduces information loss caused by subsequent differential privacy cropping operations.

7. The dynamic personalized federated learning method based on adaptive gradient constraints as described in claim 1, characterized in that, The differential privacy protection mechanism in step 5 specifically includes: calculating the local update amount. Perform a pruning operation on the updated data, with a pruning factor of 1. Add Gaussian noise to the clipped update amount. to satisfy - Differential privacy requirements.