Federated Continuous Learning System
By using the sample selection mechanism based on class divergence information and the update mechanism of the residual sample set, the problems of decreased generalization ability and knowledge forgetting caused by noisy samples in federated learning systems are solved, thereby improving the model's performance and robustness in incremental learning tasks.
Patent Information
- Application Number
- CN202411360544.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Existing federated learning systems suffer from decreased model generalization ability and knowledge forgetting when faced with noisy samples provided by data providers, making it difficult to maintain high performance in incremental learning.
By filtering samples using class divergence information, the negative impact of noisy samples on model training is reduced. Furthermore, a multi-round update mechanism for the sample data set and the residual sample set is adopted to gradually improve the model's performance in class incremental learning tasks.
The robustness and generalization ability of the model in noisy environments are enhanced, which effectively alleviates the problem of knowledge forgetting and ensures that the model can maintain high performance when dealing with new categories.
Smart Images

Figure CN119168020B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a federated continuous learning system. Background Technology
[0002] With the development of machine learning technology, the performance of models in handling different tasks has been significantly improved. In particular, with the support of a large amount of labeled data, models can better learn features and patterns and adapt to diverse application scenarios.
[0003] Currently, federated continuous learning technology provides an effective means of training models under data privacy protection, solving the model training problem under data distributed across different clients. However, current federated learning still has shortcomings when dealing with noise in the samples provided by the data provider and in incremental learning of the model's classes, leading to decreased generalization ability and knowledge forgetting. Therefore, to address these shortcomings, a federated continuous learning system that can effectively handle noisy samples and prevent knowledge forgetting is needed. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a federated continuous learning system. One or more embodiments of this specification also relate to a federated continuous learning method applied to a client, a federated continuous learning method applied to a server, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a federated continuous learning system is provided, the system comprising a server and at least one client;
[0006] Each client is configured to: acquire a first sample data set and a class divergence threshold, wherein the first sample data set includes at least one first sample data; acquire first class divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set based on each first class divergence information and the class divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information based on the local model, and send the local model information to the server;
[0007] The server is configured to receive local model information sent by each client, and obtain a global model based on the local model information; determine whether the global model has reached the model training stopping condition; if not, generate a residual sample generation instruction based on the global model and send the residual sample generation instruction to each client; if yes, determine the global model as the target model.
[0008] Each client is also configured to receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second class divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set based on each second class divergence information and the class divergence threshold; combine the residual sample set, the second initial sample pair data set, and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information based on the local model parameters of the local model; and send the local model information to the server.
[0009] According to a second aspect of the embodiments of this specification, a federated continuous learning method is provided, applied to a client, comprising:
[0010] Obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data;
[0011] Obtain the first category divergence information corresponding to each first sample data, and determine the first sample pair data set and the first single sample data set based on each first category divergence information and the category divergence threshold;
[0012] The local model corresponding to the client is trained based on the first sample pair data set and the first single sample data set.
[0013] Local model information is generated based on the local model, and the local model information is sent to the server.
[0014] According to a third aspect of the embodiments of this specification, a federated continuous learning method is provided, applied to a server, comprising:
[0015] Receive local model information sent by each client, and obtain the global model based on the local model information;
[0016] Determine whether the global model has reached the model training stopping condition;
[0017] If not, then a residual sample generation instruction is generated based on the global model, and the residual sample generation instruction is sent to each client;
[0018] If so, then the global model is determined to be the target model.
[0019] According to a fourth aspect of the embodiments of this specification, a computing device is provided, comprising:
[0020] Memory and processor;
[0021] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0022] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0023] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0024] One embodiment of this specification includes a server and at least one client. Each client is configured to acquire a first sample data set and a class divergence threshold, wherein the first sample data set includes at least one first sample data; acquire first class divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set based on each first class divergence information and the class divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information based on the local model, and send the local model information to the server; the server is configured to receive the local model information sent by each client, and acquire a global model based on each local model information; determine whether the global model has reached the model training stopping condition; if not, generate a residual sample generation instruction based on the global model, and send the residual sample generation instruction to the server. The data is sent to each client; if so, the global model is determined as the target model; each client is also configured to receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second class divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set according to each second class divergence information and the class divergence threshold; combine the residual sample set, the second initial sample pair data set, and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to the local model parameters of the local model; send the local model information to the server.
[0025] The scheme implemented in this specification filters samples using category divergence information, reducing the negative impact of noisy samples on model training and enhancing the model's robustness and generalization ability in noisy environments. Simultaneously, the use of a multi-round update mechanism for the sample dataset and residual sample set gradually improves the model's performance in incremental learning tasks, effectively mitigating the knowledge forgetting problem and ensuring the model maintains high performance when dealing with new categories. Attached Figure Description
[0026] Figure 1 This is an architecture diagram of a federated continuous learning system provided in one embodiment of this specification;
[0027] Figure 2 This is a flowchart illustrating a federated continuous learning method applied to a client, as provided in one embodiment of this specification.
[0028] Figure 3This is a flowchart illustrating a federated continuous learning method applied to a server, as provided in one embodiment of this specification.
[0029] Figure 4 This is a flowchart illustrating the processing procedure of an image processing method provided in one embodiment of this specification.
[0030] Figure 5 This is a schematic diagram of a federated continuous learning device applied to a client, provided in one embodiment of this specification.
[0031] Figure 6 This is a schematic diagram of a federated continuous learning device applied to a server, provided in one embodiment of this specification.
[0032] Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0033] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0034] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0036] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0037] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0038] Continuous learning is a machine learning method that aims to enable a model to retain previously learned knowledge as it receives new tasks or data, preventing complete forgetting. This method improves the model's adaptability by dynamically adjusting model parameters, storing important feature information, and utilizing existing knowledge to handle new tasks. Continuous learning is particularly suitable for scenarios with frequently changing tasks, helping to reduce the cost of retraining the model and improve the overall efficiency of the system.
[0039] Divergence is a statistic used to measure the difference between two probability distributions, typically compared to the actual distribution. The smaller the divergence, the more similar the two distributions, and the higher the model's predictive accuracy. In machine learning and statistics, divergence helps assess a model's convergence, stability, and generalization ability. By adjusting the model's learning strategy to reduce divergence, more accurate predictions can be achieved.
[0040] Semi-supervised learning (SSL) is a machine learning method that combines a small amount of labeled data with a large amount of unlabeled data for model training. In many practical applications, obtaining labeled data is costly, while unlabeled data is usually readily available. SSL improves model performance by utilizing the supervisory signals provided by a small amount of labeled data to guide the model in learning on unlabeled data. Through techniques such as self-supervision or pseudo-label generation, SSL can effectively enhance the generalization ability of models in data-scarce scenarios, making it suitable for various classification and regression tasks.
[0041] Jensen-Shannon Divergence (JSD) is a symmetric metric that measures the difference between two probability distributions, often used to compare the similarity between model predictions and the actual distributions. JSD assesses the difference by combining the average distributions of the two distributions and calculating the divergence between them and each individual distribution. JSD values range from 0 to 1; values closer to 0 indicate greater similarity between the two distributions, while values closer to 1 indicate greater dissimilarity. Because JSD is symmetric and has a finite number of values, it is typically used to compare the predictions of machine learning models with the true label distributions.
[0042] This specification provides a federated continuous learning method, which also relates to a federated continuous learning method applied to a client and a federated continuous learning method applied to a server, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail in the following embodiments.
[0043] With the development of machine learning technology, the performance of models in handling different tasks has significantly improved, especially with the support of large amounts of labeled data. Models can efficiently learn features and patterns in the data, thus adapting to diverse application scenarios. Whether in image classification, natural language processing, or other complex tasks, the diversity and quality of data largely determine the model's performance. Therefore, how to effectively train models in a distributed environment while protecting data privacy has become a key focus in recent years.
[0044] Federated learning, as a distributed learning technique, allows participating parties to train models without sharing raw data. This technique addresses data privacy concerns by training models locally on each client and aggregating updated parameters on a server. Furthermore, when dealing with data distributions across devices and organizations, federated learning effectively utilizes data from each client, improving the overall model training performance. However, a major challenge in practical applications is the inconsistent data quality across clients, especially the potential presence of noisy data from different providers. This noisy data can easily interfere with model training, leading to decreased accuracy during inference. Moreover, the data distribution across different clients often varies significantly, making it difficult for models to generate consistent predictions in such environments, thus weakening the overall generalization ability of federated learning.
[0045] The introduction of continuous learning techniques offers a potential solution to the problem of knowledge forgetting in models dealing with dynamic tasks. Continuous learning allows models to retain previously learned knowledge when faced with new tasks, avoiding the complete forgetting of information from previous tasks due to the introduction of new data. This is particularly crucial for scenarios similar to incremental learning, where the model not only needs to adapt to new tasks but also needs to maintain stable performance in historical tasks. However, continuous learning itself also presents certain technical challenges, especially when facing long-term, continuous task learning. How to effectively manage the model's knowledge base and update model parameters appropriately remains a problem to be solved. Furthermore, continuous learning is susceptible to "catastrophic forgetting" when dealing with scenarios where data distribution and tasks are constantly changing; that is, when the model learns a new task, the performance on old tasks drops sharply, weakening the model's long-term adaptability.
[0046] When federated learning is combined with continuous learning, theoretically, the advantages of both can be leveraged to address data privacy concerns and enhance the model's adaptability to dynamic tasks. However, in practice, this combination also introduces new technical challenges. First, the uneven distribution and noisy data among clients in federated learning limit the model's generalization ability across different clients. Second, in incremental learning-like scenarios, the model not only faces the heterogeneity of data from different clients but also the problem of knowledge forgetting. In this case, when faced with data from multiple clients, the model may fail to effectively remember information from past tasks, leading to gradual knowledge loss. Furthermore, the presence of noisy data further exacerbates the model's learning burden, slowing down its learning speed for new tasks and reducing its performance across various tasks.
[0047] See Figure 1 , Figure 1 This specification illustrates an architecture diagram of a federated continuous learning system provided in one embodiment of the specification. The federated continuous learning system may include at least one client 100 and a server 200.
[0048] Each client 100 is configured to: acquire a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; acquire first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set based on each first category divergence information and the category divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information based on the local model, and send the local model information to the server 200;
[0049] Server 200 is used to receive local model information sent by each client and obtain a global model based on the local model information; determine whether the global model has reached the model training stopping condition; if not, generate a residual sample generation instruction according to the global model and send the residual sample generation instruction to each client 100; if yes, determine the global model as the target model.
[0050] Each client 100 is further configured to receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second class divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set according to each second class divergence information and the class divergence threshold; generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set, and the second initial single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to the local model parameters of the local model; and send the local model information to the server 200.
[0051] In practical applications, clients act as distributed data processing units, responsible for processing their own datasets locally and training local models while ensuring data privacy. Within a single client, the first sample dataset is the original dataset used for the first round of training, with each first sample data item being a specific training data item. To select high-quality training samples, the client first obtains a class divergence threshold used to judge data quality. Subsequently, the client calculates the first class divergence information, representing the degree of difference between each sample and its class. Then, based on the first class divergence information corresponding to each sample, high-quality samples are selected as the first sample pair dataset, and low-quality samples are selected as the first single sample dataset.
[0052] After data filtering, the client performs local training on the sample pairs and single sample sets segmented by the filtering results, generating local models. These local models are trained by the client using local data and reflect the characteristics of each client's local data. After training, the client generates local model information, including the local model's parameters. Notably, since subsequent decisions on whether to continue training may rely on this local model information, it must also include the local model's gradient, loss value, weights, etc. This information is then sent to the server for aggregation and updating. The server receives all local model information uploaded by clients and uses it to generate the global model.
[0053] The server evaluates the global model to determine if it meets the preset model training stopping conditions. If the global model has not yet reached an ideal state, the server generates a residual sample generation instruction, requiring each client to generate a residual sample set. Residual samples are samples corresponding to the knowledge the model has memorized in previous training rounds, including sample data from previous training rounds for the corresponding client, used to prevent knowledge loss. Upon receiving the residual sample instruction, the client generates residual samples and combines them with the second sample data set for subsequent rounds of model training. The client calculates the second-class divergence information on the second batch of data, uses the divergence information to select the second initial sample pair data set and the second initial single sample data set, and then combines the second initial sample pair data set and the second initial single sample data set with the residual sample set to generate the second initial sample pair data set and the second target single sample data set for model training in this round, used for retraining and optimization of the local model.
[0054] Since the residual sample set is generated subsequently, it can also be divided into single-sample sets and sample-pair sets based on the accuracy of the generated samples (e.g., class divergence, confidence, etc.). Alternatively, only single samples or sample pairs can be generated as the residual sample set. Therefore, based on the form of the data in the residual sample set, it can be decided whether to combine the residual sample set with the second initial sample-pair data set to generate the target sample-pair data set, treating the second initial single-sample data set as the second target single-sample data set; or to combine the residual sample set with the second initial single-sample data set to generate the target second single-sample data set, treating the second initial sample-pair data set as the second target sample-pair data set; or to combine the sample-pair data in the residual sample set with the second initial sample-pair data set to generate the target sample-pair data set, and combine the single-sample data in the residual sample set with the second initial single-sample data set to generate the target second single-sample data set.
[0055] It is important to note that in this scheme, each round of model training can be understood as the client using all the data for model training in one round of model parameter adjustment. Considering the memory size required for a single training run, the training samples for each round can be divided into multiple groups for training the model. The model parameters are adjusted sequentially using the sample data from each group. After all groups have been adjusted, since this scheme involves multiple clients, once the local model of each client has been adjusted, the server obtains the global model based on the local model information sent by each client. This can be considered as completing one round of model training.
[0056] It should be noted that the class divergence corresponding to the sample data can be measured by calculating the Euclidean distance between the sample and the average vector of that class. This is a commonly used geometric distance method used to directly compare the differences between sample features and class centers. Alternatively, sample divergence can be measured using the classifier's confidence score, i.e., the probability distribution of a sample being classified into its class; a low confidence score indicates a large divergence. It can also be estimated by assessing the density of the samples in the feature space; samples in low-density regions often have larger divergences, etc. This specification does not impose any limitations on these methods. The calculation method for the first class divergence information corresponding to the first sample data and the second class divergence information corresponding to the second sample data is the same, and will not be repeated here or in the subsequent content of this specification.
[0057] It is important to note that the first sample pair dataset, the second initial sample pair dataset, and the second target sample pair dataset are sets of data containing sample data and their labels. The first single sample dataset, the second initial single sample dataset, and the second target sample dataset are sets containing only sample data. Since the model training process uses SSL (Semi-Supervised Learning), unlabeled data can also be effectively utilized. By generating pseudo-labels or introducing self-supervised signals, the model can learn more features. Furthermore, by separately determining the sample pair dataset and the single sample dataset, highly representative samples can be selected as sample pairs, while less representative samples (noise samples) can be used as single samples to train the model, thereby improving the model's performance in noisy environments.
[0058] The instruction to generate residual samples based on the global model can be understood as an instruction that guides each client to generate residual samples based on the error information of the global model. Specifically, this can be achieved by calculating the loss value of the global model on the validation set and extracting samples with larger errors as residual samples for generation; alternatively, it can be based on the deviation of the global model in the data distribution of each client, generating instructions that require clients to focus on processing data in areas with larger errors; or it can be used to train another deep learning model for generating residual samples from the global model, enabling subsequent clients to generate residual networks using the deep learning model, etc. This specification does not impose any limitations on these methods.
[0059] By filtering samples using class divergence information, the negative impact of noisy samples on model training is reduced, enhancing the model's robustness and generalization ability in noisy environments. Simultaneously, a multi-round update mechanism for the sample dataset and residual sample set is employed to gradually improve the model's performance in incremental class learning tasks, effectively mitigating the knowledge forgetting problem and ensuring the model maintains high performance when dealing with new categories.
[0060] Furthermore, obtain the first-class divergence information corresponding to each first sample data, including:
[0061] A data category feature extraction model is obtained based on the first sample dataset;
[0062] The data category feature extraction model is used to process each first sample data to obtain the first category feature information corresponding to each first sample data.
[0063] Based on the first category feature information corresponding to each first sample data, determine the first category divergence information corresponding to each first sample data.
[0064] In practical applications, the category feature extraction model is a model that makes a preliminary prediction of the category to which the sample data belongs, and the first category feature information is information that represents the probability of the first sample belonging to each category.
[0065] For example, a category feature extraction model can be understood as a model used in machine learning to extract category-related features from sample data for preliminary category prediction. This model is able to extract important category-related feature information from the raw data so that subsequent analysis can determine whether the data stands out in a particular category.
[0066] It should be noted that obtaining a data category feature extraction model based on the first sample dataset can be understood as the process of training or selecting a model using initial sample data to extract category features. Specifically, this can be achieved by identifying at least one data point and its corresponding sample label in the first sample dataset as a preheating data pair, and performing preliminary training based on this preheating data pair to obtain the category feature extraction model; alternatively, a pre-trained model can be used, such as a neural network model pre-trained on a large dataset, and fine-tuned on the first sample data to adapt to a specific category; or a clustering algorithm can be used to perform preliminary clustering of the first sample data, and a category feature extraction model can be constructed based on the clustering results, etc. This specification does not impose any limitations on these methods.
[0067] Category feature information can be understood as the feature information obtained after processing sample data through a category feature extraction model. It describes the probability of a sample data belonging to each category. This information is represented in the form of a probability distribution, indicating the likelihood that the sample belongs to each category. For example, in a multi-class classification problem, the first category feature information can be a probability vector, showing that an image has a probability of 0.7 belonging to category A, 0.2 belonging to category B, and 0.1 belonging to category C. This feature information provides the foundation for subsequent category divergence calculations, helping to further filter and process sample data to optimize model training performance.
[0068] It is important to note that determining the first-class divergence information corresponding to each first sample data point is based on the class characteristics of the first sample data itself, thus determining its own class divergence information. Determining the first-class divergence information corresponding to each first sample data point can be understood as the process of measuring the difference between the sample data and its class. Specifically, this can be achieved by using JSD (Jensen-Shannon Divergence) to calculate the difference between the sample and the class distribution, measuring their similarity; alternatively, it can be achieved by calculating the Euclidean distance between the sample and the class center to obtain the geometric divergence between the sample and the class; or it can be achieved by using the classifier's confidence score, where lower confidence samples correspond to greater divergence information, etc. This specification does not impose any restrictions on these methods.
[0069] By extracting divergence information from data category features using a model, the difference between each sample and its category can be accurately assessed, thereby selecting representative samples and improving the effectiveness and robustness of model training. This not only reduces the interference of noisy data on model training but also better selects samples with important information, further improving the model's generalization ability in complex data distributions. Simultaneously, through the effective acquisition of divergence information, the model can learn more efficiently in scenarios with scarce or imbalanced data, improving overall training performance.
[0070] Further, the first sample pair data set and the first single sample data set are determined based on the first category divergence information and the category divergence threshold, including:
[0071] Determine the target first sample data, wherein the target first sample data is any one of the first sample data;
[0072] Determine whether the first category divergence information corresponding to the first sample data is greater than the category divergence threshold;
[0073] If so, the target first sample data is determined to be the first single sample data, and a first sample data set is generated based on each first single sample data.
[0074] If not, then obtain the target first sample label data corresponding to the target first sample data, determine the target first sample data and the target first sample label data as a first sample pair, and generate a first sample pair data set according to each first sample pair.
[0075] For example, the class divergence threshold can be understood as a numerical value used to assess the degree of difference between a sample and its class, used to filter out samples with higher representativeness. During model training, data samples may come from different classes, and class divergence is the difference between each sample and its class. By setting a class divergence threshold, the system can determine which samples have smaller divergences and are more representative of the overall characteristics of that class; conversely, samples with larger divergences may contain more heterogeneous information, and because their features are not obvious, they may mislead the model, thus being identified as noisy data.
[0076] In one embodiment provided in this specification, an image classification model needs to be trained, with the categories being "cat" and "dog," and the samples including images of various types of cats and dogs. A category divergence threshold is used here to filter images that are more consistent with typical "cat" or "dog" features. A clear, standard cat image has a low category divergence, while a blurry or noisy cat image has a high divergence. If the divergence is less than a preset threshold, the image is considered a sample that can well represent the "cat" category. If the divergence exceeds the threshold, it may indicate that the sample is either noisy data or has some unique features, making it unsuitable for direct use in model training.
[0077] Because the model training process uses SSL (Semi-Supervised Learning), unlabeled data can also be effectively utilized. By generating pseudo-labels or introducing self-supervised signals, the model can learn more features. Furthermore, by separately determining the sample pair dataset and the single sample dataset, highly representative samples can be selected as sample pairs, while less representative samples (noisy samples) can be used as single samples to train the model, thereby improving the model's performance in noisy environments.
[0078] Furthermore, training the local model corresponding to the client based on the first sample pair data set and the first single sample data set includes:
[0079] Obtain an initial local model, and train the initial local model on the dataset based on the first sample to obtain a reference local model;
[0080] The first single-sample data set is locally processed according to the reference model to generate single-sample data labels corresponding to each single-sample data in the first single-sample data set.
[0081] The local model is determined by training the reference local model based on the single-sample data labels corresponding to each single sample data.
[0082] In practical applications, the initial local model is a model that is randomly initialized or has been pre-trained on the remaining data, the reference local model is a model trained on labeled data from the client, and the single-sample data label is the predicted label generated after processing the single-sample data through the reference local model.
[0083] For example, the initial local model can be understood as a model that has not yet been trained during semi-supervised learning; it is directly loaded from the global model or a pre-trained model. This model serves as the starting point for training and has not yet encountered the client's local data, therefore its performance and adaptability are relatively weak. The reference local model can be understood as one obtained after training on the dataset using the first set of samples (i.e., sample data containing labels), and has begun to adapt to the client's local data to some extent. The role of the reference local model is to provide an optimization foundation for subsequent training; for example, it can be used to process unlabeled data, generate pseudo-labels, or further adjust single-sample data. The reference local model performs better than the initial local model in adapting to the specific client environment and is able to capture the categorical feature information in the data.
[0084] Single-sample data labels can be understood as representing the model's inference results on unlabeled data, used to continue training the reference local model. This process is a crucial part of semi-supervised learning because it allows the model to further optimize using its own predictions even in the absence of labeled data. For example, single-sample data labels can serve as pseudo-labels, guiding the model on how to perform self-supervised learning on unlabeled data and gradually improve the model's generalization ability.
[0085] It should be noted that obtaining the initial local model can be understood as the process of the client providing a basic model that has not yet been trained on any local data. The specific methods for obtaining the initial local model include: directly sending the global model from the server; loading a pre-trained model from a general dataset; initializing the model using the client's existing model structure, etc. This manual does not impose any restrictions on this. Generating single-sample data labels can be understood as the process of predicting and generating labels for unlabeled data by referencing the local model. The specific methods for generating single-sample data labels include: directly inferring the label from the reference local model; assigning categories to unlabeled data using a classifier; or assigning temporary labels to samples using a pseudo-label generation mechanism combined with prediction confidence, etc. This manual does not impose any restrictions on this.
[0086] Considering that a small amount of training data can lead to poor model performance, before training the initial local model based on the first sample pair dataset to obtain the reference local model, data augmentation techniques can be used to augment the first sample pair dataset and the first single sample dataset. Furthermore, considering the lower data quality in the first single sample dataset, the augmentation methods for the first single sample dataset are fewer than those for the first sample pair dataset. For example, the first single sample dataset can be augmented using basic enhancement methods such as light rotation and scaling, while the first sample pair dataset can use more diverse augmentation methods, such as random cropping, color transformation, and mirror flipping, to ensure that the model can learn fully on high-quality samples and improve its generalization ability.
[0087] It should be noted that the method of training the local model corresponding to the client based on the second target sample pair data set and the second target single sample data set has similar technical features and similar technical effects as the above-mentioned method of training the local model corresponding to the client based on the first sample pair data set and the first single sample data set. Therefore, this specification will not elaborate further on this method.
[0088] By training the model with noisy and residual data in an unlabeled format, we can fully leverage the model's learning ability on unlabeled data, avoid over-reliance on labeled data, and further improve the model's adaptability to complex scenarios. This training method helps the model maintain high robustness when dealing with noisy real-world data. Simultaneously, guided by the residual data, the model can more effectively supplement features not learned in the early stages of training, thereby improving overall generalization performance and prediction accuracy.
[0089] Furthermore, determining whether the global model has reached the model training stopping condition includes:
[0090] Determine the global model state information corresponding to the global model;
[0091] Based on the global model state information, determine whether the global model has reached the model training stopping condition.
[0092] In practical applications, global model state information refers to various metrics used to describe the current training state and performance of the global model. Global model state information reflects the progress and performance of the global model during training as data from different clients is aggregated. It includes model accuracy, loss value, gradient information, etc., and helps determine whether the model has achieved the expected training effect. For example, in an image classification task, the model's state information might include classification accuracy and overall error on various clients. This information helps the system decide whether to continue training or stop training and use the current model. In a news text classification task, if the model's accuracy for sports news is significantly higher than that for science and technology news, this is part of the global model state information, and the system can use this information to decide whether further optimization or model adjustment is needed.
[0093] It should be noted that determining the global model state information can be understood as the process of evaluating the global model performance through different metrics. The specific methods for determining the global model state information can be: evaluating model performance by calculating the model's loss value and accuracy on the validation set; determining it by obtaining local model information sent by each client; or judging the model's training progress by monitoring the model's gradient updates and convergence speed, etc. This manual does not impose any restrictions on these methods.
[0094] By determining the global model state information to judge whether the global model has reached the model training stopping condition, the training progress of the model can be tracked and evaluated in real time, ensuring that the model stops in time when it reaches the expected effect, avoiding overtraining, and ensuring the model's adaptability and generalization ability under different client data distributions.
[0095] Furthermore, determining the global model state information corresponding to the global model includes:
[0096] Generate global model state information based on the information from each local model; or,
[0097] Obtain the global test data set, and generate global model state information based on the global test data set.
[0098] In practical applications, a test dataset refers to a dataset used to evaluate model performance. It is not involved in the model's training process but is used to verify how the model performs on unseen data after training. The test dataset should represent the sample distribution in the real-world environment where the model will be applied, in order to accurately measure the model's generalization ability. For example, in text classification tasks, the test dataset might contain multiple types of text to evaluate whether the model can accurately classify each text into the correct category. By using the test dataset, metrics such as accuracy, precision, and recall can be calculated, helping to determine the model's final performance.
[0099] It should be noted that generating global model state information based on local model information can be understood as the process of aggregating local model information from multiple clients to derive the current state of the global model. Specific methods for generating global model state information based on local model information include: weighted averaging of client model weights to generate a new global model; analyzing the performance of each local model on its respective client dataset and updating the global model state based on these performances; or monitoring gradient changes in local models to infer the convergence of the global model, etc. This specification does not impose any limitations on these methods.
[0100] By generating global model state information based on the information from each local model, the performance of local models across different clients can be comprehensively analyzed to fully reflect the training progress and status of the global model under multi-source data distribution. This process ensures that the global model better adapts to the data characteristics of each client, avoiding model bias or performance imbalance caused by differences in data distribution. Furthermore, by aggregating local model information, the convergence of the global model can be evaluated more efficiently, potential optimization directions can be identified, and the accuracy and generalization ability of the global model can be improved, ensuring stable and consistent performance across multiple client environments.
[0101] Furthermore, the residual sample generation instruction is generated based on the global model, including:
[0102] Obtain the residual sample generation model based on the global model;
[0103] Residual sample generation instructions are generated based on the residual sample generation model.
[0104] In practical applications, residual sample generation models refer to models that generate samples based on the performance and error of the global model, using data from previous training iterations. Their primary purpose is to address the problem of catastrophic forgetting. In continuous learning or federated learning scenarios, models often forget previously learned knowledge when learning new tasks. Residual sample generation models help models retain their memory of old tasks by generating samples related to previous training data, thus preventing the gradual loss of knowledge. For example, in a multi-task classification context, residual sample generation models can generate training samples related to previous tasks to ensure that the model does not forget previously learned task content when facing new tasks, maintaining stable performance across all tasks.
[0105] It should be noted that obtaining residual sample generation models based on global models can be understood as the process of generating sample generation models to address the problem of catastrophic forgetting by leveraging the performance of the global model. Specific methods for obtaining residual sample generation models based on global models include: initializing the residual sample generation model to generate simulated historical data samples based on input noise; using a fixed global model to determine whether these generated samples are sufficiently close to real historical data; and adjusting the parameters of the residual sample generation model based on the closeness of the generated results; or generating residual samples for old tasks by analyzing the performance differences of the global model in old and new tasks; or combining feedback information from local models to generate residual samples that help preserve historical knowledge through interaction with the global model, etc. This specification does not impose any limitations on these methods.
[0106] By generating a model from residual samples obtained through a global model, the model's knowledge from historical tasks can be effectively preserved, reducing catastrophic forgetting and ensuring that the model does not lose its understanding of old tasks when learning new ones. The generated residual samples help the model balance performance on new and old tasks across multiple training rounds, allowing the model to incorporate features from past data during continuous updates, thus improving its long-term generalization ability and stability. This process also further optimizes the model's ability to process data in multi-task environments, thereby improving overall model performance.
[0107] Furthermore, generating a residual sample set based on the residual sample generation instruction includes:
[0108] Obtain the residual sample generation model according to the residual sample generation instruction;
[0109] A set of residual samples is generated based on the residual sample generation model.
[0110] For example, the residual sample generation instruction includes the model parameters corresponding to the residual sample generation model. Residual sample generation can be understood as an instruction issued by the server based on the state or error of the global model, requiring each client to generate residual samples related to historical data based on its own data. This instruction is used to address the catastrophic forgetting problem, aiming to ensure that clients can generate appropriate samples to help the model retain knowledge from past tasks. For example, in federated learning, each client may have a different data distribution. The residual sample generation instruction guides each client to generate a set of residual samples best suited to its own data characteristics, helping the global model maintain stability and consistency when facing different clients.
[0111] It should be noted that generating a residual sample set based on the residual sample generation model can be understood as the process by which each client generates samples that help retain historical knowledge based on the model obtained from the instructions. The specific methods for generating a residual sample set based on the residual sample generation model can be as follows: each client can combine the same residual sample generation model with its own historical data or current task data to generate residual samples that best reflect the characteristics of the client's data; different residual sample sets can be generated by analyzing the error between the client's local model and the global model to ensure that the global model can effectively learn for different client data distributions; the generated residual samples can also be dynamically adjusted based on changes in the client's data to help the model maintain long-term memory and generalization ability for different tasks, etc. This specification does not impose any restrictions on these methods.
[0112] Generating residual sample sets through a residual sample generation model helps the model effectively address the catastrophic forgetting problem during training, ensuring that the model does not forget previously learned knowledge when learning new tasks. Different clients, based on the same generation instructions and their own local data characteristics, can generate their own adapted residual samples, thereby enhancing the diversity and adaptability of the global model. This not only improves the model's generalization ability under different data distributions but also makes the global model more robust to local data differences across clients, thus optimizing overall model performance and stability.
[0113] The scheme implemented in this specification filters sample data using class divergence information, effectively reducing the negative impact of noisy samples on model training and enhancing the model's robustness and generalization ability. The client trains locally and collaborates with the server based on the generated local model information, ensuring continuous optimization of the global model across multiple training rounds. When the global model fails to meet the preset training stopping condition, the server generates a residual sample generation instruction, guiding each client to generate a residual sample set, further improving the model's performance in noisy environments. Furthermore, combined with the multi-round update mechanism of residual samples and second sample data, the client continuously optimizes the local model, improving the model's incremental learning performance, avoiding knowledge forgetting, and thus achieving more robust global model training.
[0114] A federated continuous learning system may include multiple clients 100 and a server 200. Clients 100 can be referred to as edge devices, and server 200 can be referred to as cloud devices. Multiple clients 100 can establish communication connections through server 200. In a federated continuous learning scenario, server 200 is used to provide federated continuous learning services between multiple clients 100. Each client 100 can act as either a sender or a receiver, communicating through server 200.
[0115] Users can interact with server 200 through client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In a federated continuous learning scenario, users can publish a data stream including local model information to server 200 through client 100. Server 200 generates a target model based on the data stream and pushes the target model information to other clients that have established communication.
[0116] In this system, client 100 and server 200 establish a connection via a network. The network provides the medium for communication between client 100 and server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by client 100 may need to undergo encoding, transcoding, compression, or other processing before being published to server 200.
[0117] Client 100 can be a browser, an app (application), a web application such as an H5 (HyperText Markup Language 5) application, a lightweight application (also known as a mini-program), or a cloud application. Client 100 can be developed based on the software development kit (SDK) provided by server 200, such as a real-time communication (RTC) SDK. Client 100 can be deployed on electronic devices and depends on the device or certain apps on the device to run. Electronic devices may have displays and support information browsing, such as personal mobile terminals like mobile phones, tablets, and personal computers. Various other types of applications can also be configured on electronic devices, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platform software.
[0118] Server 200 may include servers providing various services, such as servers providing communication services to multiple clients, servers supporting backend training of models used on clients, and servers processing data sent by clients. It should be noted that server 200 can be implemented as a distributed server cluster composed of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server integrated with blockchain. The server can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0119] See Figure 2 , Figure 2 A flowchart is shown of a federated continuous learning method applied to a client according to an embodiment of this specification, which specifically includes the following steps.
[0120] Step 202: Obtain the first sample data set and the category divergence threshold, wherein the first sample data set includes at least one first sample data.
[0121] Step 204: Obtain the first category divergence information corresponding to each first sample data, and determine the first sample pair data set and the first single sample data set based on each first category divergence information and the category divergence threshold.
[0122] Step 206: Train the local model corresponding to the client based on the first sample pair data set and the first single sample data set.
[0123] Step 208: Generate local model information based on the local model, and send the local model information to the server.
[0124] Furthermore, obtain the first-class divergence information corresponding to each first sample data, including:
[0125] A data category feature extraction model is obtained based on the first sample dataset;
[0126] The data category feature extraction model is used to process each first sample data to obtain the first category feature information corresponding to each first sample data.
[0127] Based on the first category feature information corresponding to each first sample data, determine the first category divergence information corresponding to each first sample data.
[0128] Considering that the sample data will be updated during subsequent rounds of model training, the method further includes the following after sending the local model information to the server:
[0129] Receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data;
[0130] Determine the second category divergence information corresponding to each second sample data, and determine the second initial sample pair data set and the second initial single sample data set based on each second category divergence information and the category divergence threshold;
[0131] The second target sample pair data set and the second target single sample data set are generated by combining the residual sample set, the second initial sample pair data set, and the second initial single sample data set.
[0132] A local model is trained based on the second target sample pair data set and the second target single sample data set, and local model information is generated based on the local model parameters of the local model.
[0133] The local model information is sent to the server.
[0134] Furthermore, generating a residual sample set based on the residual sample generation instruction includes:
[0135] Obtain the residual sample generation model according to the residual sample generation instruction;
[0136] A set of residual samples is generated based on the residual sample generation model.
[0137] The above is an illustrative scheme of a federated continuous learning method applied to a client in this embodiment. It should be noted that the technical solution of this client-side federated continuous learning method belongs to the same concept as the technical solution of the aforementioned federated continuous learning system. Details not described in detail in the client-side federated continuous learning method can be found in the description of the aforementioned federated continuous learning system technical solution.
[0138] By applying the scheme in the embodiments of this specification and combining class divergence information to filter sample data, the client can effectively reduce the interference of noisy samples on model training, enhancing the robustness and generalization ability of the local model. Simultaneously, when generating residual samples and combining them with the second sample dataset for multiple rounds of local model optimization, the client improves the model's performance in incremental learning, gradually alleviating the knowledge forgetting problem, thereby ensuring that the client model can continuously improve its training effect on local data and adapt to data changes.
[0139] See Figure 3 , Figure 3 A flowchart of a federated continuous learning method for a server, according to an embodiment of this specification, is shown, specifically including the following steps.
[0140] Step 302: Receive local model information sent by each client, and obtain the global model based on the local model information.
[0141] Step 304: Determine whether the global model has reached the model training stopping condition. If not, proceed to step 306; if yes, proceed to step 308.
[0142] Step 306: Generate residual sample generation instructions based on the global model, and send the residual sample generation instructions to each client.
[0143] Step 308: Determine the global model as the target model.
[0144] Furthermore, the residual sample generation instruction is generated based on the global model, including:
[0145] Obtain the residual sample generation model based on the global model;
[0146] Residual sample generation instructions are generated based on the residual sample generation model.
[0147] The above is an illustrative scheme of a federated continuous learning method applied to a server according to this embodiment. It should be noted that the technical solution of this federated continuous learning method applied to a server belongs to the same concept as the technical solution of the federated continuous learning system described above. For details not described in detail in the technical solution of the federated continuous learning method applied to a server, please refer to the description of the technical solution of the federated continuous learning system described above.
[0148] Using the scheme described in this specification, the server continuously optimizes the global model by receiving and aggregating local model information from each client. When the global model fails to meet the preset training stopping condition, the server generates and issues a residual sample generation instruction to guide the client in generating a residual sample set. This further compensates for the model's shortcomings under different client data distributions, improves the robustness and generalization ability of the global model, and ensures that the global model can continuously learn and achieve higher accuracy in a multi-client environment.
[0149] The following is in conjunction with the appendix Figure 4 Taking the application of the federated continuous learning system provided in this specification in multi-client image processing as an example, the federated continuous learning system will be further explained. Among other things, Figure 4 The present specification illustrates a flowchart of a multi-client image processing method according to an embodiment of this specification, which specifically includes the following steps.
[0150] Step 402: Each client obtains a first image data set including at least one first image data and a category divergence threshold.
[0151] Step 404: The client extracts the feature information of each image data from the first image data set and calculates the first category divergence information corresponding to each image data.
[0152] Step 406: The client selects high-quality samples as the first sample pair data set based on the class divergence information and class divergence threshold of each image data set, and uses noisy samples as the first single sample data set.
[0153] Step 408: The client trains a local model based on the first sample pair dataset and the first single sample dataset, generating a local model.
[0154] Step 410: The client extracts model parameters and update information from the local model, and generates local model information of model weights, gradients, and model parameters.
[0155] Step 412: The client sends the local model information to the server.
[0156] Step 414: Based on the local model information sent by each client, the server performs a federated aggregation operation to integrate the model parameters of each client and the global model trained in this round.
[0157] Step 416: The server determines whether the global model has reached the preset training stopping condition. If not, proceed to step 418; if yes, proceed to step 430.
[0158] Step 418: The server trains a residual sample generation model based on the current global model, and generates a residual sample generation instruction based on the residual sample generation model and sends it to each client.
[0159] Step 420: The client receives the residual sample generation instruction, combines the local image data and the generation instruction, and generates a residual sample set.
[0160] Step 422: The client obtains a set of second sample data containing at least one second sample data and generates class divergence information corresponding to each second sample data.
[0161] Step 424: The client selects high-quality samples as the second initial sample pair data set based on the class divergence information and class divergence threshold of each second sample data set, and uses noisy samples as the second single sample data set.
[0162] Step 426: The client combines the second initial sample pair data set and the residual sample set to generate the second target sample pair data set.
[0163] Step 428: The client retrains the local model based on the second target sample dataset and the second single sample dataset, optimizes the local model parameters, and returns to execute step 410.
[0164] Step 430: Determine the global model as the target model and perform image processing using the target model.
[0165] The scheme implemented in the embodiments of this specification can effectively achieve federated continuous learning in a multi-client environment. By introducing a class divergence filtering mechanism and residual sample generation instructions, it enhances the model's generalization ability in noisy samples and incremental class learning scenarios, reduces knowledge forgetting, and improves the performance of the global model in image processing tasks. Simultaneously, the residual sample generation mechanism can correct the error portion of the global model, further improving the model's accuracy and robustness.
[0166] Corresponding to the above method embodiments, this specification also provides embodiments of a federated continuous learning device applied to a client. Figure 5 This specification illustrates a schematic diagram of a federated continuous learning device applied to a client, according to one embodiment of this specification. Figure 5As shown, the device includes:
[0167] The first acquisition module 502 is configured to acquire a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data.
[0168] The first screening module 504 is configured to obtain the first category divergence information corresponding to each first sample data, and determine the first sample pair data set and the first single sample data set based on each first category divergence information and the category divergence threshold.
[0169] The first local training module 506 is configured to train the local model corresponding to the client based on the first sample pair data set and the first single sample data set.
[0170] The first sending module 508 is configured to generate local model information based on the local model and send the local model information to the server.
[0171] Optionally, the first filtering module 504 is further configured to:
[0172] A data category feature extraction model is obtained based on the first sample dataset;
[0173] The data category feature extraction model is used to process each first sample data to obtain the first category feature information corresponding to each first sample data.
[0174] Based on the first category feature information corresponding to each first sample data, determine the first category divergence information corresponding to each first sample data.
[0175] Optionally, the federated continuous learning device applied to the client further includes:
[0176] The second acquisition module is configured to receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; and acquire a second sample data set, wherein the second sample data set includes at least one second sample data.
[0177] The second screening module is configured to determine the second category divergence information corresponding to each second sample data, and to determine the second initial sample pair data set and the second initial single sample data set based on each second category divergence information and the category divergence threshold.
[0178] The second combining module is configured to combine the residual sample set, the second initial sample pair data set, and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set.
[0179] The second local training module is configured to train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to the local model parameters of the local model.
[0180] The second sending module is configured to send the local model information to the server.
[0181] Optionally, the second acquisition module is further configured to:
[0182] Obtain the residual sample generation model according to the residual sample generation instruction;
[0183] A set of residual samples is generated based on the residual sample generation model.
[0184] The above is an illustrative scheme of a federated continuous learning device applied to a client in this embodiment. It should be noted that the technical solution of this federated continuous learning device applied to a client belongs to the same concept as the technical solution of the federated continuous learning method applied to a client described above. Details not described in detail in the technical solution of the federated continuous learning device applied to a client can be found in the description of the technical solution of the federated continuous learning method applied to a client described above.
[0185] The scheme implemented in this specification, through a filtering module targeting category divergence information, effectively reduces the negative impact of noisy samples on local model training, significantly improving the model's robustness and generalization ability. The local training module in the device optimizes the model using the filtered high-quality samples, ensuring that the client continuously improves model performance during multiple training rounds. Simultaneously, the residual sample generation module in the device, combined with the second sample data, gradually enhances the model's performance in incremental class learning tasks, mitigating the knowledge forgetting problem and enabling the client to maintain high learning ability and accuracy when facing new categories.
[0186] Corresponding to the above method embodiments, this specification also provides embodiments of a federated continuous learning device applied to a server. Figure 6 A schematic diagram of a federated continuous learning device for a server, according to one embodiment of this specification, is shown. Figure 6 As shown, the device includes:
[0187] The receiving module 602 is configured to receive local model information sent by each client and obtain the global model based on the local model information.
[0188] The judgment module 604 is configured to determine whether the global model has reached the model training stop condition. If not, it executes the sending 606; if so, it executes the determination module 608.
[0189] The sending module 606 is configured to generate a residual sample generation instruction based on the global model and send the residual sample generation instruction to each client.
[0190] The determination module 608 is configured to determine the global model as the target model.
[0191] Optionally, the sending module 606 is further configured to:
[0192] Obtain the residual sample generation model based on the global model;
[0193] Residual sample generation instructions are generated based on the residual sample generation model.
[0194] The above is an illustrative scheme of a federated continuous learning device applied to a server according to this embodiment. It should be noted that the technical solution of this federated continuous learning device applied to a server belongs to the same concept as the technical solution of the federated continuous learning method applied to a server described above. For details not described in detail in the technical solution of the federated continuous learning device applied to a server, please refer to the description of the technical solution of the federated continuous learning method applied to a server described above.
[0195] The scheme implemented in this specification involves receiving local model information sent by the client and performing efficient global model aggregation to ensure optimization of the global model in a multi-client environment. A judgment module promptly evaluates the training status of the global model, and a residual sample generation instruction module guides each client to generate residual sample sets. This further corrects the global model's error based on the data distribution of different clients, improving the model's robustness and generalization ability. The judgment module effectively supports incremental learning tasks, ensuring continuous optimization of the global model across multiple learning rounds, avoiding knowledge forgetting, and ultimately achieving high-precision and highly adaptive global model training.
[0196] Figure 7 A structural block diagram of a computing device 700 according to one embodiment of this specification is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0197] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0198] In one embodiment of this specification, the above-described components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0199] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.
[0200] The processor 720 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0201] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solutions of the above-described federated continuous learning method applied to a client and the federated continuous learning method applied to a server. For details not described in detail in the technical solution of the computing device, please refer to the descriptions of the above-described federated continuous learning method applied to a client and the federated continuous learning method applied to a server.
[0202] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0203] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server. Details not described in detail in the technical solution of the storage medium can be found in the descriptions of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0204] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0205] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the aforementioned federated continuous learning method applied to a client and a federated continuous learning method applied to a server. Details not described in detail in the computer program's technical solution can be found in the descriptions of the aforementioned federated continuous learning method applied to a client and a federated continuous learning method applied to a server.
[0206] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0207] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0208] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0209] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0210] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A federated continuous learning system, characterized in that, The system includes a server and at least one client; Each client is configured to: acquire a first sample data set and a class divergence threshold, wherein the first sample data set includes at least one first sample data; acquire first class divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set based on each first class divergence information and the class divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information based on the local model, and send the local model information to the server; The server is configured to receive local model information sent by each client, and obtain a global model based on the local model information; determine whether the global model has reached the model training stopping condition; if not, generate a residual sample generation instruction based on the global model and send the residual sample generation instruction to each client; if yes, determine the global model as the target model. Each client is also configured to receive the residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second class divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set according to each second class divergence information and the class divergence threshold; combine the residual sample set, the second initial sample pair data set, and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to the local model parameters of the local model; and send the local model information to the server.
2. The system as described in claim 1, characterized in that, Obtain the first-class divergence information corresponding to each first sample data, including: A data category feature extraction model is obtained based on the first sample dataset; The data category feature extraction model is used to process each first sample data to obtain the first category feature information corresponding to each first sample data. Based on the first category feature information corresponding to each first sample data, determine the first category divergence information corresponding to each first sample data.
3. The system as described in claim 1, characterized in that, The first sample pair data set and the first single sample data set are determined based on the divergence information of each first category and the category divergence threshold, including: Determine the target first sample data, wherein the target first sample data is any one of the first sample data; Determine whether the first category divergence information corresponding to the first sample data is greater than the category divergence threshold; If so, the target first sample data is determined to be the first single sample data, and a first sample data set is generated based on each first single sample data. If not, then obtain the target first sample label data corresponding to the target first sample data, determine the target first sample data and the target first sample label data as a first sample pair, and generate a first sample pair data set according to each first sample pair.
4. The system as described in claim 1, characterized in that, Training the local model corresponding to the client based on the first sample pair data set and the first single sample data set includes: Obtain an initial local model, and train the initial local model on the dataset based on the first sample to obtain a reference local model; The first single-sample data set is processed according to the reference local model to generate single-sample data labels corresponding to each single-sample data in the first single-sample data set. The local model is determined by training the reference local model based on the single-sample data labels corresponding to each single sample data.
5. The system as described in claim 1, characterized in that, Determining whether the global model has reached the model training stopping condition includes: Determine the global model state information corresponding to the global model; Based on the global model state information, determine whether the global model has reached the model training stopping condition.
6. The system as described in claim 5, characterized in that, Determining the global model state information corresponding to the global model includes: Generate global model state information based on the information from each local model; or, Obtain the global test data set, and generate global model state information based on the global test data set.
7. The system as described in claim 1, characterized in that, The residual sample generation instruction is generated based on the global model, including: Obtain the residual sample generation model based on the global model; Residual sample generation instructions are generated based on the residual sample generation model.
8. The system as described in claim 1, characterized in that, Generate a residual sample set based on the residual sample generation instruction, including: Obtain the residual sample generation model according to the residual sample generation instruction; A set of residual samples is generated based on the residual sample generation model.
9. A federated continuous learning method, characterized in that, A client applied to the system of any one of claims 1-8, comprising: Obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; Obtain the first category divergence information corresponding to each first sample data, and determine the first sample pair data set and the first single sample data set based on each first category divergence information and the category divergence threshold; The local model corresponding to the client is trained based on the first sample pair data set and the first single sample data set. Local model information is generated based on the local model, and the local model information is sent to the server.
10. The method as described in claim 9, characterized in that, Obtain the first-class divergence information corresponding to each first sample data, including: A data category feature extraction model is obtained based on the first sample dataset; The data category feature extraction model is used to process each first sample data to obtain the first category feature information corresponding to each first sample data. Based on the first category feature information corresponding to each first sample data, determine the first category divergence information corresponding to each first sample data.
11. The method as described in claim 9, characterized in that, After sending the local model information to the server, the method further includes: Receive a residual sample generation instruction and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data set; Determine the second category divergence information corresponding to each second sample data, and determine the second initial sample pair data set and the second initial single sample data set based on each second category divergence information and the category divergence threshold; The second target sample pair data set and the second target single sample data set are generated by combining the residual sample set, the second initial sample pair data set, and the second initial single sample data set. A local model is trained based on the second target sample pair data set and the second target single sample data set, and local model information is generated based on the local model parameters of the local model. The local model information is sent to the server.
12. The method as described in claim 11, characterized in that, Generate a residual sample set based on the residual sample generation instruction, including: Obtain the residual sample generation model according to the residual sample generation instruction; A set of residual samples is generated based on the residual sample generation model.
13. A federated continuous learning method, characterized in that, A server applied to the system of any one of claims 1-8, comprising: Receive local model information sent by each client, and obtain the global model based on the local model information; Determine whether the global model has reached the model training stopping condition; If not, then a residual sample generation instruction is generated based on the global model, and the residual sample generation instruction is sent to each client; If so, then the global model is determined to be the target model.
14. The method as described in claim 13, characterized in that, The residual sample generation instruction is generated based on the global model, including: Obtain the residual sample generation model based on the global model; Residual sample generation instructions are generated based on the residual sample generation model.
15. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 9-14.
16. A computer-readable storage medium storing a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 9-14.
17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 9-14.
Citation Information
Patent Citations
Federal learning method based on generative model and deep transfer learning
CN115860116A
Label noise robust federated learning method based on self-paced learning and adjacent matrix
CN116911379A