A medical system federated learning method based on watermark embedding and a medical system
By designing a watermarking task dataset in federated learning of a medical system, calculating the watermark depth and adjusting the task weight, and adopting the FedAvg algorithm, the watermark inconsistency problem caused by client heterogeneity is solved, achieving both concealment and accuracy of the watermark, and improving model accuracy and training efficiency.
Patent Information
- Application Number
- CN202411750631.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In existing federated learning methods for healthcare systems, watermark embedding methods do not fully consider the data heterogeneity among clients, resulting in inconsistencies in watermarks across different clients, which affects reliability. Furthermore, centralized methods fail to effectively utilize client resources, increasing server load and impacting the accuracy of the main task.
By designing a watermarking task dataset in a medical system, combining the medical data types of the client, calculating the watermark depth, adjusting the weight of the main task and the watermarking task, and using the FedAvg algorithm for multiple rounds of federated training, the concealment and accuracy of the watermark are achieved, making full use of client resources.
This approach achieves both concealment and accuracy of watermarking, ensuring the precision of the medical task model and the reliability of the embedded watermark. It also decouples the main task from the watermarking task, improving overall training efficiency and model security.
Smart Images

Figure CN119724457B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of federated learning, specifically to the field of watermark embedding of federated learning models, and more particularly to a medical system federated learning method based on watermark embedding and a medical system. BACKGROUND
[0002] With the continuous development of artificial intelligence technology, data privacy and security issues have become particularly important in sensitive fields such as medical systems. Federated learning in the medical field trains models on devices or nodes in multiple hospitals or medical institutions without sharing original medical data, and aggregates local updates into a global model, thereby effectively protecting data privacy. However, the distributed nature of federated learning also brings new security and trust challenges, such as model theft, data tampering, and malicious participant attacks. In the medical system, these problems pose particular challenges, as they directly relate to patient privacy and the security of medical data. To address these issues, model watermarking technology, as an effective model protection method, has begun to attract the attention of researchers. Model watermarking embeds a secret identifier in the model without significantly affecting the model's performance, allowing the model owner to prove ownership by identifying the watermark when the model is stolen or misused. This is particularly important in the medical field for protecting the copyright of deep learning models. In the context of federated learning in the medical system, large hospitals have a large amount of evenly distributed patient data, while specialized hospitals focus on specific departments, resulting in significant label shifts in the data. Township hospitals, on the other hand, face the problem of small and unevenly distributed data. These factors will affect the effectiveness of watermark injection, as existing global watermark injection methods do not fully consider the heterogeneity of each client. To improve the robustness and effectiveness of the watermark, new watermark injection methods need to be developed that can adapt to the data heterogeneity of different hospital clients and ensure model security and copyright protection in the medical federated learning environment.
[0003] When federated learning is applied in a medical system, model watermarking technology can effectively protect the intellectual property of the model and enhance the security of the system. The mainstream medical model watermarking methods can be divided into black-box watermarking and white-box watermarking. In the medical federated learning environment, black-box watermarking allows the watermark in the model to be verified by inputting specific triggers without accessing the internal structure of the model. This method adds specific trigger data and target labels during the training process of the medical task model, so that the model outputs a specific result when the trigger data is input. For example, when the model is suspected of being stolen, the hospital can check whether the model outputs the expected result by inputting these trigger data, thereby verifying the watermark. The advantage of black-box watermarking is that it does not need to access the internal parameters of the model, so it can adapt to different model structures and is more friendly to the privacy protection of the model. White-box watermarking needs to access the internal structure of the medical task model, such as model parameters, gradients, etc., to embed and detect watermarks. In medical federated learning, white-box watermarking embeds identifiable watermark information by modifying the internal parameters or structure of the model. This involves adding special structural noise or identifiers to specific layers of the model to embed watermark information in the model parameters. The embedding process of white-box watermarking is more complex and needs to consider the structure of the model, and accessing the internal parameters of the model in the verification process poses certain risks in medical data protection.
[0004] In summary, in the federated learning method of the medical system, some existing model watermark embedding methods attempt to evenly distribute watermark tasks to different hospital clients to achieve watermark embedding, but this method does not fully consider the heterogeneity problem between clients caused by data non-independent and identically distributed, which will lead to inconsistencies in the watermark aggregated by the central server between different clients, affecting the reliability of the watermark. In addition, some methods only complete the watermark task at the central server side. Although this method is centralized, it does not effectively utilize the computing resources of each hospital client, increases the burden on the server side, and prolongs the training time of the overall model. At the same time, due to the coupling between the watermark task and the main task of the medical model, this centralized watermark embedding method will have a negative impact on the accuracy of the model in the main task such as disease diagnosis.
[0005] It should be noted that the background art is only used to introduce the relevant information of the present application, so as to help understand the technical solutions of the present application, but does not mean that the relevant information must be prior art. In the absence of evidence that the relevant information has been disclosed before the filing date of the present application, the relevant information should not be regarded as prior art. SUMMARY
[0006] Therefore, the purpose of the present application is to overcome the defects of the prior art, and to provide a medical system federated learning method based on watermark embedding and a medical system
[0007] The object of the present application is achieved by the following technical solutions:
[0008] According to a first aspect of the present application, a watermark embedding-based medical system federated learning method is provided, the medical system comprising a plurality of medical units and a medical center, wherein each medical unit is a client and the medical center is configured with a center server, the method comprising: step S1, designing a watermark according to the medical data type of the client to obtain a watermark task data set, the watermark task data set comprising a plurality of watermark samples, all of which are configured with the same watermark label; step S2, obtaining an initial medical task model of each client and a main task medical data set, the main task medical data set comprising a plurality of main task data samples configured with disease labels, and combining the main task medical data set with the watermark task data set to obtain a training set of each client; step S3, performing a first-stage training, comprising causing each client to train its initial model a preset number of times according to its own training set and a preset loss function and a preset initial proportion of the main task and the watermark task, and calculating its own watermark depth; step S4, causing each client to reconfigure the proportion of the main task and the watermark task based on its own watermark depth and adjust its preset loss function based on the configured proportion, wherein the deeper the watermark depth of the client, the higher the proportion of the watermark task; step S5, performing a second-stage training, comprising performing multiple rounds of federated training based on the adjusted loss function of each client to obtain a medical task model for each client.
[0009] Preferably, in step S2, the watermark depth of each client is calculated by the following way; step S31, obtaining the intermediate layer output of each client model after the first-stage training, wherein the intermediate layer output of each client model comprises the predicted score of each disease label in the main task medical data set of the client; step S32, determining the watermark depth of each client based on the intermediate layer output of each client model by the following way:
[0010]
[0011] wherein WDS represents the watermark depth of the client, z1 represents the maximum predicted score in the intermediate layer output of the client model, z2 represents the second largest predicted score in the intermediate layer output of the client model, and H(z) represents the entropy of the intermediate layer output of the client model.
[0012] Preferably, the entropy of the intermediate layer output of each client model is determined by the following way:
[0013]
[0014]
[0015] wherein H(z) represents the entropy of the intermediate layer output of the client, C represents the total number of disease label types in the primary task medical data set of the client, p a represents the probability corresponding to the a-th disease label in the training set of the client, z a , z b represent the prediction scores corresponding to the a-th disease label and the b-th disease label in the training set of the client, respectively.
[0016] Preferably, the preset loss function of each client is:
[0017]
[0018] wherein, represents the primary task loss of the client, represents the watermark task loss of the client, represents the cross-entropy loss function, a represents the primary task proportion, b represents the watermark task proportion, N represents the number of samples in the primary task medical data set of the client, M represents the number of watermark samples in the watermark training set of the client, y (i)′ represents the predicted disease label of the i-th primary task medical sample in the primary task medical data set of the client, y (i) represents the true disease label of the i-th primary task medical sample in the primary task medical data set, y t (j)′ represents the predicted watermark label of the j-th watermark sample in the watermark training set of the client, y t represents the true watermark label of the watermark sample.
[0019] Preferably, the initial proportion of the primary task is configured as 0.5, and the initial proportion of the watermark task is configured as 0.5.
[0020] Preferably, the preset loss function in each client is adjusted by: configuring the primary task proportion in the preset loss function of the client as 0.5; and configuring the watermark task proportion in the preset loss function of the client based on the watermark depth of the client by:
[0021]
[0022] wherein b k represents the watermark task proportion of the current client, WDS k represents the watermark depth of the current client, WDS rp represents the preset reward and punishment coefficient, WDS max represents the maximum value in the watermark depths of all clients, WDS min represents the minimum value in the watermark depths of all clients.
[0023] Preferably, in the step S5, the FedAvg algorithm is used for multi-round federated learning.
[0024] According to a second aspect of the present application, a medical system is provided, the system comprising a plurality of medical units, a medical center, the medical system being configured to perform federated learning using the method according to any one of the first aspect of the present application to obtain a medical task model.
[0025] According to a third aspect of the present application, a computer readable storage medium is provided, having stored thereon a computer program, the computer program being executable by a processor to implement the steps of the method according to any one of the first aspect of the present application.
[0026] According to a fourth aspect of the present application, an electronic device is provided, comprising: one or more processors; and a memory, wherein the memory is configured to store executable instructions; the one or more processors are configured to implement the steps of the method according to any one of the first aspect of the present application via execution of the executable instructions.
[0027] Compared with the prior art, the present application has the following advantages:
[0028] The present application embeds watermark by using the way that the watermark task is performed by the client in the medical system and then aggregated by the center server, realizes the embedding of complete watermark through the cooperation of the center server and the client in the medical system, achieves the concealment and accuracy of the watermark, at the same time, adjusts the proportion of the watermark task and the main task of each client based on the watermark task adaptation ability of each client in the medical system, fully utilizes the resources of each client, realizes the decoupling of the main task and the watermark task, and thus guarantees the accuracy of the medical task model and the reliability of the embedded watermark. BRIEF DESCRIPTION OF DRAWINGS
[0029] The embodiments of the present application are further described below with reference to the accompanying drawings, in which:
[0030] Figure 1 A step schematic diagram of a watermark embedding based medical system federated learning method according to an embodiment of the present application;
[0031] Figure 2 A first stage training schematic diagram of a watermark embedding based medical system federated learning method according to an embodiment of the present application;
[0032] Figure 3 A second stage training schematic diagram of a watermark embedding based medical system federated learning method according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] For the purpose of the present application, the technical solutions and advantages are more clearly and clearly understood, the following through specific examples of the present application is further described in detail. It should be understood that the specific examples described herein are only to explain the present application, and not to limit the present application.
[0034] As mentioned in the background section, in the federated learning method of the medical system, the existing part of the model watermark embedding method attempts to evenly distribute the watermark task to different hospital clients to achieve the embedding of the watermark, but this method does not fully consider the heterogeneity problem between clients caused by data non-independent and identically distributed, which will lead to inconsistency of the watermark aggregated by the central server among different clients, affecting the reliability of the watermark, and some methods only complete the watermark task at the central server side. Although this kind of method is centralized, it fails to effectively utilize the computing resources of each hospital client, increases the burden of the server side, and prolongs the training time of the overall model. At the same time, due to the coupling between the watermark task and the main task of the medical model, this centralized watermark embedding method will have a negative impact on the accuracy of the model in the main task such as disease diagnosis.
[0035] Before specifically introducing the embodiments of the present application, some terms used therein are explained as follows:
[0036] Watermark task: The watermark task is related to the intellectual property protection of the model. In federated learning, watermarks can be embedded in the model to prove the ownership or source of the model. The watermark task involves embedding specific patterns or information in the model during training, which can also be detected when the model is illegally copied or used. The purpose of the watermark task is to improve the security and traceability of the model, and to prevent the model from being illegally copied or misused.
[0037] Main task: The main task refers to the core task in federated learning, which involves the main goal or problem. In the field of medical health, the main task is generally disease diagnosis, and the model needs to learn from existing patient medical data how to accurately identify and predict diseases based on the data. The sample data of the main task is used to train the model to solve specific problems such as disease classification and disease prediction.
[0038] Intermediate layer output (logit output): The intermediate layer output refers to the output of the last layer before applying the activation function in the neural network, which is the original prediction value of the model. In a binary classification problem, the intermediate layer output is a real number value, representing the linear score of the positive class. In a multi-classification problem, the intermediate layer output is a vector, each element corresponding to the prediction score of a class.
[0039] In order to better understand the present application, the following specific embodiments are described in detail for each step.
[0040] In order to better understand the present application, first briefly introduce the inventive concept of the present application, the present application proposes a medical system federated learning method based on watermark embedding, the method includes five steps, as shown in Figure 1 The five steps shown in the figure include: step S1, designing watermark according to the medical data type of the client to obtain watermark task dataset, the watermark task dataset includes a plurality of watermark samples, all watermark samples are configured with the same watermark label; step S2, obtaining the initial medical task model of each client, the main task medical dataset, the main task medical dataset contains a plurality of main task data samples configured with disease labels, combining the main task medical dataset with the watermark task dataset to obtain the training set of each client; step S3, first stage training, including making each client train its initial model according to its training set, a preset loss function and a preset initial proportion of main task and watermark task for a preset number of times and calculating its watermark depth; step S4, making each client reconfigure the proportion of its main task and watermark task based on its watermark depth and adjusting its preset loss function based on the configured proportion, wherein the deeper the watermark depth of the client, the higher the proportion of the watermark task; step S5, second stage training, multiple rounds of federated training based on the adjusted loss function of each client to obtain a medical task model for each client.
[0041] Each step will be described in detail below.
[0042] In the step S1, the watermark is designed according to the medical data type of the client to obtain the watermark task dataset, and the watermark task dataset includes a plurality of watermark samples, all watermark samples are configured with the same watermark label. Specifically, the watermark sample is designed based on the data set type in the client, the watermark sample can be a text, an image or other identifiable pattern, the data type of the watermark sample is determined based on the data set type used by the client model to ensure that the client model can recognize the watermark data set. In the medical system, some client's main task data samples are text data, such as blood pressure data, genomic data, drug data, etc., some client's main task data samples are medical image data, such as X-ray film, magnetic resonance imaging, ultrasound image, etc., therefore the watermark data set on each client needs to be the same as the data type of its main task data sample to ensure that each client can correctly recognize the watermark sample.
[0043] In the step S2, an initial medical task model of each client is obtained, and a main task medical data set containing a plurality of main task data samples configured with disease labels is obtained, and the main task medical data set is combined with a watermark task data set to obtain a training set of each client. According to an embodiment of the present application, when the initial medical task model of each client is obtained, the training environment of each client is also initialized, and the pre-training weight of each client is loaded. By pre-loading the pre-training weight of each client, the rate of model training is improved.
[0044] In the step S3, first-stage training is performed, including causing each client to train the initial model of the client according to the training set of the client, a preset loss function, and a preset initial proportion of the main task and the watermark task for a preset number of times, and calculating the watermark depth of the client. As shown in Figure 2 The first-stage training process of each client includes training the initial medical task model of each client for a preset number of times, and evaluating the watermark depth of each client based on the intermediate layer output of the trained medical task model. The watermark depth represents the adaptation degree of the client to the watermark task, and the deeper the watermark depth, the higher the adaptation degree of the client to the watermark task. It should be noted that the first-stage training is only performed for a small number of training rounds. In the medical system, the first-stage training is to train the initial medical task model of each medical institution based on the training set combined by the main task medical data set and the watermark data set for a preset number of times. Based on the medical task model of each client (medical institution) after the first-stage training, the intermediate layer output of the model to each disease label in the main task medical data set of the client can be obtained, which is used to calculate the watermark depth of the client. The intermediate layer output refers to the output of the last layer before the activation function is applied, which represents the original prediction score of the model to each class (label). In the medical system, the intermediate layer output of each client includes the prediction score of each disease label in the main task medical data set of the client, and the intermediate layer output of each client is represented as z = (z1, z2,..., zn), where n represents the total number of disease labels in the main task medical data set of the client. C C represents the total number of disease label types in the main task medical data set of each client.
[0045] It should be noted that there is a deviation in the amount of data owned by each client in the medical system, and the medical task model trained on the client with a large amount of and evenly distributed medical data contributes greatly to the global model and can play a key role in embedding watermark into the global model, and the medical task model trained on the client with a small amount of data or unevenly distributed data can improve the generalization ability of the global model, but the watermark embedded by these clients will be covered or distorted in the aggregation process, therefore, it is crucial to divide the proportion of the main task and the watermark task according to the adaptation degree of each client of the medical system to the watermark task. Therefore, the watermark depth of each client is calculated based on the prediction score of each disease label in the main task medical data set of the client by the medical task model on the client to evaluate the adaptation degree of each client to the watermark task, and the proportion of the main task and the watermark task of each client is configured according to the watermark depth of each client, wherein, according to an embodiment of the present application, the watermark depth of each client is obtained in the following manner:
[0046]
[0047] Wherein, WDS represents the watermark depth of the client, z1 represents the maximum prediction score in the intermediate layer output of the client model, z2 represents the second largest prediction score in the intermediate layer output of the client model, z1-z2 represents the confidence of the intermediate layer output of the client model, and H(z) represents the entropy of the intermediate layer output of the client model, wherein the entropy of the intermediate layer output of the client model is used to measure the degree of confusion of the prediction output of the medical task model on the client, and the entropy is an index for measuring uncertainty or information amount in information theory, and the lower the entropy of the intermediate layer output, the higher the confidence of the model in making predictions for a certain class, that is, the medical task model with low entropy of the intermediate layer output has more confidence in classifying the input medical data sample, and at the same time, the generalization ability of the model is also improved, wherein, according to an embodiment of the present application, the entropy of the intermediate layer output is calculated in the following manner:
[0048]
[0049]
[0050] Wherein, H(z) represents the entropy of the intermediate layer output of the client, C represents the total number of types of disease labels in the main task medical data set of the client, p a represents the probability of the a-th disease label in the training set of the client, z a , z b represent the prediction scores corresponding to the a-th disease label and the b-th disease label in the training set of the client, respectively.
[0051] According to one embodiment of the present application, in step S3, the preset loss function of each client is composed of two parts of main task loss and watermark task loss, and the preset loss function is as follows:
[0052]
[0053] wherein, represents the main task loss of the client, represents the watermark task loss of the client, represents the cross-entropy loss function, α represents the main task proportion, β represents the watermark task proportion, N represents the sample number of the main task medical data set of the client, M represents the watermark sample number of the watermark training set of the client, y (i)′ represents the predicted disease label of the i th main task medical sample in the main task medical data set of the client, y (i) represents the true disease label of the i th main task medical sample in the main task medical data set, y t (j)′ represents the predicted watermark label of the j th watermark sample in the watermark training set of the client, y t represents the true watermark label of the watermark sample.
[0054] In the step S4, each client reconfigures the proportion of the main task and the watermark task based on the watermark depth of itself and adjusts the preset loss function based on the configured proportion, wherein the deeper the watermark depth of the client, the higher the proportion of the watermark task. It should be noted that the larger the watermark depth of the client, the stronger the adaptation ability of the client to the watermark task, and the better the effect of the model watermark embedding. The smaller the watermark depth of the client, the weaker the adaptation ability of the client to the watermark task, and the weaker the effect of the model watermark embedding. In the medical system, large hospitals usually have a large amount of and evenly distributed data, and have relatively strong watermark accommodation capacity, so they can be allocated more watermark learning tasks. The data of specialist hospitals are significantly biased in labels and are concentrated in a specific department of patient groups. The data of township hospitals are small and unevenly distributed, and the addition of watermark tasks will have a greater impact on the performance of the main task. Therefore, the township hospitals can focus on the learning of the main task to enhance the generalization ability of the medical task model to the main task, so as to decouple the main task and the watermark task, ensure the accuracy of the main task, and ensure the accuracy of the watermark task. Compared with the existing method of measuring the watermark learning ability of each client by using the watermark accuracy of each client, the watermark depth measurement method of the present application is more scientific. Moreover, the existing method of measuring the adaptation degree of the watermark according to the watermark accuracy is insufficient and unreasonable, and cannot reflect the watermark adaptation degree of each client. According to an embodiment of the present application, in order to improve the performance of the watermark task while ensuring the accuracy of the main task, the proportion of the watermark task and the main task of each client is adjusted based on the watermark depth of each client, so that the clients with shallow watermark focus on the learning of the main task, and the clients with deep watermark focus on the deepening of the watermark task. The preset loss function is adjusted by the proportion of the main task loss and the watermark task loss to realize the adjustment of the proportion of the watermark task and the main task (the proportion of the task is reflected in the proportion coefficient of the loss function). According to an embodiment of the present application, the main task proportion of the loss function of each client is configured as 0.5, and the watermark task proportion of the loss function of each client is configured based on the watermark depth of the client as follows:
[0055]
[0056] wherein β k represents the watermark task proportion of the kth client, WDS k represents the watermark depth of the kth client, λ rp represents a preset reward and punishment coefficient, which is generally set as 20% of the total global injection, WDS max represents the maximum value of the watermark depth of all clients, WDS min represents the minimum value of the watermark depth of all clients.
[0057] In the step S5, a second stage training is performed, and multiple rounds of federated training are performed based on the adjusted loss function of each client to obtain a medical task model for each client. Figure 3 As shown in the figure, the process of the second stage training is shown, which includes training rounds, each training round includes: training the medical task model on each client to convergence, then sending the parameters of the medical task model on each client to the center server, and finally the center server aggregates the parameters to build a global model and distributes the global model to each client. Wherein, the FedAvg algorithm is used to aggregate the parameters or updates of the medical task model on each client, so that the watermark task in the deep watermark adaptation client affects other clients through global aggregation, and the shallow watermark client focuses on main task learning to improve the main task accuracy, so as to play the cooperation effect of each client. The FedAvg algorithm is a known technology to those skilled in the art, and will not be described in detail here.
[0058] It should be noted that, due to the differences in medical equipment and diagnostic methods of each medical institution of the medical system, and due to the differences in patient population and medical technology of each medical institution, the distribution of the main task medical data on each medical institution is also heterogeneous. Taking medical images as an example, large medical institutions have a perfect medical system, and they have a large number of medical images with uniform disease type distribution; the data of specialized hospitals is significantly biased, and the medical images are concentrated in a specific department; the patient cases in township hospitals are scarce, and the medical image data is small and unevenly distributed. In order to more clearly understand the scheme of the present application, the steps of a medical system federated learning method based on watermark embedding proposed by the present application will be described below taking the case of medical data type as medical images. First, watermark design is performed to obtain a watermark task data set. Since the medical data type is medical images, the obtained watermark task data set is a plurality of image watermark samples with the same watermark label, so as to ensure that the model of each client in the medical system can recognize the watermark sample; second, the initial medical image classification model of each client and the main task medical image data set are obtained, and the main task medical image data set and the watermark task data set are combined to obtain the training set of each client; third, first stage training is performed, including causing each client to train the initial medical image classification model of itself according to the training set thereof and a preset loss function with a main task proportion of 0.5 and a watermark task proportion of 0.5 for a preset number of times and calculating the watermark depth thereof. Since the medical images of the medical institutions in the medical system are distributed heterogeneously, the first stage training is performed for a smaller number of training rounds to obtain the adaptation degree of each medical institution (client) to the watermark task; fourth, after obtaining the watermark depth of each client, each client reconfigures the proportions of the main task and the watermark task based on the watermark depth thereof, and the proportion of the watermark task in the client with a deeper watermark depth is higher, and the preset loss function of each client is adjusted based on the configured proportions; fifth, second stage training is performed, and a plurality of rounds of federated training are performed based on the adjusted loss function of each client to obtain a medical image classification model for each client. In the second stage training, each client trains according to the proportions of the main task and the watermark task configured based on the watermark depth thereof, and the training tasks are allocated according to the characteristics of large medical institutions, specialized hospitals and township hospitals to fully utilize the resources of each medical institution, realize the decoupling of the medical image classification model training task (main task) and the watermark task of the medical system, and thus ensure the accuracy of the medical image classification model and the reliability of the embedded watermark.
[0059] It should be understood that the medical system federated learning method based on watermark embedding proposed by the present application is not only suitable for the medical system, but also suitable for other federated systems similar to the medical system in which the client data set is heterogeneous.
[0060] According to one embodiment of the present application, the present application also proposes a medical system comprising a plurality of medical units and a medical center, wherein each medical unit serves as a client in a federated learning framework, the medical center server serves as a center server in the federated learning framework, and the medical system is configured to perform federated learning by using the watermark embedding-based medical system federated learning method to enable each client to obtain a medical image classification model.
[0061] In the above medical system, each medical institution allocates the proportion of the main task and the watermark task based on its own watermark depth, fully utilizes the resources of each medical institution in the medical system during the training process, and realizes the decoupling of the main task and the watermark task, so as to realize the accuracy of the main task and the reliability of the embedded watermark.
[0062] It should be noted that although the above describes each step in a specific order, it does not mean that each step must be performed in the above specific order, in fact, some of these steps can be performed concurrently, or even in a changed order, as long as the required function can be realized.
[0063] The present application can be a system, a method, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present application.
[0064] The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or punched tape, a magneto-optical storage device, or any suitable combination of the foregoing. A non-transitory, computer-readable storage medium does not include a signal.
[0065] Embodiments of the application have been described above, the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles, practical applications or technical improvements in the art of the embodiments, or to enable other ordinary skilled persons in the art to understand the embodiments disclosed herein.
Claims
1. A federated learning method for a healthcare system based on watermark embedding, wherein the healthcare system comprises multiple healthcare units and a healthcare center, wherein, Each medical unit is a client, and the medical center is equipped with a central server. The method is characterized by comprising: Step S1: Design watermarks based on the client's medical data types to obtain a watermark task dataset. The watermark task dataset includes multiple watermark samples, all of which are configured with the same watermark label. Step S2: Obtain the initial medical task model and main task medical dataset for each client. The main task medical dataset contains multiple main task data samples configured with disease labels. Combine the main task medical dataset with the watermark task dataset to obtain the training set for each client. Step S3: Perform the first stage of training, which includes having each client train its initial model a preset number of times based on its own training set, a preset loss function, and the preset initial weights of the main task and the watermarking task, and calculating the watermark depth for each client through the following steps: Step S31: Determine the entropy of the intermediate layer output for each client model as follows: in, This represents the entropy output by the client's intermediate layer. This represents the total number of disease label types in the client's main task medical dataset. This indicates the first [item] in the client's training set. The probability corresponding to each disease label , The numbers in the training set of the client are respectively represented as the first... Disease label and the first The predicted score corresponding to each disease label; Step S32: Based on the entropy of the intermediate layer output of each client model determined in step S31, calculate the watermark depth for each client as follows: Where WDS represents the client-side watermark depth, This represents the maximum predicted score in the intermediate layer output of the client model. This represents the second-largest prediction score in the intermediate layer output of the client-side model. This represents the entropy of the intermediate layer output of the client-side model; Step S4: Reconfigure the weight of the main task and watermarking task for each client based on its own watermarking depth and adjust its preset loss function based on the configured weight. The deeper the watermarking depth, the higher the proportion of the watermarking task in the client. Step S5: Perform the second stage of training by conducting multiple rounds of federated training based on the adjusted loss function for each client so that each client obtains a medical task model.
2. The method according to claim 1, characterized in that, The preset loss function for each client is: in, This indicates the loss of the client's main task. This indicates the loss of watermarking tasks on the client side. Represents the cross-entropy loss function. Indicates the proportion of the main task. This indicates the proportion of watermarking tasks. This indicates the number of samples in the client's main task medical dataset. This indicates the number of watermark samples in the client's watermark training set. This indicates that the client has access to the first data set in its main task medical dataset. Predicting disease labels for a primary medical sample; This represents the first [item] in the main task medical dataset. The true disease labels of the primary medical samples. This indicates that the client is using the first watermark training set... Predicted watermark labels for a sample watermark. This indicates the actual watermark label of the watermark sample.
3. The method according to claim 2, characterized in that, The initial weight of the main task is set to 0.5, and the initial weight of the watermarking task is set to 0.
5.
4. The method according to claim 1, characterized in that, Adjust the preset loss function in each client as follows: Configure the weight of the main task in the client's preset loss function to 0.5; The watermarking depth of this client is configured by adjusting the watermarking task weight in the client's preset loss function as follows: in, This indicates the current proportion of watermarking tasks on the client side. Indicates the current watermark depth on the client. This indicates the preset reward and punishment coefficient. This represents the maximum watermark depth across all clients. This represents the minimum watermark depth among all clients.
5. The method according to claim 1, characterized in that, In step S5, the FedAvg algorithm is used for multiple rounds of federated learning.
6. A medical system comprising multiple medical units and a medical center, characterized in that, The medical system is configured to perform federated learning using the method described in any one of claims 1 to 5 to obtain a medical task model.
7. A computer-readable storage medium, characterized in that, It contains a computer program that can be executed by a processor to implement the steps of the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that, include: One or more processors; as well as Memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method according to any one of claims 1 to 5 by executing the executable instructions.
Citation Information
Patent Citations
Convolutional neural network chest radiograph disease classification algorithm added with attention mechanism
CN116993645A
Method of verification for machine learning models
US20240388444A1