Federal learning optimization method for dynamic network structure
Through the improved NSGA-III algorithm and hierarchical aggregation strategy, the challenges of multi-objective optimization of federated learning in intelligent transportation networks are solved, the convergence speed and generalization performance of the model are improved, the communication cost is reduced, and multi-objective collaborative optimization is achieved.
Patent Information
- Application Number
- CN202510686530.4
- 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
Existing federated learning methods have difficulty in achieving a balance among multiple optimization objectives in intelligent transportation networks, especially in heterogeneous data and dynamic network environments, where there are problems of degraded model performance and high communication costs.
A multi-objective optimization method based on the improved NSGA-III algorithm is adopted, combined with a hierarchical aggregation strategy, to divide the deep neural network model into deep and shallow parts. An asynchronous aggregation mechanism is adopted to optimize the topological structure of the convolutional neural network through hierarchical aggregation of the client model, thereby achieving multi-objective collaborative optimization.
It improves the model convergence speed and generalization performance of federated learning in data heterogeneous environments, reduces communication costs, and improves the applicability and accuracy of the model.
Smart Images

Figure CN120706507A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent transportation technology, and in particular relates to a federated learning optimization method for dynamic network structures. Background Art
[0002] In recent years, artificial intelligence (AI) technology has experienced explosive growth, giving rise to a new class of large-scale model technology, exemplified by the renowned ChatGPT. Large-scale model technology is primarily supported by powerful computing power, vast amounts of data, and efficient algorithms. This suggests that, in addition to the essential algorithms and physical requirements of machine computing power for AI, leveraging vast amounts of data for model training has become a key technology in the field of intelligent transportation networks. With the rapid development of intelligent transportation network optimization technology, massive amounts of data are distributed across edge devices, posing challenges for traditional centralized machine learning, such as data silos and privacy leaks. Federated learning, an emerging distributed machine learning paradigm, allows participants to train models locally while sharing only model parameters, not raw data. This effectively addresses data privacy and security concerns and demonstrates significant potential in the field of intelligent transportation network optimization.
[0003] However, existing federated learning faces the following challenges in its application, which limits its widespread use.
[0004] 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.
[0005] Secondly, static network models exhibit significant limitations in the practical application scenarios of federated learning. The core mechanism of traditional deep learning methods is to achieve gradient optimization of weight parameters through the backpropagation algorithm. The network topology (including hyperparameters such as the inter-layer connection method and the number of convolution channels) is usually pre-set based on empirical rules. This static architecture design paradigm has significant limitations in the heterogeneous computing environment of federated learning. Specifically, the computing resources of the participating nodes in federated learning vary significantly, 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 optimization space for overall model performance.
[0006] 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 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 balanced multi-objective optimization has become a key breakthrough in improving the performance of federated learning. Summary of the Invention
[0007] 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 federated learning in achieving a balance across multiple optimization objectives in intelligent transportation networks, a multi-objective optimization method for federated learning based on an improved NSGA-III evolutionary algorithm is proposed. The improved NSGA-III evolutionary algorithm is used to solve the multi-objective optimization problem and achieve a balance between multiple objectives. To address the dynamic network optimization and data heterogeneity issues, 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 on the client side is utilized 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 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.
[0008] To achieve the above objectives, the present application discloses a federated learning optimization method for dynamic network structures, comprising the following steps:
[0009] Obtain multiple optimization objectives for intelligent transportation networks and objective functions for federated learning training;
[0010] Federated learning is used as the basic training framework, and an evolutionary optimization process is integrated on top of it. This allows the training process to dynamically explore the optimal balance between four objectives, including:
[0011] Initialization of the global model population uses a good point set strategy to uniformly sample multiple initial populations in the parameter space as the basis for subsequent evolutionary iterations;
[0012] 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.
[0013] 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.
[0014] Output the optimization results of the intelligent transportation network.
[0015] Preferably, the objective function of federated learning training is as follows:
[0016]
[0017] F(v) is the objective function of the model, including the global model test error rate f1, communication cost f2, global model accuracy distribution variance f3 and data cost f4. The decision variables and constraints are the parameters to be optimized and their ranges, represented by v. The topological structure parameters of the neural network, the proportion of participants in each round of federated learning C, the learning rate η and the training batch B jointly affect the four objective functions of federated learning. Among them, the hyperparameters of the neural network CNN include the number of convolutional layers Conv, the number of fully connected layers L, and the number of neurons in the fully connected layer N. L , convolution kernel size ks, number of convolution kernel channels C num , that is, v={η,B,C,Conv,ks,C num ,L,N L}.
[0018] Preferably, the objective function f1 is to minimize the global model test error rate, and the specific calculation formula is as follows:
[0019] f1(v)=1―A,
[0020] a k =Net(η,B,C,Conv,ks,C num )
[0021] a k is the model test accuracy of the kth participant, A is the average test accuracy of the model, and K is the total number of clients;
[0022] The objective function f2 is to minimize the communication cost, which is expressed as:
[0023] Coss=σ·C,
[0024] C is the proportion of participants participating in each round, and σ is the size of the model parameters;
[0025] The objective function f3 is to minimize the variance of the model accuracy distribution:
[0026] The objective function f4 is to minimize the data cost, which is expressed as
[0027]
[0028] N is the total number of participants in this round N = K·C, is the data cost of the nth participant.
[0029] Preferably, the improved NSGA-III algorithm is used as the multi-objective algorithm, and the population initialization method is improved based on the NSGA-III algorithm, specifically including:
[0030] The good point set strategy is used to improve the population initialization method; the good point set is defined as: G s is the unit cube in s-dimensional Euclidean space, if r∈G s , there exists a point set P n (i)={(r1i1,r2i2,r3i3,...r n i n ),i=1,2,3,…n}, its deviation satisfy Then P n (i) is the set of good points, n represents the number of samples, and r represents the good point; C(γ,ε) is a constant that is only related to r and ε, ε is an arbitrary positive number, n represents the number of samples, k is an integer, p is a The smallest prime number of ;
[0031] 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.
[0032] Preferably, a good point set initialization method is adopted for the solution space composed of real decision variables, where the real decision variables are the participant ratio C and the learning rate ε, the space dimension is 2, and the population size is m. The specific steps are as follows:
[0033] Calculate the value of r, r=(r1,r2,...r m ),in
[0034] Construct a good point set based on the population size m:
[0035]
[0036] P kMapped into the domain of the variable:
[0037] X=min k +P k (max k ―min k )
[0038] where min k is the lower limit of the current variable, max k The upper limit of the current variable.
[0039] 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;
[0040] 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.
[0041] 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.
[0042] Preferably, the algorithm steps on the server side are as follows:
[0043] Initialize global model parameters w0;
[0044] Two types of network parameter aggregation updates based on different communication rounds: set p = max(K·C,1) and define the participant set as C r ; When the communication round t Mod t a = 0, the server aggregates and updates the collected client global model parameters. r Each participant in , updates Where p is the number of participants, ρ n is the weight parameter of the nth participant, is the complete model parameter of the nth participant; in other communication rounds, the server only aggregates and updates the collected client shallow model parameters. are the shallow model parameters of the nth participant;
[0045] 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.
[0046] Preferably, the client algorithm is as follows:
[0047] Local model update: When the communication round t Mod t a =1, the model parameter w sent by the server t Used to update the local model parameters w n ; In other communication rounds, the deep parameters of the local model are used Overwrite the model parameter w sent by the server t The deep parameter part in , gets the new local model, that is
[0048] For each training batch b in each training epoch e, update
[0049]
[0050] Behavior model parameter upload: When the communication round t Mod t a =0, upload the complete local model parameters to the server In other communication rounds, only shallow model parameters w are uploaded. n .
[0051] The beneficial effects of this application are as follows:
[0052] 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.
[0053] 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
[0054] Figure 1 Processing flow chart of an embodiment of the present application.
[0055] Figure 2 Schematic diagram of the aggregation strategy in an embodiment of the present application. DETAILED DESCRIPTION
[0056] 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.
[0057] For intelligent transportation networks, optimization goals include improving traffic efficiency, enhancing traffic safety, promoting environmental protection and sustainable development, and optimizing user experience and convenience. Improving traffic efficiency includes dynamic traffic flow control: by collecting real-time data such as traffic flow and vehicle speed, and using big data analysis and artificial intelligence algorithms to optimize signal timing and adjust route planning, reducing congestion and improving road capacity; or multimodal traffic coordination: integrating public transportation and ride-sharing resources, optimizing bus routes and schedules, and using vehicle-to-everything (V2X) technology to achieve real-time communication between vehicles and infrastructure and reduce idle driving. Enhancing traffic safety includes accident warning and rapid response: using sensors such as cameras and radar to monitor road anomalies (such as violations and accidents) in real time, combining AI image recognition technology to quickly locate problems, and sending warnings to drivers through the Internet of Vehicles; or autonomous driving safety assurance: using 5G low-latency communications and edge computing to support collaborative decision-making among autonomous vehicles and reduce the risk of accidents caused by human error. Promoting environmental protection and sustainable development includes energy conservation and emission reduction: optimizing traffic flow to reduce vehicle idling and congestion, and reducing fuel consumption and exhaust emissions; optimizing user experience and convenience includes personalized travel services: providing real-time traffic information, route recommendations and parking space inquiries based on mobile applications, and generating personalized travel plans based on user historical data.
[0058] 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):
[0059]
[0060] F(v) is the objective function of the model, including the global model test error rate f1, communication cost f2, global model accuracy distribution variance f3 and data cost f4. The four objective functions comprehensively evaluate the value of the model 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 value of the model. The decision variables and constraints are the parameters to be optimized and their ranges, represented by v. The neural network of this application selects a convolutional neural network (CNN). The topological structure parameters of the neural network, the proportion of participants in each round of federated learning C, the learning rate η and the training batch B jointly affect the four objective functions of federated learning. Among them, the hyperparameters of the neural network CNN include the number of convolutional layers Conv, the number of fully connected layers L, the number of neurons in the fully connected layer N L , convolution kernel size ks, number of convolution kernel channels C num , that is, v={η,B,C,Conv,ks,C num ,L,N L}.
[0061] The first objective function f1 is to minimize the global model test error rate. The evaluation of a model's performance mainly depends on the accuracy of the model test. The lower the model's error rate, the better the model's performance. The specific calculation formula is shown in formula (4), a k The model test accuracy for the kth participant.
[0062] f1(v)=1―A,
[0063] a k =Net(η,B,C,Conv,ks,C num ) (4)
[0064] The second objective function f2 is to minimize the communication cost. In the framework of federated learning, communication costs are often very expensive. 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. The objective f2 can be expressed as K is the total number of clients, C is the proportion of participants participating in each round, and σ is the size of the model parameters.
[0065] The third objective function f3 is to minimize the variance of the model accuracy distribution Due to the different performance of participants' devices, the final global model often 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.
[0066] The fourth objective function f4 is to minimize the data cost. 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 the fee 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 fee charged by the local client to the central server. The objective f4 can be expressed as N is the total number of participants in this round N = K·C, is the data cost of the nth participant.
[0067] In the dynamic optimization process of this application, the network topology is deliberately 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 do not disappear or are 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 changes, the core role of these basic modules is always the key to supporting the performance of the entire network.
[0068] Convolutional Neural Networks (CNN) gradually extracts features of different levels from input data through a hierarchical structure. Figure 2 As shown in the figure, the shallow network is the part close to the input layer, which is usually composed of a small number of convolutional layers and pooling layers. These layers use a smaller receptive field to scan the image data and mainly extract low-level features such as the geometric shape of the traffic network. Due to the small receptive field of the shallow network, its features have high resolution and strong spatial location dependence. These features usually retain the detailed information of the input data, and therefore perform particularly well in tasks that require local information (such as edge detection or image segmentation). However, the limitation of shallow features is that they lack the ability to abstract global semantic information and cannot effectively identify complex patterns in the data.
[0069] 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.
[0070] 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.
[0071] In the classic federated learning framework FedAvg, the loss function is defined as: Among them, f k (ω) 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 W in CNN are s 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. d 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.
[0072] In one embodiment, the present application adopts the third generation non-dominated sorting genetic algorithm (NSGA-III) as a multi-objective algorithm and improves it. The time complexity of the non-dominated sorting in the NSGA-III algorithm is O(MN 2), where N is the population size and M is the number of targets. The time complexity of the reference point association is linearly related to the product of M and N, that is, O(MN). Therefore, the total time complexity of the selection operation is OG(MN+MN 2 )), G is the number of iterations. The time complexity of crossover and mutation operations is linearly related to the population size N, that is, O(GN). Environmental selection involves non-dominated sorting and niche preservation operations, whose time complexity is O(N log N). Taking these factors into consideration, the total time complexity of the algorithm is O(GMN+GMN 2 +N log N), where MN 2 will dominate, which can be expressed as O(GMN 2 Therefore, the population size N and the number of iterations G have 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 paper improves the population initialization method based on the NSGA-III algorithm to improve the algorithm's utilization of the solution space and enhance its optimization capabilities.
[0073] 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 select a group of balanced and coordinated individuals in the population initialization stage, so as to maintain the diversity of the population and improve the quality of the optimization solution, and effectively balance the ability to explore and utilize the search space. The basic definition of the good point set is: Assume G s is the unit cube in s-dimensional Euclidean space, if r∈G s , there exists a point set P n (i)={(r1i1,r2i2,r3i3,...r n i n ),i=1,2,3,…n}, its deviation satisfy Then it is called P n (i) is the set of good points, n represents the number of samples, and r represents the good point. C(γ,ε) is a constant that is only related to r and ε, n represents the number of samples, k is an integer, p is a The smallest prime number of .
[0074] 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.
[0075] In this application, integer decision variables are encoded using binary encoding, while real-valued decision variables are encoded using real-valued encoding. Real-valued variables have a high degree of spatial randomness, so the solution space constructed by the real-valued decision variables is initialized using a good point set. The real-valued decision variables are the participant ratio C and the learning rate η, the spatial dimension is 2, and the population size is assumed to be m. The specific steps are as follows:
[0076] (1) Calculate the value of r, r=(r1,r2,...r m ),in
[0077]
[0078] (2) Construct a good point set based on the population size m:
[0079]
[0080] (3)P k Mapped into the domain of the variable:
[0081] X=min k +P k (max k ―min k )
[0082] where min k is the lower limit of the current variable, max k The upper limit of the current variable.
[0083] 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). This application uses federated learning as the basic training framework and incorporates an evolutionary optimization process, enabling dynamic exploration of the optimal balance between four objectives during training.
[0084] 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.
[0085] After the training is completed, MOFedHA 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 t a or 2t a ), 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.
[0086] 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.
[0087] This federated training is performed alternately with the population evolution process, continuing 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.
[0088]
[0089] The pseudo codes of the specific algorithms are shown in Algorithm 1 and Algorithm 2.
[0090] 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 parameter w0. Lines 3-15 are the aggregation strategy part, which details the two network parameter aggregation update strategies performed by the server side according to different communication rounds. When the communication round t Mod t a = 0, 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 section. 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 target values.
[0091]
[0092] The algorithm steps on the server side are as follows: initialize the global model parameter w0;
[0093] Two types of network parameter aggregation updates based on different communication rounds: set p = max(K·C,1) and define the participant set as C r ; When the communication round t Mod t a = 0, the server aggregates and updates the collected client global model parameters. r Each participant in , updates Where p is the number of participants, ρ n is the weight parameter of the nth participant, is the complete model parameter of the nth participant; in other communication rounds, the server only aggregates and updates the collected client shallow model parameters. are the shallow model parameters of the nth participant.
[0094] 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.
[0095] 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 communication round is t Mod t a =1, the model parameter w sent by the server t Used to update the local model parameters w n ; In other communication rounds, the deep parameters of the local model are used Overwrite the model parameter w sent by the server tThe 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. When the communication round is t Mod t a =0, upload the complete local model parameters to the server; in other communication rounds, only upload the shallow model parameters.
[0096] This application selects the public datasets Yolo_detection45138, Rope3D Dataset, and MELAUDIS Melbourne audio dataset for target detection and traffic monitoring as experimental datasets. The Yolo_detection45138 dataset contains 7,300 images, covering pedestrians, bicycles, traffic signs, traffic lights, and multiple types of vehicles, and is suitable for target detection in complex traffic scenes. The Rope3D Dataset is the first vehicle-road collaborative autonomous driving dataset, containing 71,254 frames of images and point cloud data, covering urban roads, highways, and multiple weather scenes. The MELAUDIS Melbourne audio dataset contains 5,792 background noises, 7,345 vehicle sound samples, and 2,955 idling recordings, covering six types of vehicles including bicycles, cars, and buses.
[0097] In the dataset setting, different data allocation strategies are designed for these datasets to simulate non-independent and identically distributed (Non-IID) data environments.
[0098] For the MNIST and CIFAR-10 datasets, this application provides two distribution methods:
[0099] Non-IID allocation: The dataset is divided into 200 shards. 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 the data distribution is different for each client. Assume that the number of clients participating in training is 10.
[0100] Non-IID-unequal allocation: The dataset is divided into 1000 shards. The number of shards allocated to each client is random, ranging from 10 to 250. Shards are randomly selected and allocated 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.
[0101] This application uses convolutional neural network (CNN) 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 according to the parameters passed in. The number of convolutional layers and the number of fully connected layers are both defined as 1 to 3. The total number of clients set in the experiment is K = 100, and the specific optimization parameter settings are as shown. The population size is set to 20, the learning rate range is 0.01 to 0.2, the training batch size is set to 1 to 64, the number of CNN convolution layers is a minimum of 1 layer and a maximum of 3 layers, 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 to 100 to each client as the data usage price of the client, thereby simulating the situation where the data prices of each client are different.
[0102] 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.
[0103] The following experiments are conducted on the MNIST and CIFAR-10 datasets in the equal Non-IID data scenario mentioned above. The experimental results are shown in Tables 1, 2, 3, and 4.
[0104] Table 1 Results of MOEA / D algorithm before and after improvement
[0105]
[0106] Table 2 Results of NSGA-II algorithm before and after improvement
[0107]
[0108] Table 3 Results of SPEA2 algorithm before and after improvement
[0109]
[0110] Table 4 Results before and after IBEA algorithm improvement
[0111]
[0112] By analyzing the results of the above four tables, we can clearly observe the performance and scalability of this application on data sets of different complexity.
[0113] On the CIFAR-10 dataset with higher complexity, this application shows comprehensive advantages. Taking the hypervolume index (HV) as an example, compared with MOEA / D, NSGA-II, SPEA2 and IBEA, the HV values of this application are improved by 21.9%, 42.3%, 18.5% and 40.1% respectively, and the solution set coverage (C) reaches an average of 0.84, which is significantly higher than the original algorithm's 0.25. This result highlights the powerful optimization ability of this application in processing high-dimensional heterogeneous data. Especially in comparison with IBEA, the solution set coverage of this application on CIFAR-10 is as high as 0.9, which is 3.6 times higher than the original algorithm's 0.25, further verifying its robustness in complex environments.
[0114] On the lightweight MNIST dataset, the performance of this application shows a certain degree of algorithm dependence. Although it still maintains the HV advantage when comparing MOEA / D and SPEA2 (increased by 15.5% and 6.0% respectively), the HV values decreased by 23.8% and 7.8% respectively in the comparison of NSGA-II and IBEA, and the solution set coverage also showed a local disadvantage (for example, the C value is 0.35 when compared with NSGA-II, which is lower than the original algorithm's 0.75). This phenomenon may be due to the natural advantage of traditional algorithms relying on specific search mechanisms (such as NSGA-II's fast non-dominated sorting) in simple scenarios, while the design of this application focuses more on adaptive optimization of complex scenarios. It is worth noting that even in such simple datasets, this application still maintains a relatively high HV benchmark value, indicating that the versatility of its core architecture has not been significantly weakened due to the simplification of the scenario.
[0115] From the perspective of scalability, the algorithm design of this application shows significant complexity adaptability. As the data set shifts from MNIST to CIFAR-10, its HV relative improvement rate jumps from 6.0% to 15.5% to 18.5% to 42.3%, and the average increase in solution set coverage increases from 1.2 times to 3.3 times. This positively correlated performance gain shows that the algorithm of this application can explore the solution space more efficiently in high-dimensional target space. Especially in comparison with the IBEA algorithm, the HV of this application on CIFAR-10 still achieved a 40.1% improvement, which fully demonstrates the breakthrough of its innovative architecture. In addition, the stability performance under the cross-algorithm framework (the average HV of the CIFAR-10 scenario increased by 30.7%) further verifies the scalability of this application, proving that the algorithm can adapt to the optimization logic of different basic multi-objective optimization algorithms, and provides a more universal solution for federated learning multi-objective optimization.
[0116] From a runtime perspective, the proposed algorithm effectively reduces runtime, with the exception of comparisons with the original IBEA algorithm in the MNIST non-IID scenario. Experimental results demonstrate that the proposed algorithm design reduces the impact of data heterogeneity on algorithm convergence speed and the number of model parameters required for overall communication, effectively improving algorithm efficiency and reducing runtime while lowering communication costs. This reduces the time cost of federated learning for multi-objective optimization.
[0117] In summary, the algorithm framework of this application is highly scalable. In real-world, high-dimensional, heterogeneous data environments, it can adapt to most mainstream multi-objective optimization algorithms and significantly improve the performance of federated learning multi-objective optimization algorithms. This facilitates the algorithm's search for high-quality Pareto optimal solutions and effectively improves algorithm efficiency. It also reduces communication and time costs, directly reducing the time cost of achieving the optimal solution and improving resource utilization efficiency. Therefore, this application provides a faster and more efficient solution for solving federated learning multi-objective optimization problems in complex environments.
[0118] 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 the federated learning multi-objective optimization algorithm, realizing the hyperparameter optimization of the federated learning model under the multi-objective equilibrium conditions of transportation network optimization in a more efficient way.
[0119] 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.
[0120] 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".
[0121] 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.
[0122] 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 federated learning optimization method for dynamic network structures, characterized in that: The following steps are involved: Obtain multiple optimization objectives for intelligent transportation networks and objective functions for federated learning training; Federated learning is used as the basic training framework, and an evolutionary optimization process is integrated on top of it. This allows the training process to dynamically explore the optimal balance between four objectives, including: Initialization of the global model population uses a good point set strategy to uniformly sample multiple initial populations in the parameter space as the basis for subsequent evolutionary iterations; 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 optimization results of the intelligent transportation network.
2. The federated learning optimization method for dynamic network structures according to claim 1, characterized in that: The objective function of federated learning training is as follows: F(v) is the objective function of the model, including the global model test error rate f1, communication cost f2, global model accuracy distribution variance f3 and data cost f4. The decision variables and constraints are the parameters to be optimized and their ranges, represented by v. The topological structure parameters of the neural network, the proportion of participants in each round of federated learning C, the learning rate η and the training batch B jointly affect the four objective functions of federated learning. Among them, the hyperparameters of the neural network CNN include the number of convolutional layers Conv, the number of fully connected layers L, and the number of neurons in the fully connected layer N. L , convolution kernel size ks, number of convolution kernel channels C num , that is, v={η,B,C,Conv,ks,C num ,L,N L }.
3. The federated learning optimization method for dynamic network structures according to claim 2, characterized in that: The objective function f1 is to minimize the global model test error rate. The specific calculation formula is as follows: and k =Net(η,B,C,Conv,ks,C num ) a k is the model test accuracy of the kth participant, A is the average test accuracy of the model, and K is the total number of clients; The objective function f2 is to minimize the communication cost, which is expressed as: Cost=σ·C, C is the proportion of participants participating in each round, and σ is the size of the model parameters; The objective function f3 is to minimize the variance of the model accuracy distribution: The objective function f4 is to minimize the data cost, which is expressed as N is the total number of participants in this round N = K·C, is the data cost of the nth participant.
4. The method for optimizing federated learning for dynamic network structures according to claim 3, characterized in that: The improved NSGA-III algorithm is used as the multi-objective algorithm, and the population initialization method is improved based on the NSGA-III algorithm, including: The good point set strategy is used to improve the population initialization method; the good point set is defined as: G s is the unit cube in s-dimensional Euclidean space, if r∈G s , there exists a point set P n (i)={(r1i1,r2i2,r3i3,...r n i n ),i=1,2,3,…n}, its deviation satisfy Then P n (i) is the set of good points, n represents the number of samples, and r represents the good point; C(γ,ε) is a constant that is only related to r and ε, ε is an arbitrary positive number, n represents the number of samples, k is an integer, p is a 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 method for optimizing federated learning for dynamic network structures 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 participant ratio C and the learning rate η, the space dimension is 2, and the population size is m. The specific steps are as follows: Calculate the value of r, r=(r1,r2,...r m ),in Construct a good point set based on the population size m: P k Mapped into the domain of the variable: X=min k +P k (max. k -my k ) where min k is the lower limit of the current variable, max k The upper limit of the current variable.
6. The federated learning optimization method for dynamic network structures 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 method for optimizing federated learning for dynamic network structures according to claim 6, characterized in that: The algorithm steps on the server side are as follows: Initialize global model parameters w0; Two types of network parameter aggregation updates based on different communication rounds: set p = max(K·C,1) and define the participant set as C r ; When the communication round t Mod t a = 0, the server aggregates and updates the collected client global model parameters. r Each participant in , updates Where p is the number of participants, ρ n is the weight parameter of the nth participant, is the complete model parameter of the nth participant; in other communication rounds, the server only aggregates and updates the collected client shallow model parameters. are the shallow model parameters of the nth 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 method for optimizing federated learning for dynamic network structures according to claim 6, wherein: The client algorithm is as follows: Local model update: When the communication round t Mod t a =1, the model parameter w sent by the server t Used to update the local model parameters w n ; In other communication rounds, the deep parameters of the local model are used Overwrite the model parameter w sent by the server t 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 t Mod t a =0, upload the complete local model parameters to the server In other communication rounds, only shallow model parameters w are uploaded. n .