Decentralized federated learning training behavior supervision method based on digital watermarking technology
By embedding a watermarked dataset using digital watermarking technology in decentralized federated learning, the training behavior of worker nodes is verified, solving the problem of worker nodes forging results and achieving the accuracy of model training and the reliability of the system.
Patent Information
- Application Number
- CN202211370527.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-11-03
AI Technical Summary
In a decentralized federated learning system, worker nodes may falsify training results, affecting the accuracy of model training and preventing the effective utilization of data value.
Digital watermarking technology is used to embed watermark datasets into training data. The embedding is carried out through the inherent learning ability of deep neural networks to verify the training behavior of worker nodes, quantify and visualize their honesty, and ensure the integrity and trustworthiness of training behavior.
By quantifying the training behavior of worker nodes, we can encourage them to remain honest, ensure the accuracy and integrity of model training, and improve the trustworthiness of decentralized federated learning systems.
Smart Images

Figure CN115713126B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of federated learning technology, specifically relating to a decentralized federated learning training behavior supervision method based on digital watermarking technology. Background Technology
[0002] In recent years, with the rapid development of technologies such as the Internet of Things (IoT), edge computing, and artificial intelligence (AI), an increasing number of smart terminal devices have connected to the internet, generating massive amounts of terminal data. While this massive data provides a solid foundation for the development of AI technology, it also poses more severe threats and challenges to privacy protection for smart terminals and the processing technology for massive amounts of data. Although federated learning offers a feasible solution to these problems through its unique advantage of "data remaining stationary while the model moves," most current federated learning application systems are built by business parties or device owners, resulting in limited access scale, difficulties in data expansion, and high system construction costs. This leads to a lack of effective connection between many data demanders and data owners, limiting the realization of data value. Therefore, a decentralized federated learning system structure has emerged. In this structure, data demanders and data owners form a one-to-N or N-to-N relationship, freeing the connection between the two parties from platform limitations. While decentralized federated learning brings great convenience to the connection of demand, it also loses the convenience of unified operation services and supervision. As the executors of training behavior in a decentralized federated learning architecture, worker nodes are crucial to the stable operation of the architecture by maintaining the honesty of their behavior. Any bad behavior in model training will limit the development of the architecture. Summary of the Invention
[0003] The purpose of this invention is to provide a decentralized federated learning training behavior supervision method based on digital watermarking technology.
[0004] A decentralized federated learning training behavior supervision method based on digital watermarking technology includes the following steps:
[0005] 1) The task publisher initializes the global model and prepares several watermark datasets, and sends the initial global model and watermark datasets to the selected worker nodes; the idea of constructing the watermark dataset is to add a fixed pattern to the image that is unrelated to the training data and add a label from the actual task to it.
[0006] 2) The worker node concatenates the local dataset and the watermark dataset and then performs local training to complete the watermark embedding process.
[0007] 3) The task issuer verifies the digital watermark, and the verification result identifies the training behavior of the worker nodes;
[0008] 4) Execute steps 2) and 3) multiple times to continuously quantify the training behavior of worker nodes during a federated learning process;
[0009] 5) Based on the completion status of digital watermarking, indicate the training honesty of worker nodes;
[0010] 6) The performance of the global model meets the specified requirements, the federated learning process is completed, and the training behavior supervision of the worker nodes is completed.
[0011] Furthermore, the watermark embedding in step 2) is performed using the inherent learning capability of deep neural networks. The embedding process is as follows:
[0012] 2.1) Assessment of the authenticity of worker training behavior;
[0013] Using the digital watermark dataset distributed by the task publisher Validate all local models and test their performance. The accuracy of the data will be checked in two dimensions. The results of the checks will serve as the main basis for evaluating workers’ training behavior and will be used by task assigners to decide whether to continue selecting the worker for subsequent training tasks.
[0014] 2.2) Accuracy assessment of watermarking tasks;
[0015] The watermarked dataset is used to test the aggregated new global model to determine whether the watermarked model needs to be replaced; if necessary, the watermarked dataset is replaced to ensure that the training behavior of worker nodes is completely and continuously quantified.
[0016] 2.3) The task issuer aggregates the training results returned by the workers to obtain a new global model M. G(t+1) ;
[0017]
[0018] 2.4) After completing the aggregation process of the global model, the task publisher uses the validation set of the main task to perform performance validation on the new global model, determine whether it meets the usage requirements, and make a decision on whether to continue the next round of training process of federated learning.
[0019] Furthermore, the specific process by which the task publisher verifies the digital watermark in step 3) is as follows:
[0020] 3.1) The SF-WE algorithm will process the original watermark dataset. The mapping relationship between labels is σ = {Y} o ,Y n As input, O ≠ N, and output the watermarked dataset. Then, after training at the worker nodes, a local model with a watermark is output.
[0021] The tag mapping relationship is defined by the task publisher, indicating how the watermark is labeled; Y o These are the true labels of the original data; Y n It is a predefined watermark label that will include fingerprints used for training behavior verification;
[0022] 3.2) The algorithm's watermarkingEmbedding() function extracts all labels Y from the training dataset. o The tags are used to generate corresponding patterns and Y... n Re-labeling; worker nodes upon receiving the complete watermark dataset After that, use Dataset and local dataset D local During local training, the DNN will automatically learn the patterns of these watermark data. The watermark specified by the task issuer is embedded into the local model of the worker node. The completion of the digital watermark will gradually increase as the number of local training rounds of the worker node increases.
[0023] 3.3) Aggregate the local models to obtain a new global model. Perform a watermark availability check on the global model. If the availability condition is not met, replace the watermark dataset. After replacement, check the performance of the global model. If the condition is not met, continue the training process.
[0024] Furthermore, the watermark dataset replacement process in step 3.3) is specifically as follows:
[0025] Define the observable coefficient as δ, and define the global model at round t. In the watermark dataset accuracy Accuracy compared to the previous round When the difference is less than the observable coefficient, it indicates that the watermarked dataset has reached an unusable state ΔF; to give this evaluation criterion a certain degree of tolerance, a tolerance coefficient Cnt is defined. useless The number of times the watermarked dataset can be considered unusable is defined as acceptable. Until this number is reached, the watermarked dataset is considered usable. The watermarked dataset is replaced only when its performance on the global model simultaneously meets the above conditions. Remove watermark dataset The corresponding watermark task T x Enhancement, enabling watermarked datasets The corresponding watermark task T y ;
[0026] As the training rounds progress, task T x Performance on the main task T will gradually decline, and the watermark task will gradually disappear. When T... x After performance on the primary task T declines to a certain level, T x It will recover from an unavailable state to an available state and can participate in the next watermark rotation. That is, the above watermark rotation process can be represented as:
[0027]
[0028]
[0029] Among them, e f This refers to the number of rounds the task went through before it reached an unavailable state. Represents task T x The state exhibited in the i-th round;
[0030] Since the rate of watermark disappearance is slower than the rate of watermark creation, taking two watermarking tasks T1 and T2 corresponding to two watermarked datasets of the same size as an example, suppose task T1 is swapped with task T2 after reaching an unusable state. When task T2 reaches an unusable state and needs to be swapped, task T1, which should be swapped with it, has not completely disappeared. Therefore, it continues the watermarking task from a partially disappeared state. This time, the number of rounds required for it to reach an unusable state will be less than the number of rounds required to reach an unusable state in the previous instance. In other words, after k repetitions of the above exchange, the initial state of both tasks will become unusable, and subsequent tasks cannot be completed. The number of rounds required for both tasks to reach an unusable state is:
[0031]
[0032] in, This represents the number of rounds that task T1 goes through before it becomes unusable again during the i-th elimination. Therefore, given the same watermark dataset size, the number of datasets required to complete the entire federated learning training can be determined by measuring the watermark task creation rate and elimination rate.
[0033] The beneficial effects of this invention are as follows:
[0034] This invention addresses the problem in decentralized federated learning architectures where worker nodes falsify training results to obtain false benefits, affecting the overall accuracy of model training. It proposes a decentralized federated learning training behavior supervision method based on digital watermarking technology. By expanding the application scenarios of digital watermarking, the training behavior of each worker node is quantified and visualized, thereby encouraging worker nodes to maintain honesty in their training behavior and providing reliable computing power support for decentralized federated learning systems. Attached Figure Description
[0035] Figure 1 This is an overall framework diagram of the present invention.
[0036] Figure 2 This is a comparison chart of model accuracy with and without watermarking.
[0037] Figure 3 This is a diagram showing the experimental results of the watermark generation and extinction cycle.
[0038] Figure 4 This is a graph showing the performance results of different datasets in the first 100 rounds.
[0039] Figure 5 This is a graph showing the results of a comparative experiment on the training behavior of worker nodes.
[0040] Figure 6 This is a graph showing the periodic experimental results of the watermarking task.
[0041] Figure 7 This is a graph showing the experimental results of watermark data and its performance on the model without the watermarking task.
[0042] Figure 8 This is a graph showing the results of the dataset rotation experiment. Detailed Implementation
[0043] The present invention will now be further described with reference to the accompanying drawings.
[0044] This invention relates to a decentralized federated learning training behavior supervision method based on digital watermarking technology, which is proposed in the decentralized federated learning architecture and incorporates data watermarking technology that is currently widely used in the field of machine learning.
[0045] The overall framework diagram of the present invention is as follows: Figure 1 As shown, the specific steps are as follows:
[0046] 1) The task publisher initializes the global model and prepares several watermark datasets, sending the initial global model and watermark datasets to the selected worker nodes. The idea behind constructing the watermark dataset is to add fixed patterns to images unrelated to the training data and add a label from the actual task to them.
[0047] 2) The worker nodes concatenate the local dataset and the watermark dataset and then perform local training to complete the watermark embedding process. The watermark embedding is performed using the inherent learning capability of the deep neural network. The specific algorithm for the embedding process is as follows:
[0048] The authenticity assessment of worker training behavior will use the digital watermark dataset issued by the task issuer. Validate all local models and test their performance. The accuracy of the assessment will be checked in two dimensions. The results of this stage will serve as the main basis for evaluating worker training behavior and will be used by the task issuer to decide whether to continue selecting the worker for subsequent training tasks.
[0049] The accuracy evaluation of the watermarking task will use the watermarked dataset to test the aggregated new global model, primarily to determine whether the watermarked model needs to be replaced. Replacing the watermarked dataset when necessary ensures that the training behavior of worker nodes is fully and continuously quantified.
[0050] The model's accuracy assessment on the main task occurs after the workers' training behavior is evaluated. The task publisher aggregates the training results returned by the workers according to formula (1) to obtain a new global model M. G(t+1) .
[0051]
[0052] After completing the aggregation process of the global model, the task publisher needs to use the validation set of the main task to verify the performance of the new global model, determine whether it meets the usage requirements, and decide whether to continue the next round of training in federated learning.
[0053] 3) The task issuer verifies the digital watermark. The verification result identifies the training behavior of the worker nodes. The specific inspection process is as follows:
[0054] The SF-WE algorithm will process the original watermark dataset. The mapping relationship between labels is σ = {Y} o ,Y n}(o≠n) is taken as input, and the watermark dataset is output. Then, after training at the worker nodes, a local model with a watermark is output. The tag mapping will be defined by the task publisher, indicating how the watermark will be labeled. o It is the true label of the original data, Y nThis is a predefined watermark label that will include fingerprints used for training behavior verification. Next, the algorithm's `watermarkingEmbedding()` function will extract all labels labeled Y from the training dataset. o The tags are used to generate corresponding patterns and Y... n Relabeling will generate both the pattern and carefully prepared labels simultaneously. Worker nodes receive the complete watermarked dataset. After that, it will be used Dataset and local dataset D local During local training, the DNN automatically learns the patterns in the watermark data, and the watermark specified by the task issuer is embedded into the local model of that worker node. The completeness of the digital watermark gradually increases with the number of local training rounds of the worker node.
[0055] The local models are aggregated to obtain a new global model. The watermark availability is checked on the global model. If the availability condition is not met, the watermark dataset is replaced. The specific replacement process is as follows:
[0056] Define the observable coefficient as δ, and define the global model at round t. In the watermark dataset accuracy Accuracy compared to the previous round When the difference is less than the observable coefficient, it indicates that the watermarked dataset has reached an unusable state ΔF. To give this evaluation criterion a certain degree of tolerance, a tolerance coefficient Cnt is defined. useless The number of times the watermarked dataset can be considered unusable is defined as acceptable; until this number is reached, the watermarked dataset is considered usable. The watermarked dataset is replaced when its performance on the global model simultaneously meets the above conditions. Remove watermark dataset The corresponding watermark task T x Enhancement, enabling watermarked datasets The corresponding watermark task T y .
[0057] As the training rounds progress, task T x Performance on the main task T will gradually decline, and the watermark task will gradually disappear. When T... x After performance on the primary task T declines to a certain level, T x It will recover from an unavailable state to an available state and can participate in the next watermark rotation. That is, the above watermark rotation process can be represented as:
[0058]
[0059]
[0060] Among them, e f This refers to the number of rounds the task went through before it became unavailable. Represents task T x The state exhibited in the i-th round.
[0061] Because the rate of watermark disappearance is slower than the rate of watermark creation, let's take two watermarking tasks T1 and T2 corresponding to two watermarked datasets of the same size as an example. Assume that task T1, after reaching an unusable state, swaps with task T2. When task T2 reaches an unusable state and needs to be swapped, task T1, which should be swapped with it, has not completely disappeared. Therefore, it continues the watermarking task from a partially disappeared state. This time, the number of rounds required for it to reach an unusable state will be less than the previous time. In other words, after k such repeated swaps, the initial states of both tasks will become unusable, making it impossible to complete subsequent tasks. The number of rounds required for both tasks to reach an unusable state is:
[0062]
[0063] in, This represents the number of rounds that task T1 goes through before it becomes unusable again during the i-th elimination. Therefore, given the same watermark dataset size, the number of datasets required to complete the entire federated learning training can be determined by specifying the watermark task creation and elimination rates.
[0064] After the replacement, the global model performance is checked; if it does not meet the requirements, the training process continues.
[0065] 4) Execute steps 2) and 3) multiple times to continuously quantify the training behavior of worker nodes during a federated learning process.
[0066] 5) Based on the completion status of digital watermarking, the training honesty of worker nodes is identified, which serves as one of the criteria for selecting worker nodes.
[0067] 6) The performance of the global model meets the specified requirements, the federated learning process is completed, and the training behavior supervision of the worker nodes is completed.
[0068] To determine the impact of adding a digital watermarking task on the main task, experiments were conducted with and without the watermarking task. The experimental results are as follows: Figure 2 As shown, the presence or absence of a watermark does not affect the accuracy of the model.
[0069] To determine the appropriate size of the watermark dataset and the dataset rotation time, training was performed on watermark datasets of different sizes, and the results are as follows: Figure 3 As shown, it can be seen that after a period of time, the disappearance rate of watermarking tasks will remain at a uniform level for a long time. Therefore, it is unwise to wait for its accuracy rate to drop to zero before rotating it. When the disappearance rate of watermarking tasks decreases to a level where the fluctuation is not significant, the rotation operation can be carried out.
[0070] To determine the watermark data and its scale, the data from the first 100 rounds of tasks were separately compiled, as follows: Figure 4 The experimental results above show that watermark datasets of different sizes exhibit roughly the same convergence trend. However, taking the dataset with a size of 1000 as an example, its convergence speed is relatively slow, and the accuracy difference between rounds is not significant, offering little help in judging training behavior. Therefore, in subsequent experiments, an 800-size dataset will be selected, which can maintain a large number of rounds while allowing for the observation of significant changes.
[0071] To verify the results of the worker node training behavior check, one worker will be randomly selected from all four workers and will not be trained. Before aggregation, the local model submitted by the worker will be checked for watermarking to determine whether the worker has performed training. Experimental results are as follows: Figure 5 As shown, the pre-aggregation checks can accurately quantify worker training behavior. Untrained workers can be identified. The periodic experimental results of the watermarking task are as follows: Figure 6 As shown, in each cycle of the watermark, because its decay rate is much lower than its generation rate, the watermarked dataset becomes unusable after only 9 cycles in the fourth cycle. Two watermarked datasets, D1 and D2, each with a size of 800, are added to the training process. When D1 becomes unusable, D2 is used in rotation, with the two datasets working alternately. Before replacing the datasets, it is necessary to know the performance of the two datasets on the model when they are not involved in the watermarking task. Experiments are conducted on the two datasets, and the results are as follows. Figure 7 With both watermark datasets participating in the rotation, the experimental results are as follows: Figure 8 As shown in the experimental results, rotating the watermark dataset is feasible. Although the availability of the two watermark datasets gradually decreases during cross-training, by configuring an appropriate number of replacement datasets, the watermarking task can fully cover the entire federated learning process, and the training behavior of worker nodes can be fully quantified.
[0072] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A decentralized federated learning training behavior supervision method based on digital watermarking technology, characterized in that, Includes the following steps: 1) The task publisher initializes the global model and prepares several watermark datasets, and sends the initial global model and watermark datasets to the selected worker nodes; the idea of constructing the watermark dataset is to add a fixed pattern to the image that is unrelated to the training data and add a label from the actual task to it. 2) The worker node concatenates the local dataset and the watermark dataset and then performs local training to complete the watermark embedding process. 3) The task issuer verifies the digital watermark, and the verification result identifies the training behavior of the worker nodes; 3.1) The original watermark dataset The mapping relationship between labels is σ = {Y} o ,Y n As input, O ≠ N, and output the watermarked dataset. Then, after training at the worker nodes, a local model with a watermark is output. The tag mapping relationship is defined by the task publisher, indicating how the watermark is labeled; Y o These are the true labels of the original data; Y n It is a predefined watermark label that will include fingerprints used for training behavior verification; 3.2) Extract all data with label Y from the training dataset. o The tags are used to generate corresponding patterns and Y... n Re-labeling; worker nodes upon receiving the complete watermark dataset After that, use Dataset and local dataset D local During local training, the DNN will automatically learn the patterns of these watermark data. The watermark specified by the task issuer is embedded into the local model of the worker node. The completion of the digital watermark will gradually increase as the number of local training rounds of the worker node increases. 3.3) Aggregate the local models to obtain a new global model. Check the watermark availability of the global model. If the availability condition is not met, replace the watermark dataset. After replacement, check the performance of the global model. If the condition is not met, continue the training process. Define the observable coefficient as δ, and define the global model at round t. In the watermark dataset accuracy Accuracy compared to the previous round When the difference is less than the observable coefficient, it indicates that the watermarked dataset has reached an unusable state ΔF; to give this evaluation criterion a certain degree of tolerance, a tolerance coefficient Cnt is defined. useless The number of times the watermarked dataset can be considered unusable is defined as acceptable. Until this number is reached, the watermarked dataset is considered usable. The watermarked dataset is replaced only when its performance on the global model simultaneously meets the above conditions. Remove watermark dataset The corresponding watermark task T x Enhancement, enabling watermarked datasets The corresponding watermark task T y ; As the training rounds progress, task T x Performance on the main task T will gradually decline, and the watermark task will gradually disappear. When T... x After performance on the primary task T declines to a certain level, T x It will recover from an unavailable state to an available state and participate in the next watermark rotation; the watermark rotation process is represented as follows: Among them, e f This refers to the number of rounds the task went through before it reached an unavailable state. Represents task T x The state exhibited in the i-th round; For two watermarking tasks T1 and T2 corresponding to two watermarked datasets of the same size, the number of rounds required for both tasks to reach an unusable state is: in, This indicates the number of rounds that watermarking task T1 goes through when it becomes unusable again after the i-th elimination. Given the same size of watermark datasets, the number of datasets required to complete the entire federated learning training can be determined by measuring the watermark task creation rate and the watermark extinction rate. 4) Execute steps 2) and 3) multiple times to continuously quantify the training behavior of worker nodes during a federated learning process; 5) Based on the completion status of digital watermarking, indicate the training honesty of worker nodes; 6) The performance of the global model meets the specified requirements, the federated learning process is completed, and the training behavior supervision of the worker nodes is completed.
2. The decentralized federated learning training behavior supervision method based on digital watermarking technology according to claim 1, characterized in that: In step 2), the watermark embedding is performed using the inherent learning capabilities of deep neural networks. The embedding process is as follows: 2.1) Assessment of the authenticity of worker training behavior; Using the digital watermark dataset distributed by the task publisher Validate all local models and test their performance. The accuracy of the data will be checked in two dimensions. The results of the checks will serve as the main basis for evaluating workers’ training behavior and will be used by task assigners to decide whether to continue selecting the worker for subsequent training tasks. 2.2) Accuracy assessment of watermarking tasks; The watermarked dataset is used to test the aggregated new global model to determine whether the watermarked model needs to be replaced; the watermarked dataset is replaced to ensure that the training behavior of worker nodes is completely and continuously quantified. 2.3) The task issuer aggregates the training results returned by the workers to obtain a new global model M. G(t+1) ; 2.4) After completing the aggregation process of the global model, the task publisher uses the validation set of the main task to perform performance validation on the new global model, determine whether it meets the usage requirements, and make a decision on whether to continue the next round of training process of federated learning.
Citation Information
Patent Citations
Training method and calling method of federated learning model and federated learning system.
CN114091690A