A traceable federated incremental learning method based on group feature aggregation

Through the method of end-node traceable task learning and cloud node grouping knowledge aggregation, the model efficiency problem in dynamic repetitive tasks and strong heterogeneity scenarios in federated incremental learning is solved, and the efficient utilization of repetitive tasks and efficient aggregation of models is achieved, which improves the adaptability and performance of the model.

CN120087503BActive Publication Date: 2025-09-02NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510585455.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-09-02
Estimated Expiration
2045-05-08

AI Technical Summary

Technical Problem

The existing federated incremental learning methods are difficult to effectively utilize dynamic repetitive task data and process model aggregation efficiency problems in strong heterogeneity scenarios in cloud collaboration scenarios, resulting in model iteration redundancy, performance bottlenecks and generalization performance degradation.

Method used

The traceable federated incremental learning method based on grouping feature aggregation is adopted, and the identification and reuse of repeated tasks is achieved through end-node traceable task learning and cloud node grouping knowledge aggregation, and the model aggregation is optimized through task grouping and in-group knowledge distillation technology.

Benefits of technology

It significantly improves the generalization ability and aggregation efficiency of the model in dynamic repetitive tasks and strong heterogeneous scenarios, reduces redundant calculations, and improves the adaptability and performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120087503B_ABST
    Figure CN120087503B_ABST
Patent Text Reader

Abstract

The present invention provides a traceable federated incremental learning method based on group feature aggregation, which relates to the field of federated learning technology and includes the following steps: S1, performing traceable task learning on end nodes; performing local pruning and fine-tuning based on the initial shared model, and determining whether the task is repeated based on the similarity of label distribution; S2, building a cloud-end collaborative grouping model; sending the global shared knowledge generated by the server model and the aggregation weights corresponding to the global shared knowledge to the end nodes; S3, at the end nodes, 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 weights corresponding to the global shared knowledge, and outputs the updated model; S4, replacing the new sub-model or updated sub-model in S1 with the updated model, and repeating S1 to S3 until the specified number of training times is reached and training is stopped. The present invention aims to effectively address the challenges brought by storage limitations and task repetitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of federated learning technology, and in particular to a traceable federated incremental learning method based on group feature aggregation. Background Art

[0002] Cloud-based collaborative learning, a next-generation distributed computing architecture, leverages the deep integration of cloud computing and virtualization technologies to drive the evolution of machine learning paradigms towards greater efficiency and security. However, in scenarios with continuously evolving data streams, cloud-based collaborative federated learning systems face dual challenges: First, clients continuously receive new task data from non-stationary distributions in a streaming manner, leading to intensified knowledge conflicts across time periods. Second, cloud platforms must coordinate massive client workloads to achieve continuous learning within resource constraints, avoiding privacy risks associated with repeated access to historical data. To address this issue, Federated Incremental Learning (FIL) has emerged. This technology, by constructing a progressive knowledge fusion mechanism, establishes a dynamic balance between global optimization in the cloud and local adaptation on the client side. Specifically, FIL deploys an incremental model repository in the cloud to achieve cross-client knowledge distillation. Simultaneously, an elastic memory replay strategy is employed on the client side to ensure rapid adaptation to new data distributions while maintaining effective retention of historical knowledge through methods such as generating adversarial examples. This two-way collaborative mechanism enables the cloud-based federated system to continuously improve model performance without causing catastrophic forgetting under conditions of limited communication resources, providing key technical support for scenarios that require lifelong learning, such as intelligent manufacturing and autonomous driving.

[0003] To simplify the complexity of the problem, most FIL technologies generally assume that the datasets obtained by the client are static, or assume that the data distribution of new tasks is completely different from that of historical tasks. At the same time, they ignore the prevalence of repeated tasks in cloud-based collaborative scenarios, which limits the scalability of the model. For example, multiple clients obtain the same dataset in different time periods, or because of insufficient data collection, developers need to collect more samples in the future to further optimize historical tasks. Existing FIL can meet the model training needs in cloud-based collaborative environments to a certain extent, but the following challenges still exist: First, the inefficient reuse of repeated task features leads to model iteration redundancy and performance bottlenecks; second, coarse-grained aggregation strategies under heterogeneous task distributions make it difficult to achieve balanced adaptation of global-local models. The combined effect of these two core issues seriously restricts the application effectiveness of federated incremental learning in real-world scenarios.

[0004] 1. Inefficient use of dynamic repetitive task data limits model performance

[0005] Current FIL methods typically assume that new tasks received by clients differ significantly from historical tasks in both content and distribution. Consequently, they often lack mechanisms for identifying and reusing features for dynamic, repetitive tasks. In cloud-based collaborative scenarios, different clients may receive the same data stream or highly repetitive tasks at different times. Without appropriate feature tracking and reuse strategies, on the one hand, end-side nodes will need to perform redundant training for repetitive tasks, increasing their computational and storage burdens. On the other hand, the cloud-based global model cannot quickly adapt to the features of repetitive tasks, often requiring retraining or reoptimization from scratch. This can lead to prominent forgetting issues, reduced prediction accuracy, slower model convergence, and significantly increased training cycles and communication costs.

[0006] 2. Low model aggregation efficiency in highly heterogeneous scenarios

[0007] In cloud-based collaborative scenarios, due to the varying hardware configurations, network bandwidths, and application environments of client-side nodes, the distribution of task characteristics often differs significantly between nodes. Specifically, even at the same point in time, different nodes may face completely different task types or data streams. This high degree of heterogeneity poses significant challenges for global models when aggregating information from multiple parties. Existing methods based on global averaging (such as FedAvg) or simple weighted aggregation strategies struggle to differentiate between different distributions or multi-task characteristics. This results in aggregation results that are biased towards the data distribution of certain tasks or clients, impairing the model's generalization to new or unseen tasks. Furthermore, when the aggregated global model is distributed to client-side nodes, if the personalized needs of each client task are not fully considered, the on-side model often suffers from insufficient adaptability and accuracy. Due to the lack of flexible aggregation or personalization strategies (such as the regularization and personalization mechanisms used in methods like pFedMe and FedProx), federated incremental learning in highly heterogeneous scenarios still has significant room for improvement in terms of model convergence speed and resource efficiency. Summary of the Invention

[0008] In view of this, the purpose of the present invention is to propose a traceable federated incremental learning method based on group feature aggregation to solve the problems of efficient utilization of dynamic repetitive task data and model aggregation efficiency in strong heterogeneity scenarios in the existing federated incremental learning technology in cloud collaboration scenarios.

[0009] The technical means adopted in the present invention are as follows:

[0010] A traceable federated incremental learning method based on group feature aggregation includes the following steps:

[0011] 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 similarity of label distribution; for non-repeated tasks, selectively activate 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 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 weights of the current model to the cloud node;

[0012] S2. Build a cloud-end collaborative grouping model. At the end node, collect client features and use hierarchical clustering to group them by label, grouping clients with similar features into the same group. At the cloud node, establish a corresponding server model for each group. The server model uses parallel training with knowledge distillation loss to learn the global shared knowledge of the clients within the group. The server model combines the importance assessment results of the cloud node for the clients within the group and assigns different aggregation weights to the clients within the group. The global shared knowledge generated by the server model for each group and the corresponding aggregation weights are sent to the end node.

[0013] 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;

[0014] S4: Replace the new sub-model or updated sub-model in S1 with the updated model, and repeat S1 to S3 until the specified number of training times is reached and the training is stopped.

[0015] Furthermore, S1 specifically includes the following steps:

[0016] S11, model initialization;

[0017] 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;

[0018] S12, task marking;

[0019] For the currently acquired tasks , statistical tasks The label distribution in ,in, Indicates a task The proportion of samples of the k-th class label in the task; 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 considered to be a duplicate of the historical task. The formula for calculating task similarity is as follows:

[0020]

[0021] When the calculated similarity is less than the specified value, execute S13; when the calculated similarity is greater than the specified value, execute S14;

[0022] S13, non-repetitive task training;

[0023] Set up model A series of tasks have been learned ,Model The corresponding model weights are recorded as:

[0024]

[0025] in, Is the model and the task The relevant weights are frozen weights; the current task The pruning weight is recorded as , is the unfrozen weight;

[0026] 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:

[0027]

[0028] Among them, ⊙ represents the element-by-element product operation, Indicates from Select and reuse some weights in ;

[0029] Using real-valued masks , optimize the real-valued mask by back propagation; the initial value of the real-valued mask is randomly distributed, and the real-valued mask The update formula is:

[0030]

[0031] in, Is the loss function, which measures the current task training effect; is the learning rate, which is used to control the optimization step size;

[0032] After each update, the system passes the threshold Real-valued mask , 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;

[0033] Carry out tasks training;

[0034] When the task After the training is completed, the weights that meet the task requirements are recorded as: , freeze weights ;

[0035] S14, repeated task identification and training;

[0036] In the new task When it arrives, first determine the new task Is it a repeated task of a historical task? Assuming the current model A set of tasks have been learned }, if the conditions are met ,in , it indicates that the task and historical missions 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 ;

[0037] For new tasks that have been determined to be repeated tasks , use the back propagation algorithm to learn 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 ;

[0038] Calculate the loss function and pass the task training data, and use the back propagation algorithm to simultaneously mask the new real value and weights Perform synchronization optimization;

[0039] 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 it has learned;

[0040] Initialize using the mask information of the existing task; Task The final weight Will be from The weights are selected in order to make the new task adaptable to the historical tasks.

[0041] Furthermore, S2 specifically includes the following steps:

[0042] S21, cloud node feature aggregation and identification;

[0043] The end node extracts the logits representing the characteristics of the node based on 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;

[0044] Normalize the logits of the client model to eliminate the influence of feature scales between different clients:

[0045]

[0046] in, Represents the client logits;

[0047] Use cosine similarity to compare logits of different clients. The formula is:

[0048]

[0049] According to the similarity results, the cloud node gets ,common groups, each group contains clients with similar tasks;

[0050] S22, establishing a cloud node model group;

[0051] After the cloud node obtains the end node group, for each task group Establish an independent server model in the cloud node set node ; Server Model The knowledge is transferred to the client model in the group through the distillation process;

[0052] S23, weight distribution of clients within the group;

[0053] For any group Different end node clients are weighted; weight distribution of clients Defined as:

[0054]

[0055] in, represents the logits output of the server model for client k; is the total number of clients; is the temperature parameter; the logits of the server model for client k 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.

[0056] Furthermore, S3 specifically includes the following steps:

[0057] The client model update is centered around the cross-entropy loss driven by local data, while supplemented by the knowledge distillation loss obtained from the server model to provide a global perspective. The loss function of the client model is:

[0058]

[0059]

[0060] The end node model obtains its own cross entropy loss through local task data , and obtain distilled knowledge from the server model through knowledge distillation loss Further adjust the model parameters.

[0061] Furthermore, in S13, the task The training loss function is defined as:

[0062]

[0063] 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.

[0064] Furthermore, in S22, for each group , the server's loss function is defined as follows:

[0065]

[0066]

[0067] Represents the cross entropy loss between the predicted value and the true label. The specific formula is:

[0068]

[0069] in, Indicates the The true labels of samples; Indicates the server model for The predicted probability of a sample, is the total number of samples;

[0070] Represents the knowledge distillation loss, which is measured by the KL divergence of the server model 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:

[0071]

[0072] Represents the prediction distribution of the client model:

[0073]

[0074] Represents the predicted distribution of the server model:

[0075]

[0076] is the temperature parameter; is the 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.

[0077] The present invention also provides a storage medium, which includes a stored program, wherein when the program is run, any of the above-mentioned traceable federated incremental learning methods based on group feature aggregation is executed.

[0078] The present invention also provides 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 any one of the above-mentioned traceable federated incremental learning methods based on group feature aggregation through the computer program.

[0079] Compared with the prior art, the present invention has the following advantages:

[0080] Due to the dynamic nature of data in cloud-based collaborative scenarios, existing federated incremental learning technologies struggle to incrementally train models using newly generated data from end nodes and effectively aggregate knowledge in cloud nodes. This paper proposes a federated incremental learning method for cloud-based collaborative dynamic data scenarios. This method effectively addresses the inability of dynamic, repetitive task data in cloud-based collaborative scenarios to effectively participate in federated incremental learning, as well as the inability of models to effectively aggregate in highly heterogeneous scenarios. The method comprises two parts: end-side traceable task identification training and cloud-side grouped knowledge aggregation.

[0081] In the process of learning traceable tasks at end nodes, the invention proposes a method for identifying repeated tasks using past training information. By tracking and reusing the features of dynamic, repetitive tasks, the invention effectively reduces redundant computation at the end nodes, enhances the ability to identify and reuse historical task features, and significantly reduces the problem of forgetting.

[0082] During the cloud node grouping and knowledge aggregation process, this invention effectively addresses the heterogeneity of repeated task distribution through a grouping and aggregation mechanism based on task characteristics. Task grouping and intra-group knowledge distillation techniques improve the accuracy and efficiency of model aggregation, significantly enhancing the model's generalization capabilities and performance under heterogeneous tasks. Furthermore, through cloud-based task grouping and dynamic weight allocation mechanisms, the global model's aggregation efficiency is optimized. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0084] Figure 1 1 is a diagram of the overall steps of the method of the present invention.

[0085] Figure 2 This is a schematic diagram of the architecture design of the method of the present invention.

[0086] Figure 3 This is a traceable learning flow chart for the end nodes of the present invention.

[0087] Figure 4 This is the flow chart of cloud node grouping knowledge aggregation of the present invention. DETAILED DESCRIPTION

[0088] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0089] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0090] This invention aims to address two key challenges faced by federated incremental learning in cloud-based collaborative scenarios, namely the efficient utilization of dynamic repetitive task data and the model aggregation efficiency in highly heterogeneous scenarios. It proposes a comprehensive optimization solution to improve the performance and adaptability of the system.

[0091] To address the prevalence of dynamic, repetitive tasks and the difficulty existing methods have in tracking and reusing task features, we propose a mechanism for identifying and reusing repetitive tasks based on model weight labeling and tracking. By using the currently trained model as the sole resource and extracting weight features from different task sub-models, we can accurately track and reuse historical task features without relying on the original data.

[0092] To address the significant differences in task feature distribution in highly heterogeneous scenarios, we propose a dynamic model aggregation mechanism based on intra-group knowledge distillation and feature mapping. We leverage task feature mapping on client-side nodes to construct a group-based knowledge federation solution based on the distribution of data features. By addressing inter-task heterogeneity, we reduce error accumulation, enabling the model to accurately integrate diverse features and improve aggregation effectiveness.

[0093] The present invention aims to effectively address the challenges brought by storage limitations and task repetitiveness. This solution accurately identifies and enhances the characteristics of repeated tasks by combining task label distribution with weight marking, avoiding redundant calculations and resource waste. At the same time, a flexible task grouping mechanism is designed to optimize knowledge federation through server-side group aggregation, thereby improving the performance and adaptability of the global model. In addition, the present invention uses selective retraining and feature tracking technology to achieve tracking and incremental optimization of historical task features under limited storage conditions, significantly improving the system's processing capabilities in dynamic and heterogeneous data environments. The overall flow chart of the solution is shown below. Figure 1 The traceable federated incremental learning scheme proposed in this invention can be divided into two parts: the end node traceable task learning mechanism and the cloud node group knowledge aggregation. The architecture diagram of the method is shown in Figure 2 The present invention provides a traceable federated incremental learning method based on group feature aggregation, and the specific steps are as follows:

[0094] S1, end-node traceability task learning;

[0095] During end-node training, all end nodes begin training by obtaining a shared initial global model from the cloud master node. This model contains preliminary parameters common to all clients and is used by all clients for local training. During the initialization phase, clients perform local training and weight pruning based on the shared model, generating a sub-model adapted to the task and freezing its weights. By calculating the similarity of task label distributions, the system can identify new tasks as repetitive in real time. For non-repetitive tasks, a learnable masking mechanism is introduced to selectively reuse weights from historical tasks and optimize them based on the characteristics of the current task. A loss function is used to constrain the activation range of weights, ensuring the model's task adaptability and stability. For repetitive tasks, weight copies are maintained and weights and masks are re-optimized to track and enhance task characteristics, ensuring the global model's efficiency and knowledge retention in dynamic, repetitive task scenarios. Finally, the optimized weights are frozen to prevent the loss of knowledge from previous tasks and support continuous learning for subsequent tasks. Figure 3 Learning flow chart for end-side traceability tasks

[0096] S11: Model initialization

[0097] During the initialization phase, this method sets all end node clients to a shared model. and learning tasks of The client starts. The initial model is first trained on its local dataset, and then each client performs gradual pruning, which removes a portion of the weights to obtain a sub-model and iteratively fine-tunes the sub-model to maintain accuracy. The size of each sub-model here 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 repeated task P comes Client.

[0098] S12: Quest Marker

[0099] During the training of the end node, for the currently acquired task , count the label distribution ,in, Indicates a task The proportion of samples of the k-th class label in . Whenever a new task is obtained, the label distribution of the current task is Label distribution with historical tasks Compare and calculate the similarity between the two. If the similarity exceeds the preset threshold, the current task is considered to be a duplicate of the historical task. The formula for calculating task similarity is as follows:

[0100]

[0101] If the calculated similarity is less than 0.7, proceed to S13, otherwise proceed to S14.

[0102] S13: Non-repetitive task training

[0103] Hypothetical Model A series of tasks have been learned , and its corresponding model weight is recorded as:

[0104]

[0105] in, Is the model and the task Related weights. These weights are frozen and will not be modified by training of subsequent tasks. The pruning weight is recorded as , these weights are not completely frozen yet and can be used for new tasks Provides additional learning capabilities.

[0106] To reuse existing weights , this scheme introduces a learnable mask , where D is The role of the mask is to selectively enable some weights The mask operation is defined as an element-wise product, and the result of the weight reuse is:

[0107]

[0108] Among them, ⊙ represents the element-by-element product operation, Indicates from Select and reuse some weights in .

[0109] In order to optimize the weight reuse process, this scheme introduces a real-valued mask , whose initial value is randomly distributed and optimized by back propagation. The update formula is:

[0110]

[0111] in, Is the loss function, which measures 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 Real-valued mask , binarized to generate the final binary mask . F is the indicator function, when The value is 1 when , otherwise it is 0. Finally, the binary mask Will be used for actual weight reuse selection.

[0112] After obtaining the reuse weight and trainable weights After that, you can start the task The training loss function is defined as:

[0113]

[0114] in, It's a task The main loss function can be changed according to different requirements. It is a regularization term used to constrain the range of reused weights and prevent too many weights from being activated. is the regularization coefficient that controls the trade-off between the main task loss and the reuse weight regularization.

[0115] When the task After the training is completed, the weights that meet the task requirements are recorded as: , these weights will be frozen to avoid being modified in subsequent tasks, ensuring that the task knowledge is not forgotten.

[0116] S14: Repeated Task Identification and Training

[0117] In the new task When it arrives, the system first determines whether it is a repeated task of the historical task. Assuming the current model A set of tasks have been learned }, if the conditions are met ,in . This indicates that the task and historical missions and The data distribution and features are highly similar, so knowledge can be reused. Before training, you need to store the task A copy of the model weights , to prevent the model parameters of the task from being affected during the training of the new task.

[0118] For new tasks that have been determined to be repeated tasks , use the back propagation algorithm to update its model. With Similar features, so masks based on historical tasks Initialize and adjust it. At the same time, calculate the trainable weights of the current task , ensuring that new tasks can be optimized based on existing knowledge.

[0119] Next, calculate the loss function and pass the task training data, and use the back propagation algorithm to simultaneously mask the new real value and weights Perform synchronization optimization.

[0120] When the optimization is completed, you can get a new task Task feature mask and model weights Through the gradient update mechanism, the model can adapt to new tasks while retaining the learned knowledge to the greatest extent.

[0121] in Depends on , that is, using the mask information of the existing task for initialization, avoiding the model from repeatedly calculating the existing features and improving the training efficiency. The final weight Will be from Select some weights in the model to ensure that the new task still has the adaptability to the historical tasks.

[0122] If you encounter the task again in the future , you can directly apply the optimized Calculations are performed without training from scratch. This is due to historical tasks Weight is already stored, so if future tasks depend on , the system can still call its weight for calculation. Before that, for other newly arrived tasks, the weight can be used Processing to maintain accuracy of other tasks.

[0123] S2. Cloud node collaborative grouping knowledge aggregation

[0124] Since current federated learning aggregation methods all attempt to change the weights of the entire model, this is not feasible for the client model in this solution. The client model of the end node is divided into multiple sub-models, and their weights are frozen after training to avoid forgetting the knowledge features of the previous task when learning a new task. In order to overcome this limitation, the present invention designs an efficient information transfer 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 pass the global knowledge shared within the group to the end node model while respecting the structure and constraints of the end-side sub-model. This mechanism not only avoids the direct intervention of the global model on the client model structure, but also realizes the efficient aggregation and sharing of knowledge, thereby improving the adaptability and collaboration ability of the model in a dynamic task environment. Figure 4 Flowchart of knowledge aggregation for grouping cloud nodes.

[0125] S21: Cloud Node Feature Aggregation and Identification

[0126] In this step, the end node extracts logits representing the node's characteristics according to the received task and its label and uploads them to the cloud node. In each iteration, the cloud node collects the logits uploaded by each end node server and groups end node servers with similar characteristics.

[0127] First, normalize the logits of the client model to eliminate the influence of feature scales between different clients:

[0128]

[0129] in, Represents the client Then, this scheme uses cosine similarity to compare the logits of different clients, the formula is:

[0130]

[0131] According to the similarity results, the cloud node can obtain ,common groups, each containing clients with similar tasks.

[0132] S22: Cloud node model group establishment

[0133] In this step, after the cloud node obtains the end node group, for each task group Establish an independent server model in the cloud node set node The role of the server model is: (1) to learn the knowledge of the task group. Receive features and model updates from clients in the group, aggregate and optimize them to learn the shared knowledge of the group's tasks. (2) Provide knowledge distillation guidance. Server model The knowledge is transferred to the client model in the group through the distillation process to improve the client model's understanding of the task.

[0134] For each group , the server's loss function is defined as follows:

[0135]

[0136]

[0137] 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:

[0138]

[0139] in, Indicates the The true labels of samples (in one-hot encoding form). Indicates the server model for The predicted probability of a sample. is the total number of samples.

[0140] Knowledge Distillation Loss , measure the server model through KL divergence (Kullback-Leibler 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:

[0141]

[0142] Represents the prediction distribution of the client model:

[0143]

[0144] Represents the predicted distribution of the server model:

[0145]

[0146] is the temperature parameter, which is used to smooth the distribution and ensure better transmission of probability information during the knowledge distillation process. and are weight parameters used to balance the cross entropy loss and knowledge distillation loss Impact on server model optimization.

[0147] S23: Client weight distribution within the group

[0148] After the cloud node completes the grouping of the peer node clients, since the client tasks contribute differently to the group server model, it is also necessary to The weight distribution of different end node clients. Defined as:

[0149]

[0150] Represents the logits output of the server model for client k, which is used to indicate the feature importance of task k. The total number of clients. The temperature parameter adjusts the smoothness of the logits distribution. The server model's logits for client k are converted to probabilities through a softmax operation and then divided by the normalization factor. This dynamically adjusts each client's contribution to the server model, giving clients with more important features a larger weight in the aggregation process.

[0151] S3, End Node Model Knowledge Update

[0152] The client model update is centered around a cross-entropy loss driven by local data, supplemented by a global perspective using knowledge distillation loss obtained from the server model. Unlike the cloud node model, which focuses on global tasks, the optimization of the client model on the end emphasizes localized and personalized training, while effectively integrating global knowledge through a distillation mechanism to improve overall performance and adaptability. The loss function is:

[0153]

[0154]

[0155] In this step, the end node model obtains its own cross entropy loss through local task data , and obtain distilled knowledge from the server model through knowledge distillation loss Further adjust the model parameters.

[0156] The present invention proposes a federated incremental learning method suitable for cloud-based collaborative dynamic data scenarios, which includes two parts: end-node traceable task learning and cloud node grouping knowledge aggregation.

[0157] Aiming at the problem of how to identify repeated tasks in a multi-task scenario during the dynamic learning process on the end side and make full use of the data features of repeated tasks to prevent knowledge forgetting, a traceable end-side federated incremental training method is proposed. Drawing on the task sub-network and learnable mask mechanism, a traceable model of multi-task sharing and freezing is constructed. The present invention first performs local pruning and fine-tuning based on the initial shared model, and determines whether the task is repeated based on the similarity of the label distribution; for non-repeated tasks, the existing weights are selectively activated through the learnable mask and regular constraints are incorporated to retain the historical task knowledge while efficiently adapting to new tasks; for repeated tasks, the traceability enhancement of task features is achieved by using replica maintenance and mask retraining. This method effectively improves the ability to identify and utilize repeated task data in a collaborative dynamic data environment on the cloud, and enhances the knowledge retention effect of the model.

[0158] To address the problem that traditional federated incremental learning cannot effectively aggregate global models in cloud-based collaborative scenarios, a knowledge distillation model aggregation method based on task grouping is proposed. Drawing on the principles of hierarchical clustering and cosine similarity calculation, a cloud-end collaborative grouping model is constructed. Specifically, the client features are first collected at the end node and grouped according to labels using hierarchical clustering, with clients with similar features grouped into the same group. A corresponding server model is then established for each group at the cloud node, and the global shared knowledge of the clients in the group is learned through parallel training using cross-entropy loss and knowledge distillation loss. Different aggregation weights are then assigned to the clients in the group based on the importance assessment results of the cloud node on the clients in the group. Finally, on the end side, the client updates its own model parameters based on the local cross-entropy loss and the knowledge distillation loss downloaded from the server. This collaborative mechanism of grouping aggregation and bidirectional distillation effectively ensures the independence and sustainable evolution capability of the end-side sub-models, significantly improving the adaptability and aggregation effect of the client model in a dynamic task data environment.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, 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 by: 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 similarity of label distribution; for non-repeated tasks, selectively activate 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 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 weights of the current model to the cloud node; S2. Build a cloud-end collaborative grouping model. At the end node, client features are collected and grouped by label using hierarchical clustering, placing clients with similar features into the same group. At the cloud node, a corresponding server model is built for each group. The server model learns the globally shared knowledge of the clients within the group through parallel training using knowledge distillation loss. The server model combines the importance assessment results of the cloud node on the clients within the group to assign different aggregation weights to the clients within the group. Send 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 or updated sub-model in S1 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; S12, task marking; For the currently acquired tasks , statistical tasks The label distribution in ,in, Indicates a 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 considered 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 model and the task 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 , optimize the real-valued mask 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, which measures 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 Real-valued mask , 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; Carry out 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 a historical task? Assuming the current model A set of tasks has been learned }, if the conditions are met ,in , it indicates that the task and historical missions 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 to learn 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 value and weights 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 it has learned; Initialize using the mask information of the existing task; 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 based on 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 influence of feature scales between different clients: in, Represents the client logits; Use cosine similarity to compare logits of different clients. The formula is: According to the similarity results, the cloud node gets ,common groups, each group contains clients with similar tasks; S22, establishing a cloud node model group; After the cloud node obtains the end node group, for each task group Establish an independent server model in the cloud node set node ; Server Model The knowledge is transferred to the client model in the group through the distillation process; S23, weight distribution of clients 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 client model update is centered around the cross-entropy loss driven by local data, while supplemented by the knowledge distillation loss obtained from the server model to provide a global perspective. The loss function of the client model is: The end node model obtains its own cross entropy loss through local task data , and obtain distilled knowledge from the server model through 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 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, which is measured by the KL divergence of the server model 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 prediction distribution of the client model: Represents the predicted distribution of the server model: is the temperature parameter; is the 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 according to 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