Multi-objective hierarchical aggregation federal learning optimization method

Through the improved SPEA2 algorithm and hierarchical aggregation strategy, the deep neural network model is divided into deep and shallow parts, and the asynchronous aggregation mechanism is adopted to solve the problem of multi-objective optimization in federated learning and improve the model's adaptability and convergence efficiency in data heterogeneous environments.

CN120706508APending Publication Date: 2025-09-26NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510687133.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing federated learning methods find it difficult to achieve balance on multiple objectives simultaneously, especially in heterogeneous data and dynamic network environments. It is difficult to achieve multi-objective optimization, and the static network structure cannot fully tap the computing potential, resulting in a decline in model performance.

Method used

A multi-objective optimization method based on the improved SPEA2 algorithm is adopted to divide the deep neural network model into two parts, deep and shallow. A hierarchical aggregation strategy is adopted. Through the asynchronous aggregation mechanism of the client model, the topological structure of the convolutional neural network is optimized to achieve multi-objective collaborative optimization.

Benefits of technology

It improves the model adaptability and convergence efficiency of federated learning in data heterogeneous environments, improves the generalization performance and applicability of the model, and solves the problem of multi-objective optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706508A_ABST
    Figure CN120706508A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and discloses a multi-target hierarchical aggregation federated learning optimization method, which comprises the following steps: acquiring a plurality of images; the method comprises the following steps: establishing a four-objective optimization model of federated learning, taking convolutional neural network parameters as decision variables, taking federated learning as a basic training framework, and processing an image, specifically, initializing a global model population; setting an objective function of federal learning training; the plurality of initialized models are distributed to clients, and each client executes a certain number of rounds of stochastic gradient descent based on local data and updates a model copy received by the client; after training is completed, a hierarchical asynchronous aggregation mechanism is introduced to a server side, and average sparse processing is carried out on aggregation updating frequency of deep model parameters in the whole communication round; and obtaining an image processing result. According to the method, the convergence speed and generalization performance of the federated learning model are improved, and the problem of multi-target collaborative optimization in a dynamic network and data heterogeneous environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and in particular relates to a multi-objective hierarchical aggregation federated learning optimization method. Background Art

[0002] Image data (such as medical images and facial recognition data) often involves user privacy or commercial secrets. Traditional centralized training requires transmitting raw data, which poses a risk of leakage. Federated learning localizes model training and exchanges only encrypted model parameters or gradients, ensuring that the original image data remains local, complying with privacy regulations such as GDPR. Furthermore, federated learning incorporates technologies such as differential privacy and homomorphic encryption to prevent attacks that attempt to infer original image information from the model. For example, in vertical federated learning, encrypted gradients are coordinated by third-party collaborators to prevent the leakage of features or sample IDs. Image data is often dispersed across different institutions (such as hospitals and enterprises), making it difficult to centralize due to competition or regulations. Federated learning supports horizontal, vertical, or transfer learning frameworks to flexibly address data distribution differences. For image processing tasks on smart devices (such as mobile phones and IoT devices), federated learning allows models (such as facial recognition and image classification) to be trained locally on the device, with only model updates uploaded, reducing data transmission costs and improving real-time performance. Therefore, in the field of medical imaging diagnosis, multiple hospitals can jointly build cancer detection models, leveraging federated learning to protect patient privacy while integrating data from multiple sources to improve model accuracy.

[0003] The application of federated learning in image processing is essentially a balance between privacy protection and data collaboration. It not only addresses data privacy and compliance issues but also improves model performance through distributed collaboration. It is particularly suitable for privacy-sensitive scenarios such as healthcare, where image data is dispersed.

[0004] However, existing federated learning faces the following challenges in its application, which limits its widespread use.

[0005] First, federated learning applications have difficulty finding the optimal model among multiple objectives. Most existing federated learning frameworks optimize for a single objective, but there are often certain conflicts between different objectives, making it difficult to meet the needs of multi-objective collaborative optimization in practical applications. For example, in intelligent transportation systems, it is necessary to balance the accuracy of traffic flow predictions with the real-time nature of model updates. In addition, in federated learning, the widespread problem of data heterogeneity (Non-IID) further exacerbates the difficulty of multi-objective optimization. In multi-objective optimization problems, optimizing a certain objective will lead to a decrease in the utility of other objectives. If the data difference is too large, the utility of other objectives will be greatly reduced. Multi-objective optimization is more difficult to balance in this data difference environment, resulting in a significant decrease in the overall model performance.

[0006] Secondly, static network models exhibit significant limitations in the practical application of federated learning. The core mechanism of traditional deep learning methods relies on gradient optimization of weight parameters through the backpropagation algorithm. The network topology (including hyperparameters such as inter-layer connectivity and the number of convolutional channels) is typically pre-set based on empirical rules. This static architectural design paradigm is significantly limited in the heterogeneous computing environment of federated learning. Specifically, participating nodes in federated learning have significant differences in computing resources, and these resources are dynamically adjustable. A fixed network structure makes it difficult to fully tap the computing potential of each node, thereby limiting the scope for optimizing overall model performance.

[0007] Therefore, it is necessary to introduce a structurally adaptive dynamic node model that supports multi-objective optimization to improve the multi-objective adaptability and convergence efficiency of federated learning in heterogeneous image processing network environments. However, the introduction of a dynamic network structure also brings new challenges: within each iteration of federated aggregation, the neural networks of participating nodes may have different topologies. This dynamic nature significantly limits the optimization methods for multiple objectives, especially in the dual dimensions of gradient parameters and structural parameters, making it difficult to establish an effective aggregate optimization path. Designing a structural search strategy that can achieve multi-objective balanced optimization has become a key breakthrough in improving the performance of federated learning. Summary of the Invention

[0008] To address the above challenges, this application proposes a multi-objective federated learning method based on hierarchical aggregation of client models. To address the difficulty of achieving balance across multiple objectives in federated learning, a multi-objective optimization method for federated learning based on an improved SPEA2 is proposed. The improved SPEA2 evolutionary algorithm is used to solve the multi-objective optimization problem and achieve balance among multiple objectives. Aiming at dynamic network optimization and data heterogeneity, the deep neural network model is divided into two parts, deep and shallow, corresponding to the model's feature extraction capabilities and task-specific knowledge, respectively. An asynchronous aggregation mechanism for deep and shallow model parameters in the client model is used to achieve efficient collaboration of multi-objective federated learning in a data heterogeneous environment. On the server side, a hierarchical aggregation strategy is designed to reduce the frequency of deep parameters participating in aggregation to mitigate the negative impact of data heterogeneity. A multi-objective optimization algorithm is used to aggregate model parameters to balance the trade-offs between multiple objectives. During the above dynamic optimization process, although the network topology is not fixed, its functional modules do not change. For example, the convolutional layer module, pooling layer module, and fully connected layer module in a convolutional neural network do not disappear during the optimization process, and the entire network model is composed from shallow to deep. The multi-objective federated learning method based on hierarchical aggregation of client models has achieved good results in a data heterogeneous environment and can effectively improve the applicability of the algorithm in practical application scenarios.

[0009] To achieve the above objectives, this application discloses a multi-objective hierarchical aggregation federated learning optimization method, comprising the following steps: Get multiple images; A four-objective optimization model for federated learning is established, with minimization of the global model test error rate, global model accuracy distribution variance, communication cost, and data cost as optimization objectives. Convolutional neural network parameters are used as decision variables. Federated learning is used as the basic training framework to process images. Specifically, the following steps are performed: Initialization of the global model population: The SPEA2 algorithm is improved using the good point set strategy so that the initial population obtained by population initialization is evenly distributed in the solution space; Set the objective function for federated learning training; After initialization, multiple models are distributed to the client. Each client performs a certain number of rounds of stochastic gradient descent on local data to update the model copy it receives. The optimization goal of the local training phase is to minimize the loss function on the local dataset. After training is completed, a hierarchical asynchronous aggregation mechanism is introduced on the server side to perform sparse processing on the aggregated update frequency of deep model parameters by averaging them over the entire communication round. Output the image processing result.

[0010] Preferably, the objective function of federated learning training is as follows: ; is the objective function of the model, including the global model test error rate , communication cost , global model accuracy distribution variance and data costs , the decision variables and constraints are the parameters to be optimized and their ranges, Represents; the topological parameters of the neural network and the ratio of participants in each round of federated learning , learning rate and training batches The four objective functions that jointly affect federated learning; among them, the hyperparameters of the neural network CNN include the number of convolutional layers , number of fully connected layers , the number of neurons in the fully connected layer , convolution kernel size , number of convolution kernel channels ,Right now .

[0011] Preferably, the objective function It is to minimize the global model test error rate. The specific calculation formula is as follows: ; For the The model test accuracy of participants, is the average test accuracy, is the total number of clients; Objective function is to minimize the communication cost, expressed as: ; is the proportion of participants participating in each round, is the size of the model parameters; Objective function It is to minimize the variance of the model accuracy distribution, expressed as: ; Objective function is to minimize the data cost, expressed as: ; is the total number of participants in this round , It is Data costs for each participant.

[0012] Preferably, the method of improving the SPEA2 algorithm by using the good point set strategy so that the initial population obtained by population initialization is evenly distributed in the solution space specifically includes: The good point set strategy is used to improve the population initialization method; the good point set is defined as: yes The unit cube in a dimensional Euclidean space is , there is a point set , , its deviation satisfy ,but For the best point collection, represents the number of samples, Represents good points; is a constant, only and Related, is any positive number, represents the number of samples, , is an integer, To satisfy The smallest prime number of ; The initial values ​​of the population are evenly distributed within the allowable range, so that the first generation solution is as close to the optimal value as possible, thereby improving the optimization accuracy.

[0013] Preferably, the optimal point set initialization method is adopted for the solution space composed of real number decision variables, where the real number decision variable is the participant ratio With learning rate , the spatial dimension is 2, and the population size is , the specific steps are as follows: calculate The value of ,in ; Construct a good point set based on the population size m: ; Will Mapped into the domain of the variable: ; in is the lower limit of the current variable, The upper limit of the current variable.

[0014] Preferably, the hierarchical asynchronous aggregation mechanism operates as follows: each client performs local training according to its own training progress, and only when a preset specific communication round is reached, the deep model parameters obtained from the local training are uploaded to the central server together with the shallow model parameters for aggregation to update the global model; before reaching these specific communication rounds, the client only uploads its shallow model parameters to the server for aggregation update; After obtaining the initial aggregation results, the server performs a multi-objective population evolution operation on the model population. Each model is evaluated based on a multi-dimensional objective function. In the selection operation, non-inferior models are prioritized to construct the next generation of parent individuals. In the crossover and mutation operations, new offspring models are generated by cross-exchanging and randomly perturbing model parameters, further improving the diversity and exploration capabilities of the population. These newly generated individuals then enter the federated training loop again. The federated training is performed alternately with the population evolution process and continues for multiple evolution generations until the maximum number of iterations or the population convergence condition is met; ultimately, the algorithm outputs a set of model solutions on the Pareto frontier.

[0015] Preferably, the algorithm steps on the server side are as follows: Initialize global model parameters ; Two types of network parameter aggregation updates based on different communication rounds: setting , define the participant set as ; When the communication round When , the server aggregates and updates the collected client global model parameters. Each participant in , updates ,in, is the number of participants, It is The weight parameters of the participants, It is The complete model parameters of each participant; in other communication rounds, the server only aggregates and updates the collected client shallow model parameters. , It is shallow model parameters for each participant; Model evaluation: After model training is completed, the obtained model is evaluated, and the trained model is used to predict the test set to calculate the four objective function values.

[0016] Preferably, the client algorithm is as follows: Local model update: When the communication round When the model parameters sent by the server are Used to update local model parameters ; In other communication rounds, the deep parameters of the local model are used Override the model parameters sent by the server The deep parameter part in , gets the new local model, that is ; For each training batch b in each training epoch e, update ; Behavior model parameter upload: When the communication round When the complete local model parameters are uploaded to the server ; Other communication rounds only upload shallow model parameters .

[0017] The beneficial effects of this application are as follows: A model hierarchical aggregation strategy for dynamic networks is proposed. By proposing an asynchronous update mechanism for dividing the shallow and deep parameters of the dynamic network, the convergence speed and generalization performance of the federated learning model are improved.

[0018] A multi-objective optimization federated learning model based on model hierarchical aggregation was constructed, the network hierarchical aggregation mechanism was integrated into the multi-objective optimization, and a multi-objective optimization algorithm based on hierarchical aggregation was proposed, which effectively solved the problem of multi-objective collaborative optimization in dynamic network and data heterogeneous environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Processing flow chart of an embodiment of the present application.

[0020] Figure 2 Schematic diagram of the aggregation strategy in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited in any way. Any changes or substitutions made based on the teachings of the present invention fall within the scope of protection of the present invention.

[0022] In the federated learning framework, the optimization goals of image processing must balance algorithm performance, privacy protection, communication efficiency, and fairness in multi-party collaboration. The following is an analysis of the core optimization goals and related technologies for image processing in federated learning methods: Federated learning aims to build a more generalizable global model by jointly training the local data of multiple participants. For example, in medical imaging diagnosis, data distribution varies greatly across hospitals. Federated learning improves the model's ability to identify rare cases by aggregating different data features.

[0023] Optimize the computational efficiency of the local training process, such as accelerating image processing (such as erosion / dilation operations) through SIMD instruction sets, or using lightweight models (such as MobileNet) to reduce computing resource consumption.

[0024] Image data often contains sensitive information (such as medical images), and raw data transmission must be avoided. Federated learning combines techniques such as differential privacy (DP) and homomorphic encryption (HE) to ensure privacy during gradient or parameter updates.

[0025] To combat gradient backpropagation attacks during model updates, a secure aggregation protocol or noise injection mechanism is used to destroy the attacker's ability to reconstruct the original data.

[0026] Deploy lightweight models on smart terminals (such as mobile phone cameras) to transmit only necessary features or intermediate results, reducing the end-to-cloud communication load.

[0027] Federated learning must avoid biasing the model towards participants with large data volumes. Multi-objective optimization methods (such as FedMGDA+) balance the loss functions of each client by adjusting gradient merging weights, ensuring fairness across different data distributions.

[0028] Find update directions that improve the performance of all participants together, avoiding sacrificing the accuracy of a few participants.

[0029] In addition, for the multi-objective optimization problem of federated learning, it is also necessary to establish a mathematical model for the four-objective optimization of federated learning. Modeling the optimization problem helps to clarify the objective function to be optimized and can define the constraints of the problem. These constraints define the feasible domain of the decision variables. In addition, problem modeling provides a mathematical basis for using algorithms to solve multi-objective optimization problems. Many intelligent optimization algorithms require a clear mathematical model as input. The expression of the multi-objective optimization mathematical model trained by federated learning is shown in Equation (3): ; is the objective function of the model, including the global model test error rate , communication cost , global model accuracy distribution variance and data costs The four objective functions comprehensively evaluate the model value from four aspects: global model performance, model fairness, communication cost, and training data cost. The process of optimizing the four objectives is the process of improving the model value. The decision variables and constraints are the parameters to be optimized and their ranges. The neural network selected in this application is a convolutional neural network (CNN). The topological parameters of the neural network are related to the ratio of participants in each round of federated learning. Learning rate and training batches The four objective functions that jointly affect federated learning. Among them, the hyperparameters of the neural network CNN include the number of convolutional layers , number of fully connected layers , the number of neurons in the fully connected layer , convolution kernel size , number of convolution kernel channels ,Right now .

[0030] The first objective function The performance of a model is evaluated mainly by the accuracy of the model test. The lower the error rate of the model, the better the performance of the model. The specific calculation formula is shown in formula (4). For the Model test accuracy for each participant; .

[0031] The second objective function The goal is to minimize communication costs. In the framework of federated learning, communication costs are often very high. Reducing communication costs will improve the sustainability of federated learning. In federated learning training, the main body of interaction between the client and the central server is the model parameters, so the communication cost is directly related to the model parameters of each client. It can be expressed as , is the total number of clients, is the proportion of participants participating in each round, is the size of the model parameters.

[0032] The third objective function Minimize the variance of the model accuracy distribution Due to the different performance of participants' devices, the final global model tends to favor some devices with better performance, resulting in a large gap in model accuracy between participants and making it difficult to apply the model to all participants.

[0033] The fourth objective function The goal is to minimize data costs. In actual application scenarios, due to the privacy of local data, a certain fee is generally required when calling the data of each participant for model training. However, the level of fees is not directly related to the client's contribution to the global model. In this paper, an integer between 0 and 100 is randomly assigned to each client to simulate the data fees charged by the local client to the central server. It can be expressed as , is the total number of participants in this round , is the data cost of the nth participant.

[0034] During the dynamic optimization process of this application, the network topology is intentionally designed to be non-fixed, allowing it to be continuously iterated and adjusted under the drive of the multi-objective optimization algorithm. However, during this process, although the external structure may undergo constant changes, the core functional modules remain unchanged. Specifically, in convolutional neural networks (CNNs), key components such as convolutional layer modules, pooling layer modules, and fully connected layer modules will not disappear or be replaced during the optimization process. During the entire dynamic optimization process, although new layers or modules may be added, or the connection method between existing layers may change, the core role of these basic modules is always the key to supporting the performance of the entire network.

[0035] Convolutional Neural Networks (CNN) gradually extracts features at different levels from input data through a hierarchical structure. Figure 2As shown in the figure, the shallow network is the part close to the input layer and is typically composed of a small number of convolutional and pooling layers. These layers use a small receptive field to scan the image data, primarily extracting low-level features such as color, texture, edges, and simple geometric shapes. Due to the small receptive field of shallow networks, their features have high resolution and strong spatial location dependence. These features typically retain detailed information in the input data, making them particularly effective in tasks requiring local information, such as edge detection or image segmentation. However, a limitation of shallow features is their lack of ability to abstract global semantic information, making them ineffective in identifying complex patterns in the data.

[0036] In contrast, deep networks are located near the output layer and are typically composed of multiple layers of convolution, pooling, and fully connected layers. As the number of network layers increases, the receptive field of the convolution operation gradually expands, allowing the network to capture feature relationships over a wider range. Deep networks abstract higher-level semantic information from shallow features, and the generated feature maps contain complex features such as object categories, contours, and global patterns. This feature makes deep networks more suitable for tasks that require global information, such as classification and target detection. However, due to multiple dimensionality reduction operations, deep features have low resolution and detailed information is gradually lost. Therefore, they need to be combined with shallow features to improve the ability to recognize small objects or details.

[0037] Shallow and deep features are complementary in nature. Shallow features focus on details and local information, while deep features emphasize global semantic abstraction. In federated learning, the distribution of effective data between participating devices can differ significantly. This statistical heterogeneity can adversely affect the performance of federated learning training algorithms. Specifically, within the federated learning framework with statistical heterogeneity, because the deep neural network layer focuses on extracting global semantic abstractions from the training dataset, the deep network models of different clients can differ significantly. During training, these can significantly deviate from the correct adjustment direction of the global model, significantly affecting its performance.

[0038] In the classic federated learning framework FedAvg, the loss function is defined as: ,in, is the loss function of the k-th client model. Therefore, the performance of federated learning strongly depends on the aggregation strategy of the model. The shallow learning of CNN is applicable to the general characteristics of different tasks and datasets, which means that the shallow parameters in CNN Represents the general characteristics of different training data and is more important to the global model, so shallow parameters should participate more in the center aggregation process. Since it has a strong correlation with the local dataset, it contributes less to the global model and more to the client's local model, so the global aggregation frequency and update frequency of deep parameters are reduced.

[0039] In one embodiment, the present application adopts the improved strength Pareto evolutionary algorithm SPEA2 as a multi-objective algorithm and improves it. The time complexity of SPEA2 is mainly determined by its core operations (fitness allocation, environment selection and truncation). Its complexity is closely related to the population size, the number of targets and the dimension of the problem. The time complexity of the SPEA2 algorithm is ,in is the population size, is the number of targets. The time complexity of the reference point association is and The product of is linearly related, that is, Taking all these factors into consideration, the total time complexity of the algorithm is ,in will dominate, which can be expressed as Therefore, the population size and the number of iterations This has a major impact on the algorithm's time complexity. Limited by the client's actual computing power and training time, the number of initialized populations is limited. Random initialization makes it difficult to distribute the initial population widely across the solution space, resulting in low optimization efficiency. This application improves the population initialization method of the SPEA2 algorithm to improve the algorithm's utilization of the solution space and enhance its optimization capabilities.

[0040] This application uses the good point set strategy to improve the population initialization method. The concept of good point set originated from the famous Chinese mathematician Hua Luogeng. The core idea of ​​the good point set is to maintain the diversity of the population while improving the quality of the optimization solution by selecting a group of balanced and coordinated individuals in the population initialization stage, effectively balancing the ability to explore and utilize the search space. The basic definition of the good point set is: Assume yes The unit cube in a dimensional Euclidean space is , there is a point set , its deviation satisfy , then it is called For the best point collection, represents the number of samples, Represents a good point. is a constant, only and Related, represents the number of samples, , is an integer, To satisfy The smallest prime number of .

[0041] In this application's federated learning multi-objective optimization model, the solution space is large and the population size is small. A randomly initialized population is difficult to evenly distribute across the solution space, which can affect population diversity. Because the specific location of the optimal solution is difficult to predict before optimization, a uniform distribution strategy can be employed to evenly distribute the initial population values ​​within an acceptable range. This allows the first-generation solution to be as close to the optimal value as possible, thereby improving optimization accuracy.

[0042] The integer decision variables in this application adopt binary coding, and the real decision variables adopt real value coding. The spatial randomness of real value variables is large, so the solution space composed of real decision variables adopts the optimal point set initialization method, where the real decision variables are the participant ratios. With learning rate , the spatial dimension is 2, assuming the population size is The specific steps are as follows: (1) Calculation The value of ,in ; (2) Construct a good point set based on the population size m: ; (3) Mapped into the domain of the variable: ; in is the lower limit of the current variable, The upper limit of the current variable.

[0043] Building on the traditional federated learning framework FedAvg, this application introduces a hierarchical aggregation mechanism and a multi-objective evolutionary strategy to propose a novel multi-objective federated learning algorithm, MOFedHA (Multi-objective Federated Learning with Hierarchical Aggregation). MOFedHA uses federated learning as its training framework and incorporates an evolutionary optimization process, enabling dynamic exploration of the optimal balance between four objectives during training.

[0044] The algorithm flow is as follows Figure 1As shown, the algorithm begins with the initialization of a global model population. A good point set strategy is used to uniformly sample multiple initial populations from the parameter space, which serve as the basis for subsequent evolutionary iterations. This initialization method helps enhance the diversity of the population, thereby improving the ability to cover the solution space during evolution. The initialized models are then distributed to clients. Each client performs a certain number of rounds of stochastic gradient descent on its local data to update its received model replica. The local training phase adheres to the traditional federated learning optimization objective of minimizing the loss function on the local dataset.

[0045] After the training is completed, this application introduces a hierarchical asynchronous aggregation mechanism on the server side. The specific aggregation strategy is as follows: Figure 2 As shown in Figure 2. Under this mechanism, the aggregate update frequency of the deep model parameters is averaged over the entire communication round. Specifically, this strategy is implemented by setting the same interval for the deep model parameters between each communication round, thereby reducing unnecessary frequent communication. The specific operation is as follows: each client performs local training according to its own training progress, and only when a specific preset communication round is reached (for example, the communication round T is or ), the locally trained deep model parameters are uploaded to the central server together with the shallow model parameters for aggregation to update the global model. Before these specific communication rounds, the client only uploads its shallow model parameters to the server for aggregation update.

[0046] After obtaining preliminary aggregation results, the server performs multi-objective population evolution on the model population. Each model is evaluated based on a multi-dimensional objective function. In the selection operation, non-inferior models are prioritized to construct the next generation of parent individuals. In the crossover and mutation operations, new offspring models are generated by cross-exchanging and randomly perturbing model parameters, further improving the diversity and exploration capabilities of the population. These newly generated individuals will enter the federated training loop again.

[0047] This federated training is performed alternately with the population evolution process, and continues for multiple generations until the maximum number of iterations or the population convergence condition is met. Ultimately, the algorithm outputs a set of model solutions that are on the Pareto frontier. ; The pseudo codes of the specific algorithms are shown in Algorithm 1 and Algorithm 2.

[0048] Algorithm 1 is the pseudo code of the server side, showing a series of operations performed on the server side. Line 2 initializes the global model parameters Lines 3-15 are the aggregation strategy part, which details the two network parameter aggregation update strategies performed by the server based on different communication rounds. During the communication round, the server aggregates and updates the collected client global model parameters; during other communication rounds, the server only aggregates and updates the collected client shallow model parameters. Lines 16-19 are the model evaluation part. After the model training is completed, the obtained model is evaluated and the trained model is used to predict the test set to calculate the four target values. ; Algorithm 2 is the pseudo code of the client, showing a series of operations performed on the client. Lines 2-11 are the local model update part, which details two ways for the client to update the local model according to different communication rounds. When the model parameters sent by the server are Used to update local model parameters ; In other communication rounds, the deep parameters of the local model are used Override the model parameters sent by the server The deep parameter part in the model parameter upload section is used to obtain the new local model. Sections 12-16 describe in detail the two ways for the client to upload the local model according to different communication rounds. In the communication round, the complete local model parameters are uploaded to the server; in other communication rounds, only the shallow model parameters are uploaded.

[0049] This application uses the publicly available datasets MNIST, CIFAR-10, and CIFAR-100 as experimental datasets. The MNIST dataset consists of 70,000 images, all 28x28 pixel grayscale images, each containing a handwritten digit. 60,000 of these images are used as training sets, and 10,000 as test sets. The CIFAR-10 dataset consists of 60,000 32x32 pixel RGB images from 10 classes, 50,000 of which are used as training sets and 10,000 as test sets. The CIFAR-100 dataset has 100 classes, each containing 600 images. Each class has 500 training images and 100 test images. The 100 classes in CIFAR-100 are divided into 20 broad categories. Each image is assigned a "fine" label (the class it belongs to) and a "coarse" label (the broad category it belongs to).

[0050] In the dataset setting, different data allocation strategies are designed for these datasets to simulate non-independent and identically distributed (Non-IID) data environments.

[0051] For the MNIST and CIFAR-10 datasets, this application provides two distribution methods: Non-IID allocation: The dataset is divided into 200 shards, each containing 250 images. Each client is assigned 20 shards, ensuring that each client has equal data volume but different data distribution. Shards are randomly assigned to clients to ensure that each client has a different data distribution. Assume that the number of clients participating in training is 10.

[0052] Non-IID-unequal allocation: The dataset is divided into 1000 shards, each containing 50 images. The number of shards allocated to each client is random, ranging from 10 to 250. Shards are randomly selected and assigned to clients, ensuring that each client has at least one shard. If the number of allocated shards exceeds the total number of shards, the remaining shards are randomly assigned to the client. Assume that the number of clients participating in training is 10.

[0053] This application uses a convolutional neural network (CNN) for image processing as the neural network model for the experiment. Two neural network classes are defined: CNNMnist and CNNCifar. These two neural network classes can dynamically adjust the number of convolutional layers and fully connected layers and the number of neurons based on the input parameters. The number of convolutional layers and the number of fully connected layers are both defined as 1 to 3. The total number of clients in the experimental setup The specific optimization parameter settings are shown below. The population size is set to 20, the learning rate range is 0.01-0.2, the training batch size is set to 1-64, the minimum number of CNN convolutional layers is 1 and the maximum is 3, the maximum number of kernel channels is 128, and the convolution kernel size is set to 3 or 5. Regarding the data price of each client in federated learning, the experiment randomly assigns an integer in the range of 0-100 as the client's data usage price, thereby simulating the situation where different clients have different data prices.

[0054] In the Non-IID data environment, the specific aggregation strategy is as follows Figure 2 As shown in the figure, the experiment sets the training rounds to 10, that is, the communication rounds are 10. For the last layer of the fully connected layer of each neural network, the center aggregation and model parameter update are carried out once every 5 communication rounds.

[0055] To verify that the solution obtained by this application's algorithm is superior to that obtained by other multi-objective optimization algorithms, we set the same training conditions on the CIFAR-10 dataset in an equal non-IID environment, and used different multi-objective optimization algorithms to optimize the federated learning four-optimization model and calculate its hypervolume index and coverage. The results are shown in Table 1.

[0056] Table 1 Comparative experimental data of different optimization algorithms on the CIFAR-10 dataset:

[0057] The experimental data in Table 1 shows that, in the results obtained from training on the uniform Non-IID CIFAR-10 dataset, the proposed algorithm outperforms other multi-objective optimization algorithms in terms of solution set coverage. In comparisons of the hypervolume (HV) value, the proposed algorithm is slightly inferior to the NSGA2 algorithm, but significantly outperforms the NSGA2 algorithm in terms of solution set coverage. In summary, the proposed algorithm has superior balancing capabilities for federated learning multi-objective optimization problems to NSGA-II, MOEA / D, SPEA2, and IBEA algorithms.

[0058] This application investigates the multi-objective balancing and parameter optimization problems of federated learning for dynamic networks and proposes a multi-objective federated learning algorithm based on model hierarchical aggregation. First, a four-objective optimization model for federated learning is constructed, with minimizing the global model test error rate, the distribution variance of the global model test error rate, communication cost, and data cost as optimization objectives, and convolutional neural network parameters as decision variables. By adopting a hierarchical model aggregation approach on both the server and client sides to address the problem of non-IID data bias, the accuracy of federated learning is improved. Next, this application improves the NSGA-III algorithm using a good point set strategy, ensuring that the initial population obtained by population initialization is evenly and widely distributed in the solution space, thereby improving optimization capability and accuracy and obtaining high-quality solutions. Experimental results demonstrate that the multi-objective federated learning framework based on model hierarchical aggregation can effectively mitigate the impact of non-IID data environments on multi-objective federated learning. Furthermore, the Pareto optimal solution selected by the improved NSGA-III algorithm achieves a balance between the four objectives without compromising the accuracy of the global model. Furthermore, this application further extends the algorithm to other classic multi-objective optimization algorithms for comparative experiments to comprehensively evaluate its performance and applicability. Experimental results show that the algorithm framework of this application has good scalability. In a real complex data heterogeneous environment, it can adapt to most mainstream multi-objective optimization algorithms and significantly improve the performance of federated learning multi-objective optimization algorithms, thereby achieving hyperparameter optimization of federated learning models under multi-objective equilibrium conditions in a more efficient manner.

[0059] As used herein, the word "preferred" is intended to serve as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, the use of the word "preferred" is intended to present concepts in a concrete manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless otherwise specified or clear from the context, "X employs A or B" is intended to mean any of the naturally inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied in any of the foregoing examples.

[0060] Moreover, although the present disclosure has been shown and described with respect to one or implementation, those skilled in the art will think of equivalent variations and modifications based on reading and understanding of this specification and the accompanying drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above-mentioned components (such as elements, etc.), the terms used to describe such components are intended to correspond to any component (unless otherwise indicated) that performs the specified function of the component (such as it is functionally equivalent), even if structurally different from the disclosed structure that performs the function in the exemplary implementation of the present disclosure shown herein. In addition, although the specific features of the present disclosure have been disclosed with respect to only one of several implementations, such features can be combined with one or other features of other implementations that can be desired and advantageous for a given or specific application. Moreover, insofar as the terms "including", "having", "containing" or their variations are used in specific embodiments or claims, such terms are intended to be included in a manner similar to the term "comprising".

[0061] The functional units in the embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or multiple or more units may be integrated into a single module. The aforementioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The aforementioned storage medium may be a read-only memory, a magnetic disk, or an optical disk, etc. The aforementioned devices or systems may execute the storage method in the corresponding method embodiment.

[0062] In summary, the above embodiment is one implementation method of the present invention, but the implementation method of the present invention is not limited to the described embodiment. Any other changes, modifications, substitutions, combinations, and simplifications that deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A multi-objective hierarchical aggregation federated learning optimization method, characterized in that: The following steps are involved: Get multiple images; A four-objective optimization model for federated learning is established, with minimization of the global model test error rate, global model accuracy distribution variance, communication cost, and data cost as optimization objectives. Convolutional neural network parameters are used as decision variables. Federated learning is used as the basic training framework to process images. Specifically, the following steps are performed: Initialization of the global model population: The SPEA2 algorithm is improved using the good point set strategy so that the initial population obtained by population initialization is evenly distributed in the solution space; Set the objective function for federated learning training; After initialization, multiple models are distributed to the client. Each client performs a certain number of rounds of stochastic gradient descent on local data to update its received model copy. The optimization goal of the local training phase is to minimize the loss function on the local dataset during image processing. After training is completed, a hierarchical asynchronous aggregation mechanism is introduced on the server side to perform sparse processing on the aggregated update frequency of deep model parameters by averaging them over the entire communication round. Output the image processing result.

2. The multi-objective hierarchical aggregation federated learning optimization method according to claim 1 is characterized in that: The objective function of federated learning training is as follows: ; is the objective function of the model, including the global model test error rate , communication cost , global model accuracy distribution variance and data costs , the decision variables and constraints are the parameters to be optimized and their ranges, Represents; the topological parameters of the neural network and the ratio of participants in each round of federated learning , learning rate and training batches The four objective functions that jointly affect federated learning; among them, the hyperparameters of the neural network CNN include the number of convolutional layers , number of fully connected layers , the number of neurons in the fully connected layer , convolution kernel size , number of convolution kernel channels ,Right now .

3. The multi-objective hierarchical aggregation federated learning optimization method according to claim 2, characterized in that: Objective function It is to minimize the global model test error rate. The specific calculation formula is as follows: ; For the The model test accuracy of participants, is the average test accuracy, is the total number of clients; Objective function is to minimize the communication cost, expressed as: ; is the proportion of participants participating in each round, is the size of the model parameters; Objective function It is to minimize the variance of the model accuracy distribution, expressed as: ; Objective function is to minimize the data cost, expressed as: ; is the total number of participants in this round , It is Data costs for each participant.

4. The multi-objective hierarchical aggregation federated learning optimization method according to claim 3 is characterized in that: The SPEA2 algorithm is improved by using the good point set strategy to make the initial population obtained by population initialization uniformly distributed in the solution space, specifically including: The good point set strategy is used to improve the population initialization method; the good point set is defined as: yes The unit cube in a dimensional Euclidean space is , there is a point set , , its deviation satisfy ,but For the best point collection, represents the number of samples, Represents good points; is a constant, only and Related, is any positive number, represents the number of samples, , is an integer, To satisfy The smallest prime number of ; The initial values ​​of the population are evenly distributed within the allowable range, so that the first generation solution is as close to the optimal value as possible, thereby improving the optimization accuracy.

5. The multi-objective hierarchical aggregation federated learning optimization method according to claim 4, characterized in that: The optimal point set initialization method is adopted for the solution space composed of real decision variables, where the real decision variables are the proportion of participants With learning rate , the spatial dimension is 2, and the population size is , the specific steps are as follows: calculate The value of ,in ; Construct a good point set based on the population size m: ; Will Mapped into the domain of the variable: ; in is the lower limit of the current variable, The upper limit of the current variable.

6. The multi-objective hierarchical aggregation federated learning optimization method according to claim 5, characterized in that: The hierarchical asynchronous aggregation mechanism operates as follows: each client performs local training according to its own training progress, and only when a specific preset communication round is reached, the deep model parameters obtained from local training are uploaded to the central server together with the shallow model parameters for aggregation to update the global model; Before reaching these specific communication rounds, the client only uploads its shallow model parameters to the server to participate in the aggregate update; After obtaining the initial aggregation results, the server performs a multi-objective population evolution operation on the model population. Each model is evaluated based on a multi-dimensional objective function. In the selection operation, non-inferior models are prioritized to construct the next generation of parent individuals. In the crossover and mutation operations, new offspring models are generated by cross-exchanging and randomly perturbing model parameters, further improving the diversity and exploration capabilities of the population. These newly generated individuals then enter the federated training loop again. The federated training is performed alternately with the population evolution process and continues for multiple evolution generations until the maximum number of iterations or the population convergence condition is met; ultimately, the algorithm outputs a set of model solutions on the Pareto frontier.

7. The multi-objective hierarchical aggregation federated learning optimization method according to claim 6, characterized in that: The algorithm steps on the server side are as follows: Initialize global model parameters ; Two types of network parameter aggregation updates based on different communication rounds: setting , define the participant set as ; When the communication round When , the server aggregates and updates the collected client global model parameters. Each participant in , updates ,in, is the number of participants, It is The weight parameters of the participants, It is The complete model parameters of each participant; in other communication rounds, the server only aggregates and updates the collected client shallow model parameters. , It is shallow model parameters for each participant; Model evaluation: After model training is completed, the obtained model is evaluated, and the trained model is used to predict the test set to calculate the four objective function values.

8. The multi-objective hierarchical aggregation federated learning optimization method according to claim 6, characterized in that: The client algorithm is as follows: Local model update: When the communication round When the model parameters sent by the server are Used to update local model parameters ; In other communication rounds, the deep parameters of the local model are used Override the model parameters sent by the server The deep parameter part in , gets the new local model, that is ; For each training batch b in each training epoch e, update ; Behavior model parameter upload: When the communication round When the complete local model parameters are uploaded to the server ; Other communication rounds only upload shallow model parameters .

Citation Information

Cited By

  • Multi-dimensional bid evaluation intelligent optimization method based on deep learning

    CN121301752A