Incremental data-oriented personalized federal learning method and device
By introducing internal and external circulation mechanisms and weight decay regular terms in federated learning, the shortcomings of traditional federated learning methods in processing incremental data and personalized capabilities are solved, and more efficient model training and personalized prediction are achieved.
Patent Information
- Application Number
- CN202411787719.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The traditional method of federated learning is aggregation training through phased stock data, which has lag, and it is difficult to process dynamic incremental data from some clients in a timely manner, and the global model lacks personalization capabilities.
Using a personalized federated learning method for incremental data, the global model is trained through internal loops, and the model is optimized by adding weight attenuation regular terms, and personalized model optimization training is carried out in the external loop to ensure the accuracy of personalized prediction of incremental data.
It improves the generalization ability of the model, reduces the complexity of the model, prevents overfitting, and can dynamically process the incremental data of the client, breaks through the lag bottleneck of traditional federated learning models, and enhances the real-time and adaptability of the model.
Smart Images

Figure CN119808889A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of federated learning technology, and more specifically, to a personalized federated learning method and device for incremental data. Background Art
[0002] Federated Learning (FL) is an emerging machine learning paradigm with great potential in data privacy protection and resource utilization. Unlike traditional centralized fraud detection learning methods, federated learning allows multiple clients to train their own models locally without uploading sensitive raw data to a central server. After the client trains the model locally, it only shares the updated parameters of the model, such as weights and gradients, rather than the actual data content. This process reduces the risk of data leakage and effectively protects user privacy. In addition, since data does not need to be frequently transmitted to a central server, federated learning significantly reduces data transmission latency and bandwidth overhead. This efficient data processing method not only improves the training speed of the model, but also improves the generalization ability of the model under different data distributions, thereby enhancing the accuracy and real-time performance of the model.
[0003] In practical applications, the traditional method of federated learning is to perform aggregate training through phased stock data, which has lags and is difficult to process the dynamic incremental data of some clients in a timely manner. In addition, the global model lacks personalization capabilities. Summary of the invention
[0004] In order to solve the problems in practical applications that the traditional method of federated learning is to perform aggregate training through phased stock data, which has lags and is difficult to process the dynamic incremental data of some clients in a timely manner, and the global model lacks personalization capabilities, the present application provides a personalized federated learning method and device for incremental data.
[0005] The embodiment of the present application is implemented as follows:
[0006] In a first aspect, the present application provides a personalized federated learning method for incremental data, including:
[0007] Training a global model based on an inner loop, and optimizing the global model by adding a weight decay regularization term;
[0008] Perform personalized model optimization training based on outer loop incremental training data.
[0009] In a possible implementation, the training of the global model based on the inner loop and the optimization of the global model by adding a weight decay regularization term further include:
[0010] Initialize the global model parameter W0 through the server, and send the global model parameter to all clients k;
[0011] Each client k receives the global model parameter W t Then, use its local stock dataset D k Conduct model training;
[0012] Client k uploads the updated local model parameters to the server;
[0013] After receiving the model parameters of all clients, the server aggregates them by weighted average or simple average to obtain the updated global model parameters.
[0014] The server sets the new global model parameters w t+1 Distribute to each client and start the next round of training.
[0015] 5. In a possible implementation, after receiving the global model parameters, each client uses its local stock data set to perform model training, further comprising:
[0016] Each client optimizes the loss function L including the weight decay regularization term k (w), which is defined as the sum of the average loss of the local dataset and the weight decay regularization term of the model parameters;
[0017] The loss function is:
[0018]
[0019] Among them, l(w; x i ,y i ) is the prediction error, and λ is the weight coefficient of the weight decay regularization term.
[0020] In one possible implementation, in the process of using its local stock dataset for model training, each client performs multiple iterations through the gradient descent method, and updates the model parameter w in each iteration;
[0021] The specific update steps are:
[0022]
[0023] Among them, η is the learning rate. After multiple iterations, client k obtains the updated local model parameters
[0024] In a possible implementation, the training process is repeated until a predetermined number of iterations E is reached or an early stopping condition is met.
[0025] In a possible implementation, the performing personalized model optimization training based on the outer loop incremental training data further includes:
[0026] After receiving the global model parameters, each client performs personalized model optimization training and updates the parameters of the local model to the global model parameters;
[0027] The client uses the local incremental dataset for training;
[0028] The client needs to choose a smaller learning rate to ensure that the fine-tuning process is stable and does not destroy the pre-trained weights.
[0029] The client performs fewer training iterations to prevent overfitting.
[0030] Each client fine-tunes the model based on the local incremental data set and adjusts the model weights using the standard back-propagation algorithm;
[0031] After the model training is completed, the client uses the local validation set to evaluate the performance of the fine-tuned personalized model. Based on the evaluation results, the client can decide whether to further iterate and adjust the model parameters.
[0032] In a possible implementation, the incremental data set contains the latest user interaction data, which can reflect the latest preferences and behaviors of the current user.
[0033] In one possible implementation, in the process of performing local calculations within multiple clients to obtain corresponding model parameters, training is performed using a weight decay regularization training method, which can effectively constrain the complexity of the model and prevent overfitting, thereby improving the generalization ability of the model.
[0034] In one possible implementation, during the personalized training process, the final global model will be adjusted and optimized according to different data characteristics and business requirements to obtain a personalized local model that can meet respective specific needs.
[0035] In a second aspect, the present application provides a personalized federated learning device for incremental data, including:
[0036] An inner loop training module, used for training a global model based on an inner loop, and optimizing the global model by adding a weight decay regularization term;
[0037] The outer loop training module is used to perform personalized model optimization training based on the outer loop incremental training data.
[0038] The technical solution provided by this application can at least achieve the following beneficial effects:
[0039] The personalized federated learning method for incremental data provided in this application proposes to add a weight decay regularization term in the training process to improve the generalization of the model, reduce the complexity of the model, and prevent overfitting. It also proposes the idea of fusion meta-learning and divides the model into an inner loop and an outer loop. The inner loop performs phased global training to obtain a global model of the stock data, and the outer loop performs personalized incremental training on the global model to ensure the personalized prediction accuracy of the incremental data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 It is a flowchart of a personalized federated learning method for incremental data shown in an exemplary embodiment of the present application;
[0042] Figure 2 It is a schematic diagram of an implementation process of training a federated learning model shown in an exemplary embodiment of the present application;
[0043] Figure 3 is a schematic diagram of incremental personalized federated learning training shown in an exemplary embodiment of the present application;
[0044] Figure 4 It is a structural diagram of a personalized federated learning device for incremental data shown in an exemplary embodiment of the present application.
[0045] Reference numerals:
[0046] 1. Inner loop training module; 2. Outer loop training module. DETAILED DESCRIPTION
[0047] In order to make the purpose, implementation mode and advantages of the present application clearer, the exemplary implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, not all of the embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0048] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0049] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0050] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0051] Before explaining the personalized federated learning method for incremental data provided in the embodiment of the present application, the application scenario and implementation environment of the embodiment of the present application are first introduced.
[0052] Federated Learning (FL) is an emerging machine learning paradigm with great potential in data privacy protection and resource utilization. Unlike traditional centralized fraud detection learning methods, federated learning allows multiple clients to train their own models locally without uploading sensitive raw data to a central server. After the client trains the model locally, it only shares the updated parameters of the model, such as weights and gradients, rather than the actual data content. This process reduces the risk of data leakage and effectively protects user privacy. In addition, since data does not need to be frequently transmitted to a central server, federated learning significantly reduces data transmission latency and bandwidth overhead. This efficient data processing method not only improves the training speed of the model, but also improves the generalization ability of the model under different data distributions, thereby enhancing the accuracy and real-time performance of the model.
[0053] In practical applications, the traditional method of federated learning is to perform aggregate training through phased stock data, which has lags and is difficult to process the dynamic incremental data of some clients in a timely manner. In addition, the global model lacks personalization capabilities.
[0054] Based on this, the present application provides a personalized federated learning method and device for incremental data, which integrates the idea of meta-learning and introduces weight decay regularization through internal and external loops to improve the generalization ability of the model. In the outer loop, the personalized algorithm is iterated to ensure that the model can achieve better performance in incremental data training.
[0055] This application considers the scenario of efficient processing of incremental training data: traditional methods only optimize the training of stock data of federated learning, ignoring the impact of incremental training data on model training in actual scenarios. This invention considers both stock training data and incremental training data, and can dynamically process the incremental data of the client, breaking through the lag bottleneck of the traditional federated learning model.
[0056] This application makes full use of the global model for personalized training: The algorithm proposed in this invention introduces the idea of meta-learning and optimizes the personalized model through the internal and external loop mechanism. The personalized algorithm is iterated in the external loop, so that the model can adapt to new incremental training data more quickly, improving training efficiency and model performance.
[0057] Next, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through embodiments and in combination with the accompanying drawings. The embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of them.
[0058] Figure 1 It is a flowchart of a personalized federated learning method for incremental data shown in an exemplary embodiment of the present application.
[0059] In an exemplary embodiment, Figure 1 As shown, a personalized federated learning method for incremental data is provided. In this embodiment, the method may include the following steps:
[0060] Step 100: Train the global model based on the inner loop, and optimize the global model by adding a weight decay regularization term.
[0061] Step 200: Perform personalized model optimization training based on the outer loop incremental training data.
[0062] Figure 2 It is a schematic diagram of the implementation process of training a federated learning model shown in an exemplary embodiment of the present application.
[0063] In one possible implementation, Figure 2 As shown in Figure 2, the specific implementation process of its learning method is as follows:
[0064] Based on the inner loop global model training process:
[0065] Taking into account the uneven quantity and distribution of data collected by each client, the model is optimized by adding a weight decay regularization term in the global model training process based on the inner loop.
[0066] Assuming there are K clients, the server initializes the global model parameter W0 and sends it to all clients.
[0067] Each client k, upon receiving the global model parameters W t Then, use its local stock dataset D k Perform model training.
[0068] During the training process, each client optimizes the loss function L including the weight decay regularization term k (w), which is defined as the sum of the average loss of the local dataset and the weight decay regularization term of the model parameters.
[0069] Specifically, the loss function is:
[0070]
[0071] Among them, l(w; x i ,y i ) is the prediction error, and λ is the weight coefficient of the weight decay regularization term.
[0072] In the local training phase, each client performs multiple iterations (assuming the number of iterations is ) through the gradient descent method, and updates the model parameters w in each iteration.
[0073] The specific update steps are:
[0074]
[0075] Where η is the learning rate. After multiple iterations, the client obtains the updated local model parameters
[0076] Next, the client uploads the updated local model parameters to the server.
[0077] After receiving the model parameters of all clients, the server aggregates them by weighted average or simple average to obtain the updated global model parameters.
[0078] The server sets the new global model parameters w t+1 Distribute to each client and start the next round of training.
[0079] This training process is repeated until the predetermined number of iterations T is reached or the early stopping condition is met. Through this internal and external loop training process, federated learning not only effectively utilizes distributed data, but also prevents overfitting through the weight decay regularization term, thereby improving the generalization ability and stability of the model.
[0080] In addition, since each client only transmits model update parameters instead of original data, this method significantly reduces network bandwidth usage and data transmission delays while protecting data privacy.
[0081] Eventually, after multiple rounds of iterations, the server is able to obtain an accurate global model.
[0082] Personalized optimization process based on outer loop incremental training data:
[0083] In a distributed learning environment, since incremental data is not collected from all clients at the same time, we need to perform personalized model optimization training for clients with incremental data. The whole process can be divided into two stages: inner loop and outer loop. In the inner loop, the server trains a global model based on the currently available global data. In the outer loop, the server sends this global model to each client with incremental data, and these clients make further personalized adjustments based on the global model.
[0084] First, assume that there are N clients with incremental data. The server trains the global model parameters W from the currently available global data through an inner loop. t Specifically, the server aggregates all available global data and obtains the current global model parameters W through multiple rounds of training. t The server then distributes these model parameters to all clients that have incremental data.
[0085] Each client receives the global model parameters W t After that, the personalized model optimization training will be carried out according to the following steps. The client first updates the parameters of the local model to the global model parameters W t , ensuring that all client models start personalized training in the same initial state. In practice, this can be accomplished by setting the model weights.
[0086] Next, the client uses its local incremental dataset D n Perform training, incremental data set D n Contains the latest user interaction data, which can reflect the latest preferences and behaviors of the current user. In order to fine-tune the model, the client needs to choose a smaller learning rate to ensure that the fine-tuning process is stable and does not destroy the pre-trained weights. In terms of training settings, the client performs fewer training times to prevent overfitting. This meticulous adjustment allows the model to better adapt to local incremental data. Each client uses the local incremental data set D n Perform model fine-tuning and adjust model weights using the standard back-propagation algorithm.
[0087] After the model training is completed, the client uses the local validation set to evaluate the performance of the fine-tuned personalized model. Based on the evaluation results, the client can decide whether to further iterate and adjust the model parameters.
[0088] Through this combination of inner and outer loops, the system can effectively use incremental data to optimize personalized model training and improve the model's personalization capabilities and overall performance. This approach can not only continuously optimize the performance of the model, but also adapt to changing user needs and behaviors, so that the model is always in the best state.
[0089] Figure 3 It is a schematic diagram of incremental personalized federated learning training shown in an exemplary embodiment of the present application.
[0090] In one possible implementation, Figure 3 As shown, the learning method is implemented as follows:
[0091] Assume that there are three insurance data centers, which will be operated using the incremental federated learning method described in detail in this paper. Specifically, data center 1, data center 2, and data center 3.
[0092] First, they will perform local calculations in their respective data centers to calculate the corresponding model parameters. In this process, they will use a weight decay regularization training method, which can effectively constrain the complexity of the model, prevent overfitting, and thus improve the generalization ability of the model.
[0093] When local calculations are completed, these data centers will send the calculation results processed by encryption technology to a dedicated aggregation server. The aggregation server will use the method of federated learning dynamic weight aggregation to process the results from different data centers to generate a global model, which will be sent back to each participant.
[0094] After receiving the global model, each participant will encrypt the received gradients, which ensures data security and privacy. Then, they will use the decrypted gradient results to update the model parameters in their respective data centers. After this series of operations, all parties can obtain the final global model.
[0095] When all parties obtain the final global model and incremental data, they will conduct personalized training on the incremental data based on the global model that has been built. During this personalized training process, the model will be adjusted and optimized according to different data characteristics and business needs, and finally a personalized local model that can meet their specific needs will be obtained. This personalized local model can better adapt to different scenarios and data environments in actual applications, and provide more accurate and efficient services.
[0096] Working principle:
[0097] Some embodiments of the present application introduce a weight decay regularization term during the model training process, and impose regularization constraints on the model parameters to prevent model overfitting and improve the generalization ability of the model. By integrating the idea of meta-learning, the model is trained using internal and external loop mechanisms, and personalized algorithms are iterated in the outer loop, so that the model can adapt to new incremental data more quickly, thereby improving training efficiency and model performance.
[0098] Regularization is introduced in both the inner and outer loops to ensure the stability and generalization of the model throughout the training process. The inner loop is mainly for updating the global model, while the outer loop is for optimizing the personalized model.
[0099] In addition, some embodiments of the present application have designed a mechanism for dynamically processing incremental client data, which can update and process new client data in real time, breaking through the lag bottleneck of traditional federated learning models, improving the real-time and adaptability of the model, and through personalized algorithm iteration, enabling each client's model to be optimized according to its own characteristics, thereby improving the adaptability and accuracy of the model on different clients and solving the problem of the lack of personalization capabilities of the global model.
[0100] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the instructions, these steps are not necessarily executed in sequence according to the order of the instructions. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0101] Corresponding to the aforementioned embodiment of the personalized federated learning method for incremental data, adopting the same technical concept, the present application also provides an embodiment of a personalized federated learning device for incremental data.
[0102] Figure 4 It is a structural diagram of a personalized federated learning device for incremental data shown in an exemplary embodiment of the present application.
[0103] In an exemplary embodiment, Figure 4 As shown, the personalized federated learning device for incremental data includes:
[0104] An inner loop training module 1 is used to train the global model based on the inner loop and optimize the global model by adding a weight decay regularization term;
[0105] The outer loop training module 2 is used to perform personalized model optimization training based on the outer loop incremental training data.
[0106] For the specific definition of the personalized federated learning device for incremental data, please refer to the definition of the personalized federated learning method for incremental data above, which will not be repeated here. Each module in the above-mentioned personalized federated learning device for incremental data can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0107] It can be seen that some embodiments of the present application take into account the problem of uneven data distribution of each client during the federated learning training process, and propose to add a weight decay regularization term during the training process to improve the generalization of the model, reduce the complexity of the model, and prevent overfitting.
[0108] In view of the problem that the incremental training data of some clients cannot be added to the global model training in time, the idea of fusion meta-learning is proposed. The model is divided into an inner loop and an outer loop. The inner loop performs phased global training to obtain the global model of the existing data, and the outer loop performs personalized incremental training on the global model to ensure the personalized prediction accuracy of the incremental data.
[0109] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0110] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A personalized federated learning method for incremental data, characterized in that: include: Training a global model based on an inner loop, and optimizing the global model by adding a weight decay regularization term; Perform personalized model optimization training based on outer loop incremental training data.
2. The personalized federated learning method for incremental data according to claim 1, characterized in that: The training of the global model based on the inner loop and the optimization of the global model by adding a weight decay regularization term further include: Initialize the global model parameter W0 through the server, and send the global model parameter to all clients k; Each client k receives the global model parameter W t Then, use its local stock dataset D k Conduct model training; Client k uploads the updated local model parameters to the server; After receiving the model parameters of all clients, the server aggregates them by weighted average or simple average to obtain the updated global model parameters. The server sets the new global model parameters w t+1 Distribute to each client and start the next round of training.
3. The personalized federated learning method for incremental data according to claim 2, characterized in that: After receiving the global model parameters, each client uses its local stock data set to perform model training, further comprising: Each client optimizes the loss function L including the weight decay regularization term k (w), which is defined as the sum of the average loss of the local dataset and the weight decay regularization term of the model parameters; The loss function is: Among them, l(w; x i ,y i ) is the prediction error, and λ is the weight coefficient of the weight decay regularization term.
4. The personalized federated learning method for incremental data according to claim 3, characterized in that: In the process of model training using its local stock dataset, each client performs multiple iterations through the gradient descent method, updating the model parameter w in each iteration; The specific update steps are: Among them, η is the learning rate. After multiple iterations, client k obtains the updated local model parameters 5. The personalized federated learning method for incremental data according to claim 4, characterized in that: The training process is repeated until the predetermined number of iterations E is reached or the early stopping condition is met.
6. The personalized federated learning method for incremental data according to claim 5, characterized in that: The personalized model optimization training based on the outer loop incremental training data further includes: After receiving the global model parameters, each client performs personalized model optimization training and updates the parameters of the local model to the global model parameters; The client uses the local incremental dataset for training; The client needs to choose a smaller learning rate to ensure that the fine-tuning process is stable and does not destroy the pre-trained weights. The client performs fewer training iterations to prevent overfitting. Each client fine-tunes the model based on the local incremental data set and adjusts the model weights using the standard back-propagation algorithm; After the model training is completed, the client uses the local validation set to evaluate the performance of the fine-tuned personalized model. Based on the evaluation results, the client can decide whether to further iterate and adjust the model parameters.
7. The personalized federated learning method for incremental data according to claim 6, characterized in that: The incremental data set contains the latest user interaction data and can reflect the latest preferences and behaviors of the current user.
8. The personalized federated learning method for incremental data according to claim 2, characterized in that: In the process of performing local calculations within multiple clients to obtain corresponding model parameters, using a weight decay regularization training method for training can effectively constrain the complexity of the model, prevent overfitting, and thus improve the generalization ability of the model.
9. The personalized federated learning method for incremental data according to claim 6, characterized in that: During the personalized training process, the final global model will be adjusted and optimized according to different data characteristics and business requirements to obtain a personalized local model that can meet their respective specific needs.
10. A personalized federated learning device for incremental data, characterized in that: include: An inner loop training module, used for training a global model based on an inner loop, and optimizing the global model by adding a weight decay regularization term; The outer loop training module is used to perform personalized model optimization training based on the outer loop incremental training data.
Citation Information
Patent Citations
Optimization method for heterogeneous model fusion in federated learning
CN114912705A
Federal learning personalization method based on comparative learning
CN115115066A
Edge federal learning training method and system for heterogeneous data
CN116611535A
Personalized traffic sign discrimination method based on federal learning
CN116758513A
Electroencephalogram signal identity recognition method based on personalized federal incremental learning
CN117077765A
Cited By
Personalized federal learning method and system oriented to non-independent identically distributed data
CN121766394A