Hierarchical federated learning method based on multi-gradient information multi-objective optimization

CN122988259APending Publication Date: 2026-10-27NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512019348.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

边缘级数据异构性导致全局模型偏斜、收敛速率放缓及客户端性能不公等难以均衡

Benefits of technology

[0065]本申请的有益效果如下:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122988259A_ABST
    Figure CN122988259A_ABST
Patent Text Reader

Abstract

The application relates to a layered federal learning method based on multi-gradient information multi-target optimization, which comprises the following steps: acquiring medical image analysis data generated by multi-device cooperation; constructing a layered federal learning model of a cloud-edge-end three-layer network hierarchy; maintaining full client participation in the cloud-edge layer; introducing a multi-target optimization selector in the edge-client layer to dynamically select high-value clients to participate in training; adopting a dynamic weighting mechanism in the two-layer aggregation process to adjust the aggregation weight according to the gradient direction of the client or the edge server; and outputting an optimized global model and diagnostic related prediction results for direct use by the client. The application finally generates a global gradient direction through two-stage aggregation, avoids sacrificing the performance of the client model and the edge model, measures the gradient direction consistency, diversity and gradient norm of each update to promote the gradient distribution balance, and adds gradient direction historical consistency to reduce the risk of global model performance loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a hierarchical federated learning method based on multi-gradient information and multi-objective optimization. Background Technology

[0002] To protect data privacy and security, break down "data silos," and promote efficient collaboration among multiple stakeholders in training machine learning models, Google proposed decentralized federated learning. As a new paradigm for distributed machine learning, federated learning primarily updates the global model through local model training on the client and parameter aggregation on the server. Currently, most mainstream federated learning focuses on cloud server-based federated learning. However, due to the reduced latency and cost of edge computing and communication networks, some research has also focused on edge server-based federated learning. Cloud servers can access a large number of training samples, while edge servers can achieve rapid model updates. Liu et al. combined the advantages of both and proposed a hierarchical federated learning framework, where both the upper and lower layers use federated averaging (HierFAVG). Hierarchical federated learning has shown significant application potential in cross-institutional collaborative diagnosis in healthcare and dynamic resource slicing in drone networks.

[0003] Although HFL has broad application needs, several problems still exist: 1. Data heterogeneity leads to global model skew. The introduction of edge layers in HFL alters the data heterogeneity of traditional federated learning, resulting in significant differences in data distribution at the edge server level. For example, in multi-hospital collaborative medical image analysis, equipment in a single department primarily generates specific types of image data (such as lung CT scans and abdominal ultrasounds), exhibiting strong Non-IID data distribution within that department. When general hospitals act as edge servers, with similar departmental setups, equipment levels, and patient capacity, the disease composition ratio of all image data aggregated within each hospital is similar across different hospitals, conforming to IID (referred to as the Edge-NIID scenario in this application). Current HFLs often employ weighted averaging mechanisms, which cannot adapt to this edge layer data heterogeneity, easily causing the global model to skew towards edge nodes with dominant data distributions, while simultaneously reducing the model's generalization ability.

[0004] 2. Defects in the client selection mechanism lead to a slower model convergence rate. Traditional HFL employs a training strategy that randomly selects clients, neglecting both the differences in client device resources (such as computing power and energy consumption) and the differences in data quality, gradient contribution, and data diversity. For example, randomly selected small clients may have insufficient computing power, small data sample size, and high noise levels, resulting in low training efficiency and limited gradient contribution. This increases the number of invalid iterations in the global model, ultimately leading to a significant slowdown in the model convergence rate.

[0005] 3. Failure to consider performance inequities caused by client-side differences. On the one hand, data heterogeneity leads to an imbalance in client-side training foundations. For example, in medical scenarios, client-side data distribution varies greatly. When a unified fixed-weight aggregation mechanism is used, the model performance of some clients cannot match the actual diagnostic needs. On the other hand, client-side training instability or noisy samples can cause abrupt changes in gradient direction. After being transmitted to the global model through edge servers, this not only causes model bias but also further widens the performance gap between different clients.

[0006] Furthermore, existing research on hierarchical federated learning almost exclusively focuses on constructing a cloud-edge-client hierarchical architecture based on the perspective of joint computing costs and communication resource allocation, designing reasonable edge server and client allocation mechanisms to improve the accuracy of the global model. However, in real-world environments, some inherent hierarchical organizational structures are fixed, unrelated to communication costs and resource allocation, and there is no need to consider client affiliation. For example, in a comprehensive hospital system, a provincial hospital may contain many affiliated hospitals, which are further divided into different clinics. In this case, the number of edge servers is often limited, while the number of clients may be an order of magnitude larger. Summary of the Invention

[0007] Addressing the heterogeneity of edge data in hierarchical federated learning is a current research hotspot. Edge-level data heterogeneity leads to global model skewness, slower convergence rates, and unfair client performance, making it difficult to achieve a balance. This application proposes a multi-objective optimization client selection algorithm, G-M3CS, and its improved version, G-M3CS+, based on multi-gradient information. By introducing the NSGA-II algorithm, it proposes optimization objectives such as gradient diversity and gradient history consistency to screen high-value clients. A dynamic weighting mechanism is introduced to further ensure uniform aggregation between the cloud-edge and edge-client layers, adapting to heterogeneous edge-level data distributions and dynamically balancing model performance and fairness. Experiments on multiple datasets in various heterogeneous scenarios show that the proposed algorithm improves global model performance by an average of 12.9% and fairness by an average of 26.6% compared to existing algorithms. Particularly in highly heterogeneous scenarios with complex datasets like CIFAR-10, it achieves a 23.3% performance improvement over the baseline algorithm, effectively alleviating the training challenges caused by edge-level data heterogeneity.

[0008] To achieve the above objectives, this application discloses a hierarchical federated learning method based on multi-gradient information and multi-objective optimization, comprising the following steps: Acquire medical image analysis data generated collaboratively from multiple devices; A hierarchical federated learning model with a three-layer network structure of cloud-edge-device is constructed, in which a cloud server acts as a central aggregator, a set of edge servers acts as an intermediate aggregator, and a set of clients acts as terminal devices. The model is trained on medical image analysis data. The cloud-edge layer maintains full client participation to ensure the comprehensiveness of the global model; the edge-client layer introduces the NSGA-II multi-objective optimization selector, which comprehensively considers the consistency, diversity and norm of gradient directions of client updates, and dynamically selects high-value clients to participate in training. The FedMGDA dynamic weighting mechanism is used in both aggregation processes to adjust the aggregation weights according to the gradient direction of the client or edge server. Output the optimized global model and diagnostic-related prediction results for direct use by the client.

[0009] Furthermore, the FedMGDA dynamic weighting mechanism is adopted in both aggregation processes, focusing on the training process of federated learning itself, and designing reasonable objectives from the perspective of multiple gradients. The gradient update direction and global consistency are considered to prevent serious client drift. At the same time, in order to ensure convergence efficiency, the gradient norm is added to the gradient value function, and high-value clients are selected using a multi-objective optimization algorithm. In addition, gradient diversity objectives are designed to ensure that the model is exposed to diverse update directions.

[0010] Furthermore, in the hierarchical federated learning model, any edge node Include A local device, denoted as Furthermore, under edge nodes Each local device Have a local dataset ,in Represents the l-th edge node device n's... One input training sample, It is the l-th edge node device n-th Output the corresponding tags. Represents the dataset The cardinality; During initialization, the cloud generates a global model and distributes it to all edge devices and clients. The local model is first trained by the terminal device. After passing through, the data is transmitted to its associated edge server for edge aggregation. Once the edge reaches a set threshold... After each round, cloud aggregation will be further carried out.

[0011] Furthermore, the hierarchical federated learning model includes three steps: local client update, edge model aggregation, and cloud aggregation. The local update process includes: for a device ,use Indicates the first The model parameters of each device, among which For edge node indexing, , Update the round index locally; use the loss function To characterize each output value, in the device The loss function on the dataset is defined as Indicates the first One input training sample, It is the first Output the corresponding tags; During the t-th local update, the task for each device n is to compute its local update using stochastic gradient descent. in It's the learning rate. This represents the stochastic gradient obtained on a randomly and uniformly selected mini-batch of data. and These are the local updates in round t and round (t-1), respectively; the difference in parameter changes is approximated as each... Post-wheel multigradient Local update Post-round multigradient computation: mod means modulo. It is a partial update in round t-t1; after completion After each local iteration, each device n stores its local multigradient information. Transmitted to a specific edge server ; The edge model aggregation step includes: each edge Received The multi-gradient information of each local device is considered as an objective, and a quadratic programming problem is used to find the Pareto stationary point. To solve for the minimum norm convex combination, the following problem is constructed: in The Jacobian matrix represents the objective function vector in a multi-objective optimization problem. It is the optimal weight for the i-th client in round t. This indicates that the weight vector belongs to the probability simplex. It is the weight of the i-th client. It is equipment Partial update in round t; It is a preset benchmark weight; It is a weight deviation constraint threshold, which controls the degree of deviation between the actual gradient weights and the reference weights; it solves for the common gradient descent direction. for Edge server The updated gradient Upload to the cloud server and update the edge model parameters simultaneously. for The quadratic programming problem is solved using a normalized gradient, and the resulting direction is obtained. The cloud aggregation process includes: the cloud server receiving gradients from all edge servers. Repeat the edge aggregation logic to calculate the global gradient. for in The Jacobian matrix represents the objective function vector of the edge server. It is the edge-optimal weight in round t. The edge weights in round t are used to update the global model parameters in round t using the global gradient. for These are the global model parameters for the (t-1)th round; Will The broadcast message returns to the client to initiate the next global round of model training. This global aggregation process collects gradient information from local devices via edge servers. Uploading gradient information to the cloud server Repeat this process until the model accuracy is met or the total number of training rounds is reached.

[0012] Further, select a subset of clients. It participates in the training of hierarchical federation; it utilizes the multiple gradients transmitted in each stage and applies the multi-objective evolutionary algorithm NSGA-II to handle multiple objective function problems.

[0013] Furthermore, this involves client-side coding, objective function specification, objective function implementation, and client subset selection. The client encoding includes: Any edge node Include A local device, during the client selection phase, parameters This indicates the proportion of client participation in each round, and it determines the edge. have One client is allowed to update the edge model; when The value at that edge indicates that all clients under that edge participate in each round of training; to facilitate population evolution in NSGA-II, clients are encoded as chromosomes, where 0 indicates that the client was not selected, and 1 indicates that the client participated in this round of training. Each 0 / 1 combination represents a population; The mutation operator in the NSGA-II evolution process is improved as follows: each mutated individual has 5 segments with a gene locus of 1: in P[k] is the value of the kth gene locus.

[0014] Furthermore, the objective function is specified to include: To fully leverage multi-gradient approaches to address the heterogeneity of edge data, the client selection problem is modeled as a three-objective optimization problem with equality constraints. Based on gradient characteristics, the three objectives are set as follows: maximizing gradient direction consistency; maximizing gradient norm; and maximizing gradient diversity. Every edge in every global round Simultaneous client selection, each edge Maintain three gradient information dictionaries , This represents the gradient uploaded by the i-th client in the current t-th round. This represents the historical gradient uploaded by the i-th client during its most recent training session. Represents the edge gradient after the previous round of edge server aggregation. Historical gradients are updated immediately after each edge aggregation is completed. To maintain the stability of gradient updates, an exponentially weighted average is used. in, This represents the historical gradient updated in the current round. The gradient is the most recent historical gradient retained, not the gradient from the previous round. This represents the gradient after training in the current round. Weighting coefficients; marginal The objective function is calculated based on three dictionaries to determine the client's choice; these three conflicting objectives are as follows: (1) Maximize gradient direction consistency: This objective measures the consistency between the gradient of the selected client and the global gradient direction. Since the gradient direction of the client differs from the global gradient direction, the sum of the cosine similarity between each client and the global gradient is calculated. A larger value indicates that the overall selection scheme is more consistent with the global gradient direction. If the set of selected clients is... The global gradient of the previous aggregation round is The gradient of client i is Then the objective function 1 is expressed as (2) Maximize the gradient norm: This objective measures the magnitude of the update of the selected client; calculate the sum of the L2 norms of the gradients of each client. The larger the value, the stronger the overall gradient update strength of the selected scheme. Objective function 2 is expressed as: (3) Maximize gradient diversity: This objective measures the degree of difference in gradients among selected clients; by calculating the sum of the cosine distances of the gradients of each client, it provides a perspective for the global model. Objective function 3 is expressed as follows: in Let the gradient cosine similarity be between clients i and j. For the selected client's logarithm That is, the number of client logs that are effectively computed is obtained; In the three objective calculations for each population, if client i is not selected in this round, resulting in... If empty, use the historical gradient dictionary. The historical gradient is used instead of the previous value to ensure that the value of each population is the latest state.

[0015] Furthermore, the target improvement includes: By using the "value-complementarity-stability" triplet, each objective assumes the responsibility of "correcting deviations." The improved three objectives are as follows: (1) Maximize the gradient value exponent: The improved objective function 1 is expressed as in The objective is to use a sigmoid function, which ensures that the gradient direction is consistent with the global gradient while also constraining the magnitude to a reasonable range. (2) Maximize gradient complementarity diversity: Calculate the average gradient of the selected clients, and then evaluate the cosine distance between each client's gradient and the average gradient to ensure that the client gradients are reasonably dispersed near the average gradient; the improved objective function 2 is expressed as in This represents the average gradient of the selected client. The goal is to avoid excessive homogenization of gradients while preventing deviation from the overall optimization direction. (3) Maximize gradient history consistency: Introduce the client's own historical gradient as a reference, encourage the selection of clients that are stable on the time axis, and reduce the probability of abnormal updates being selected; the improved objective function 3 is expressed as in This represents the historical gradient after exponential weighted averaging; by using historical consistency scores, clients with stable gradient trends are prioritized to reduce training fluctuations.

[0016] Furthermore, the hierarchical federated process under the overall FedMGDA integration involves multi-gradient communication between the client and the edge, and between the edge and the cloud, divided into two stages: edge aggregation and cloud aggregation. Specifically, it includes: Initialize global model parameters And it is distributed to all clients by the cloud server; Select a subset of clients for this round of training based on the edges; The selected client performs local training and returns multiple gradients; When the global wheel When edge aggregation is performed, Execute cloud aggregation in real time; Before the start of each global round of training, a client selection process based on multi-objective optimization is executed: initialization Each population satisfies the equality constraint; Three objectives for population assessment; Each evolution involves a binary tournament, crossover mutation, and rapid non-dominated sorting, and the final Pareto front is obtained at the end of the evolution. The first population at the Pareto front is selected, decoded into a subset of the client, and output to the edge. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of this application; Figure 2 This is a time flow diagram of this application with respect to global round T; Figure 3 This is the flowchart of the NSGA-II algorithm in this application; Figure 4 This is an instance of the improved mutation operator (when N=10, K=5); Figure 5 This is the pseudocode for Algorithm 1 of this application; Figure 6 This is the pseudocode for Algorithm 2 in this application. Detailed Implementation

[0018] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0019] To address the aforementioned issues, this application proposes a hierarchical federated learning algorithm (G-M3CS) for multi-objective optimization of client selection based on multi-gradient information, simultaneously optimizing communication efficiency, model fairness, and model performance. This algorithm maintains full client participation at the cloud-edge layer to ensure the comprehensiveness of the global model. At the edge-client layer, an NSGA-II multi-objective optimization selector is introduced, comprehensively considering the consistency, diversity, and norm of gradient directions in client updates to dynamically select high-value clients for training. Furthermore, considering update stability and historical consistency, a G-M3CS+ algorithm is also proposed. Simultaneously, a dynamic weighting mechanism using FedMGDA is employed in both aggregation processes, adjusting aggregation weights based on the gradient direction of the client or edge server. This avoids sacrificing the performance of some users for overall improvement, thereby significantly enhancing fairness and robustness while maintaining global model accuracy.

[0020] This application introduces multi-objective optimization into hierarchical federation for client selection. Currently, the use of multi-objective optimization methods to enhance the performance of federated learning systems is mainly divided into top-level applications of hyperparameter tuning and federated layer optimization of multi-objective aggregation. The most representative multi-objective aggregation in the federated layer is the FedMGDA algorithm (Hu Z, Shaloudegi K, Zhang G, et al. Federated learning meets multi-objective optimization[J]. IEEETransactions on Network Science and Engineering, 2022, 9(4): 2039-2051), which is also the basis of the algorithm in this application. It is a federated learning algorithm based on multi-objective optimization. By finding Pareto stable solutions, it can ensure user fairness and robustness without sacrificing the performance of any participating users. The algorithm in this application focuses more on the training process of federated learning itself, designing reasonable objectives from the perspective of multiple gradients; comprehensively considering the gradient update direction and global consistency to prevent serious client drift; and in order to ensure convergence efficiency, the gradient norm is added to the gradient value function, and high-value clients are selected using multi-objective optimization algorithms. Furthermore, this application designs a gradient diversity objective based on the characteristics and fairness requirements of the FedMGDA training process, ensuring that the model is exposed to diverse update directions and improving the model's generalization performance. The diverse gradient distribution in this application is more directly related to each round of training and is better able to adapt to dynamic changes during the training process.

[0021] In one embodiment, a hierarchical federated learning model with a three-layer network structure of cloud-edge-device is constructed, where a cloud server acts as a central aggregator and a set of edge servers are included. As an intermediate aggregator, a set of clients N = {n: n = 1, ..., N} serves as the terminal devices. Arbitrary edge nodes... Include A local device, denoted as Furthermore, under edge nodes Each local device Have a local dataset ,in Indicates the first One input training sample, It is the first Output the corresponding tags. Represents the dataset The base number.

[0022] During initialization, the cloud generates a global model and distributes it to all edge devices and clients. The local model is first trained by the terminal device using the acquired medical images. After passing through, the data is transmitted to its associated edge server for edge aggregation. Once the edge reaches a set threshold... After round (i.e., globally) Then, cloud aggregation is performed. The timeline is as follows: Figure 2 As shown below, the three steps of local client update, edge model aggregation, and cloud aggregation will be described below.

[0023] (1) Local update: For a device ,use Indicates the first The model parameters of each device, among which For edge index ( ), Update the round index locally. Additionally, use the loss function. To characterize each output value, then in the device The loss function on the dataset is defined as (1) During the t-th local update, the task for each device n is to compute its local update using stochastic gradient descent. (2) in It's the learning rate. An exponential decay strategy is adopted with each epoch. This represents the stochastic gradient obtained on a randomly and uniformly selected mini-batch of data. Since the edge aggregation stage needs to utilize multi-gradient information, the difference in parameter variation is approximated as each... Post-wheel multigradient Local update Post-cycle multigradient calculation is (3) After completion After each local iteration, each device n stores its local multigradient information. Transmitted to a specific edge server .

[0024] (2) Edge model aggregation: each edge Received Based on the aggregation concept of FedMGDA, the multi-gradient information of each local device is treated as an objective, and a quadratic programming problem is used to find a common descent direction (i.e., a Pareto station). To solve for the minimum norm convex combination, the following problem is constructed: (4) in The Jacobian matrix represents the objective function vector in a multi-objective optimization problem; It is a preset baseline weight, corresponding to the fixed weight of traditional FedAvg (i.e., weights are allocated according to the amount of data). This is a weight deviation constraint threshold, which controls the degree of deviation between the actual gradient weights and the benchmark weights, while balancing average performance and fairness. Based on this, the common gradient descent direction can be solved. for (5) Edge server The updated gradient Upload to the cloud server and update the edge model parameters simultaneously. for (6) In practice, normalized gradients are used to solve quadratic programming problems and obtain directions. Normalized gradients are common for non-smooth and stochastic optimizations, which can prevent gradient discrepancies from malicious clients while facilitating step size adjustment.

[0025] (3) Cloud aggregation: The cloud server receives gradients from all edge servers. Repeat the edge aggregation logic to calculate the global gradient. (7) (8) in Update global model parameters using global gradients for (9) Will The broadcast returns to the client to initiate the next global round of model training. This global aggregation process collects gradient information from the local device via the edge server. Uploading gradient information to the cloud server This process is repeated until a stopping condition (such as model accuracy or total number of training epochs) is met. A summary of the definitions of federated learning-related symbols used in this application is shown in Table 1.

[0026] Table 1 Main Symbols In one embodiment, multiple objectives are optimized for modeling: In federated learning, the number of clients and data distribution affect training performance. On the one hand, while selecting all clients for training can cover the overall distribution, increasing the number of clients may slow down convergence due to differences in data balance and data volume among clients. On the other hand, as mentioned in the introduction, edge servers in a hierarchical system often manage a large number of clients. In this case, the computational, communication, and time costs of all clients participating in each round of training have a non-linear relationship with the improvement of model performance. Therefore, selecting a subset of clients... Instead of the entire client Participation in training for hierarchical federation is crucial.

[0027] To address the client selection issue in hierarchical federated learning under FedMGDA integration and fully leverage the multi-gradient transmission at each stage, refer to... Figure 3 This application employs the multi-objective evolutionary algorithm NSGA-II to handle problems with multiple objective functions. The following example illustrates a multi-objective optimization problem involving n decision variables and m objective functions: (10) in, Represents n-dimensional decision variables, Represents an m-dimensional target vector. Indicates the first Inequality constraints Indicates the first There are several equality constraints. In multi-objective optimization, the objective functions are often incompatible, and there is no single optimal solution. The feasible region is limited by the constraint functions, and optimization must be performed simultaneously within this region.

[0028] The Non-Dominated Sorting Genetic Algorithm (NSGA-II) relies on three key mechanisms: fast non-dominated sorting, crowding calculation, and elite preservation. Fast non-dominated sorting divides the population hierarchy based on "dominance relations": if for solutions x and y, and M optimization objectives, satisfying... , And there exists at least one objective m such that If x dominates y, this process ensures the priority of the better solution; the crowding distance is expressed by the formula... Quantification , Let be the maximum and minimum values ​​of the m-th target, respectively. Represents individuals at the same level The adjacent solutions maintain the diversity of population distribution in the target space; the elite preservation strategy merges the parent and offspring populations and retains high-quality individuals through non-dominated sorting and crowding selection, thereby accelerating the convergence speed of the algorithm.

[0029] In cloud-edge-device communication, multiple gradients contain rich information. The gradient itself can provide signals related to directionality, amplitude, and local curvature, which express the model convergence status from different perspectives. Existing research on federated learning has selected clients from different gradient perspectives; however, they only consider controlling the gradient direction or gradient norm, which may lead to overfitting or underfitting of the model. Therefore, in one embodiment, this application describes the proposed G-M3CS algorithm for client selection from the aspects of client encoding, objective function formulation, and objective function improvement.

[0030] In one embodiment, client-side encoding includes: any edge node Include A local device, during the client selection phase, parameters This indicates the proportion of client participation in each round, which determines the edge. have Each client is allowed to update the edge model. When This indicates that all clients below this edge participate in each round of training. To facilitate population evolution in NSGA-II, clients need to be encoded as chromosomes; 0 indicates that the client was not selected, and 1 indicates that the client participated in this round of training. A population is represented by a combination of 0s and 1s. For example, when , At that time, only when the type is , , and The decision vector satisfies the constraints. The edge server can select different preference schemes based on the gradient characteristics.

[0031] During population initialization, the size of the search space is... That is, it exists Different client selection schemes are proposed. On the one hand, it is necessary to ensure that the number of clients remains at a certain level to avoid large differences in gradient distribution due to too many or too few clients; on the other hand, since the setting of maximizing the objective function must consider the participation of a fixed proportion, equality constraints are set. (in The number of participants from each client is limited by the k-th gene position in the population. However, with The exponential growth in the number of combinations leads to a significant increase in time and space complexity. This situation poses a great challenge to algorithms, making it difficult to find solutions that satisfy the constraints within a finite population size and number of evolutions.

[0032] Therefore, this application makes the following improvements to the mutation operator in the NSGA-II evolution process, effectively preventing the original mutation from potentially breaking the equality constraints. Figure 4 The specific mutation operation is shown, and each individual after mutation has 5 segments with a gene locus of 1.

[0033] (11) in The improved mutation operator, through a strategy of preserving quantity and random swapping, strictly adheres to equality constraints while enhancing exploration capabilities, reducing computational complexity from... Descending to This allows individuals to approach the Pareto solution more quickly through optimization.

[0034] In one embodiment, the objective function is defined as follows: In order to make full use of multi-gradients to solve the problem of heterogeneous edge data, the G-M3CS algorithm proposed in this application models the client selection problem as a three-objective optimization problem with equality constraints. According to the gradient characteristics, the three objectives are set as follows: 1. Maximize gradient direction consistency; 2. Maximize gradient norm; 3. Maximize gradient diversity.

[0035] Every edge in every global round Simultaneous client selection, each edge Maintain three gradient information dictionaries , This represents the gradient uploaded by the i-th client in the current t-th round. This represents the historical gradient uploaded by the i-th client during its most recent training session. Represents the edge gradient after the previous round of edge server aggregation. Historical gradients are updated immediately after each edge aggregation is completed. To maintain the stability of gradient updates, we use an exponentially weighted average. (12) in, This represents the historical gradient updated in the current round. The gradient is the most recent historical gradient retained, not the gradient from the previous round, because the client may not have participated in the training in the previous round. This represents the gradient after training in the current round. These are weighting coefficients. Margins The objective function is calculated based on three dictionaries to determine the client's choice. These three conflicting objectives are as follows.

[0036] (1) Maximize gradient direction consistency: This objective measures the consistency between the gradient of the selected client and the global gradient direction. In FL, the global model update direction deviates because the optimization objective of a single client is inconsistent with the global objective. Since the gradient direction of a client differs from the global gradient direction, the sum of the cosine similarity between each client and the global gradient is calculated. A larger value indicates that the overall selection scheme is more consistent with the global gradient direction. Let the set of selected clients be... The global gradient of the previous aggregation round is The gradient of client i is Then the objective function 1 can be expressed as (13) (2) Maximize the gradient norm: This objective measures the magnitude of the update of the selected client. If the gradient norm of the client is too small, it will result in a weak update magnitude of the model parameters, slowing down the convergence speed of the global model. Calculate the sum of the L2 norms of the gradients of each client; the larger the value, the stronger the overall gradient update force of the selected scheme, and the more effectively it can drive the global model to iterate towards the optimal solution. Objective function 2 can be expressed as: (14) (3) Maximize gradient diversity: This objective measures the degree of difference in gradients among selected clients. Since the data distribution of each client often has biases (such as Edge-NIID characteristics), if the gradients of the selected clients are too similar, the model may only learn local data patterns, limiting the generalization ability of the global model. Homogeneity of client gradients reduces the model's adaptability to different data scenarios. By calculating the sum of the cosine distances of the gradients of each client, a richer perspective is provided for the global model. Objective function 3 can be expressed as: (15) in Let the gradient cosine similarity be between clients i and j. For the selected client's logarithm (16) This yields the number of client logs that are effectively computed. The gradient diversity objective further enhances the common descent direction in FedMGDA, improving the fairness of client participation.

[0037] In the three objective calculations for each population, if client i is not selected in this round, it may result in... If empty, use the historical gradient dictionary. The historical gradient is used instead of the previous value to ensure that the value of each population is the latest state.

[0038] In practice, this application found that the original three objectives reveal several systemic flaws in real-world edge scenarios. Original objectives 1 and 3 simultaneously encourage clients with a large norm and consistent with the global gradient direction. This results in a few clients with large datasets often having both large norms and directions close to the average, leading to repeated selection. In Non-IID scenarios with extremely uneven data distribution, this causes other clients to remain "silent" for extended periods, resulting in a continuous deterioration of the fairness metric. Original objective 2 uses cosine distance to encourage diversity but fails to consider the value of that diversity. A client with a gradient direction completely opposite but a very small amplitude can also receive high diversity scores, leading to "ineffective cancellation" of the aggregated gradients, and its updates may actually slow down convergence.

[0039] Furthermore, the original objective relies solely on the current gradient information, focusing only on a single snapshot and neglecting the stability over the client's time dimension. If the client's gradient fluctuates drastically (e.g., due to malicious clients, data drift, etc.), it may suddenly contribute an abnormal gradient in a certain round, which could be selected by high diversity or high norm, leading to model training instability and reduced model robustness.

[0040] To address the aforementioned shortcomings, in one embodiment, this application proposes a new "value-complementarity-stability" triplet, where each objective assumes a "corrective" role, thereby improving the objective function. The algorithm with the improved objectives is named G-M3CS+, and the specific details of the improved three objectives are as follows.

[0041] (1) Maximize the Gradient Value Index: This measures the combined value of each client gradient in terms of direction and magnitude. It is equivalent to combining the original objectives 1 and 2, simultaneously evaluating both the "direction value" (absolute value of the cosine similarity to the global gradient) and the "magnitude value" (ratio of gradient magnitude to the global gradient), and mapping it to [0,1] using the sigmoid function, with an ideal value close to 1. The improved objective function 1 can be expressed as: (17) in This is a sigmoid function. The objective is to ensure the gradient direction is consistent with the global gradient while also constraining the magnitude to a reasonable range, avoiding it being too large or too small, thus solving the problem of "correct direction but abnormal magnitude".

[0042] (2) Maximize complementary gradient diversity: This measures the complementarity between the gradients of the selected clients, rather than the original simple diversity. The average gradient of the selected clients is calculated, and then the cosine distance between each client's gradient and the average gradient is evaluated to ensure that the client gradients are reasonably dispersed around the average gradient. The improved objective function 2 can be expressed as: (18) in This represents the average gradient of the selected clients. The design objective ensures that diversity is "complementary around the overall trend," rather than meaningless discreteness. This avoids both excessive homogenization of gradients and deviations from the overall optimization direction.

[0043] (3) Maximize Historical Consistency: This measures the stability between the client's current gradient and its historical gradients. Explicitly incorporating the client's own historical gradients as a reference encourages the selection of clients that are stable over time, reducing the probability of abnormal updates being selected. The improved objective function 3 can be expressed as: (19) in This represents the historical gradient after exponential weighted averaging. By using historical consistency scores, clients with stable gradient trends are prioritized, reducing training fluctuations and addressing the issue of a disconnect between short-term performance and long-term stability.

[0044] The Pareto front distributions generated before and after the objective improvement in the same scenario show that the selected client schemes form a more effective trade-off among gradient-related objectives. The improved three objectives, through comprehensive value evaluation, complementary diversity constraints, and historical stability filtering, address the shortcomings of the original objectives, achieve more robust and efficient client selection, and improve the convergence performance of distributed optimization.

[0045] The G-M3CS algorithm proposed in this application primarily operates in the client selection phase of hierarchical federated learning. It sorts devices based on the three objectives mentioned in equations (13, 14, 15 or 17, 18, 19) and adaptively selects a device in each global round. (Reference) Figure 5 and Figure 6 This hierarchical federated learning algorithm is described in two parts: Algorithm 1 is the hierarchical federated process under the overall FedMGDA integration, and Algorithm 2 is the client selection process based on multi-objective optimization.

[0046] (1) Algorithm 1: Hierarchical federated learning under G-M3CS mainly transmits multiple gradients in communication between client-edge and edge-cloud, and is divided into two stages: edge aggregation and cloud aggregation.

[0047] Line 1: Initialize global model parameters And distributed to all clients by the cloud server; Line 3: The edge performs G-M3CS to select a subset of clients for this round of training, see Algorithm 2 for details; Lines 4-6: The selected clients perform local training and return multigradients; Lines 7-12 and 13-16: Describe the timing and process of edge aggregation and cloud aggregation respectively, when the global round When edge aggregation is performed, Cloud aggregation is executed in real time. See the function definition below the algorithm for details. (2) Algorithm 2: Client selection based on multi-objective optimization mainly occurs before the start of each global round of training, i.e., line 3 of Algorithm 1. Edge Receive gradients from each client As input, For NSGA-II related hyperparameters, This indicates the initial population size. Indicates the number of evolutionary iterations.

[0048] Line 1: Initialization Line 1: Populations satisfying equality constraints; Line 2: Evaluate the three objectives of the population; Lines 3-8: Perform binary tournament, crossover mutation, and fast non-dominated sorting in each evolution, and obtain the final Pareto front after the evolution ends; Line 9: Select the first population of the Pareto front, decode it as a client subset, and output it to the edge.

[0049] Using the same cloud aggregation and edge aggregation rounds as a benchmark, this application quantitatively analyzes the computational complexity of the G-M3CS and G-M3CS+ algorithms. The objective function evaluation of NSGA-II is the core source of computational complexity. Each evolutionary generation needs to evaluate three objective functions for each of P individuals (client selection schemes), and only the objective evaluation complexity varies with the objective function design.

[0050] This application experimentally verifies the superior performance and improved client-side fairness of the G-M3CS algorithm under different datasets, data distributions, and models. For the disease prediction task in medical images, this application uses three public datasets: MedicalSegmentation Decathlon (covering data from multiple sites such as the brain, heart, and liver), Cephalometric X-ray Image (a dataset of skull X-ray images), and BraTS 2015 (a dataset for brain tumor image segmentation, containing MRI images of 220 high-grade gliomas and 54 low-grade gliomas).

[0051] Because the layered federation introduces an edge layer, the degree of data heterogeneity varies due to different data distributions. In this application, all datasets are divided into four data distribution states: IID, Edge-NIID, Non-IID (1), and Non-IID (2), with the degree of data heterogeneity increasing in that order. Specifically, Edge-NIID assigns a sample of one class to each customer and assigns 10 customers of different classes to each edge; Non-IID (1) assigns a sample of two classes to each customer and randomly assigns 10 customers to each edge; Non-IID (2) assigns a sample of one class to each customer and assigns 10 customers to each edge to form 5-class labels.

[0052] Based on the characteristics of the three datasets, corresponding neural network structures were designed, all using convolutional neural networks (CNNs) for feature extraction and classification. The specific structures of the neural networks are shown in Table 2. Each client trains a two-layer CNN, with ReLU activation applied after each convolution. CNNCifar explicitly calls softmax in the output layer, with no additional activations elsewhere.

[0053] Table 2 Neural Network Structure This application compares the global performance of G-M3CS, G-M3CS+ algorithms, and HierFAVG, FedMGDA, and FedMDFG algorithms under random selection. Furthermore, it tests other gradient-based client selection algorithms, FedPNS and FedBN2, whose underlying idea of ​​utilizing gradient information is similar to the original objectives 1 and 2 of this application. Accuracy is used as the global performance metric on a cloud server global test dataset, while fairness is measured by the variance of the final model's accuracy across clients.

[0054] To ensure the interpretability of the experimental results, the same system variables were set for each baseline algorithm across all datasets and data distributions. Fifty clients and five edge servers were configured, with clients randomly and evenly distributed across each edge server. Local updates on each client used mini-batch stochastic gradient descent (SGD) with a batch size of 20. Based on the dataset complexity, the initial learning rate was set to 0.01, and the exponential decay learning rate was set to 0.995. Specific system hyperparameters and NSGA hyperparameter settings are shown in Table 3.

[0055] Table 3 System Hyperparameter Settings To address the heterogeneity issue of edge layer data, the FedMGDA algorithm is introduced into hierarchical federated learning. This involves employing multi-gradient descent in both the client-edge and edge-cloud aggregation logic layers, hence the name HFedMGDA. While initially designed to achieve fairness among users in federated learning through multi-objective optimization, this algorithm adaptively calculates a common descent direction for each user objective, thus naturally adapting to heterogeneous data scenarios with non-independent and identically distributed data.

[0056] However, designing a system that uses the FedMGDA algorithm in both the upper and lower layers is not easy. In a two-layer FL, it is only necessary to consider that the client uploads multiple gradients to the server after multiple rounds of updates. However, in a three-layer system, the edge nodes need to wait for the cloud aggregation round after receiving the client's multiple gradients before uploading them to the cloud server. Will the algorithm still converge in this case? This application verifies the effectiveness of HFedMGDA under two data distributions of the dataset.

[0057] Experimental results show that, regardless of the data distribution, HFedMGDA consistently outperforms FedMGDA globally, with an average improvement of 5.02%, significantly outperforming the HierFavg algorithm. Intuitively, the lack of a significant improvement over FedMGDA is attributed to the smaller number of edge servers and the insufficient representation of edge-level data heterogeneity; however, this is sufficient to demonstrate the effectiveness of the two-layer multi-gradient descent approach introduced in this application.

[0058] To visually demonstrate the training performance of each algorithm, the results of G-M3CS, G-M3CS+, and five baseline algorithms (HierFavg, HFedMGDA, FedPNS, FedBN2, and FedMDFG) on three datasets were selected. The experimental results show that the proposed algorithm G-M3CS+ outperforms other baseline algorithms on the Medical Segmentation Decathlon and Cephalometric X-ray Image datasets, and also outperforms other baseline algorithms on the BraTS 2015 dataset. Under the three data distributions of MNIST, G-M3CS+ improves the global model performance by 0.21%, 0.82%, and 0.41% compared to the randomly selected HFedMGDA model, and by 4.89%, 13.59%, and 7.78% compared to HierFavg. Under the three data distributions of BraTS 2015, G-M3CS+ improved the performance of the randomly selected HFedMGDA global model by 23.26%, 7.36%, and 20.54%, respectively. G-M3CS achieved the largest improvement of 7.49% on the Cephalometric X-ray Image dataset.

[0059] Furthermore, for each dataset, the global rounds in which the set accuracy is first achieved are used as the measure. The convergence rate of Algorithm 1 in this application is 33% higher on average than HierFavg, and G-M3CS+ achieves a slight improvement of 3.12% in convergence rate compared to HFedMGDA under random selection, while also achieving an improvement in global accuracy.

[0060] Table 4 Comparison of Test Accuracy (%) of the Global Models of Seven Algorithms It is worth noting that G-M3CS or G-M3CS+ significantly improves performance across all datasets with Edge-NIID distributions, achieving a maximum improvement of 23.26% on the highly heterogeneous BraTS 2015 dataset. This is because while the client exhibits strong Non-IID behavior, the addition of the edge layer causes it to exhibit IID behavior. The client-side algorithm proposed in this application operates on the client-edge layer, effectively mitigating the client-side Non-IID problem and allowing client training to smoothly converge towards the common gradient direction.

[0061] The improved multi-objective optimization in the HFedMGDA algorithm aims to optimize the global model without sacrificing any client performance, thus balancing performance and fairness. Therefore, a fairness metric is employed, calculated by measuring the variance of the final global model's accuracy across all clients. To measure fairness, and to some extent, to measure the model's generalization ability. Using the same hyperparameters on the Medical Segmentation Decathlon and Cephalometric X-ray Image datasets, G-M3CS+ was compared with existing FL algorithms. G-M3CS+ showed significantly better overall accuracy across all distributions than other algorithms, although G-M3CS+ had lower variance. While not a minimum, the data distribution across clients is more even and concentrated at both the maximum and minimum values. The variance is the same as HierFavg's, but the clients have better minimum and maximum values, and the distribution is more even. (Consider the variance across all distributions.) Fairness performance is improved by an average of 12.8% compared to HFedMGDA and by an average of 26.6% compared to HierFavg.

[0062] Furthermore, to evaluate the robustness of the global model and the system's bottom-line capability, the worst accuracy of the global model on all client test sets was calculated, and the results are shown in Table 5. Although variance measures the balance of the overall distribution, worst accuracy focuses more on the performance of extreme individuals; these two metrics are used to comprehensively evaluate fairness performance.

[0063] Table 5: Statistics on the worst accuracy rate in the client application. As can be seen from Table 5, G-M3CS+ achieves the maximum worst accuracy across almost all data distributions, with only one distribution showing suboptimal performance. This is because the gradient diversity design in multi-objective optimization ensures that even the weakest users can be selected to participate in training and achieve acceptable performance.

[0064] This application proposes a multi-objective optimization client selection algorithm, G-M3CS, based on multi-gradient information. This algorithm is adapted to hierarchical federated learning with inherent hierarchical structures, effectively alleviating the data heterogeneity problem at the edge layers. Specifically, FedMGDA is improved to a two-layer gradient descent. Building upon this, three objectives—gradient direction consistency, gradient norm, and gradient diversity—are constructed in the edge client selection stage, generating a Pareto front in each round to select the winning client. To address practical issues, the three objectives are further refined into gradient value, complementary diversity, and historical consistency, reducing computational complexity while making training more stable. Extensive experiments demonstrate that G-M3CS+ significantly improves global model performance, fairness, and generalization ability compared to the baseline algorithm.

[0065] The beneficial effects of this application are as follows: (1) For the first time, multi-objective optimization is introduced into the hierarchical federated learning framework. The dynamic weighting mechanism of FedMGDA is used in both the upper and lower layers of aggregation. The global gradient direction is finally generated through two-stage aggregation, avoiding sacrificing the performance of the client model and the edge model. (2) In order to improve the model accuracy while ensuring convergence efficiency, the G-M3CS client selection algorithm is proposed. It measures the consistency, diversity and norm of gradient direction of each update, and forms a double closed loop with multi-objective aggregation to jointly promote the balanced gradient distribution. (3) Based on the G-M3CS algorithm, G-M3CS+ was proposed. The objective of multi-objective optimization was redesigned to cover the original objective with gradient value, and historical consistency of gradient direction was added to reduce the risk of global model performance loss caused by unstable client updates.

[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A hierarchical federated learning method based on multi-gradient information and multi-objective optimization, characterized in that, Includes the following steps: Acquire medical image analysis data generated collaboratively from multiple devices; A hierarchical federated learning model with a three-layer network structure of cloud-edge-device is constructed, in which the cloud server acts as the central aggregator, a set of edge servers acts as the intermediate aggregator, and a set of clients acts as the terminal devices. The model is trained on medical image analysis data. The cloud-edge layer maintains full client participation to ensure the comprehensiveness of the global model; the edge-client layer introduces the NSGA-II multi-objective optimization selector, which comprehensively considers the consistency, diversity and norm of gradient directions of client updates, and dynamically selects high-value clients to participate in training. The FedMGDA dynamic weighting mechanism is used in both aggregation processes to adjust the aggregation weights according to the gradient direction of the client or edge server. Output the optimized global model and diagnostic-related prediction results for direct use by the client.

2. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 1, characterized in that, The FedMGDA dynamic weighting mechanism is used in both aggregation processes, focusing on the training process of federated learning itself and designing objectives from the perspective of multiple gradients. The gradient update direction and global consistency are considered to prevent severe client drift. At the same time, in order to ensure convergence efficiency, the gradient norm is added to the gradient value function, and a multi-objective optimization algorithm is used to select high-value clients. In addition, gradient diversity objectives are designed to ensure that the model is exposed to diverse update directions.

3. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 2, characterized in that, In the hierarchical federated learning model, any edge node Include A local device, denoted as Furthermore, under edge nodes Each local device Have a local dataset ,in Represents the l-th edge node device n's... One input training sample, It is the l-th edge node device n-th Output the corresponding tags. Represents the dataset The cardinality; During initialization, the cloud generates a global model and distributes it to all edge devices and clients. The local model is first trained by the terminal device. After passing through, the data is transmitted to its associated edge server for edge aggregation. Once the edge reaches a set threshold... After each round, cloud aggregation will be further carried out.

4. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 3, characterized in that, The hierarchical federated learning model includes three steps: local client update, edge model aggregation, and cloud aggregation. The local update process includes: for a device ,use Indicates the first The model parameters of each device, among which For edge node indexing, , Update the round index locally; use the loss function To characterize each output value, in the device The loss function on the dataset is defined as Indicates the first One input training sample, It is the first Output the corresponding tags; During the t-th local update, the task for each device n is to compute its local update using stochastic gradient descent. in It's the learning rate. This represents the stochastic gradient obtained on a randomly and uniformly selected mini-batch of data. and These are the local updates in round t and round (t-1), respectively; the difference in parameter changes is approximated as each... Post-wheel multigradient Local update Post-round multigradient computation: mod means modulo. It is a partial update in round t-t1; after completion After each local iteration, each device n stores its local multigradient information. Transmitted to a specific edge server ; The edge model aggregation step includes: each edge Received The multi-gradient information of each local device is considered as an objective, and a quadratic programming problem is used to find the Pareto stationary point. To solve for the minimum norm convex combination, the following problem is constructed: in The Jacobian matrix represents the objective function vector in a multi-objective optimization problem. It is the optimal weight for the i-th client in round t. This indicates that the weight vector belongs to the probability simplex. It is the weight of the i-th client. It is equipment Partial update in round t; It is a preset benchmark weight; It is a weight deviation constraint threshold, which controls the degree of deviation between the actual gradient weights and the reference weights; it solves for the common gradient descent direction. for Edge server The updated gradient Upload to the cloud server and update the edge model parameters simultaneously. for The quadratic programming problem is solved using a normalized gradient, and the resulting direction is obtained. The cloud aggregation process includes: the cloud server receiving gradients from all edge servers. Repeat the edge aggregation logic to calculate the global gradient. for in The Jacobian matrix represents the objective function vector of the edge server. It is the edge-optimal weight in round t. The edge weights in round t are used to update the global model parameters in round t using the global gradient. for These are the global model parameters for the (t-1)th round; Will The broadcast message returns to the client to initiate the next global round of model training. This global aggregation process collects gradient information from local devices via edge servers. Uploading gradient information to the cloud server Repeat this process until the model accuracy is met or the total number of training rounds is reached.

5. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 4, characterized in that, Select client subset It participates in the training of hierarchical federation; it utilizes the multiple gradients transmitted in each stage and applies the multi-objective evolutionary algorithm NSGA-II to handle multiple objective function problems.

6. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 5, characterized in that, From client-side coding, objective function specification, objective function implementation, and client subset selection; The client encoding includes: Any edge node Include A local device, during the client selection phase, parameters This indicates the proportion of client participation in each round, and it determines the edge. have One client is allowed to update the edge model; when The value at that edge indicates that all clients under that edge participate in each round of training; to facilitate population evolution in NSGA-II, clients are encoded as chromosomes, where 0 indicates that the client was not selected, and 1 indicates that the client participated in this round of training. Each 0 / 1 combination represents a population; The mutation operator in the NSGA-II evolution process is improved as follows: each mutated individual has 5 segments with a gene locus of 1: in P[k] is the value of the kth gene locus.

7. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 6, characterized in that, The objective function is specified to include: To fully leverage multi-gradient approaches to address the heterogeneity of edge data, the client selection problem is modeled as a three-objective optimization problem with equality constraints. Based on gradient characteristics, the three objectives are set as follows: maximizing gradient direction consistency; maximizing gradient norm; and maximizing gradient diversity. Every edge in every global round Simultaneous client selection, each edge Maintain three gradient information dictionaries , This represents the gradient uploaded by the i-th client in the current t-th round. This represents the historical gradient uploaded by the i-th client during its most recent training session. Represents the edge gradient after the previous round of edge server aggregation. Historical gradients are updated immediately after each edge aggregation is completed. To maintain the stability of gradient updates, an exponentially weighted average is used. in, This represents the historical gradient updated in the current round. The gradient is the most recent historical gradient retained, not the gradient from the previous round. This represents the gradient after training in the current round. Weighting coefficients; marginal The objective function is calculated based on three dictionaries to determine the client's choice; these three conflicting objectives are as follows: (1) Maximize gradient direction consistency: This objective measures the consistency between the gradient of the selected client and the global gradient direction. Since the gradient direction of the client differs from the global gradient direction, the sum of the cosine similarity between each client and the global gradient is calculated. A larger value indicates that the overall selection scheme is more consistent with the global gradient direction. If the set of selected clients is... The global gradient of the previous aggregation round is The gradient of client i is Then the objective function 1 is expressed as (2) Maximize the gradient norm: This objective measures the magnitude of the update of the selected client; calculate the sum of the L2 norms of the gradients of each client. The larger the value, the stronger the overall gradient update strength of the selected scheme. Objective function 2 is expressed as: (3) Maximize gradient diversity: This objective measures the degree of difference in gradients among selected clients; by calculating the sum of the cosine distances of the gradients of each client, it provides a perspective for the global model. Objective function 3 is expressed as follows: in Let the gradient cosine similarity be between clients i and j. For the selected client's logarithm That is, the number of client logs that are effectively computed is obtained; In the three objective calculations for each population, if client i is not selected in this round, resulting in... If empty, use the historical gradient dictionary. The historical gradient is used instead of the previous value to ensure that the value of each population is the latest state.

8. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 7, characterized in that, The target improvements include: By using the "value-complementarity-stability" triplet, each objective assumes the responsibility of "correcting deviations." The improved three objectives are as follows: (1) Maximize the gradient value exponent: The improved objective function 1 is expressed as in The objective is to use a sigmoid function, which ensures that the gradient direction is consistent with the global gradient while also constraining the magnitude to a reasonable range. (2) Maximize gradient complementarity diversity: Calculate the average gradient of the selected clients, and then evaluate the cosine distance between each client's gradient and the average gradient to ensure that the client gradients are reasonably dispersed near the average gradient; the improved objective function 2 is expressed as in This represents the average gradient of the selected client. The goal is to avoid excessive homogenization of gradients while preventing deviation from the overall optimization direction. (3) Maximize gradient history consistency: Introduce the client's own historical gradient as a reference, encourage the selection of clients that are stable on the time axis, and reduce the probability of abnormal updates being selected; the improved objective function 3 is expressed as in This represents the historical gradient after exponential weighted averaging; by using historical consistency scores, clients with stable gradient trends are prioritized to reduce training fluctuations.

9. The hierarchical federated learning method based on multi-gradient information and multi-objective optimization according to claim 8, characterized in that, The hierarchical federated processes integrated with FedMGDA transmit multiple gradients in communication between the client, edge, and edge-cloud, specifically including: Initialize global model parameters And it is distributed to all clients by the cloud server; Select a subset of clients for this round of training based on the edges; The selected client performs local training and returns multiple gradients; When the global wheel When edge aggregation is performed, Execute cloud aggregation in real time; In addition, a client selection process based on multi-objective optimization is executed before the start of each global round of training: initialization Each population satisfies the equality constraint; Three objectives for population assessment; Each evolution involves a binary tournament, crossover mutation, and rapid non-dominated sorting, and the final Pareto front is obtained at the end of the evolution. The first population at the Pareto front is selected, decoded into a subset for the client, and output to the edge server.