Traceable federal incremental learning method based on grouping feature aggregation
By introducing end-node traceable task learning and cloud node grouping knowledge aggregation methods in federated incremental learning, the problem of inefficient model aggregation in dynamic repetitive task data utilization in cloud collaborative scenarios and in strong heterogeneity scenarios is solved, and more efficient model training and better generalization performance are achieved.
Patent Information
- Application Number
- CN202510585455.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-05-08
AI Technical Summary
Existing federated incremental learning technology is difficult to effectively utilize dynamic repetitive task data in cloud collaboration scenarios, and the model aggregation efficiency is inefficient in strong heterogeneity scenarios, resulting in model iteration redundancy and performance bottlenecks.
A traceable federated incremental learning method based on grouping feature aggregation is proposed. Through end-node traceable task learning and cloud node grouping knowledge aggregation, efficient utilization of dynamic repetitive task data and efficient aggregation of models in heterogeneous scenarios are realized.
It effectively reduces the redundant calculation on the end side, enhances the ability to identify and reuse historical task features, significantly improves the generalization ability of the model and its performance under heterogeneous tasks, and optimizes the aggregation efficiency of the global model.
Smart Images

Figure CN120087503A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning, and in particular, to a traceable federated incremental learning method based on grouped feature aggregation. Background Art
[0002] As a new generation of distributed computing architecture, cloud collaboration, relying on the deep integration of cloud computing and virtualization technologies, is driving the evolution of the machine learning paradigm towards a more efficient and secure direction. However, when faced with the scenario of continuously evolving data streams, the cloud collaboration federated learning system faces dual challenges: on the one hand, the client continuously receives new task data with non-stationary distributions in a streaming manner, resulting in an exacerbation of cross-time knowledge conflicts; on the other hand, the cloud platform needs to coordinate a large number of clients to achieve continuous learning under resource constraints and avoid the risk of privacy leakage caused by repeated access to historical data. For this reason, Federated Incremental Learning (FIL) has emerged. This technology establishes a dynamic balance between global optimization in the cloud and local adaptation on the client side by constructing a progressive knowledge fusion mechanism. Specifically, FIL deploys an incremental model repository in the cloud to achieve cross-client knowledge distillation, and at the same time adopts an elastic memory replay strategy on the client side, which not only ensures rapid adaptation to new data distributions but also maintains effective retention of historical knowledge through methods such as generating adversarial samples. This two-way collaboration mechanism enables the cloud federated system to continuously improve model performance without causing catastrophic forgetting under limited communication resources, providing key technical support for scenarios such as intelligent manufacturing and autonomous driving that require lifelong learning.
[0003] To simplify the complexity of the problem, most FIL technologies generally assume that the datasets obtained by the clients are static, or default that new tasks are completely different from historical tasks in terms of data distribution, while ignoring the universality of repeated tasks in the cloud collaboration scenario, resulting in limited scalability of the model. For example, multiple clients obtain the same dataset at different times, or due to insufficient data collection, developers need to collect more samples later to further optimize historical tasks. Existing FIL can meet the model training requirements in the cloud collaboration environment to a certain extent, but there are still the following challenges: firstly, the inefficient reuse of repeated task features leads to model iteration redundancy and performance bottlenecks; secondly, the coarse-grained aggregation strategy under heterogeneous task distributions makes it difficult to achieve balanced adaptation between the global and local models. The superimposed effect of these two core problems severely restricts the application efficiency of federated incremental learning in real scenarios.
[0004] 1. Inefficient utilization of dynamic repeated task data limits model performance Current FIL methods usually assume that the new tasks received by the client are significantly different from the historical tasks in terms of content and distribution, so they often lack the feature recognition and reuse mechanism for dynamic repetitive tasks. In the cloud collaboration scenario, different clients may receive the same data stream or highly repetitive tasks at different times. Without corresponding feature tracking and reuse strategies, on the one hand, it will cause the edge nodes to perform redundant training on repetitive tasks, increasing their computing and storage burdens; on the other hand, the global model in the cloud cannot quickly adapt to the features of repetitive tasks and often needs to be retrained or optimized from scratch, resulting in prominent forgetting problems, decreased prediction accuracy, slow model convergence speed, and significantly increased training cycles and communication costs.
[0005] 2. Low model aggregation efficiency in strongly heterogeneous scenarios In the cloud collaboration scenario, due to the different hardware configurations, network bandwidths, and application environments of edge nodes, there are often significant differences in the task feature distributions among different nodes. Specifically, even at the same time point, different nodes may face completely different task types or data streams. This high degree of heterogeneity poses a huge challenge for the global model to aggregate multi-party information. Existing methods based on global averaging (such as FedAvg) or simple weighted aggregation strategies are difficult to differentially process different distributions or multi-variate task features, resulting in the aggregation result being biased towards the data distributions of some tasks or some clients, thus weakening the generalization performance of the model for new tasks or unseen tasks. In addition, when the aggregated global model is sent to the edge nodes, if the personalized needs of each client's tasks are not fully considered, the adaptability and accuracy of the edge model are often insufficient. Due to the lack of elastic aggregation or personalized strategies (such as the regularization and personalization mechanisms in methods like pFedMe and FedProx), there is still much room for improvement in the model convergence speed and resource utilization efficiency of federated incremental learning in strongly heterogeneous scenarios. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to propose a traceable federated incremental learning method based on grouped feature aggregation to solve the problems of efficient utilization of dynamic repetitive task data and model aggregation efficiency in strongly heterogeneous scenarios in existing federated incremental learning technologies in cloud collaboration scenarios.
[0007] The technical means adopted by the present invention are as follows: A traceable federated incremental learning method based on grouped feature aggregation, comprising the following steps: S1. Perform learning and training on the traceability tasks of end nodes; perform local pruning and fine-tuning based on the initial shared model, and judge whether the tasks are repeated according to the similarity of label distributions; for non-repeated tasks, selectively activate the existing weights through a learnable mask and incorporate regularization constraints to obtain a new sub-model of the initial shared model; for repeated tasks, perform mask re-training to obtain an updated sub-model for this repeated task; the end node transfers the task feature vectors of the new sub-model or updated sub-model and the updated weights of the current round of the model to the cloud node; S2. Construct a cloud-end collaborative grouping model; collect the features of each client at the end node and group them according to the labels using hierarchical clustering, and incorporate the clients with similar features into the same group; establish a corresponding server model for each group at the cloud node, and the server model learns the global shared knowledge of the clients within the group through parallel training with knowledge distillation loss; the server model combines the importance evaluation results of the cloud node for the clients within the group and assigns different aggregation weights to the clients within the group; send the global shared knowledge generated by the server model of each group and the aggregation weights corresponding to the global shared knowledge to the end node; S3. At the end node, the client updates its own model parameters based on the local cross-entropy loss, the global shared knowledge generated by the server model of each group, and the aggregation weights corresponding to the global shared knowledge, and outputs the updated model; S4. Replace the new sub-model or updated sub-model in S1 with the updated model, and repeat S1~S3 until the specified number of training times is reached and the training stops.
[0008] Furthermore, S1 specifically includes the following steps: S11. Model initialization; Set all end-node clients to start with a shared model and the task being learned of the client; for the task , the end node first learns according to the shared model , forms a corresponding sub-model according to the activation of the model neurons by the data distribution of the task, and iteratively fine-tunes the sub-model to maintain accuracy; keep the weights of the sub-model unchanged to avoid forgetting and enable learning until the repeated task P comes to the client; S12. Task marking; For the currently obtained task , count the label distribution in the task , where represents the sample proportion of the th class label in the task k ; whenever a new task is obtained, record the label distribution of the current task Compare with the label distribution of historical tasks Calculate the similarity between the two. If the similarity exceeds the preset threshold, it is determined that the current task duplicates the historical task. The formula for calculating task similarity is as follows:
[0009] When the calculated similarity is less than the specified value, execute S13; when the calculated similarity is greater than the specified value, execute S14; S13. Train non-repeated tasks; Suppose the model has learned a series of tasks , and the model corresponding model weights are denoted as:
[0010] Among them, is the weight related to task , which is the frozen weight; the prunable weight of the current task is denoted as , which is the unfrozen weight; Use a learnable mask to selectively enable some weights , where D is the dimension; the mask operation is defined as element-wise multiplication, and the result of calculating weight reuse is:
[0011] Among them, ⊙ represents the element-wise multiplication operation, represents the part of the weights selected and reused from ; Adopt a real-valued mask , and optimize the real-valued mask through backpropagation; the initial value of the real-valued mask is randomly distributed, and the update formula of the real-valued mask is:
[0012] Among them, is the loss function, which measures the training effect of the current task ; is the learning rate, which is used to control the optimization step size; After each update, the system binarizes the real-valued mask through the threshold to generate the final binary mask ; F is the indicator function, which takes the value of 1 when , otherwise 0; the binary mask For actual weight reuse selection; Perform a task training; When the training of the task is completed, the weights that meet the task requirements are recorded as : , freeze the weights ; S14. Repeat task recognition and training; When a new task arrives, first determine whether the new task is a repeated task of a historical task; assume that the current model has learned a series of task sets }, if the condition is met, where , it indicates that the task is highly similar to the historical tasks and in data distribution and features, and knowledge reuse can be performed; before starting the training of the new task , store a copy of the model weights of the task ; ; For the new task determined to be a repeated task, use the backpropagation algorithm to update the model of the new task ; initialize based on the mask of the historical task, and adjust the current mask; calculate the trainable weights of the current task ; Calculate the loss function and use the training data of the task to simultaneously optimize the new real-valued mask and the weights using the backpropagation algorithm; After the optimization is completed, obtain the task feature mask and the model weights of the new task ; through the gradient update mechanism, enable the model to retain the knowledge already learned while adapting to the new task; Initialize using the mask information of the existing tasks; the final weights of the task will be selected from to enable the new task to have the adaptability to the historical tasks.
[0013] Furthermore, S2 specifically includes the following steps: S21. Cloud node feature aggregation and recognition; The edge node extracts the logits representing the characteristics of this node based on the label of the received task and uploads them to the cloud node; the cloud node collects the logits uploaded by each edge node server during each round of iteration, and groups the edge node servers with similar characteristics based on this. Normalize the logits of the client model to eliminate the influence of the feature scales between different clients:
[0014] Among them, represents the logits of client . Use cosine similarity to compare the logits of different clients, and the formula is:
[0015] According to the similarity result, the cloud node obtains , a total of groups, and each group contains clients with similar tasks; S22. Establish a cloud node model group; After the cloud node obtains the edge node grouping, for each task group establish an independent server model in the cloud node set node ; the knowledge of the server model is passed to the client models within the group through the distillation process; S23. Weight assignment for clients within the group; For different edge node clients in any group , perform weight assignment; the weight assignment of the client is defined as:
[0016] Among them, represents the logits output of the server model for client k ; is the total number of clients; is the temperature parameter; convert the logits of the server model for client k into probability form, and then divide by the normalization factor to dynamically adjust the contribution degree of each client to the server model, so that clients with higher feature importance occupy a larger proportion in the aggregation process.
[0017] Furthermore, S3 specifically includes the following steps: The update of the client model is centered on the cross-entropy loss driven by local data, and at the same time, the knowledge distillation loss obtained from the server model is used to supplement its global perspective on the edge side; the loss function of the client model is:
[0018]
[0019] The end node model obtains its own cross-entropy loss through local task data , and obtains distilled knowledge from the server model, and further adjusts the model parameters through the knowledge distillation loss
[0020] Furthermore, in S13, the training of the task is carried out, and the loss function of the training is defined as:
[0021] where is the main loss function of the task ; is the regularization term, which is used to constrain the range of the reused weights; is the regularization coefficient.
[0022] Furthermore, in S22, for each group , the loss function of the server is defined as follows:
[0023]
[0024] represents the cross-entropy loss between the predicted value and the true label, and the specific formula is:
[0025] where represents the true label of the th sample; represents the predicted probability of the server model for the th sample, is the total number of samples; represents the knowledge distillation loss, which measures the distribution difference between the server model and the prediction of the client model ; the knowledge distillation loss is used to transfer the knowledge of the client model to the server model, and the specific formula is:
[0026] represents the prediction distribution of the client model:
[0027] represents the prediction distribution of the server model:
[0028] is a temperature parameter; is a weight parameter for balancing the cross-entropy loss on the impact of server model optimization; is a weight parameter for balancing the knowledge distillation loss on the impact of server model optimization.
[0029] The present invention also provides a storage medium, which includes a stored program. When the program runs, it executes any one of the above traceable federated incremental learning methods based on grouped feature aggregation.
[0030] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor runs through the computer program to execute any one of the above traceable federated incremental learning methods based on grouped feature aggregation.
[0031] Compared with the prior art, the present invention has the following advantages: Due to the dynamic characteristics of data in the cloud collaboration scenario, existing federated incremental learning technologies are difficult to use newly generated data at the end nodes to perform incremental training on the model and effectively aggregate knowledge at the cloud node. The present invention proposes a federated incremental learning method for the cloud collaboration dynamic data scenario, which can effectively address the problems that dynamic repetitive task data cannot effectively participate in federated incremental learning and the model cannot be effectively aggregated in the strongly heterogeneous scenario in the cloud collaboration scenario. The method includes two parts: end-side traceable task identification training and cloud-side grouped knowledge aggregation.
[0032] In the process of traceable task learning at the end node, the invention proposes a method for identifying repetitive tasks using past training information. Through the feature tracking and reuse mechanism of dynamic repetitive tasks, the present invention effectively reduces redundant calculations at the end node, enhances the recognition and reuse ability of historical task features, and significantly reduces the forgetting problem.
[0033] In the process of grouped knowledge aggregation at the cloud node, the present invention effectively handles the heterogeneity of repetitive task distributions through a grouped aggregation mechanism based on task features. Through task grouping and intra-group knowledge distillation technologies, the accuracy and efficiency of model aggregation are improved. This mechanism significantly enhances the generalization ability of the model and its performance in heterogeneous tasks. At the same time, through the task grouping and dynamic weight allocation mechanism in the cloud, the aggregation efficiency of the global model is optimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0035] Figure 1 This is the overall step diagram of the method of the present invention.
[0036] Figure 2 This is the schematic diagram of the architecture design of the method of the present invention.
[0037] Figure 3 This is the flowchart of traceable learning of the end node of the present invention.
[0038] Figure 4 This is the flowchart of knowledge aggregation for cloud node grouping of the present invention. Detailed implementation manners
[0039] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0041] The present invention aims to solve two key challenges faced by federated incremental learning in the cloud collaboration scenario, namely the efficient utilization of dynamically repeated task data and the model aggregation efficiency problem in strongly heterogeneous scenarios, and proposes a comprehensive optimization solution to improve the performance and adaptability of the system.
[0042] A mechanism for identifying and reusing repetitive tasks based on model weight marking and tracking is proposed to address the universality of dynamic repetitive tasks and the difficulty of existing methods in tracking and reusing task features. Using the current training model as the only resource, by extracting the weight features of different task sub-models, accurate tracking and reuse of historical task features are achieved without relying on the original data.
[0043] A dynamic model aggregation mechanism based on intra-group knowledge distillation and feature mapping is proposed to address the significant differences in task feature distributions in strongly heterogeneous scenarios. Using the task feature mapping of edge nodes, a grouped knowledge federation scheme is constructed according to the data feature distribution. By handling the heterogeneity between tasks, error accumulation is reduced, and the model can accurately fuse diverse features, improving the aggregation effect.
[0044] The present invention aims to effectively address the challenges brought by storage limitations and task repetitiveness. The proposed solution accurately identifies and enhances repetitive task features by combining task label distributions and weight markings, avoiding redundant calculations and resource waste. Meanwhile, a flexible task grouping mechanism is designed to optimize knowledge federation through server-side grouped aggregation, improving the performance and adaptability of the global model. In addition, the present invention realizes the tracking and incremental optimization of historical task features under limited storage conditions through selective retraining and feature tracking techniques, significantly enhancing the system's processing capabilities in dynamic and heterogeneous data environments. The overall flowchart of the solution is as Figure 1 shown. The traceable federated incremental learning solution proposed in the present invention can be divided into two parts: the traceable task learning mechanism at the edge node and the inter-group knowledge aggregation at the cloud node. The architecture schematic diagram of the method is as Figure 2 shown. The present invention provides a traceable federated incremental learning method based on grouped feature aggregation, and the specific steps are as follows: S1. Traceable task learning at the edge node; During the training process at the edge nodes, all edge nodes will obtain a shared initial global model from the cloud master node at the beginning of training to start training. This model contains the preliminary parameters common to all clients for local training by all clients. In the initialization phase, the clients perform local training and weight pruning based on the shared model, generate sub-models adapted to the tasks, and freeze their weights. By calculating the similarity of the task label distributions, the system can identify in real time whether a new task is a duplicate task. For non-duplicate tasks, by introducing a learnable masking mechanism, selectively reuse historical task weights and optimize them in combination with the current task features, and use the loss function to constrain the activation range of the weights to ensure the task adaptability and stability of the model. For duplicate tasks, by maintaining weight copies and re-optimizing the weights and masks, track and enhance the task features to ensure the efficiency and knowledge retention of the global model in dynamic duplicate task scenarios. Finally, freeze the optimized weights to avoid forgetting the knowledge of old tasks to support the continuous learning of subsequent tasks. Figure 3 Flowchart of traceable task learning at the edge S11: Model initialization In the initialization phase, this method sets all edge node clients with a shared model and the task being learned of the client starts. The initial model is first trained through its local dataset, and then each client performs step-by-step pruning, which will delete a part of the weights to obtain a sub-model, and iteratively fine-tune the sub-model to maintain accuracy. Here, the size of each sub-model is based on the complexity of the task and can be set by each client. After obtaining the sub-model, we keep its weights unchanged to avoid forgetting and enable learning until the duplicate task P comes to the client.
[0045] S12: Task labeling During the training process at the edge nodes, for the currently obtained task , count the label distribution among them , where represents the sample proportion of the k-th class label in the task . Whenever a new task is obtained, compare the label distribution of the current task with the label distribution of the historical tasks, and calculate the similarity between the two. If the similarity exceeds the preset threshold, it is determined that the current task is a duplicate of the historical task. The formula for calculating the task similarity is as follows:
[0046] If the calculated similarity is less than 0.7, perform S13, otherwise perform S14 S13: Non-repetitive task training Assume the model has learned a series of tasks , and the corresponding model weights are denoted as:
[0047] wherein, is the weight related to task . These weights are frozen and will not be modified due to the training of subsequent tasks. The prunable weights of the current task are denoted as , and these weights have not been fully frozen and can provide additional learning ability for the new task .
[0048] To reuse the existing weights , this solution introduces a learnable mask , where D is the dimension. The role of the mask is to selectively enable some of the weights . The mask operation is defined as an element-wise product, and the result of calculating the weight reuse is:
[0049] wherein, ⊙ represents the element-wise product operation, represents the part of the weights selected and reused from .
[0050] To optimize the weight reuse process, this solution introduces a real-valued mask , whose initial value is randomly distributed and is optimized through backpropagation. The update formula for the real-valued mask is:
[0051] wherein, is the loss function, which measures the training effect of the current task . is the learning rate, which is used to control the optimization step size. After each update, the system binarizes the real-valued mask through the threshold to generate the final binary mask . F is the indicator function, which takes the value of 1 when , and 0 otherwise. Finally, the binary mask will be used for the actual weight reuse selection.
[0052] After obtaining the reused weights and the trainable weights , the task Training. The loss function for training is defined as:
[0053] where is the main loss function of the task and can be changed according to different requirements. is the regularization term, which is used to constrain the range of the reused weights and prevent too many weights from being activated. is the regularization coefficient, which controls the trade-off between the main task loss and the regularization of the reused weights.
[0054] When the training of the task is completed, the weights that meet the task requirements are recorded as: , and these weights will be frozen to avoid being modified in subsequent tasks and ensure that the knowledge of the task is not forgotten.
[0055] S14: Repeat task recognition and training When a new task arrives, the system first determines whether it is a repeated task of a historical task. Suppose the current model has learned a series of task sets . If the condition is met, where . Then it indicates that the task is highly similar to the historical tasks and in terms of data distribution and features, and knowledge reuse can be performed. Before starting the training of the new task , it is necessary to first store a copy of the model weights of the task to prevent the model parameters of this task from being affected during the training of the new task.
[0056] For the new task that has been determined to be a repeated task, the backpropagation algorithm is used to update its model. Since the task has similar features to , it can be initialized based on the mask of the historical task and adjusted. At the same time, calculate the trainable weights of the current task to ensure that the new task can be optimized based on the existing knowledge.
[0057] Next, calculate the loss function and use the training data of the task to simultaneously optimize the new real-valued mask and the weights using the backpropagation algorithm.
[0058] After optimization is completed, a new task can be obtained of the task feature mask and the model weights . Through the gradient update mechanism, the model can adapt to the new task while maximizing the retention of the knowledge already learned.
[0059] Among them depends on , that is, using the mask information of the existing task for initialization, avoiding the model from recalculating the existing features and improving the training efficiency. Task 's final weights will select some weights from to ensure that the new task still has the ability to adapt to historical tasks.
[0060] In the future, if the task is encountered again, the optimized can be directly applied for calculation without having to train from scratch. This is because the weights of the historical task have been stored. Therefore, if future tasks depend on , the system can still call its weights for calculation. Before this, for other newly arrived tasks, the weights can be used for processing to maintain the accuracy of other tasks.
[0061] S2. Knowledge Aggregation of Cloud Node Collaboration Grouping Since current federated learning aggregation methods all attempt to change the weights of the entire model, this is not feasible for the client models in this solution. The client models of the end nodes are divided into multiple sub-models, and their weights are frozen after training is completed to avoid forgetting the knowledge features of previous tasks when learning new tasks. To overcome this limitation, the present invention designs an efficient information transmission mechanism to build a bridge between the client and the cloud node. By introducing knowledge distillation technology based on task grouping, the cloud node model can transfer the global knowledge shared within the group to the end node model while respecting the structure and constraints of the sub-models on the end side. This mechanism not only avoids the direct intervention of the global model on the structure of the client model but also realizes the efficient aggregation and sharing of knowledge, thereby enhancing the adaptability and collaboration ability of the model in a dynamic task environment. Figure 4 It is a flow chart for knowledge aggregation of cloud node grouping.
[0062] S21: Cloud Node Feature Convergence and Identification In this step, the edge node extracts the logits representing the characteristics of this node according to the received task and uploads them to the cloud node. The cloud node collects the logits uploaded by each edge node server during each round of iteration and groups the edge node servers with similar characteristics based on this.
[0063] First, normalize the logits of the client model to eliminate the influence of the feature scales between different clients:
[0064] Among them, represents the logits of client . Subsequently, this solution uses cosine similarity to compare the logits of different clients. The formula is:
[0065] According to the similarity results, the cloud node can obtain , a total of groups, and each group contains clients with similar tasks.
[0066] S22: Establishment of cloud node model groups In this step, after the cloud node obtains the edge node grouping, for each task group an independent server model is established in the cloud node set node . The functions of the server model are: (1) Learning the knowledge of the task group. The server model receives the features and model updates from the clients within the group, aggregates and optimizes them to learn the shared knowledge of the tasks in this group. (2) Providing knowledge distillation guidance. The knowledge of the server model will be passed to the client models within the group through the distillation process to improve the understanding of the tasks by the client models.
[0067] For each group , the loss function of the server is defined as follows:
[0068]
[0069] This loss function consists of two main components: cross-entropy loss and knowledge distillation loss . represents the cross-entropy loss between the predicted value and the true label. The specific formula is:
[0070] Among them, represents the The true label (in one-hot encoding form) of a sample. Indicates the predicted probability of the server model for the th sample. is the total number of samples.
[0071] Knowledge distillation loss , through the Kullback-Leibler divergence, measures the distribution difference between the server model and the prediction of the client model. The knowledge distillation loss is used to transfer the knowledge of the client model to the server model, and the specific formula is:
[0072] represents the prediction distribution of the client model:
[0073] represents the prediction distribution of the server model:
[0074] is the temperature parameter, used to smooth the distribution and ensure better transfer of probability information during the knowledge distillation process. and are weight parameters, used to balance the cross-entropy loss and the knowledge distillation loss on the optimization of the server model.
[0075] S23: Intra-group client weight allocation After the cloud node completes the grouping of the end-node clients, since the contributions of the clients' tasks to the group server model are different, it is also necessary to allocate weights to the different end-node clients in any group . The weight allocation of the client is defined as:
[0076] represents the logits output of the server model for client k, used to represent the feature importance of task k. is the total number of clients. is a temperature parameter used to adjust the smoothness of the logits distribution. Through the softmax operation, the logits of the server model for client k are converted into probability form and then divided by the normalization factor, ultimately achieving dynamic adjustment of the contribution of each client to the server model, enabling clients with higher feature importance to occupy a larger proportion in the aggregation process.
[0077] S3. Knowledge Update of Edge Node Model The update of the client model is centered around the cross-entropy loss driven by local data, while supplementing its global perspective through the knowledge distillation loss obtained from the server model. Different from the cloud node model that focuses on global tasks, the optimization of the edge-side client model pays more attention to localized and personalized training, and at the same time effectively integrates global knowledge through the distillation mechanism, thereby improving the overall performance and adaptability. Its loss function is:
[0078]
[0079] In this step, the edge node model obtains its own cross-entropy loss through local task data , and obtains distillation knowledge from the server model, and further adjusts the model parameters through the knowledge distillation loss .
[0080] The present invention proposes a federated incremental learning method applicable to the cloud-edge collaborative dynamic data scenario, including two parts: edge node traceable task learning and cloud node grouped knowledge aggregation.
[0081] Aiming at the problem of how to identify repeated tasks in a multi-task scenario and make full use of the data features of repeated tasks to prevent knowledge forgetting during the edge-side dynamic learning process, a traceable edge-side federated incremental training method is proposed. Drawing on the mechanism of task sub-networks and learnable masks, a traceable model for multi-task sharing and freezing is constructed. The present invention first performs local pruning and fine-tuning based on the initial shared model, and judges whether the task is repeated according to the label distribution similarity; for non-repeated tasks, selectively activate the existing weights through the learnable mask and incorporate regularization constraints, while retaining historical task knowledge and efficiently adapting to new tasks; for repeated tasks, use copy maintenance and mask retraining to achieve traceable enhancement of task features. This method effectively improves the ability to identify and utilize repeated task data in the cloud-edge collaborative dynamic data environment, and enhances the knowledge retention effect of the model.
[0082] Aiming at the problem that traditional federated incremental learning cannot effectively aggregate the global model in the cloud collaborative scenario, a knowledge distillation model aggregation method based on task grouping is proposed. By drawing on the principles of hierarchical clustering and cosine similarity calculation, a cloud-edge collaborative grouping model is constructed. Specifically, first, the features of each client are collected at the edge nodes and grouped according to labels using hierarchical clustering, and clients with similar features are included in the same group; then, corresponding server models are established for each group at the cloud node, and the global shared knowledge of the clients within the group is learned through parallel training of cross-entropy loss and knowledge distillation loss; then, combined with the importance evaluation results of the cloud node for the clients within the group, different aggregation weights are assigned to the clients within the group; finally, at the edge side, the clients update their own model parameters based on the local cross-entropy loss and the knowledge distillation loss downloaded from the server. Through such a collaborative mechanism of grouped aggregation and bidirectional distillation, the independence and sustainable evolution ability of the edge sub-models are effectively guaranteed, and the adaptability and aggregation effect of the client models in the dynamic task data environment are greatly improved.
[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A traceable federated incremental learning method based on group feature aggregation, characterized in that: The steps include: S1. Perform traceable task learning and training on the end node; perform local pruning and fine-tuning based on the initial shared model, and determine whether the task is repeated based on the label distribution similarity; for non-repeated tasks, selectively activate the existing weights through the learnable mask and incorporate regular constraints to obtain a new sub-model of the initial shared model; for repeated tasks, perform mask retraining to obtain an updated sub-model for this repeated task; the end node transmits the task feature vector of the new sub-model or updated sub-model and the updated weight of the current round of model to the cloud node; S2. Construct a cloud-end collaborative grouping model. Collect the features of each client at the end node and use hierarchical clustering to group them according to labels, and include clients with similar features in the same group. Establish a corresponding server model for each group at the cloud node. The server model learns the global shared knowledge of the clients in the group through parallel training of knowledge distillation loss. The server model combines the importance evaluation results of the cloud node on the clients in the group and assigns different aggregation weights to the clients in the group. Sending the global shared knowledge generated by the server model of each group and the aggregate weight corresponding to the global shared knowledge to the end node; S3. At the end node, the client updates its own model parameters based on the local cross entropy loss and the global shared knowledge generated by the server model of each group and the aggregation weight corresponding to the global shared knowledge, and outputs the updated model; S4: Replace the new sub-model in S1 or the updated sub-model with the updated model, and repeat S1 to S3 until the specified number of training times is reached and the training is stopped.
2. The traceable federated incremental learning method based on group feature aggregation according to claim 1 is characterized in that: S1 specifically includes the following steps: S11, model initialization; Set all end node clients to a shared model and learning tasks of Client starts; for tasks , the end node first follows the shared model Learning is performed by activating the model neurons according to the data distribution of the task, forming a corresponding sub-model, and iteratively fine-tuning the sub-model to maintain accuracy; keeping the sub-model weights unchanged to avoid forgetting and enable learning until the repeated task P comes Client side; S12, task marking; For the currently acquired tasks , statistical tasks The label distribution in ,in, Indicates the task Middle k The sample ratio of the class label; whenever a new task is obtained, the label distribution of the current task Label distribution with historical tasks Compare and calculate the similarity between the two. If the similarity exceeds the preset threshold, the current task is determined to be a duplicate of the historical task. The formula for calculating task similarity is as follows: When the calculated similarity is less than the specified value, execute S13; when the calculated similarity is greater than the specified value, execute S14; S13, non-repetitive task training; Set up model A series of tasks have been learned ,Model The corresponding model weights are recorded as: in, is the task in the model The relevant weights are frozen weights; the current task The pruning weight is recorded as , is the unfrozen weight; Using learnable masks Selectively enable some weights , where D is The mask operation is defined as the element-wise product, and the result of the weight reuse is: Among them, ⊙ represents the element-by-element product operation, Indicates from Select and reuse some weights in ; Using real-valued masks , the real-valued mask is optimized by back propagation; the initial value of the real-valued mask is randomly distributed, and the real-valued mask The update formula is: in, Is the loss function, measuring the current task training effect; is the learning rate, which is used to control the optimization step size; After each update, the system passes the threshold Masking real values , binarized to generate the final binary mask ; F is the indicator function, when The value is 1 when , otherwise it is 0; binary mask For actual weight reuse selection; Performing tasks training; When the task After the training is completed, the weights that meet the task requirements are recorded as: , freeze weights ; S14, repeated task identification and training; In the new task When it arrives, first determine the new task Is it a repeated task of the historical task? Assuming the current model A set of tasks have been learned }, if the condition is met ,in , it indicates that the task With historical tasks and The data distribution and features are highly similar, so knowledge can be reused; when starting a new task Before training, store the task A copy of the model weights ; For new tasks that have been determined to be repeated tasks , use the back propagation algorithm for new tasks The model is updated based on the mask of historical tasks. Initialize and adjust the current mask; calculate the trainable weights for the current task ; Calculate the loss function and pass the task training data, and use the back-propagation algorithm to simultaneously mask the new real-valued and weight Perform synchronization optimization; After the optimization is completed, a new task is obtained Task feature mask and model weights ; Through the gradient update mechanism, the model can adapt to new tasks while retaining the knowledge that has been learned; Initialize using the mask information of existing tasks; Task The final weight Will be from The weights are selected in order to make the new task adaptable to the historical tasks.
3. The traceable federated incremental learning method based on group feature aggregation according to claim 1 is characterized in that: S2 specifically includes the following steps: S21, cloud node feature aggregation and identification; The end node extracts the logits representing the characteristics of the node according to the label of the received task and uploads it to the cloud node; the cloud node collects the logits uploaded by each end node server in each iteration process, and groups the end node servers with similar characteristics accordingly; Normalize the logits of the client model to eliminate the impact of feature scales between different clients: in, Represents the client logits; Use cosine similarity to compare logits from different clients. The formula is: According to the similarity results, the cloud node obtains ,common groups, each containing clients with similar tasks; S22, establishing a cloud node model group; After the cloud node obtains the end node group, for each task group Build a standalone server model in the cloud node set ; Server Model The knowledge is transferred to the client models in the group through the distillation process; S23, client weight allocation within the group; For any group Different end node clients are weighted; weight distribution of clients Defined as: in, Represents the server model to the client k Logits output; is the total number of clients; is the temperature parameter; the server model is k The logits are converted into probability form and then divided by the normalization factor to dynamically adjust the contribution of each client to the server model so that clients with higher feature importance occupy a larger proportion in the aggregation process.
4. The traceable federated incremental learning method based on group feature aggregation according to claim 1 is characterized in that: S3 specifically includes the following steps: The update of the client model is centered on the cross entropy loss driven by local data, and the knowledge distillation loss obtained from the server model is used to supplement the global perspective of the client side. The loss function of the client model is: The end node model obtains its own cross entropy loss through local task data , and obtain the distilled knowledge from the server model through the knowledge distillation loss Further adjust the model parameters.
5. The traceable federated incremental learning method based on group feature aggregation according to claim 1 is characterized in that: In S13, carry out the task The training loss function is defined as: in, It's a task The main loss function of is a regularization term used to constrain the range of reuse weights; is the regularization coefficient.
6. The traceable federated incremental learning method based on group feature aggregation according to claim 1 is characterized in that: In S22, for each group , the server’s loss function is defined as follows: Represents the cross entropy loss between the predicted value and the true label. The specific formula is: in, Indicates The true labels of samples; Indicates the server model for The predicted probability of a sample, is the total number of samples; Represents the knowledge distillation loss, and measures the server model through KL divergence Predictions with client models The knowledge distillation loss is used to transfer the knowledge of the client model to the server model. The specific formula is: Represents the predicted distribution of the client model: Represents the predicted distribution of the server model: is the temperature parameter; is a weight parameter used to balance the cross entropy loss Impact on server model optimization; is the weight parameter used to balance the knowledge distillation loss Impact on server model optimization.
7. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is run, the traceable federated incremental learning method based on group feature aggregation described in any one of claims 1 to 6 is executed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor executes the traceable federated incremental learning method based on group feature aggregation as described in any one of claims 1 to 6 through the operation of the computer program.
Citation Information
Patent Citations
Data-driven cognitive computing-oriented privacy protection federated learning method and system
CN117521785A
Asynchronous federal image classification method and system based on client selection and aggregation weight adjustment
CN118628837A
Federal incremental learning method based on feature distillation and prototype
CN119026006A
Self-adaptive clustering federal learning method based on knowledge migration
CN119761533A
Cited By
Federal knowledge distillation method for sharing production parameters of rubber tires and application of federal knowledge distillation method
CN121094057A
Soil attribute prediction method fusing chaotic characteristics and federated learning
CN121919842A
A soil property prediction method fusing chaotic characteristics and federated learning
CN121919842B