Federated domain incremental learning method and framework for cross-edge

By employing K-center heuristic core set replay, elastic weight consolidation, progressive knowledge distillation, and cross-domain feature alignment across edge environments, the catastrophic forgetting problem of edge devices in different environments is solved, achieving efficient cross-edge knowledge transfer and model generalization.

CN121503580APending Publication Date: 2026-02-10NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511521644.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In the real world, highly mobile edge devices face catastrophic forgetting problems in incremental learning when traversing different edge environments. Existing technologies struggle to effectively address the problem of forgetting old knowledge when moving from one edge device to another into a new edge system.

Method used

A core sample set is selected using a K-center heuristic-based core set replay algorithm. A hybrid strategy of elastic weight consolidation and progressive knowledge distillation is combined. The learning of new and old knowledge is balanced by a composite objective function. A cross-domain feature alignment algorithm with maximum mean difference is used to reduce feature distribution differences. Dynamic weighted aggregation is performed based on the differences in model update volume to achieve incremental learning across edge federated domains.

Benefits of technology

It effectively mitigates catastrophic forgetting, enhances the model generalization ability of dynamic devices in new edge environments, improves the adaptability and robustness of the global model, and significantly improves classification accuracy and anti-forgetting performance in unknown domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503580A_ABST
    Figure CN121503580A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for cross-edge federated domain incremental learning, a medium and equipment, and the method comprises the steps: screening out a core sample set from first old domain data through employing a core set playback algorithm based on a K center heuristic mode; balancing the learning of the new task knowledge and the retention proportion of the core sample set by adopting a mixed strategy of elastic weight consolidation and progressive knowledge distillation to obtain new domain data and second old domain data after feature balance; based on a cross-domain feature alignment algorithm of maximum mean value difference, minimizing the distribution difference of the new domain data and the second old domain data in the feature space to obtain new domain representation with consistent features; and calculating a model update quantity difference value based on the new domain representation with consistent features and the data of the static equipment in the new edge environment, and performing dynamic weighted aggregation on the new domain representation with consistent features based on the model update quantity difference value to obtain a cross-edge federated domain incremental learning model. According to the method, the problem that old knowledge is forgotten due to the fact that cross-edge equipment enters a new edge system to participate in federal training is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of edge computing technology, and in particular to a federated domain incremental learning method and framework for cross-edge computing. Background Technology

[0002] With the surge in the number of IoT devices, such as wearables and robotic dogs, the demand for real-time processing of massive amounts of data is becoming increasingly urgent. Traditional cloud computing is facing three major bottlenecks: communication latency, network bandwidth, and data privacy. Therefore, mobile edge computing has emerged. Its core idea is to move computing and storage from the cloud to the network edge. This architectural innovation directly addresses core pain points such as high latency, high bandwidth consumption, and privacy leaks, providing a highly efficient solution for cloud, edge, and device collaboration.

[0003] However, in real-world environments, data is typically distributed across massive, heterogeneous edge nodes and is highly privacy-sensitive. Data security, legal and regulatory constraints prevent centralized training, leading to data silos and privacy barriers in mobile edge computing environments. Therefore, efficiently utilizing distributed data and collaboratively training high-performance global models while protecting privacy and security has become a major challenge for mobile edge computing applications. To address this issue, federated learning has emerged, protecting data privacy through parameter aggregation rather than sharing raw data. Research on federated learning primarily focuses on model convergence, model aggregation, security, and privacy under non-independent, identically distributed data.

[0004] However, in many real-world scenarios, such as the Internet of Things (IoT) and autonomous driving, edge devices are not static but highly mobile, continuously operating across different edge environments. For example, autonomous vehicles traveling between different cities encounter changes in traffic rules, road conditions, and weather, causing the data they collect to exhibit continuously changing and non-independent, identically distributed characteristics. This continuous change caused by the movement of the devices constitutes an inherent domain shift. Simultaneously, the continuous exposure to new edge environments and data distributions presents an incremental learning challenge: while learning new knowledge, previously learned knowledge is overwritten by new knowledge, leading to catastrophic forgetting.

[0005] While existing research on domain generalization or continuous learning has made some progress in federated learning in centralized settings and in single or static edge environments, it faces challenges in dealing with the more common and complex cross-edge federated continuous learning scenarios in the real world. These challenges involve mobile edge devices that traverse different edge environments and continuously encounter and learn incremental data from new and unknown domains. Summary of the Invention

[0006] The main purpose of this application is to provide a method and framework for incremental learning in federated domains across edges, which aims to solve the problem of forgetting old knowledge caused by cross-edge devices entering new edge systems to participate in federated training.

[0007] To achieve the above objectives, this application provides a method for incremental learning across edge-fed domains, applied to a dynamic device in a cross-edge federated learning system. This dynamic device moves between different edge environments and participates in federated training in new edge environments, carrying the old task model and previous domain data when entering a new edge environment. The method includes: employing a K-center heuristic-based core set replay algorithm to select a core sample set from the first old domain data, and consolidating the memory of old task knowledge by locally replaying the core sample set; using a composite objective function as the training objective function, and employing a hybrid strategy of elastic weight consolidation and progressive knowledge distillation to balance the new task knowledge... The learning of knowledge and the retention ratio of the core sample set are used to obtain the new domain data and the second old domain data after feature balancing. Among them, the composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss and elastic weight consolidation regularization loss. Based on the cross-domain feature alignment algorithm of maximum mean difference, the distribution difference between the new domain data and the second old domain data in the feature space is minimized to obtain the feature-consistent new domain representation. Based on the feature-consistent new domain representation and the data of static devices in the new edge environment, the model update difference is calculated. Based on the model update difference, the feature-consistent new domain representation is dynamically weighted and aggregated to obtain and deploy the cross-edge federated domain incremental learning model.

[0008] Optionally, the core set replay algorithm based on K-center heuristic is used to select the core sample set from the first old domain data, including: statistically analyzing the category distribution ratio of the first old domain data; determining the quota for each category based on the category distribution ratio of the first old domain data and the preset core set sample center number; iteratively selecting samples corresponding to the quota from each category, and adding the sample with the largest distance between the corresponding quota sample and the current core set sample center number to the core set sample, until the core set sample reaches the preset size, thus obtaining the selected core sample set.

[0009] Optionally, the standard classification loss function is the loss function in supervised learning of the hybrid strategy of elastic weight consolidation and progressive knowledge distillation. Supervised learning is used to measure the difference between the prediction of the hybrid strategy of elastic weight consolidation and progressive knowledge distillation and the true hard label. The elastic weight consolidation loss function is used to estimate the importance of the parameters of the old task model based on the Fisher information matrix, obtain the optimal parameters, and penalize the weighted squared distance between the current task parameters and the optimal parameters.

[0010] Optionally, the cross-domain feature alignment algorithm based on the maximum mean difference is a pre-trained feature alignment algorithm based on the maximum mean difference of multiple kernels.

[0011] Optionally, the pre-trained feature alignment algorithm based on multi-kernel maximum average difference includes: calculating the embedding distance of the regenerated kernel Hilbert space of the sample means of the new domain data and the second old domain data to obtain a single-kernel squared estimate; calculating the multi-kernel MMD based on the mean of the single-kernel squared estimates of the number of kernel functions; and determining the pre-trained feature alignment algorithm based on multi-kernel maximum average difference based on the multi-kernel MMD.

[0012] Optionally, it also includes: using a pre-trained ResNet18 model as the base model for the static device, and using cross-entropy loss as the local training loss for the static device.

[0013] Optionally, the client includes static devices and dynamic devices. The step of dynamically weighting and aggregating the feature-consistent new domain representations based on the model update difference to obtain and deploy a cross-edge federated domain incremental learning model includes: calculating the difference between the model update difference and the average data update amount of all participating clients using L2 distance to obtain the difference amount; converting the difference amount into normalized weights using the Softmax function; and aggregating the feature-consistent new domain representations with the model update difference weighted using normalized weights to obtain a cross-edge federated domain incremental learning model.

[0014] Furthermore, to achieve the above objectives, this application also provides a device for incremental learning across edge-fed domains, comprising a dynamic device for a cross-edge federated learning system. This dynamic device moves between different edge environments and participates in federated training in new edge environments, carrying the old task model and first old domain data when entering a new edge environment. The dynamic device includes the following modules: a sample selection module, used to select a core sample set from the first old domain data using a K-center heuristic-based core set replay algorithm, and to consolidate the memory of old task knowledge by locally replaying the core sample set; and a data balancing module, used to balance data using a composite objective function as the training objective function, employing a hybrid strategy of elastic weight consolidation and progressive knowledge distillation. The learning of new task knowledge and the retention ratio of the core sample set are weighted to obtain the new domain data and the second old domain data after feature balancing. Among them, the composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss and elastic weight consolidation regularization loss. The data balancing module is used to minimize the distribution difference between the new domain data and the second old domain data in the feature space based on the cross-domain feature alignment algorithm with the maximum mean difference, so as to obtain the feature-consistent new domain representation. The data aggregation module is used to calculate the model update difference based on the feature-consistent new domain representation and the static device data of the new edge environment. Based on the model update difference, the feature-consistent new domain representation is dynamically weighted and aggregated to obtain and deploy the cross-edge federated domain incremental learning model.

[0015] To achieve the above objectives, this application also provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the federated domain incremental learning method for cross-edge domains provided in the above embodiments.

[0016] To achieve the above objectives, this application also provides an electronic device, the electronic device comprising: at least one processor, a memory, and an input / output unit; wherein the memory is used to store a computer program, and the processor is used to invoke the computer program stored in the memory to execute the federated domain incremental learning method for cross-edge domains provided in any of the foregoing embodiments.

[0017] This application proposes a method and framework for incremental learning across edge federated domains. It utilizes a dynamic device applied to the cross-edge federated learning system. This dynamic device moves between different edge environments and participates in federated training in new edge environments, carrying the old task model and first old domain data when entering a new edge environment. The method includes: employing a K-center heuristic-based core set replay algorithm to select a core sample set from the first old domain data, and consolidating the memory of old task knowledge through local replay of the core sample set; using a composite objective function as the training objective function, employing a hybrid strategy of elastic weight consolidation and progressive knowledge distillation to balance the learning of new task knowledge and the retention of the core sample set, resulting in new domain data and second old domain data. The composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss, and elastic weight consolidation regularization loss; and cross-domain feature alignment based on the maximum mean difference. The algorithm minimizes the distribution difference between the new domain data and the second old domain data in the feature space to obtain a feature-consistent new domain representation. Based on the feature-consistent new domain representation and the data from static devices in the new edge environment, it calculates the model update difference. Based on the model update difference, it dynamically weights and aggregates the feature-consistent new domain representation to obtain and deploy a cross-edge federated domain incremental learning model. This method achieves cross-edge knowledge transfer based on domain adaptation. First, the data in the entire domain is randomly disordered to ensure the elimination of distribution bias. For the data, a K-center heuristic algorithm is proposed to improve the core set's ability to represent distribution shifts. At the same time, knowledge distillation and elastic weights are used to consolidate the constraints on key parameters to prevent the new domain training from overwriting the knowledge of the old domain and to alleviate catastrophic forgetting. A cross-domain feature alignment method based on the maximum mean difference is used to reduce the feature distribution difference between the data in the two edge environments and improve the generalization ability of the dynamic device model to adapt to the increasing amount of new sample data. Attached Figure Description

[0018] Figure 1 A flowchart illustrating an embodiment of the federated domain incremental learning method across edges provided in this application; Figure 2 This application provides a method framework diagram for an embodiment of the federated domain incremental learning method across edges; Figure 3 This is a schematic diagram of the core set playback strategy provided in an embodiment of the federated domain incremental learning method across the edge of this application.

[0019] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0020] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0021] In existing technologies, a cross-edge federated learning process mainly includes dynamic devices, static devices, and edge servers. Dynamic devices can continuously learn a series of tasks, with vastly different data distributions between each task. Common dynamic devices include wearable devices, self-driving cars, and other terminal devices with edge computing capabilities. These dynamic devices often move between different edge environments. When they enter a new edge environment, they establish a connection with the edge server in that environment and participate in the federated training of the new edge environment. In a Cross-DFCL setup, dynamic devices carry models from older tasks to participate in the federated learning process in the new edge environment. Before training begins on a new task, the dynamic devices hold previously trained models and a small amount of core data from the old domain, while the models of the static devices in the new federated learning system hold knowledge of the current task. Each federated learning system has one edge server and multiple static devices. The edge server aggregates the model parameters of all devices participating in the federated training to obtain a global model.

[0022] The core objective of this invention is to achieve privacy-preserving federated continuous learning in heterogeneous and unstable multi-edge environments with low computational cost and good adaptability, a problem that urgently needs to be solved. This invention primarily focuses on scenarios involving incremental cross-edge federated domains. Addressing the domain generalization and catastrophic forgetting problems faced by cross-edge devices dynamically joining new edge systems, it proposes a cross-edge domain adaptive federated continuous learning method (Cross-DFCL, Cross-Edge Distribution Federated Continuous Learning). This allows dynamic devices to complete continuously added tasks in multiple edge environments at a lower cost. For dynamic devices, this invention improves the generalization ability of the global model while addressing catastrophic forgetting. To solve the problem of forgetting old knowledge caused by cross-edge devices entering new edge systems for federated training, the dynamic device simultaneously introduces elastic weight consolidation and progressive knowledge distillation through a K-center heuristic core set replay method to mitigate catastrophic forgetting; it uses a cross-domain feature alignment method based on the maximum mean difference to reduce the feature distribution differences between the two edge environments, improving the model's generalization ability; and it performs dynamic weighted aggregation based on the differences in model update volume, assigning different aggregation weights to dynamic devices at different stages.

[0023] To mitigate catastrophic forgetting, this application first introduces a core set selection mechanism. Building upon this, to enable dynamic devices to effectively utilize these historical core knowledge and resist forgetting when participating in federated learning in new edge environments, this invention proposes a continuous learning strategy based on local knowledge distillation and core set replay. Finally, regarding how to fuse heterogeneous model parameters from dynamic and static devices during federated aggregation and improve the generalization ability of the global model to multiple and unseen domains, this invention designs a multi-core maximum average difference domain alignment module.

[0024] Reference Figure 1 The first embodiment of this application provides a method for incremental learning across edge federated domains, which may include: S101. A dynamic device applied to a cross-edge federated learning system, wherein the dynamic device moves between different edge environments and participates in federated training in new edge environments, and carries the old task model and first old domain data when entering a new edge environment, the method comprising: S102. A core set replay algorithm based on K-center heuristic is adopted to select a core sample set from the first old domain data, and the core sample set is replayed locally to consolidate the memory of old task knowledge. In one embodiment of this application, a core sample set is selected from the first old domain data based on the K-center heuristic core set replay algorithm, including: Analyze the category distribution ratio of the first old domain data; The quota for each category is determined based on the category distribution ratio of the first old domain data and the number of sample centers in the preset core set. Iteratively select samples corresponding to the quota for each category. Each time, select the sample corresponding to the quota and the sample with the largest distance from the current core set sample center number to add to the core set sample, until the core set sample reaches the preset size, and obtain the selected core sample set.

[0025] refer to Figure 3 For example, in resource-constrained scenarios such as continuous learning and federated learning, or scenarios requiring efficient data management, core set selection is an efficient solution. It involves selecting a much smaller but representative subset from the original dataset that approximates the key information or statistical properties of the original dataset for model training, knowledge replay, or data summarization. This section will elaborate on the core set selection method used in this invention—the K-Centers Heuristic algorithm—specifically how it is combined with a class balancing strategy to construct a core set suitable for classification tasks.

[0026] The present invention provides the following: A dataset of samples ,in For category labels, the goal of core set selection is to select... A subset of samples ,satisfy This design employs a stratified sampling strategy to maintain a balanced class distribution, while maximizing the preservation of the original statistical properties of the data. The specific steps are as follows: (1) Calculation of category proportions: The category distribution proportions of the original dataset are calculated as shown in equation (1.1):

[0027] in For category The number of samples. (2) Sample quota allocation: based on proportion The number of samples for each category is allocated as shown in equation (1.2):

[0028] And ensure by adjusting the maximum category quota . (3) Core set selection within each category: For each category From its sample set Select We use a representative sample and the K-center heuristic algorithm. The K-center heuristic algorithm selects... Find a center point that minimizes the maximum distance of all samples to the nearest center. For each category... Sample feature matrix ( (Assuming a feature dimension), the algorithm approximates the solution using a greedy strategy: To optimize cross-edge federated learning and preserve the historical knowledge of dynamic devices, this invention designs a core dataset held solely by the dynamic device and replayed locally. This asymmetric strategy aims to leverage the replay capability of dynamic devices to enhance their memory of old domains and generalization to new domains, while allowing static devices to focus on local data, avoiding negative transfer interference and performance degradation that may result from replaying old domain samples. To construct an efficient and representative core set, the dynamic device employs a K-heuristic selection method: first, an initial core sample is randomly selected; then, the minimum distance between all remaining samples and samples in the current core set is iteratively calculated, and the sample maximizing this minimum distance is added to the core set. This process is repeated until a preset core set size is reached, thus greedily constructing a diverse and concise sample set that effectively covers the feature space of the old domain. These core samples are replayed during local training on the dynamic device, helping it consolidate the core features of the old domain when learning new domain knowledge, effectively mitigating catastrophic forgetting and promoting knowledge transfer.

[0029] S103. Using the composite objective function as the training objective function, a hybrid strategy of elastic weight consolidation and progressive knowledge distillation is adopted to balance the learning of new task knowledge and the retention of core sample set, so as to obtain new domain data and second old domain data. The composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss and elastic weight consolidation regularization loss.

[0030] In one embodiment of this application, the standard classification loss function is the loss function in supervised learning of a hybrid strategy of elastic weight consolidation and progressive knowledge distillation. The supervised learning is used to measure the difference between the prediction of the hybrid strategy of elastic weight consolidation and progressive knowledge distillation and the true hard label. The Elastic Weight Consolidation Loss Function is used to estimate the importance of parameters of the old task model based on the Fisher information matrix, obtain the optimal parameters, and penalize the weighted squared distance between the current task parameters and the optimal parameters.

[0031] refer to Figure 2In a Cross-DFCL setup, the data distribution held by different edge devices varies significantly. For dynamic devices, it is necessary not only to adapt to changes in local data streams but also to preserve historical knowledge and promote the consistency of the global model. To effectively balance the learning of new knowledge with the retention of old knowledge to obtain an optimal model, this invention designs a hybrid training strategy of elastic weight consolidation and progressive knowledge distillation for dynamic devices. This invention adopts a hybrid strategy of elastic weight consolidation and knowledge distillation, aiming to more effectively resist catastrophic forgetting through complementary parameter constraint mechanisms. Elastic weight consolidation directly acts on the model weights, calculating and applying a secondary penalty term, which is an explicit regularization based on parameter importance. Knowledge distillation, on the other hand, mainly constrains the parameters indirectly by minimizing the difference in the output probability distribution of the new and old models on specific data. It does not directly penalize the change in specific parameters but requires the overall functional behavior of the new model to approximate that of the old model, guiding parameter updates.

[0032] One of the challenges facing dynamic devices is avoiding catastrophic forgetting during continuous learning. Elastic weight consolidation methods reduce catastrophic forgetting by identifying parameters crucial to previous tasks and penalizing modifications to these parameters in subsequent learning; while knowledge distillation allows a "student" model—the current device model—to learn soft labels held by a "teacher" model—the global model from the previous domain. Progressive tuning introduces dynamic changes during training, allowing the model to rely more on the teacher model's guidance early in training and then focus more on fitting the hard labels of the local data later, achieving a smooth transition.

[0033] Specifically, this invention designs a composite objective function. It consists of three parts: standard classification loss Knowledge distillation loss and elastic weights reinforce regularization loss As shown in equation (1.3):

[0034] in, During the training cycle The distillation weight is dynamically adjusted in real time.

[0035] Standard classification loss ( ) is the loss function in supervised learning, typically the cross-entropy loss function, used to measure the model's predictions ( ) and real hard labels ( The difference between them is shown in equation (1.4):

[0036] in It is a model for categories i The predicted probability. Elastic weight consolidation loss ( ) Parameters used to penalize those important to past tasks The change is based on the Fisher information matrix. To estimate the importance of parameters and penalize the current parameter. Compared with the optimal parameters of the previous task The weighted squared distance between them is shown in equation (1.5):

[0037] in: It is the first in the model One parameter. It is the optimal value of this parameter in the previous task (or state). It is a parameter The importance metric, here referring to the diagonal elements of the Fisher information matrix, estimates the sensitivity of this parameter to the output of previous tasks. It is a hyperparameter that controls the strength of the elastic weights to reinforce regularization and balance the learning of new and old knowledge. Fisher Information Matrix and optimal parameters It needs to be calculated and stored after the previous task training is completed.

[0038] For static devices, a pre-trained ResNet18 model is used for training. The loss function for static devices adopts the cross-entropy loss function as the optimization objective, as shown in Equation (1.6):

[0039] in: This represents the predicted probability of the category.

[0040] S104. A cross-domain feature alignment algorithm based on the maximum mean difference minimizes the distribution difference between the new domain data and the second old domain data in the feature space to obtain a new domain representation with consistent features. In one embodiment of this application, the cross-domain feature alignment algorithm based on the maximum mean difference is a pre-trained feature alignment algorithm based on the maximum mean difference of multiple kernels.

[0041] In one embodiment of this application, the pre-trained feature alignment algorithm for multi-core maximum average difference includes: The embedding distance of the regenerated kernel Hilbert space of the sample means of the new domain data and the second old domain data is calculated to obtain the single-kernel squared estimator; Based on the mean of the single-kernel squared estimator with the number of kernel functions, a multi-kernel MMD is calculated, and a pre-trained feature alignment algorithm based on the multi-kernel maximum average difference is determined based on the multi-kernel MMD.

[0042] In cross-edge scenarios, models need to process data scattered across a large number of heterogeneous edge devices. This requires models not only to perform well on the devices during training, but more importantly, to maintain robustness when switching between devices with different data distributions or being deployed to unseen devices. This ability to generalize across different edge environments is the core issue addressed by domain generalization. Specifically, because the data from different edge devices often have different distributions in the feature space, the performance of a model trained in the source domain can significantly degrade when directly applied to other target domains. To address the challenges posed by this domain shift and enable models to run stably in diverse edge environments, domain generalization-related techniques are needed to train the model, allowing it to learn feature representations with stronger domain invariance. To alleviate this problem, this invention employs feature alignment technology as a pre-training method to narrow the distribution of data from different domains in the feature space. Traditional methods reduce the distribution shift between the source and target domains through feature alignment, but often combine feature alignment with the training task, which may lead to mutual interference between optimization objectives, making it difficult to obtain optimal alignment results or universally applicable domain-invariant features. Therefore, this invention proposes a pre-trained feature alignment method based on multi-kernel maximum average difference. This method is performed independently before task training. It optimizes the model to minimize the maximum average difference distance between the feature distributions of the old domain and the current new domain, thereby providing a feature base with better domain invariance and effectively avoiding mutual interference with the loss function of subsequent tasks.

[0043] The core idea of ​​this feature alignment process is as follows: given a model, temporarily freeze the classifier part and train only the feature extractor. The training objective is to minimize the distribution difference between the source and target domains in the feature space output by the feature extractor. This difference is quantified by the maximum mean difference loss. After completing this pure feature alignment stage, the entire model is unfrozen, and subsequent standard classification on the new domain is performed. Maximum mean difference is a nonparametric measure used to measure the difference between two probability distributions. It is achieved by mapping samples to a reproducing kernel Hilbert space and calculating the squared distance between the mean elements of the two distributions in that space. For a finite set of samples, an empirical estimate of the maximum mean difference (in unbiased or biased form) can be calculated.

[0044] The method used in this invention is a commonly used biased empirical maximum mean difference estimate, where the maximum mean difference measures the difference between two probability distributions. and The nonparametric measure of difference is achieved by the embedding distance of the sample means in the regenerating kernel Hilbert space.

[0045] Given source domain features Target domain features Its squared estimator is shown in equation (1.7):

[0046] Finally, the final objective function is obtained. As shown in equation (1.8):

[0047] S105. Based on the feature-consistent new domain representation and the data update difference of static devices in the new edge environment, calculate the model update difference, dynamically weight and aggregate the feature-consistent new domain representation based on the model update difference, and obtain and deploy the cross-edge federated domain incremental learning model.

[0048] In one embodiment of this application, a pre-trained ResNet18 model is used as the base model for the static device, and cross-entropy loss is used as the local training loss for the static device.

[0049] In one embodiment of this application, the client includes a static device and a dynamic device. The step of dynamically weighting and aggregating new domain representations with consistent features based on model update differences to obtain and deploy a cross-edge federated domain incremental learning model includes: The difference between the model update difference and the average data update amount of all participating clients is calculated using L2 distance to obtain the difference amount. The variances are converted into normalized weights using the Softmax function; By aggregating the difference between the feature-consistent new domain representation and the model update amount weighted by normalized weights, a cross-edge federated domain incremental learning model is obtained.

[0050] Specifically, in cross-edge federated continuous learning, especially when it comes to continuous learning and domain generalization, efficiently aggregating model updates from different clients is a significant challenge. The FedAvg algorithm directly weights the contributions of clients based on the size of their local datasets. However, in the cross-edge federated continuous learning scenario of this invention, the data distribution or importance of dynamic devices changes over time, and dynamic devices carry smaller amounts of data, while other static devices carry relatively stable and larger amounts of local data. Traditional aggregation methods can lead to model updates favoring dynamic devices with larger and more stable data distributions, thus diluting the contributions made by dynamic devices. This not only hinders the model's rapid and effective adaptation to new domains and weakens its domain generalization ability, but also affects the model's overall robustness and performance across all experienced edge domains. To more adaptively aggregate model updates, this invention proposes a dynamic weighted aggregation strategy based on the differences in model update amounts, while assigning different aggregation weights to dynamic devices at different times.

[0051] Specifically, in each aggregation round The global model is Each participating client After training locally (including static and dynamic devices), the model update amount is calculated as shown in Equation (3.9), and then uploaded to the aggregation node.

[0052]

[0053] To assess the relative uniqueness of each client's update, this invention uses L2 distance to calculate the difference between its update size and the average update size of all participating clients. As shown in equation (1.10):

[0054] in .

[0055] Next, this invention converts these differences into normalized weights using the Softmax function. As shown in equation (1.11):

[0056] in It is a temperature hyperparameter used to adjust the concentration of weight allocation. A higher concentration... The value will cause the weight to be more concentrated on clients with larger update differences.

[0057] Finally, the next round of global model The weighted client model update amounts are aggregated, as shown in equation (1.12):

[0058] This dynamic weighting strategy allows the aggregation process to focus on model updates that provide greater differentiation or represent new directions in the field, rather than relying on fixed weight assignments. This is highly effective for handling scenarios with dynamically changing data distributions.

[0059] The main contributions of this invention include the following aspects: (1) This invention completes cross-edge federation continuous learning modeling under data distribution offset, proposes cross-edge federation domain incremental learning problem, explores the catastrophic forgetting problem faced by dynamic devices when learning new data distributions across multiple edge environments, and improves the generalization ability of dynamic device models to adapt to the increasing new sample data.

[0060] (2) This invention achieves cross-edge knowledge transfer based on domain adaptation. First, the data in the whole domain is randomly disordered to ensure the elimination of distribution bias. For the data, a K-center heuristic algorithm is proposed to improve the core set's ability to represent distribution shift. At the same time, knowledge distillation method and elastic weight are used to consolidate the constraint key parameters to prevent the new domain training from covering the knowledge of the old domain and to alleviate catastrophic forgetting. A cross-domain feature alignment method based on the maximum mean difference is used to reduce the feature distribution difference of the data in the two edge environments and improve the generalization ability of the model.

[0061] (3) The present invention was validated on the PACS dataset to evaluate the stable and efficient knowledge transfer of dynamic devices across domains with significant style differences. Cross-DFCL achieved an average classification accuracy of 83.45% in unknown domains, which is 11.2% higher than the baseline method, thus improving generalization performance. The anti-forgetting index was 84.78%, which is 19.9% ​​higher than the baseline method, significantly mitigating catastrophic forgetting and improving generalization performance.

[0062] Based on the above method embodiments, this application also provides a federated domain incremental learning device for cross-edge systems, comprising: a dynamic device for a cross-edge federated learning system, wherein the dynamic device moves between different edge environments and participates in federated training in new edge environments, and carries the old task model and first old domain data when entering a new edge environment; the dynamic device includes the following modules: a sample selection module, used to select a core sample set from the first old domain data using a core set replay algorithm based on K-center heuristics, and to consolidate the memory of old task knowledge by locally replaying the core sample set; and a data balancing module, used to use a composite objective function as the training objective function, and employing a hybrid strategy of elastic weight consolidation and progressive knowledge distillation. The system balances the learning of new task knowledge with the retention of core sample sets to obtain feature-balanced new domain data and second old domain data. A composite objective function is determined based on weighted standard classification loss, knowledge distillation loss, and elastic weight consolidation regularization loss. A data balancing module uses a cross-domain feature alignment algorithm based on the maximum mean difference to minimize the distribution difference between the new domain data and the second old domain data in the feature space, resulting in a feature-consistent new domain representation. A data aggregation module calculates the model update difference based on the feature-consistent new domain representation and data from static devices in the new edge environment. Based on this model update difference, the feature-consistent new domain representation is dynamically weighted and aggregated to obtain and deploy a cross-edge federated domain incremental learning model.

[0063] Based on the above method embodiments, this application also provides a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform any of the methods for incremental learning across edge federated domains described in the preceding embodiments.

[0064] Based on the above method embodiments, this application also provides an electronic device, the electronic device comprising: at least one processor, a memory, and an input / output unit; wherein, the memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the federated domain incremental learning method for cross-edge as described in the preceding embodiments.

[0065] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for incremental learning across federated domains in a cross-edge context, characterized in that, A dynamic device applied to a cross-edge federated learning system, the dynamic device moving between different edge environments and participating in federated training in new edge environments, carrying the old task model and first old domain data when entering a new edge environment, the method comprising: A core set replay algorithm based on K-center heuristic is adopted to select the core sample set from the first old domain data, and the core sample set is replayed locally to consolidate the memory of old task knowledge. Using a composite objective function as the training objective function, a hybrid strategy of elastic weight consolidation and progressive knowledge distillation is adopted to balance the learning of new task knowledge and the retention of core sample set, resulting in new domain data and second old domain data after feature balance. The composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss and elastic weight consolidation regularization loss. The cross-domain feature alignment algorithm based on the maximum mean difference minimizes the distribution difference between the new domain data and the second old domain data in the feature space, and obtains a new domain representation with consistent features. The difference in model update quantity is calculated based on the feature-consistent new domain representation and the data of static devices in the new edge environment. The feature-consistent new domain representation is dynamically weighted and aggregated based on the difference in model update quantity to obtain and deploy a federated domain incremental learning model across the edge.

2. The method for incremental learning across federated domains as described in claim 1, characterized in that, The core set replay algorithm based on the K-center heuristic is used to select the core sample set from the first old domain data, including: Statistical analysis of the category distribution ratio of the first old domain data; The quota for each category is determined based on the category distribution ratio of the first old domain data and the number of sample centers in the preset core set. Iteratively select samples corresponding to the quota for each category. Each time, select the sample corresponding to the quota and the sample with the largest distance from the current core set sample center number to add to the core set sample, until the core set sample reaches the preset size, and obtain the selected core sample set.

3. The federated domain incremental learning method for cross-edge domains as described in claim 1, characterized in that, The standard classification loss function is the loss function in supervised learning of the hybrid strategy of elastic weight consolidation and progressive knowledge distillation. Supervised learning is used to measure the difference between the prediction of the hybrid strategy of elastic weight consolidation and progressive knowledge distillation and the true hard label. The Elastic Weight Consolidation Loss Function is used to estimate the importance of parameters of the old task model based on the Fisher information matrix, obtain the optimal parameters, and penalize the weighted squared distance between the current task parameters and the optimal parameters.

4. The method for incremental learning across federated domains as described in claim 1, characterized in that, The cross-domain feature alignment algorithm based on the maximum mean difference is a pre-trained feature alignment algorithm based on the maximum mean difference of multiple kernels.

5. The federated domain incremental learning method for cross-edge domains as described in claim 1, characterized in that, The pre-trained feature alignment algorithm based on multi-kernel maximum average difference includes: The embedding distance of the regenerated kernel Hilbert space of the sample means of the new domain data and the second old domain data is calculated to obtain the single-kernel squared estimator; Based on the mean of the single-kernel squared estimator with the number of kernel functions, a multi-kernel MMD is calculated, and a pre-trained feature alignment algorithm based on the multi-kernel maximum average difference is determined based on the multi-kernel MMD.

6. The federated domain incremental learning method for cross-edge domains as described in claim 1, characterized in that, Also includes: A pre-trained ResNet18 model is used as the base model for the static device, and cross-entropy loss is used as the local training loss for the static device.

7. The federated domain incremental learning method for cross-edge domains as described in claim 1, characterized in that, The client includes static and dynamic devices. The dynamic weighted aggregation of new domain representations with consistent features based on model update differences, to obtain and deploy a cross-edge federated domain incremental learning model, includes: The difference between the model update difference and the average data update amount of all participating clients is calculated using L2 distance to obtain the difference amount. The variances are converted into normalized weights using the Softmax function; By aggregating the difference between the feature-consistent new domain representation and the model update amount weighted by normalized weights, a cross-edge federated domain incremental learning model is obtained.

8. A federated domain incremental learning device for cross-edge domains, characterized in that, include: A dynamic device for a cross-edge federated learning system, the dynamic device moving between different edge environments and participating in federated training in new edge environments, and carrying the old task model and first old domain data when entering a new edge environment; The dynamic device includes the following modules: The sample selection module is used to select the core sample set from the first old domain data using a core set replay algorithm based on K-center heuristic, and to consolidate the memory of old task knowledge by replaying the core sample set locally. The data balancing module is used to balance the learning of new task knowledge and the retention of core sample set by a hybrid strategy of elastic weight consolidation and progressive knowledge distillation with a composite objective function as the training objective function, so as to obtain new domain data and second old domain data. The composite objective function is determined based on the weighted standard classification loss, knowledge distillation loss and elastic weight consolidation regularization loss. The data balancing module is used for cross-domain feature alignment algorithms based on the maximum mean difference to minimize the distribution difference between the new domain data and the second old domain data in the feature space, thereby obtaining a new domain representation with consistent features. The data aggregation module is used to calculate the difference in model update quantity based on the new domain representation with consistent features and the static device data of the new edge environment. Based on the difference in model update quantity, the new domain representation with consistent features is dynamically weighted and aggregated to obtain and deploy a federated domain incremental learning model across the edge.

9. A computer-readable storage medium, characterized in that, It includes instructions that, when executed on a computer, cause the computer to perform the method for incremental learning across edge federated domains as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes: At least one processor, memory, and input / output unit; The memory is used to store computer programs, and the processor is used to call the computer programs stored in the memory to execute the federated domain incremental learning method for cross-edge domains according to any one of claims 1 to 7.