Group personalized federal learning method based on Moire envelope
By introducing a two-layer parallel optimization mechanism of Moro envelope into federated learning, user devices are divided into edge groups, which solves the performance degradation problem of traditional federated learning under heterogeneous device data and improves model generalization and robustness in high device computing power scenarios.
Patent Information
- Application Number
- CN202411558115.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-11-04
AI Technical Summary
Traditional federated learning suffers from performance degradation when dealing with data from heterogeneous devices, and is particularly difficult to promote effectively in mobile network edge environments. Individual-level personalized federated learning methods require high computing power and have limited applicability.
A population-based personalized federated learning method based on Moro envelope is adopted. By establishing a two-layer parallel optimization mechanism, user devices are divided into edge groups. The Moro envelope is used to improve the FL optimization problem between and within the edge groups, so as to realize the collaborative training of personalized models and the updating of global models.
It improves the model's generalization ability and convergence performance, reduces the impact of changes in device availability, and is suitable for non-independent and identically distributed datasets in high-device computing scenarios, thus enhancing the model's performance and robustness.
Smart Images

Figure CN119277423A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of wireless communications and relates to a group personalized federated learning method based on Morrow envelope. Background Art
[0002] Federated learning (FL) is an emerging distributed machine learning paradigm that has attracted widespread attention from industry and academia because it can train a suitable global model for all participating user devices while protecting user data privacy. However, traditional FL faces many challenges. For example, when faced with a large amount of heterogeneous device data, FL performance will be greatly reduced. This problem is particularly prominent when FL is applied to the edge of mobile networks, resulting in the global model trained in the end not being able to be well generalized to each user device.
[0003] Data heterogeneity stems from the differences in attributes, preferences, and data collection modes of user devices. In order to cope with the challenges that data heterogeneity brings to federated learning, personalized federated learning (PFL) was proposed. Its core is to develop a personalized solution for each participating user device. Compared with traditional FL, PFL pays more attention to the data differences between different user devices, thereby improving model performance as much as possible. Currently, there are many PFLs that can effectively cope with the challenges of data heterogeneity, but most of their designs only stay at the individual level. The proposed group personalized federated learning (GPFL) methods, such as synchronous group personalized federated learning with attention message passing mechanism (AMP-GPFL), have low requirements on the computing power of user devices and are relatively limited in scope of application. Summary of the invention
[0004] In view of this, the object of the present invention is to provide a group personalized federated learning method based on Morrow envelope.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A group personalized federated learning method based on Moreau envelope, the method comprising the following steps:
[0007] S1: Establish an edge network system consisting of several user nodes, several sub-servers and an edge server, wherein a sub-server and the user nodes connected to it constitute an edge group;
[0008] S2: Establish a personalized federated learning model with decoupled dual-layer parallel optimization, including the optimization problem between edge groups based on Morrow envelope improvement, and the FL optimization problem within an edge group;
[0009] S3: The user group and the associated sub-server collaborate to train and update the personalized model, and then update the corresponding personalized group model with the obtained personalized model;
[0010] S4: The edge server collects the personalized group models from the sub-servers and updates the global model in an aggregated manner, and then returns it to the corresponding sub-server;
[0011] S5: Repeat S3 and S4. After several iterations, the convergence condition will be reached.
[0012] Further, the S1 specifically includes the following contents:
[0013] Establish an edge network system consisting of N user nodes, M sub-servers and an edge server; Represents a collection of subservers, Represents a collection of user nodes; the sub-server is connected to the edge server through a wired backhaul link, and each sub-server serves a group of user nodes that do not interfere with each other; each sub-server The set of user nodes it serves Form an edge group m, where The sub-server and the user node communicate through a wireless channel. During the communication process, the user device may lose connection with the sub-server due to insufficient power or unstable network connection. The user device is not always available for model training. m,n ∈{0,1} represents the availability status of user device n in group m, X m,n =1 means that user device n can participate in model training, X m,n =0 means that user device n cannot participate in model training; define the devices in group m The probability of participating in model training is User devices in group m The dataset used is represented as Thus the total data set of group m is expressed as And the data set of each user device in group m The distribution between them is non-IID.
[0014] Further, the S2 specifically includes the following steps:
[0015] Establish the FL optimization problem P1 for edge groups:
[0016] P1:
[0017] Among them, w is defined as the global model, w *represents the optimal solution of the optimization problem P1; F m (w) is related to the Morrow envelope and is defined as the following optimization problem P2:
[0018] P2:
[0019] Among them, u m is defined as the personalized model for group m; λ is a regularization parameter used to control u m The difference between w and f m (u m ) represents the training loss of all users in group m The sum of n (u m ) represents the personalized model u m On user device Local dataset The loss function on the y-axis; in the two-layer parallel optimization process represented by P1 and P2, problem P1 is to solve the outer optimization problem of the global model w, and problem P2 is to solve the personalized model u. m The inner optimization problem of the two optimization problems is decoupled from each other; define the personalized model u m The optimal solution is The local optimal solution of problem P1 is in Furthermore, the local optimal solution Calculated by the following formula:
[0020]
[0021] The above solution is the local optimal solution The calculation process adopts the gradient descent method, where α is the gradient descent step size.
[0022] Further, the S3 specifically includes the following steps:
[0023] S31: The sub-server sends the latest group model to all corresponding user nodes, the content is as follows:
[0024] use represents the global iteration index, where is the index set of T global iterations; e∈E is used to represent the index of group iteration, where is the index set of E group iterations; the group model of group m after the e-th group iteration of the t-th global iteration is expressed as
[0025] Before each global iteration starts the group iteration, the group model Initialized to w t-1 ;
[0026] Subserver m will send the latest group model Broadcast to all participants in group m User node;
[0027] S32: The user group and the associated sub-server collaborate to train a personalized model, the content of which is as follows:
[0028] User device n in group m calculates the local user model by performing K steps of stochastic gradient descent (user device n is based on the local dataset The model is updated by the following formula)
[0029]
[0030] in, η t represents the step length, f n (·) represents the loss function of the user device;
[0031] S33: The sub-server aggregates the models uploaded by the available devices, updates the obtained personalized model and updates the group model, the content of which is as follows:
[0032] 1) Sub-server m aggregates all models of user devices in group m that can participate in training To generate a personalized model:
[0033]
[0034] 2) According to the above local optimal solution The calculation process of the group model in the e-th group iteration is as follows:
[0035]
[0036] 3) After E group iterations, the group model update task is completed and a personalized model is obtained and group models
[0037] Further, the S4 specifically includes the following steps:
[0038] S41: The edge server collects the group model, the content is as follows:
[0039] At the tth iteration of the model, the edge server receives data from all child servers. Get the group model
[0040] S42: The edge server aggregates the collected group models and updates the global model, the content of which is as follows:
[0041] The edge server aggregates the group model and updates the global model as follows:
[0042]
[0043] Among them, the constant β>0 is used to control the group model aggregation to the global model w t degree of impact.
[0044] Further, the S5 specifically includes the following steps:
[0045] Repeat S3 and S4. Each time a global iteration is performed, the global iteration index t is updated to t+1 until the specified number of global iterations T is reached. Then the iteration is stopped and the solution w of problem P1 is obtained. T and the solution to problem P2
[0046] The beneficial effects of the present invention are:
[0047] (1) The present invention breaks the situation that the existing personalized federated learning method is only for individuals, and proposes a group personalized federated learning method based on Morrow envelope. The user device nodes connected to the same edge sub-server are grouped together, and the personalized group model is trained between the groups through a two-layer parallel optimization mechanism, which includes an inner optimization problem based on Morrow envelope and an optimization problem based on federated average mechanism; the group model is trained within the group through the federated average mechanism;
[0048] (2) The present invention promotes the edge sub-server and the user device nodes connected to it to collaborate in training the personalized group model through a two-layer parallel optimization mechanism between groups, thereby improving the generalization ability of the model. At the same time, when facing user devices with higher computing power, the final model convergence effect of the present invention is better;
[0049] (3) The present invention trains the group model through a federated averaging mechanism within the group, which can reduce the impact of changes in device availability on training.
[0050] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0052] Figure 1A flowchart of a group personalized federated learning method based on Moreau envelope;
[0053] Figure 2 This is a system architecture diagram of a group personalized federated learning method based on Moreau envelope;
[0054] Figure 3 The average test accuracy of the method proposed in the present invention and the comparative method under different device availability when the number of devices is fixed, the device groups are divided, and the device data is non-independent and identically distributed (non-IID). DETAILED DESCRIPTION
[0055] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0056] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0057] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0058] The present invention provides a group personalized federated learning method based on Morrow envelope, which is suitable for group non-IID data sets in high-device computing scenarios; the process of the method is as follows Figure 1 As shown, the following steps are included:
[0059] S1, establish Figure 2The wireless edge network system model and edge device availability model shown are as follows:
[0060] Establish an edge network system consisting of N user nodes, M sub-servers and an edge server. Represents a collection of subservers, Represents a collection of user nodes. In the system model proposed by the present invention, the sub-server is connected to the edge server through a wired backhaul link, and each sub-server serves a group of user nodes that do not interfere with each other. The set of user nodes it serves Form an edge group m, where The sub-server and the user node communicate through a wireless channel. During the communication process, the user device may lose connection with the sub-server due to insufficient power, unstable network connection, etc., so the user device is not always available for model training. m,n ∈{0,1} represents the availability status of user device n in group m. Specifically, X m,n =1 means that user device n can participate in model training, X m,n =0 means that user device n cannot participate in model training; define the devices in group m The probability of participating in model training is User devices in group m The dataset used is represented as Thus the total data set of group m can be expressed as And the data set of each user device in group m The distribution between them is non-IID;
[0061] S2, establishes a personalized federated learning optimization problem with two-layer parallel optimization, including the optimization problem between edge groups based on the improvement of Morrow envelope, and the FL optimization problem within an edge group. The specific contents are as follows:
[0062] 1) Establish the FL optimization problem P1 for edge groups:
[0063] P1:
[0064] Among them, w is defined as the global model, w * represents the optimal solution of the optimization problem P1;
[0065] 2) F m (w) is related to the Morrow envelope and can be defined as the following optimization problem P2:
[0066] P2:
[0067] Among them, u m is defined as the personalized model for group m; λ is a regularization parameter used to control u m The difference between w and f m (u m ) represents the training loss of all users in group m The sum of n (u m ) represents the personalized model u m On user device Local dataset The loss function on the y-axis; in the two-layer parallel optimization process represented by P1 and P2, problem P1 is to solve the outer optimization problem of the global model w, and problem P2 is to solve the personalized model u. m The inner optimization problem of the two optimization problems is decoupled from each other; define the personalized model u m The optimal solution is The local optimal solution of problem P1 is in Furthermore, the local optimal solution It can be calculated by the following formula:
[0068]
[0069] The above solution is the local optimal solution The calculation process adopts the gradient descent method, where α is the gradient descent step size.
[0070] S3, specifically includes the following sub-steps:
[0071] In sub-S31, the sub-server collects and sends the latest group model to the user node, and defines the model update parameters, the specific contents are as follows:
[0072] use represents the global iteration index, where is the index set of T global iterations; e∈E is used to represent the index of group iteration, where is the index set of E group iterations; the group model of group m after the e-th group iteration of the t-th global iteration is expressed as
[0073] Before each global iteration starts the group iteration, the group model Initialized to w t-1 ;
[0074] Subserver m will send the latest group model Broadcast to all participants in group m User node;
[0075] Sub-S32, the user device and the associated sub-server collaborate to train a personalized model, the specific contents are as follows:
[0076] User device n in group m calculates the local user model by performing K steps of stochastic gradient descent (user device n is based on the local dataset The model is updated by the following formula)
[0077]
[0078] in, η t represents the step length, f n (·) represents the loss function of the user device;
[0079] Sub-S33, the sub-server aggregates the personalized models uploaded by the user devices and updates the group model. The specific contents are as follows:
[0080] S33: The sub-server aggregates the models uploaded by the available devices, updates the obtained personalized model and updates the group model, the content of which is as follows:
[0081] Sub-server m aggregates all models of user devices in group m that can participate in training To generate a personalized model:
[0082]
[0083] According to the above local optimal solution The calculation process of the group model in the e-th group iteration is as follows:
[0084]
[0085] After E group iterations, the group model update task is completed and a personalized model is obtained. and group models
[0086] S4, specifically includes the following sub-steps:
[0087] Sub-S41, the edge server collects the group model from the sub-server, the specific content is as follows:
[0088] At the tth iteration of the model, the edge server receives data from all child servers. Get the group model
[0089] Sub-S42, the edge server aggregates the group model and updates the global model, the specific contents are as follows:
[0090] The edge server aggregates the group model and updates the global model as follows:
[0091]
[0092] Among them, the constant β>0 is used to control the group model aggregation to the global model w t degree of impact.
[0093] S5 can be regarded as judging whether the model has reached the convergence condition. The specific contents are as follows:
[0094] Repeat S3 and S4. Each time a global iteration is performed, the global iteration index t is updated to t+1 until the specified number of global iterations T is reached. Then the iteration is stopped and the solution w of problem P1 is obtained. T and the solution to problem P2
[0095] Furthermore, the present invention conducts simulation experiments in the constructed wireless edge network system model through the proposed solution, and the specific results are as follows: Figure 3 As shown;
[0096] Furthermore, if Figure 3 As shown, the present invention uses the CIFAR-10 dataset to give the relationship between the average test accuracy of the federated learning system and the number of model iterations under different training schemes and different user available probabilities. Among them, the individual personalized federated learning scheme is a scheme based on the Morrow envelope for individual-level data heterogeneity, the comparative group personalized federated learning scheme is a scheme based on the attention message transmission mechanism for group-level data heterogeneity, and the traditional federated average scheme is a scheme based on the traditional federated average for individual-level data heterogeneity;
[0097] Figure 3 It shows that when the number of devices is fixed, the user device groups are divided, the group data is non-independent and identically distributed (non-IID), and the device computing power is high, the group personalized federated learning scheme proposed in the present invention is compared with comparison schemes 1, 2, and 3 under different device availability probabilities. Among them, comparison scheme 1 is a group personalized federated learning scheme based on the attention message passing mechanism, comparison scheme 2 is an individual personalized federated learning scheme based on the Morrow envelope, and comparison scheme 3 is traditional federated learning. Specifically, from Figure 3 The following content can be obtained:
[0098] 1) The performance of the individual personalized federated learning scheme is significantly better than that of the traditional federated learning scheme, which proves the effectiveness of the personalized federated learning scheme when the data is non-IID distributed and can alleviate the shortcomings of the traditional federated learning.
[0099] 2) Compared with the personalized federated learning scheme at the individual level, the personalized federated learning scheme at the group level has better performance when the group data distribution is non-IID, which proves the superiority of the personalized federated learning scheme at the group level;
[0100] 3) The performance of the group personalized federated learning scheme based on Morrow envelope proposed in the present invention is further better than the group personalized federated learning scheme based on attention message passing mechanism, which proves that the scheme proposed in the present invention has more obvious advantages in scenarios with higher device computing power requirements;
[0101] 4) For individual personalized federated learning schemes, the device availability probability ρ m,n When the performance is reduced, the performance is greatly reduced, but the solution proposed by the present invention is hardly affected by ρ m,n The impact of the changes proves the robustness of the proposed scheme when some devices are unavailable;
[0102] comprehensive Figure 3 Analysis shows that the solution proposed in the present invention can effectively improve the model performance in realistic wireless edge network scenarios where the data distribution at the group level is non-IID and the device computing power requirements are high.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A group personalized federated learning method based on Moreau envelope, characterized by: The method comprises the following steps: S1: Establish an edge network system consisting of several user nodes, several sub-servers and an edge server, wherein a sub-server and the user nodes connected to it constitute an edge group; S2: Establish a personalized federated learning model with decoupled dual-layer parallel optimization, including the optimization problem between edge groups based on Morrow envelope improvement, and the FL optimization problem within an edge group; S3: The user group and the associated sub-server collaborate to train and update the personalized model, and then update the corresponding personalized group model with the obtained personalized model; S4: The edge server collects the personalized group models from the sub-servers and updates the global model in an aggregated manner, and then returns it to the corresponding sub-server; S5: Repeat S3 and S4. After several iterations, the convergence condition will be reached.
2. The group personalized federated learning method based on Morrow envelope according to claim 1, characterized in that: The S1 specifically includes the following contents: Establish an edge network system consisting of N user nodes, M sub-servers and an edge server; Represents a collection of subservers, Represents a collection of user nodes; the sub-server is connected to the edge server through a wired backhaul link, and each sub-server serves a group of user nodes that do not interfere with each other; each sub-server The set of user nodes it serves Form an edge group m, where The sub-server and the user node communicate through a wireless channel. During the communication process, the user device may lose connection with the sub-server due to insufficient power or unstable network connection. The user device is not always available for model training. m,n ∈{0,1} represents the availability status of user device n in group m, X m,n =1 means that user device n can participate in model training, X m,n =0 means that user device n cannot participate in model training; define the devices in group m The probability of participating in model training is User devices in group m The dataset used is represented as Thus the total data set of group m is expressed as And the data set of each user device in group m The distribution between them is non-IID.
3. The group personalized federated learning method based on Morrow envelope according to claim 2, characterized in that: The S2 specifically includes the following steps: Establish the FL optimization problem P1 for edge groups: P1: Among them, w is defined as the global model, w * represents the optimal solution of the optimization problem P1; F m (w) is related to the Morrow envelope and is defined as the following optimization problem P2: P2: Among them, u m is defined as the personalized model for group m; λ is a regularization parameter used to control u m The difference between w and f m (u m ) represents the training loss of all users in group m The sum of n (u m ) represents the personalized model u m On user device Local dataset The loss function on the y-axis; in the two-layer parallel optimization process represented by P1 and P2, problem P1 is to solve the outer optimization problem of the global model w, and problem P2 is to solve the personalized model u. m The inner optimization problem of the two optimization problems is decoupled from each other; define the personalized model u m The optimal solution is The local optimal solution of problem P1 is in Furthermore, the local optimal solution Calculated by the following formula: The above solution is the local optimal solution The calculation process adopts the gradient descent method, where α is the gradient descent step size.
4. The group personalized federated learning method based on Morrow envelope according to claim 3 is characterized by: The S3 specifically includes the following steps: S31: The sub-server sends the latest group model to all corresponding user nodes, the content is as follows: use represents the global iteration index, where is the index set of T global iterations; e∈E is used to represent the index of group iteration, where is the index set of E group iterations; the group model of group m after the e-th group iteration of the t-th global iteration is expressed as Before each global iteration starts the group iteration, the group model Initialized to w t-1 ; Subserver m will send the latest group model Broadcast to all participants in group m User node; S32: The user group and the associated sub-server collaborate to train a personalized model, the content of which is as follows: User device n in group m calculates the local user model by performing K steps of stochastic gradient descent (user device n is based on the local dataset The model is updated by the following formula) in, η t represents the step length, f n (·) represents the loss function of the user equipment; S33: The sub-server aggregates the models uploaded by the available devices, updates the obtained personalized model and updates the group model, the content of which is as follows: 1) Sub-server m aggregates all models of user devices in group m that can participate in training To generate a personalized model: 2) According to the above local optimal solution The calculation process of the group model in the e-th group iteration is as follows: 3) After E group iterations, the group model update task is completed and a personalized model is obtained and group models 5. The group personalized federated learning method based on Morrow envelope according to claim 4 is characterized by: The S4 specifically comprises the following steps: S41: The edge server collects the group model, the content is as follows: At the tth iteration of the model, the edge server receives data from all child servers. Get the group model S42: The edge server aggregates the collected group models and updates the global model, the content of which is as follows: The edge server aggregates the group model and updates the global model as follows: Among them, the constant β>0 is used to control the group model aggregation to the global model w t degree of impact.
6. The group personalized federated learning method based on Morrow envelope according to claim 5, characterized in that: The S5 specifically includes the following steps: Repeat S3 and S4. Each time a global iteration is performed, the global iteration index t is updated to t+1 until the specified number of global iterations T is reached. Then the iteration is stopped and the solution w of problem P1 is obtained. T and the solution to problem P2
Citation Information
Patent Citations
Federal distillation-based federal learning model training method and system, and medium
CN114154643A
Method for realizing personalized model under hierarchical federated learning framework
CN115345320A
Federal learning aggregation optimization system and method for power data sharing
CN115358487A
Group personalized federal learning method
CN117313834A
Federal learning and data processing method for complementing missing client sampling information
CN117350398A