Hierarchical federated learning model optimization method and device based on Pareto optimality
Through the hierarchical federated learning model optimization method based on Pareto optimality, the Pareto frontier is solved through the maximum budget of the cloud server, the Pareto fairness solution is found, and the target edge server and mobile device set are determined. The problem of low global model quality caused by inconsistent mobile device training quality is solved, and high-quality aggregation of the global model and maximization of social welfare are achieved.
Patent Information
- Application Number
- CN202311235492.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2043-09-22
AI Technical Summary
In existing technologies, the quality of local models trained on each mobile device varies, resulting in the inability to effectively improve the quality of the global model, and the Nash equilibrium of mobile customers' decision-making problems cannot maximize social welfare.
A hierarchical federated learning model optimization method based on Pareto optimality is adopted. The Pareto frontier is solved through the maximum budget of the cloud server, the Pareto fairness solution is found, the target edge server set and the target mobile device set are determined, and the hierarchical federated learning model training is carried out to incentivize each participant to maximize utility.
Under the maximum budget, each participant is motivated to maximize the utility of each participant, and a high-quality global model is obtained through aggregation, which improves the social welfare of the model.
Smart Images

Figure CN117273121B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data analysis technology, and in particular to a hierarchical federated learning model optimization method and device based on Pareto optimality. Background Art
[0002] A game-based incentive mechanism for a federated learning platform is currently being developed for mobile big data analysis. The platform first publishes tasks and distributes corresponding rewards. Edge servers then incentivize mobile devices to participate in model training. To maximize its own utility, each mobile client determines its level of participation by considering its rewards and energy consumption, specifically the size of its training dataset. The decision-making problem for mobile clients is formulated as a non-cooperative game to achieve a Nash equilibrium.
[0003] In real-world applications, the amount and quality of data held by each mobile device varies. Consequently, the quality of the local models obtained by each mobile device after participating in model training also varies, effectively failing to improve the overall model quality. The Nash equilibrium reached in a mobile customer's decision-making problem is only an equilibrium state and does not maximize social welfare. Summary of the Invention
[0004] The present invention provides a hierarchical federated learning model optimization method and device based on Pareto optimality, which is used to solve the defect in the existing technology that the quality of local models trained by each mobile device is different, resulting in the inability to effectively improve the quality of the global model, maximize the utility of each participant, and aggregate to obtain a high-quality global model.
[0005] The present invention provides a hierarchical federated learning model optimization method based on Pareto optimality, comprising:
[0006] Based on the maximum budget of the cloud server, solving the Pareto frontier that maximizes the cumulative value of the utility function values of all participants; the participants include the cloud server, edge server and mobile device;
[0007] Finding a Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is a Pareto-optimal solution that maximizes the utility function values of all participants;
[0008] Based on the Pareto fairness solution, a target edge server set and a target mobile device set are determined, and model training of hierarchical federated learning is performed based on the target edge server set and the target mobile device set.
[0009] According to a hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention, the method solves the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget of the cloud server, including:
[0010] Based on the maximum budget constraint, find the Pareto frontier that maximizes the cumulative value of the utility function of all participants;
[0011] The maximum budget constraint includes:
[0012] The sum of the budgets of all edge servers is less than or equal to the maximum budget of the cloud server;
[0013] The sum of the budgets of all mobile devices connected to any edge server is less than or equal to the budget of the any edge server;
[0014] Each mobile device is associated with at most one edge server.
[0015] According to a hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention, finding a Pareto-fair solution from the Pareto frontier specifically includes:
[0016] Based on the Pareto frontier, determining a target weight coefficient;
[0017] The Pareto-fair solution is determined according to the target weight coefficient.
[0018] According to a Pareto optimality-based hierarchical federated learning model optimization method provided by the present invention, determining the target weight coefficient includes:
[0019] Initializing a first weight coefficient, calculating utility function values of all participants corresponding to the first weight coefficient, and taking the minimum absolute value of the utility function values of all participants corresponding to the first weight coefficient as the first value and the second value;
[0020] updating the first weight coefficient based on the first weight coefficient, utility function values of all participants corresponding to the first weight coefficient, the second value, and the current number of iterations, and calculating an updated first value;
[0021] When the updated first value is greater than or equal to the second value, using the updated first value as the second value;
[0022] Repeat the process of calculating the updated first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value, until the change value of the updated first weight coefficient relative to the first weight coefficient before the update is less than a set threshold, and use the weight coefficient corresponding to the second value as the target weight coefficient.
[0023] According to a hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention, the first weight coefficient is updated according to the following formula:
[0024]
[0025] Where k t+1 is the first weight coefficient when the current iteration number is t+1, k t is the first weight coefficient when the current iteration number is t, I(·) is the indicator function, I(·)=1 when · is true, otherwise I(·)=0, is the utility function value of the i-th participant corresponding to the first weight coefficient when the current iteration number is t, is the set of all participants, is the second value when the current iteration number is t, α is the first coefficient of initialization, α∈(0,1), K t =min(K t-1 +1,K min ), where K 0 =1,K min is the second coefficient to be initialized.
[0026] According to a Pareto optimality-based hierarchical federated learning model optimization method provided by the present invention, the hierarchical federated learning model training is performed based on the target edge server set and the target mobile device set, including:
[0027] Any edge server in the target edge server set sends initial edge model parameters to a mobile device connected to the any edge server;
[0028] Any mobile device in the target mobile device set obtains local model parameters based on the initial edge model parameter training, and uploads the local model parameters to the edge server to which the any mobile device belongs;
[0029] Any edge server in the target edge server set performs edge model aggregation based on local model parameters sent by all mobile devices connected to the any edge server to obtain edge model parameters, and uploads the edge model parameters to the cloud server;
[0030] The cloud server performs global model aggregation based on the model parameters of all edge servers in the target edge server set.
[0031] The present invention also provides a hierarchical federated learning model optimization device based on Pareto optimality, comprising:
[0032] A frontier solving module is used to solve the Pareto frontier that maximizes the cumulative value of the utility function of all participants based on the maximum budget of the cloud server; the participants include the cloud server, edge server and mobile device;
[0033] a fair solution finding module, configured to find a Pareto fair solution from the Pareto frontier; the Pareto fair solution being a Pareto optimal solution in which the utility of all participants is maximized;
[0034] A model training module is used to determine a target edge server set and a target mobile device set based on the Pareto fairness solution, and perform model training of hierarchical federated learning based on the target edge server set and the target mobile device set.
[0035] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, it implements any of the above-described hierarchical federated learning model optimization methods based on Pareto optimality.
[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described hierarchical federated learning model optimization methods based on Pareto optimality.
[0037] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described Pareto optimality-based hierarchical federated learning model optimization methods.
[0038] The hierarchical federated learning model optimization method and device based on Pareto optimality provided by the present invention solves the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget of the cloud server, and then searches for a Pareto fair solution from the Pareto frontier that maximizes the utility function values of all participants. According to the Pareto fair solution, the target edge server set and the target mobile device set are determined and the hierarchical federated learning model training is performed, so that each participant can be incentivized at the same time under the maximum budget, the utility of each participant can be maximized, and a high-quality global model can be obtained by aggregation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 11 is a flow chart of a hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention;
[0041] Figure 2 Schematic diagram of the structure of the hierarchical federated learning model optimization device based on Pareto optimality provided by the present invention;
[0042] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0044] Figure 1 The flowchart of the hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention is as follows: Figure 1 As shown, the method includes the following steps:
[0045] Step 100: Based on the maximum budget of the cloud server, solve the Pareto front that maximizes the cumulative value of the utility function values of all participants; the participants include the cloud server, the edge server, and the mobile device.
[0046] Step 101: Find a Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is a Pareto-optimal solution that maximizes the utility function values of all participants.
[0047] Step 102: Based on the Pareto fairness solution, determine the target edge server set and the target mobile device set, and perform model training of hierarchical federated learning based on the target edge server set and the target mobile device set.
[0048] Specifically, the execution subject of the method provided by the present invention can be a system of a hierarchical federated learning model, which includes a cloud server Multiple edge servers and multiple mobile devices, the set of edge servers is The collection of mobile devices is Among them, mobile devices n j The datasets we have are in It is a mobile device j The size of the dataset you have.
[0049] It can be assumed that model training is defined in discrete time periods In the process of training the hierarchical federated learning model, the cloud server The initial global model parameter w needs to be 0 Sent to each edge server Get the initial edge model parameters Then each edge server m i The initial edge model parameters Sent to each mobile device of its choice Get the initial local model parameters in Is the cloud server in the tth iteration The set of edge servers selected, In the tth iteration, edge server m i The collection of selected mobile devices.
[0050] In hierarchical federated learning, the benefits of all participants include model quality, and the cost is under the maximum budget B. In order to obtain a high-quality global model while effectively controlling the cost, we can first solve the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget of the cloud server, that is, solve problem (1):
[0051]
[0052] Among them, for participants Define the utility function as: U(p i )=R(p i )-C(p i )where R(p i ) is the participant p i The benefit, C(p i ) is the participant p i In the design of the incentive mechanism, cloud servers, edge servers, and mobile devices are defined as participants.
[0053] Optionally, based on the maximum budget of the cloud server, solving the Pareto frontier that maximizes the cumulative value of the utility function values of all participants includes:
[0054] Based on the maximum budget constraint, find the Pareto frontier that maximizes the cumulative value of the utility function values of all participants.
[0055] Specifically, in hierarchical federated learning, in order to incentivize edge servers to contribute high-accuracy edge models, the cloud server, with a maximum budget B, can solve the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget constraint.
[0056] Among them, the maximum budget constraints include:
[0057] (1) The sum of the budgets of all edge servers is less than or equal to the maximum budget of the cloud server. In the tth iteration, the cloud server gives edge server m i Size The return, Indicates that the sum of the budgets of all edge servers cannot exceed the maximum budget of the cloud server.
[0058] (2) The sum of the budgets of all mobile devices connected to any edge server is less than or equal to the budget of any edge server. In order to encourage mobile devices to contribute high-quality local models, in the tth iteration, the edge server m i Give mobile devices n j Size The return, Represents the edge server m i The sum of rewards given to the mobile devices associated with it cannot exceed the edge server m i Budget.
[0059] (3) Each mobile device is associated with at most one edge server. Indicates that each device can be associated with at most one edge server. Indicates that edge server m in the tth iteration i The collection of selected mobile devices.
[0060] In the method provided by the present invention, in order to maximize social welfare, this problem is transformed into a multi-objective programming problem, thereby solving the Pareto front of this multi-objective problem. In order to maximize the utility of each participant, a Pareto-fair solution can be found in the Pareto front, thereby maximizing the minimum utility among all Pareto fronts, that is, solving problem (2) under the maximum budget constraint:
[0061]
[0062] Here we give the definitions of Pareto optimal solution and Pareto frontier, and use x to represent the solution of problem (2).
[0063] Definition 1: Pareto optimal solution. For the multi-objective optimization problem (2), there is no x such that for any U i (p i ) makes Ui (x)>U i (x*), then x* is called the Pareto optimal solution of the multi-objective optimization problem (2).
[0064] Definition 2. Pareto front. The set of all Pareto optimal solutions is called the Pareto front, which is:
[0065] In order to ensure the fairness of participants' returns, the present invention introduces a Pareto fairness solution to maximize the utility of the participant with the smallest utility.
[0066] Definition 3: Pareto Fair Solution. In the Pareto frontier, the Pareto optimal solution that maximizes the utility function value of all participants (which is also the Pareto optimal solution that maximizes the utility of the participant with the smallest utility) is called a Pareto Fair Solution, that is,
[0067]
[0068] Once the Pareto-fair solution is obtained, the participants selected are determined to maximize the utility function values of all participants. Therefore, the target edge server set and target mobile device set can be determined based on the Pareto-fair solution obtained during each iteration. The cloud server, the edge servers in the target edge server set, and the mobile devices in the target mobile device set are then used to complete the training iteration. Furthermore, the hierarchical federated learning model can select the participant that maximizes the utility function values of all participants during each training iteration, thereby completing the model training.
[0069] The hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention solves the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget of the cloud server, and then searches for a Pareto fair solution from the Pareto frontier that maximizes the utility function values of all participants. According to the Pareto fair solution, the target edge server set and the target mobile device set are determined and the hierarchical federated learning model training is performed, so that each participant can be incentivized at the same time under the maximum budget, the utility of each participant can be maximized, and a high-quality global model can be obtained by aggregation.
[0070] Optionally, find a Pareto-fair solution from the Pareto front, specifically including:
[0071] Based on the Pareto frontier, determine the target weight coefficient;
[0072] According to the target weight coefficient, the Pareto fair solution is determined.
[0073] Specifically, in order to find the Pareto optimal solution of the multi-objective optimization problem (2), the problem (2) can be transformed into the following linear weighted problem (3):
[0074] in,
[0075] The weight coefficient of problem (3) is defined as The solution to problem (3) obtained under the weight coefficient k is U(k). It can be understood that for different weight coefficients k, by solving problem (3), different Pareto optimal solutions can be obtained, and different participants can be determined at the same time. Therefore, by solving problem (3), the target weight coefficient that maximizes the utility function values of all participants can be determined, that is, the target weight coefficient that maximizes the utility function value of the participant with the smallest utility function value among the participants, thereby obtaining a Pareto fair solution.
[0076] Optionally, determining a target weight coefficient includes:
[0077] Initializing a first weight coefficient, calculating utility function values of all participants corresponding to the first weight coefficient, and taking the minimum absolute value of the utility function values of all participants corresponding to the first weight coefficient as the first value and the second value;
[0078] Based on the first weight coefficient, the utility function values of all participants corresponding to the first weight coefficient, the second value, and the current number of iterations, the first weight coefficient is updated, and the updated first value is calculated;
[0079] When the updated first value is greater than or equal to the second value, the updated first value is used as the second value;
[0080] Repeat the process of calculating and updating the first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value, until the change value of the updated first weight coefficient relative to the first weight coefficient before the update is less than the set threshold, and using the weight coefficient corresponding to the second value as the target weight coefficient.
[0081] Specifically, if it is necessary to solve the target weight coefficient that maximizes the utility function value of the participant with the smallest utility function value among the participants, the first weight coefficient can be initialized first, the utility function values of all participants corresponding to the first weight coefficient can be calculated, and then the absolute minimum value of the utility function values of all participants corresponding to the first weight coefficient can be used as the first value and the second value, wherein the first value is used to represent the absolute minimum value of the utility function values of all participants corresponding to the first weight coefficient, and the second value is used to represent the maximum value of all the first values currently calculated.
[0082] Then, the first weight coefficient can be updated based on the current first weight coefficient, the utility function values of all participants corresponding to the current first weight coefficient, the current second value and the current number of iterations, and the updated first value can be calculated.
[0083] Optionally, the first weight coefficient is updated according to the following formula:
[0084]
[0085] Where k t+1 is the first weight coefficient when the current iteration number is t+1, k t is the first weight coefficient when the current iteration number is t, I(·) is the indicator function, I(·) = 1 when · is true, otherwise I(·) = 0, is the utility function value of the i-th participant corresponding to the first weight coefficient when the current iteration number is t, is the set of all participants, is the second value when the current iteration number is t, α is the first coefficient of initialization, α∈(0,1), K t =min(K t-1 +1,K min ), where K 0 =1,K min is the second coefficient to be initialized.
[0086] When the updated first value is greater than or equal to the second value, it means that the first value corresponding to the updated first weight coefficient is greater than the first value corresponding to the first weight coefficient in any previous iteration number. Therefore, the updated first value is used as the second value.
[0087] Then, the process of calculating and updating the first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value is repeated.
[0088] A threshold can be set, and the above calculation process is repeated until the change value of the updated first weight coefficient relative to the first weight coefficient before the update is less than the set threshold, and the weight coefficient corresponding to the second value is used as the target weight coefficient.
[0089] Optionally, based on the target edge server set and the target mobile device set, model training for hierarchical federated learning is performed, including:
[0090] Any edge server in the target edge server set sends initial edge model parameters to a mobile device connected to any edge server;
[0091] Any mobile device in the target mobile device set obtains local model parameters based on the initial edge model parameter training, and uploads the local model parameters to the edge server to which the any mobile device belongs;
[0092] Any edge server in the target edge server set performs edge model aggregation based on the local model parameters sent by all mobile devices connected to any edge server to obtain edge model parameters, and uploads the edge model parameters to the cloud server;
[0093] The cloud server performs global model aggregation based on the model parameters of all edge servers in the target edge server set.
[0094] Specifically, in any iterative process, the target edge server set and target mobile device set corresponding to the iterative process can be obtained. The edge servers in the target edge server set are the edge servers and mobile devices used for training the hierarchical federated learning model.
[0095] During the training of the hierarchical federated learning model, in the tth iteration (t≥1), the mobile device n in the target mobile device set j According to the edge server m i Model parameters sent The local model parameters are obtained by stochastic gradient descent training The mobile device then sets the local model parameters Upload to the edge server m i . Edge Server m i Upon receiving After the local model parameters of all mobile devices in , edge model aggregation is performed according to the aggregation formula (1), where the aggregation formula (1) is:
[0096]
[0097] where d ij is the edge server m i Selected mobile device n j The size of the dataset you have, is the edge server m i Selected mobile device n j The quality of the local model.
[0098] Then the edge server m i Upload edge model parameters to the cloud server The cloud server receives After the edge models of all edge servers in the network are aggregated, global model aggregation is performed to complete the training. The aggregation formula (2) is:
[0099]
[0100] The following supplementary explanation of the hierarchical federated learning model optimization method based on Pareto optimality provided by the present invention is provided through embodiments in specific application scenarios.
[0101] How to determine the weight coefficient k is the key point of the method provided by the present invention. By consulting the literature, some properties of the weight coefficient k can be obtained:
[0102] For the Pareto front U(k) is the solution to problem (3). For any weight vector that does not maximize utility Optimal solution For collections satisfy:
[0103] (1)
[0104] (2) If but
[0105] (3) like but
[0106] (4)
[0107] Based on the above properties, this embodiment provides an algorithm for finding a specific Pareto optimal solution, as shown in Algorithm 1.
[0108] Algorithm 1: Finding Pareto Fair Solution (PFS)
[0109] Input: initial weight coefficient k 0 , utility function U 0 (·), α∈(0,1), K min ;
[0110] Output Pareto optimal solution: k*, r* (r is the reward), U*.
[0111] initialization:
[0112]
[0113] After obtaining the Pareto-fair solution using Algorithm 1, the edge server selected by the cloud server for global model aggregation and the mobile device selected by the edge server for edge aggregation will be determined, thereby performing hierarchical federated learning model training.
[0114] At the same time, this embodiment also improves the training process of the hierarchical federated learning model and proposes a new model aggregation method, as shown in Algorithm 2.
[0115] Algorithm 2: Improved hierarchical federated learning training process
[0116]
[0117] in Is the cloud server in the tth iteration The set of edge servers selected, In the tth iteration, edge server m i The collection of selected mobile devices.
[0118] The Pareto-fair solution mechanism proposed in this embodiment can effectively accelerate model convergence and improve the model's social welfare, achieving improvements of 7.58% and 16.87% on the CIFAR10 dataset, and 7.02% and 15.17% on the MNIST dataset. The Pareto-fair solution achieves faster convergence because the Pareto-fair solution algorithm maximizes the utility of each participant by finding a Pareto-fair solution, thereby incentivizing mobile devices to train high-quality models. Edge servers select mobile devices with high-quality models to aggregate high-quality edge models, and cloud servers select edge servers with high-quality edge models to aggregate high-quality global models.
[0119] The following describes the hierarchical federated learning model optimization device based on Pareto optimality provided by the present invention. The hierarchical federated learning model optimization device based on Pareto optimality described below and the hierarchical federated learning model optimization method based on Pareto optimality described above can be referenced to each other.
[0120] Figure 2 The schematic diagram of the structure of the hierarchical federated learning model optimization device based on Pareto optimality provided by the present invention is as follows: Figure 2 As shown, the device includes:
[0121] A frontier solving module 200 is configured to solve a Pareto frontier that maximizes the cumulative value of the utility functions of all participants based on the maximum budget of the cloud server; the participants include the cloud server, the edge server, and the mobile device;
[0122] A fair solution finding module 210 is used to find a Pareto fair solution from the Pareto frontier; the Pareto fair solution is a Pareto optimal solution that maximizes the utility of all participants;
[0123] The model training module 220 is used to determine a target edge server set and a target mobile device set based on a Pareto fairness solution, and perform model training of hierarchical federated learning based on the target edge server set and the target mobile device set.
[0124] Optionally, based on the maximum budget of the cloud server, solving the Pareto frontier that maximizes the cumulative value of the utility function values of all participants includes:
[0125] Based on the maximum budget constraint, find the Pareto frontier that maximizes the cumulative value of the utility function of all participants;
[0126] Among them, the maximum budget constraints include:
[0127] The sum of the budgets of all edge servers is less than or equal to the maximum budget of the cloud server;
[0128] The sum of the budgets of all mobile devices connected to any edge server is less than or equal to the budget of any edge server;
[0129] Each mobile device is associated with at most one edge server.
[0130] Optionally, find a Pareto-fair solution from the Pareto front, specifically including:
[0131] Based on the Pareto frontier, determine the target weight coefficient;
[0132] According to the target weight coefficient, the Pareto fair solution is determined.
[0133] Optionally, determining a target weight coefficient includes:
[0134] Initializing a first weight coefficient, calculating utility function values of all participants corresponding to the first weight coefficient, and taking the minimum absolute value of the utility function values of all participants corresponding to the first weight coefficient as the first value and the second value;
[0135] Based on the first weight coefficient, the utility function values of all participants corresponding to the first weight coefficient, the second value, and the current number of iterations, the first weight coefficient is updated, and the updated first value is calculated;
[0136] When the updated first value is greater than or equal to the second value, the updated first value is used as the second value;
[0137] Repeat the process of calculating and updating the first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value, until the change value of the updated first weight coefficient relative to the first weight coefficient before the update is less than the set threshold, and using the weight coefficient corresponding to the second value as the target weight coefficient.
[0138] Optionally, the first weight coefficient is updated according to the following formula:
[0139]
[0140] Where k t+1 is the first weight coefficient when the current iteration number is t+1, k t is the first weight coefficient when the current iteration number is t, I(·) is the indicator function, I(·) = 1 when · is true, otherwise I(·) = 0, is the utility function value of the i-th participant corresponding to the first weight coefficient when the current iteration number is t, is the set of all participants, is the second value when the current iteration number is t, α is the first coefficient of initialization, α∈(0,1), K t =min(K t-1 +1,K min ), where K 0 =1,K min is the second coefficient to be initialized.
[0141] Optionally, based on the target edge server set and the target mobile device set, model training for hierarchical federated learning is performed, including:
[0142] Any edge server in the target edge server set sends initial edge model parameters to a mobile device connected to any edge server;
[0143] Any mobile device in the target mobile device set obtains local model parameters based on the initial edge model parameter training, and uploads the local model parameters to the edge server to which the any mobile device belongs;
[0144] Any edge server in the target edge server set performs edge model aggregation based on the local model parameters sent by all mobile devices connected to any edge server to obtain edge model parameters, and uploads the edge model parameters to the cloud server;
[0145] The cloud server performs global model aggregation based on the model parameters of all edge servers in the target edge server set.
[0146] Figure 3 A schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute a hierarchical federated learning model optimization method based on Pareto optimality, which includes:
[0147] Based on the maximum budget of the cloud server, solve the Pareto frontier that maximizes the cumulative value of the utility function of all participants; the participants include cloud servers, edge servers, and mobile devices;
[0148] Find the Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is the Pareto-optimal solution that maximizes the utility function values of all participants;
[0149] Based on the Pareto fairness solution, the target edge server set and the target mobile device set are determined, and the hierarchical federated learning model training is performed based on the target edge server set and the target mobile device set.
[0150] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0151] On the other hand, the present invention further provides a computer program product, comprising a computer program, which may be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is capable of executing the Pareto optimality-based hierarchical federated learning model optimization method provided by the above methods, comprising:
[0152] Based on the maximum budget of the cloud server, solve the Pareto frontier that maximizes the cumulative value of the utility function of all participants; the participants include cloud servers, edge servers, and mobile devices;
[0153] Find the Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is the Pareto-optimal solution that maximizes the utility function values of all participants;
[0154] Based on the Pareto fairness solution, the target edge server set and the target mobile device set are determined, and the hierarchical federated learning model training is performed based on the target edge server set and the target mobile device set.
[0155] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the Pareto optimality-based hierarchical federated learning model optimization method provided by the above methods, the method comprising:
[0156] Based on the maximum budget of the cloud server, solve the Pareto frontier that maximizes the cumulative value of the utility function of all participants; the participants include cloud servers, edge servers, and mobile devices;
[0157] Find the Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is the Pareto-optimal solution that maximizes the utility function values of all participants;
[0158] Based on the Pareto fairness solution, the target edge server set and the target mobile device set are determined, and the hierarchical federated learning model training is performed based on the target edge server set and the target mobile device set.
[0159] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A hierarchical federated learning model optimization method based on Pareto optimality, characterized by: include: Based on the maximum budget of the cloud server, solving the Pareto frontier that maximizes the cumulative value of the utility function values of all participants; the participants include the cloud server, edge server and mobile device; Finding a Pareto-fair solution from the Pareto frontier; the Pareto-fair solution is a Pareto-optimal solution that maximizes the utility function values of all participants; Determining a target edge server set and a target mobile device set based on the Pareto fairness solution, and performing model training of hierarchical federated learning based on the target edge server set and the target mobile device set; The finding of a Pareto-fair solution from the Pareto frontier specifically includes: Based on the Pareto frontier, determining a target weight coefficient; Determining the Pareto-fair solution according to the target weight coefficient; Determining the target weight coefficient includes: Initializing a first weight coefficient, calculating utility function values of all participants corresponding to the first weight coefficient, and taking the minimum absolute value of the utility function values of all participants corresponding to the first weight coefficient as the first value and the second value; updating the first weight coefficient based on the first weight coefficient, utility function values of all participants corresponding to the first weight coefficient, the second value, and the current number of iterations, and calculating an updated first value; When the updated first value is greater than or equal to the second value, using the updated first value as the second value; Repeating the process of calculating and updating the first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value, until a change in the updated first weight coefficient relative to the first weight coefficient before the update is less than a set threshold, and using the weight coefficient corresponding to the second value as the target weight coefficient; The first weight coefficient is updated according to the following formula: Where k t+1 is the first weight coefficient when the current iteration number is t+1, k t is the first weight coefficient when the current iteration number is t, I(·) is the indicator function, I(·) = 1 when · is true, otherwise I(·) = 0, is the utility function value of the i-th participant corresponding to the first weight coefficient when the current iteration number is t, is the set of all participants, is the second value when the current iteration number is t, α is the first coefficient of initialization, α∈(0,1), K t =min(K t-1 +1,K min ), where K 0 =1,K min is the second coefficient to be initialized.
2. The hierarchical federated learning model optimization method based on Pareto optimality according to claim 1, characterized in that: The method of solving the Pareto frontier that maximizes the cumulative value of the utility function values of all participants based on the maximum budget of the cloud server includes: Based on the maximum budget constraint, find the Pareto frontier that maximizes the cumulative value of the utility function of all participants; The maximum budget constraint includes: The sum of the budgets of all edge servers is less than or equal to the maximum budget of the cloud server; The sum of the budgets of all mobile devices connected to any edge server is less than or equal to the budget of the any edge server; Each mobile device is associated with at most one edge server.
3. The hierarchical federated learning model optimization method based on Pareto optimality according to claim 1, characterized in that: The performing of model training of hierarchical federated learning based on the target edge server set and the target mobile device set includes: Any edge server in the target edge server set sends initial edge model parameters to a mobile device connected to the any edge server; Any mobile device in the target mobile device set obtains local model parameters based on the initial edge model parameter training, and uploads the local model parameters to the edge server to which the any mobile device belongs; Any edge server in the target edge server set performs edge model aggregation based on local model parameters sent by all mobile devices connected to the any edge server to obtain edge model parameters, and uploads the edge model parameters to the cloud server; The cloud server performs global model aggregation based on the model parameters of all edge servers in the target edge server set.
4. A hierarchical federated learning model optimization device based on Pareto optimality, characterized in that: include: A frontier solving module is used to solve the Pareto frontier that maximizes the cumulative value of the utility function of all participants based on the maximum budget of the cloud server; the participants include the cloud server, edge server and mobile device; a fair solution finding module, configured to find a Pareto fair solution from the Pareto frontier; the Pareto fair solution being a Pareto optimal solution in which the utility of all participants is maximized; A model training module is used to determine the target edge server set and the target mobile device set based on the Pareto fairness solution, and perform model training of hierarchical federated learning based on the target edge server set and the target mobile device set. The finding of a Pareto-fair solution from the Pareto frontier specifically includes: Based on the Pareto frontier, determining a target weight coefficient; Determining the Pareto-fair solution according to the target weight coefficient; Determining the target weight coefficient includes: Initializing a first weight coefficient, calculating utility function values of all participants corresponding to the first weight coefficient, and taking the minimum absolute value of the utility function values of all participants corresponding to the first weight coefficient as the first value and the second value; updating the first weight coefficient based on the first weight coefficient, utility function values of all participants corresponding to the first weight coefficient, the second value, and the current number of iterations, and calculating an updated first value; When the updated first value is greater than or equal to the second value, using the updated first value as the second value; Repeating the process of calculating and updating the first weight coefficient, calculating the updated first value, and using the updated first value as the second value when the updated first value is greater than or equal to the second value, until a change in the updated first weight coefficient relative to the first weight coefficient before the update is less than a set threshold, and using the weight coefficient corresponding to the second value as the target weight coefficient; The first weight coefficient is updated according to the following formula: Where k t+1 is the first weight coefficient when the current iteration number is t+1, k t is the first weight coefficient when the current iteration number is t, I() is an indicator function, when it is true, I()=1, otherwise I()=0, is the utility function value of the i-th participant corresponding to the first weight coefficient when the current iteration number is t, is the set of all participants, is the second value when the current iteration number is t, α is the first coefficient of initialization, α∈(0,1), K t =min(K t-1 +1,K min ), where K 0 =1,K min is the second coefficient to be initialized.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the hierarchical federated learning model optimization method based on Pareto optimality as described in any one of claims 1 to 3 is implemented.
6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the hierarchical federated learning model optimization method based on Pareto optimality as described in any one of claims 1 to 3 is implemented.
7. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the hierarchical federated learning model optimization method based on Pareto optimality as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Multi-energy station system economic optimization operation method based on negotiation game
CN111969657A
Layered federal learning method and system applying differential privacy protection
CN113361694A