A full weight aggregation method based on proxy model in heterogeneous federated learning
By employing a full-weight aggregation method using surrogate models in heterogeneous federated learning, and utilizing meta-learning techniques and loyalty-guided aggregation processes, the problems of model performance degradation and low training efficiency on heterogeneous devices are solved, achieving efficient, low-energy model training and improved accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PEKING UNIV
- Filing Date
- 2024-08-27
- Publication Date
- 2026-05-19
AI Technical Summary
Existing heterogeneous federated learning techniques suffer from problems such as degraded model performance, low training efficiency, increased energy consumption, and decreased accuracy when dealing with heterogeneous devices, especially due to knowledge loss caused by the inability to perform full weight aggregation.
The full weight aggregation method using the agent model is adopted. By constructing an agent model with a unified architecture in the system server, knowledge transfer and aggregation are performed using meta-learning technology, and combined with the loyalty-guided aggregation process, the full weight aggregation of the device model is achieved.
It significantly improves model training efficiency on heterogeneous devices, reduces energy consumption, and enhances model accuracy and generalization ability.
Smart Images

Figure CN119150954B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and machine learning, and relates to a full-weight aggregation technique based on an agent model, specifically a full-weight aggregation method based on an agent model in heterogeneous federated learning. Background Technology
[0002] In modern mobile and Internet of Things (IoT) environments, federated learning (FL) has become a crucial method for supporting collaborative model training across devices due to the diversity of device types. Traditional federated learning methods typically require all mobile devices to have the same model architecture. However, in reality, devices such as smartphones, smartwatches, and home automation systems have varying processing and storage capabilities, necessitating structural adjustments to models to adapt to different devices. For example, high-end devices may use complex deep learning models for image processing or speech recognition, while low-end devices require simpler models to ensure operational efficiency. This high degree of device heterogeneity necessitates the development of a new federated learning framework capable of effectively managing and optimizing models with diverse architectures. Existing technologies primarily employ pruning-based and distillation-based methods to address model heterogeneity.
[0003] For example, pruning-based techniques typically involve initializing a standard model and then adapting it to devices with varying computational capabilities by pruning non-critical weights. These methods include, but are not limited to, techniques demonstrated by Hermes and LotteryFL. While these techniques alleviate model deployment issues to some extent, they often lead to significant performance degradation in highly heterogeneous environments.
[0004] On the other hand, distillation-based techniques, such as FedMD and FedGEMS, while capable of handling models with different architectures, typically ignore knowledge of the intermediate layers of the model, leading to prolonged training convergence time and increasing computational burden when device computing power is limited.
[0005] These existing techniques not only suffer from low training efficiency, but also face problems of decreased accuracy and increased energy consumption when applied to heterogeneous devices. This is mainly because existing heterogeneous model federated learning techniques can only aggregate partial weights of the models, thus losing the knowledge learned by the models. Therefore, there is an urgent need for a method that can fully utilize the full weight aggregation of heterogeneous models, which can not only improve the training efficiency of the models, but also significantly improve the performance and energy efficiency of the models on various devices. Summary of the Invention
[0006] To address the problems existing in the prior art, this invention provides a full-weight aggregation method based on agent models in heterogeneous federated learning. By using the complete weights of all device models in the intelligent aggregation system, the learning effect of device models and the overall operating efficiency of the system are optimized.
[0007] The technical solution of the present invention is as follows:
[0008] A full-weight aggregation method based on an agent model in heterogeneous federated learning includes the following steps:
[0009] S1. System Setup and Proxy Model Construction
[0010] During the system initialization phase, corresponding models, training datasets, and test datasets are deployed on different types of devices; a series of proxy models are built in the system server, with one proxy model corresponding to each device type; these proxy models have a unified architecture, which can carry the key information of different device models while maintaining computational efficiency;
[0011] S2. Local Model Training and Model Upload
[0012] Each device independently trains its own model using the training dataset locally mounted on the device, based on its functions and computing capabilities, and uploads the model weights to the system server after training is completed.
[0013] S3. Weighted knowledge transfer to the surrogate model
[0014] After receiving the device model weights uploaded by each device, the system server first pre-aggregates the device models with the same architecture, and then uses meta-learning technology to transfer the knowledge of the pre-aggregated models to the corresponding proxy models to ensure effective integration of knowledge.
[0015] S4. Loyalty-Driven Aggregation
[0016] After the knowledge transfer of the proxy model is completed, the system server guides the aggregation process based on the loyalty between each proxy model and the pre-aggregated model, thereby aggregating the proxy models into a global model.
[0017] S5. Global Model Update and Distribution
[0018] After aggregation is completed, the system server performs a second knowledge transfer, transferring the knowledge of the global model to the pre-aggregated model, and sending the updated pre-aggregated model back to each device;
[0019] The equipment repeats steps S2 to S5, performing multiple rounds of training and aggregation until the equipment models of each device converge, achieving the expected performance and accuracy.
[0020] Furthermore, the specific steps of the agent model construction process in step S1 include:
[0021] S1-1. The system server selects the device type with the largest model capacity as the basic architecture of the proxy model based on the device type, ensuring that the proxy model can contain the knowledge of all device models;
[0022] S1-2. Pre-train the surrogate model using a public dataset to ensure it has sufficient generalization ability.
[0023] Furthermore, the specific steps of the local model training and uploading process in step S2 include:
[0024] S2-1. Each device trains its model on its locally mounted training dataset to optimize device model performance;
[0025] S2-2. After training is complete, each device uploads its respective model weights to the system server.
[0026] Furthermore, the specific steps of step S3, the weight knowledge transfer to the proxy model, include:
[0027] S3-1. After receiving the device model weights uploaded by each device, the system server pre-aggregates the device models with the same architecture to generate a pre-aggregated model.
[0028] S3-2. Using meta-learning technology, the system server establishes a weight mapping relationship from the pre-aggregated model to the proxy model to achieve accurate knowledge transfer. Meta-learning technology is used to learn the mapping relationship between different layers and neurons to ensure the accuracy and efficiency of knowledge transfer.
[0029] S3-3. By optimizing the mapping relationship, information loss is reduced, thereby ensuring that the surrogate model and the pre-aggregation model maintain the same accuracy.
[0030] Furthermore, the specific steps of the loyalty-guided aggregation process in step S4 include:
[0031] S4-1. Calculate the cosine similarity between the output of the proxy model and the output of the original model, and use it as the loyalty score;
[0032] S4-2. Based on loyalty scores, adjust the weights of different agent models in the aggregation process. Models with higher loyalty scores will have greater weight in the aggregation process, thereby optimizing the performance of the global model.
[0033] Furthermore, the specific steps of the global model update and distribution process in step S5 include:
[0034] S5-1. The system server uses a public dataset and employs meta-learning techniques to transfer the knowledge of the global model to the pre-aggregated model, ensuring that the pre-aggregated model can reflect the updates of global knowledge.
[0035] S5-2. The updated pre-aggregated model is sent back to each participating device. After receiving the weights, the devices use them as the updated device model weights and then conduct the next round of device model training.
[0036] S5-3. Update the weights of the proxy model to the weights of the global model.
[0037] This invention provides a full-weight aggregation method based on agent models in heterogeneous federated learning. By using the complete weights of all device models in the intelligent aggregation system, it optimizes the learning effect of device models and the overall operating efficiency of the system. This method can significantly improve the training efficiency of models on heterogeneous devices, reduce energy consumption, and improve the accuracy and generalization ability of models. Attached Figure Description
[0038] Figure 1 This is the execution flow of the full-weight aggregation method based on the agent model in heterogeneous federated learning of this invention. Detailed Implementation
[0039] To better understand the present invention, a specific embodiment will be provided below to describe the application of the agent-based full-weight aggregation method in a heterogeneous federated learning environment.
[0040] Taking image classification as an example, this embodiment details how to implement the present invention in a heterogeneous environment consisting of smartphones, smartwatches, and IoT devices. These devices have different processing capabilities and storage capacities, making them suitable for heterogeneous models of different sizes and structures.
[0041] This invention provides a full-weight aggregation method based on an agent model in heterogeneous federated learning, such as... Figure 1 As shown:
[0042] S1. System Setup and Proxy Model Construction
[0043] In this embodiment, the system is initially configured with 10 smartphones as high-end devices, 10 smartwatches as mid-range devices, and 10 IoT devices as low-end devices. During system initialization, a ResNet-34 model is deployed on the smartphones as the device model, along with 10 equally divided training and testing datasets for the Office-HomeArt dataset. The smartwatches deploy a MobileNet-V2 model as the device model, along with 10 equally divided training and testing datasets for the Office-Home Clipart dataset. The IoT devices deploy a LeNet-5 model as the device model, along with 10 equally divided training and testing datasets for the Office-Home Product dataset. Three ResNet-34 proxy models are constructed on the system server, each corresponding to one device, thus maintaining computational efficiency while carrying the key information of different device models.
[0044] The specific steps involved in constructing the proxy model include:
[0045] S1-1. The system server selects the device type with the largest model capacity as the basic architecture for the proxy model based on the device type. To ensure that the proxy model can carry the knowledge of all device models, considering the complexity of the models, the ResNet-34 model deployed on the most powerful device (i.e., a smartphone) is selected as the benchmark for the proxy model architecture.
[0046] S1-2. Pre-train the proxy model using a public dataset (in this embodiment, the Office-Home Realworld dataset) to ensure that it has sufficient generalization ability.
[0047] S2. Local Model Training and Model Upload
[0048] Each device independently trains its own model using the training dataset locally installed on the device, based on its functions and computing capabilities. After training is complete, the model weights are uploaded to the system server.
[0049] The specific steps of local model training and uploading include:
[0050] S2-1. Each device trains its model on its locally mounted training dataset to optimize device model performance.
[0051] S2-2. After training is complete, each device uploads its respective device model weights to the system server.
[0052] S3. Weighted knowledge transfer to the surrogate model
[0053] After receiving the device model weights uploaded by each device, the system server first pre-aggregates device models with the same architecture; specifically, it pre-aggregates the device models of 10 smartphones, 10 smartwatches, and 10 IoT devices. Then, it uses meta-learning techniques to transfer the knowledge from the pre-aggregated models to the corresponding proxy models, ensuring effective knowledge integration. The specific steps of the weight knowledge transfer process include:
[0054] S3-1. After receiving the device model weights uploaded by each device, the system server pre-aggregates device models with the same architecture to generate a pre-aggregated model.
[0055] S3-2. Utilizing meta-learning technology, the system server establishes a weight mapping relationship from the pre-aggregated model to the surrogate model, achieving accurate knowledge transfer. Meta-learning technology is used to learn the mapping relationships between different layers and neurons, ensuring the accuracy and efficiency of knowledge transfer.
[0056] S3-3. By optimizing the mapping relationship, information loss is reduced, thereby ensuring that the surrogate model and the pre-aggregation model maintain the same accuracy.
[0057] S4. Loyalty-Driven Aggregation
[0058] After completing the knowledge transfer of the proxy models, the system server guides the aggregation process based on the loyalty between each proxy model and the pre-aggregated model (derived by calculating the cosine similarity between the outputs), thereby aggregating the proxy models into a global model. The specific steps of the loyalty-guided aggregation process include:
[0059] S4-1. Calculate the cosine similarity between the output of the proxy model and the output of the pre-aggregated model, and use it as the loyalty score.
[0060] S4-2. Adjust the weights of different agent models in the aggregation process based on loyalty scores. Agent models with higher loyalty scores will have greater weight in the aggregation process, thereby optimizing the performance of the global model.
[0061] S5. Global Model Update and Distribution
[0062] After aggregation is complete, the system server performs a second knowledge transfer, transferring the knowledge from the global model to the pre-aggregated model, and then sends the updated pre-aggregated model back to each device. The specific steps of the global model update and distribution process include:
[0063] S5-1. The server uses a public dataset and employs meta-learning techniques to transfer the knowledge of the global model to the pre-aggregated model, ensuring that the pre-aggregated model can reflect the updates of the global model's knowledge.
[0064] S5-2. The updated pre-aggregated model is sent back to each participating device. After receiving the weights, the devices use them as the updated device model weights and proceed with the next round of device model training.
[0065] S5-3. Update the weights of the proxy model to the weights of the global model.
[0066] The device repeats steps S2 to S5 for multiple rounds of training and aggregation until the accuracy of each device model in the test dataset deployed locally on the device stabilizes within 10 rounds without increasing. At this point, the training of each device model is considered to have converged, and the training ends.
[0067] Through the specific embodiments described above, this invention can significantly improve model training efficiency on heterogeneous devices, reduce energy consumption, and enhance model accuracy and generalization ability. The functional modules of this invention can be implemented through software, hardware, or a combination thereof to adapt to different heterogeneous federated learning application scenarios.
[0068] Finally, it should be noted that the purpose of disclosing the embodiments is to help further understand the present invention. However, those skilled in the art will understand that various substitutions and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the embodiments, and the scope of protection of the present invention is defined by the scope of the claims.
Claims
1. A full-weight aggregation method based on an agent model in heterogeneous federated learning, characterized in that, Includes the following steps: S1. System Setup and Agent Model Construction During the system initialization phase, corresponding models, training datasets, and test datasets are deployed on different types of devices; a series of proxy models are built in the system server, with one proxy model corresponding to each device type; these proxy models have a unified architecture, which can carry the key information of different device models while maintaining computational efficiency; S2. Local Model Training and Model Upload Each device independently trains its own model using the training dataset locally mounted on the device, based on its functions and computing capabilities, and uploads the model weights to the system server after training is completed. S3. Weighted knowledge transfer to surrogate model After receiving the device model weights uploaded by each device, the system server first pre-aggregates the device models with the same architecture, and then uses meta-learning technology to transfer the knowledge of the pre-aggregated models to the corresponding proxy models to ensure effective integration of knowledge. The specific steps include: S3-1. After receiving the device model weights uploaded by each device, the system server pre-aggregates device models with the same architecture to generate a pre-aggregated model; S3-2. Using meta-learning technology, the system server establishes a weight mapping relationship from the pre-aggregated model to the proxy model to achieve accurate knowledge transfer. Meta-learning technology is used to learn the mapping relationship between different layers and neurons to ensure the accuracy and efficiency of knowledge transfer. S3-3. By optimizing the mapping relationship, information loss is reduced, thereby ensuring that the surrogate model and the pre-aggregation model maintain the same accuracy. S4. Loyalty-Driven Aggregation After completing the knowledge transfer of the proxy models, the system server guides the aggregation process based on the loyalty between each proxy model and the pre-aggregated model, thereby aggregating the proxy models into a global model; the specific steps include: S4-1. Calculate the cosine similarity between the output of the proxy model and the output of the original model, and use it as the loyalty score; S4-2. Based on loyalty scores, adjust the weights of different agent models in the aggregation process, giving higher loyalty models a greater weight in the aggregation process, thereby optimizing the performance of the global model; S5. Global Model Update and Distribution After aggregation is completed, the system server performs a second knowledge transfer, transferring the knowledge of the global model to the pre-aggregated model, and sending the updated pre-aggregated model back to each device; The equipment repeats steps S2 to S5, performing multiple rounds of training and aggregation until the equipment models of each device converge, achieving the expected performance and accuracy.
2. The method as described in claim 1, characterized in that, The specific steps of the agent model construction process in step S1 include: S1-1. The system server selects the device type with the largest model capacity as the basic architecture of the proxy model based on the device type, ensuring that the proxy model can contain the knowledge of all device models; S1-2. Pre-train the surrogate model using a public dataset to ensure it has sufficient generalization ability.
3. The method as described in claim 1, characterized in that, The specific steps of the local model training and uploading process in step S2 include: S2-1. Each device trains its model on its locally mounted training dataset to optimize device model performance; S2-2. After training is complete, each device uploads its respective model weights to the system server.
4. The method as described in claim 1, characterized in that, The specific steps of the global model update and distribution process in step S5 include: S5-1. The system server uses a public dataset and employs meta-learning techniques to transfer the knowledge of the global model to the pre-aggregated model, ensuring that the pre-aggregated model can reflect the updates of the global knowledge. S5-2. The updated pre-aggregated model is sent back to each participating device. After receiving the weights, the devices use them as the updated device model weights and then conduct the next round of device model training. S5-3. Update the weights of the proxy model to the weights of the global model.