Cross-participant image reconstruction method and system under federated learning background, and medium
By optimizing the hidden variables of the conditional denoising diffusion implicit model in federated learning, the problem of low image reconstruction quality in the prior art is solved, higher quality image reconstruction is achieved, and training cost and difficulty are reduced.
Patent Information
- Application Number
- CN202510084985.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-01-20
AI Technical Summary
Under the defense mechanism used for privacy protection in federated learning, it is difficult to effectively reconstruct images, and the generation of adversarial network training is high, the training process is difficult, and the quality of reconstructed images is not high.
Through gradient matching loss and regularization loss, the first n hidden variables of the conditional denoising diffusion implicit model are optimized to reconstruct the target image and improve the loyalty of the reconstructed image.
Compared with the generative adversarial network, the conditional denoising diffusion implicit model performs better in generalization ability and detail retention of reconstructed images, the reconstructed images are more faithful to the target image, and the training cost and difficulty are lower.
Smart Images

Figure CN120014087A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, system and medium for reconstructing images across participants in a federated learning context. Background Art
[0002] Federated learning is a distributed learning method that aims to protect client privacy. It allows multiple clients to collaboratively train a global neural network without sharing their private data, and only needs to submit locally updated network gradients to the server. DLG (Deep Gradient Leakage) has questioned the privacy protection of federated learning, and optimized random noise through gradient matching loss, ultimately reconstructing the client's image.
[0003] In order to further protect the privacy of users, some defense mechanisms have been proposed to prevent privacy leakage by gradient information degradation methods, such as using additive noise (differential privacy) or gradient compression before sharing with the server. Many experiments have shown that DLG cannot reconstruct meaningful images in the context of applying these defense mechanisms. However, the privacy protection of federated learning under these defense mechanisms is not absolutely safe. In the prior art, a method is proposed to use the latent space of the generative adversarial network learned from the public image dataset as a prior to compensate for the information loss in the gradient degradation process to achieve image reconstruction. However, the generative adversarial network not only has high training costs, but also has a very difficult training process, and often faces problems such as model collapse and non-convergence. Moreover, the distribution of pictures generated by the generative adversarial network is limited by the distribution of the latent space, and sometimes the image cannot be faithfully reconstructed, and there are problems such as image direction change and detail loss. Based on this, the present invention proposes a cross-participant image reconstruction scheme in the context of federated learning, which improves the fidelity of the reconstructed image to the target image, and can be used to evaluate the privacy protection performance of federated learning under the defense mechanism, so as to guide the improvement of the federated learning defense mechanism. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a method, system and medium for cross-party image reconstruction in the context of federated learning. Through gradient matching loss and regularization loss, the first n latent variables are optimized in sequence, so that these latent variables reconstruct the target image through a denoising diffusion implicit model, thereby improving the fidelity of the reconstructed image to the target image.
[0005] In a first aspect, a method for cross-party image reconstruction in a federated learning context is provided, comprising the following steps:
[0006] S1: Sample a tensor of the same shape as the input of the federated learning model from a standard normal distribution as the initial latent variable;
[0007] S2: Obtain the target gradient uploaded by the client and infer the label of the target image based on the target gradient;
[0008] S3: Use the conditional denoising diffusion implicit model to generate matching images with latent variables and inferred labels as input;
[0009] S4: Put the matching image and the inferred label into the federated learning model together, and after a round of forward propagation and back propagation, obtain the matching gradient of the federated learning model;
[0010] S5: Calculate the loss function, which includes the loss of the matching gradient relative to the target gradient and the regularization loss of generating the matching image;
[0011] S6: Optimize latent variables according to the loss function;
[0012] S7: Repeat steps S3 to S6 until the loss function converges to the minimum value or reaches the predetermined number of rounds, and obtain the hidden variable z at time step t t ;
[0013] S8: The object to be optimized is the hidden variable z at time step t t Update the hidden variable z at time step t-1 t-1 , z t-1 The initial value of z is t It is obtained by one-step sampling of the conditional denoising diffusion implicit model;
[0014] S9: Then repeat steps S3 to S8 until the optimization of the hidden variables of the first n time steps is completed;
[0015] S10: Based on the latent variables and inferred labels of the previous n time steps, the conditional denoising diffusion implicit model is used to obtain the reconstructed image z0.
[0016] Furthermore, the label of the target image is inferred based on the target gradient, which specifically includes:
[0017] Analyze the gradient of each weight of the last fully connected classification layer of the target gradient. If the gradient of the i-th weight of the fully connected classification layer is negative, the label c=i of the target image.
[0018] Furthermore, the sampling process of the conditional denoising diffusion implicit model is expressed as follows:
[0019]
[0020] In the formula, x t and x t-1 Represent the images at time step t and time step t-1, ∈ θ is a neural network model. Represents the neural network model ∈ θWith label c, time step t and image x at that time step t The output is the same as the image x when the input is t Noise of the same shape; α t and σ t are a set of constants related to t, ∈ t represents random noise.
[0021] Furthermore, the loss function L(z) is expressed as follows:
[0022]
[0023] In the formula, Represents the matching gradient g and the target gradient , that is, the loss of the matching gradient relative to the target gradient; R(z) represents the total variation of the generated matching image, that is, the regularization loss of the generated matching image; α represents the regularization loss weight for generating the matching image.
[0024] Furthermore, the matching gradient g is expressed as follows:
[0025]
[0026] In the formula, G represents the conditional denoising diffusion implicit model, z represents the latent variable to be optimized, and c represents the inferred label. Represents the gradient of the federated learning model;
[0027] The total variation R(z) of generating the matching image is expressed as follows:
[0028] R(z)=TV(G(z))
[0029] Where TV(G(z)) represents the total variation of G(z), which is the sum of the absolute values of the differences between adjacent pixel values of G(z) in both the width and height directions.
[0030] Furthermore, the AdamW optimizer is used when optimizing latent variables according to the loss function.
[0031] Furthermore, it also includes:
[0032] The similarity value between the reconstructed image and the target image is calculated, and the privacy protection performance of federated learning is evaluated based on the similarity value.
[0033] Furthermore, a similarity value between the reconstructed image and the target image is calculated by one of mean square error, peak signal-to-noise ratio and LPIPS.
[0034] Secondly, a cross-party image reconstruction system in the context of federated learning is provided, including:
[0035] Memory on which computer programs or instructions are stored;
[0036] A processor is used to load and execute the computer program or instructions to implement the cross-participant image reconstruction method in the context of federated learning as described above.
[0037] In a third aspect, a computer-readable storage medium is provided, on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the cross-party image reconstruction method in the context of federated learning as described above is implemented.
[0038] The present invention proposes a method, system and medium for cross-participant image reconstruction in the context of federated learning, which has the following beneficial effects:
[0039] (1) Compared with the generative adversarial network in the prior art, the generalization ability and detail preservation of the image reconstructed by the conditional denoising diffusion implicit model are better than those of the generative adversarial network, and the reconstructed image is more faithful to the target image;
[0040] (2) The present invention regards the first n latent variables of the conditional denoising diffusion implicit model as the latent space of the conditional denoising diffusion implicit model, and optimizes these latent variables in turn through gradient matching loss and regularization loss. Compared with the existing optimization process, the optimization efficiency is improved, and a higher quality image can be reconstructed under the same number of optimization rounds;
[0041] (3) Under the same data set conditions, the training cost and difficulty of the conditional denoising diffusion implicit model are much lower than those of the generative adversarial network;
[0042] (4) Based on the image reconstruction method proposed in this invention, a new perspective is provided to evaluate the privacy and security issues of federated learning, thereby promoting the development of federated learning defense mechanisms. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 is a flow chart of a method for reconstructing an image across participants in a federated learning context provided by an embodiment of the present invention;
[0045] Figure 2 It is a framework diagram of a method for cross-participant image reconstruction in a federated learning context provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0047] The background of the present invention is a federated learning network for processing image multi-classification tasks. The server is honest and curious, and can directly obtain the gradient updates submitted by the client, trying and only trying to reconstruct the image used by the client to train the model. The gradient updates submitted by the client are generated by a single image after a round of training, and differential privacy is applied to the gradient. The technical solution of the present invention is specifically described below in conjunction with specific embodiments.
[0048] like Figure 1 , Figure 2 As shown, an embodiment of the present invention provides a method for reconstructing an image across participants in a federated learning context, comprising the following steps:
[0049] S1: Sample a tensor of the same shape as the input of the federated learning model from a standard normal distribution as the initial latent variable; therefore, the mean of the initial latent variable is 0 and the standard deviation is 1.
[0050] S2: Get the target gradient uploaded by the client, and infer the label of the target image based on the target gradient. The specific inference process is: analyze the gradient of each weight of the last fully connected classification layer of the target gradient. If the gradient of the i-th weight of the fully connected classification layer is negative, the label c=i of the target image.
[0051] In image classification tasks, images and their labels are used as input for model training. In the DLG method, labels are randomly generated and optimized together with random noise. Studies have shown that random labels make it difficult for optimization problems to converge, so a method of inferring training image labels from gradients is proposed.
[0052] Specifically, for a federated learning (FL) model that performs classification tasks on m classes, the gradient of the i-th (i=1,2,…,m) weight of the final fully connected (FC) classification layer (denoted as ) is defined by the following formula:
[0053]
[0054] Among them, z i is the i-th output of the FC layer, f θ is the FL model, c is the label of the data, and L is the FL model loss function. It is worth noting that the second term on the right side of the equation The result is the activated output of the previous layer. If the previous layer uses an activation function such as ReLU or sigmoid, the output is always non-negative. For a neural network using a cross entropy loss function and training images with one-hot labels, assuming that softmax is applied in the last layer, the first term on the right side of the equation is negative if and only if i = c. Therefore, it can be identified by The positive and negative of is used to construct the label of the target image.
[0055] S3: Use the conditional denoising diffusion implicit model to generate matching images with latent variables and inferred labels as input.
[0056] The conditional denoising diffusion implicit model is an image generation model proposed on the basis of the denoising diffusion implicit model, and the denoising diffusion implicit model is an image generation model proposed on the basis of the denoising diffusion probability model. In order to facilitate understanding of the technical solution of the present invention, the denoising diffusion probability model is first introduced.
[0057] The denoising diffusion probability model starts with the standard normal distribution of noise and generates an image through several steps of "denoising" process. This process from noise to image is also called sampling. The following is a description of its algorithm:
[0058]
[0059] The algorithm starts from pure noise x t Start by gradually subtracting ∈ θ (x t ,t), the final x0 is the generated image. θ is a neural network model, with time step t and x at that time step t is the input, and the output is x t The noise of the same shape, this noise means from x t-1 to x t The noise that should be added, ε represents random noise.
[0060] The process of training the denoising diffusion probability model is actually training ∈ θ The algorithm is described as follows:
[0061]
[0062] The algorithm continuously adds noise to the original image x0 until it becomes pure noise x T . And each time noise is added, use ∈ θ (x t ,t) predict the noise and use gradient descent to optimize the parameter θ to minimize the error between the predicted noise and the true noise.
[0063] Therefore, when sampling, ∈θ (x t ,t) can accurately predict the t-1 to x t The noise that should be added is thus x t Calculate x t-1 Among them, α t , and σ t are a set of constants related to t; ∈ represents the noise added at the current time step t.
[0064] The denoising diffusion implicit model is an improved version of the denoising diffusion probability model. The main improvements are twofold: first, it can control the uncertainty of the generated image, and second, it can skip steps during sampling to speed up the sampling process. The sampling process of the denoising diffusion implicit model is as follows:
[0065]
[0066] In the formula, ∈ t represents random noise; Represents the neural network model ∈ θ At time step t and the image x at that time step t The output is the same as the image x when the input is t The noise of the same shape. Different from the denoising diffusion probability model, the denoising diffusion implicit model controls the uncertainty of the generated image through the last term of the above formula. When σ t When x is 0, for a certain random noise (hidden variable), a unique image will be generated. This certainty is exactly what the present invention needs. The present invention hopes that the hidden variable obtained by optimization can generate the target image with certainty. In addition, x in the above formula t-1 Can be adjusted to x t-n , that is, skipping some sampling steps. Experiments show that skipping can speed up the sampling process by 10 to 50 times without losing image quality.
[0067] By embedding conditional information in the network structure of the denoising diffusion implicit model, the unconditional denoising diffusion implicit model can be transformed into a conditional denoising diffusion implicit model. When training the conditional denoising diffusion implicit model, on the basis of AlgorithmTraining, a conditional label c is provided, and becomes When sampling, input the condition c together with ∈ θ , the sampling process of the conditional denoising diffusion implicit model is expressed as follows:
[0068]
[0069] In the formula, x t and x t-1Represent the images at time step t and time step t-1, ∈ θ is a neural network model. Represents the neural network model ∈ θ In the image x with label c, time step t and the image x at that time step t The output is the same as the image x when the input is t Noise of the same shape. In this way, the conditional denoising diffusion implicit model can generate images of the specified label category.
[0070] S4: Put the matching image and the inferred label into the federated learning model, and after a round of forward propagation and back propagation, obtain the matching gradient g of the federated learning model. Specifically, the matching gradient g is expressed as follows:
[0071]
[0072] In the formula, G represents the conditional denoising diffusion implicit model, z represents the latent variable to be optimized, and c represents the inferred label. Represents the gradient of the federated learning model.
[0073] S5: Calculate the loss function, which includes the loss of the matching gradient relative to the target gradient and the regularization loss of generating the matching image.
[0074] Specifically, the loss function L(z) is expressed as follows:
[0075]
[0076] In the formula, Represents the matching gradient g and the target gradient The L2 norm between them, that is, the loss of the matching gradient relative to the target gradient, aims to make the two gradients gradually close, which means that the generated image gradually approaches the target image; R(z) represents the total variation of the generated matching image, that is, the regularization loss of the generated matching image, which measures the authenticity of the generated image, making the generated image natural and real; α represents the regularization loss weight of the generated matching image.
[0077] Among them, the total variation R(z) of generating the matching image is expressed as follows:
[0078] R(z)=TV(G(z))
[0079] Where TV(G(z)) represents the total variation of G(z), which is the sum of the absolute values of the differences between adjacent pixel values of G(z) in both the width and height directions.
[0080] S6: Optimize the hidden variables according to the loss function so that the value of the loss function approaches the minimum value.
[0081] This process can be modeled as an optimization problem:
[0082]
[0083] That is, search for the latent variable z that minimizes L(z) in the latent space. * .
[0084] In this embodiment, the AdamW optimizer is used when optimizing latent variables according to the loss function.
[0085] The Adam series optimizers have the following features:
[0086] (1) Adaptive learning rate: The Adam optimizer uses the first and second moment estimates of the gradient to adjust the learning rate of each weight individually. This adaptive learning rate method can lead to more efficient updates and faster convergence.
[0087] (2) Efficient Gradient Descent: Unlike SGD, which requires updates of the same size to all parameters, Adam achieves efficient gradient descent by making smaller updates to frequently updated parameters and larger updates to infrequently updated parameters.
[0088] (3) Less dependence on initial learning rate: The Adam optimizer is less sensitive to the initial learning rate, thus reducing the time spent on hyperparameter tuning.
[0089] (4) Corrected weight decay: The main difference between Adam and AdamW is how they handle weight decay (a form of regularization). In Adam, weight decay is applied before calculating the gradient, which can lead to suboptimal results. AdamW applies weight decay after calculating the gradient, which is a more correct implementation and further improves performance over Adam.
[0090] (5) Improved generalization: By properly applying weight decay, AdamW tends to generalize better than Adam, especially on larger models or datasets. Better convergence: Empirical results show that AdamW converges faster than Adam and can obtain better solutions.
[0091] S7: Repeat steps S3 to S6 until the loss function converges to the minimum value or reaches the predetermined number of rounds, and obtain the hidden variable z at time step t t .
[0092] S8: The object to be optimized is the hidden variable z at time step t t Update the hidden variable z at time step t-1 t-1 , z t-1 The initial value of z is the optimized t It is obtained by sampling the conditional denoising diffusion implicit model.
[0093] S9: Then repeat steps S3 to S8 until the hidden variable z of the first n time steps t is completed T ,z T-1 ,…,z T-n Optimization.
[0094] S10: Based on the latent variables and inferred labels of the previous n time steps t, the conditional denoising diffusion implicit model is used to obtain the reconstructed image z0.
[0095] This method does not optimize only the initial latent variables like the existing methods. If only the initial latent variables are optimized, the impact on the generated image will gradually weaken as the optimization process proceeds, thereby affecting the quality of the final reconstructed image and also resulting in low optimization efficiency. Therefore, this method sequentially optimizes the first n latent variables of the conditional denoising diffusion implicit model to maintain the impact of the change of the latent variables on the generated image.
[0096] The above embodiment provides a method for reconstructing an image across participants in a federated learning context, which has the following advantages:
[0097] (1) Compared with the generative adversarial network in the prior art, the generalization ability and detail preservation of the image reconstructed by the conditional denoising diffusion implicit model are better than those of the generative adversarial network, and the reconstructed image is more faithful to the target image;
[0098] (2) The present invention regards the first n latent variables of the conditional denoising diffusion implicit model as the latent space of the conditional denoising diffusion implicit model, and optimizes these latent variables in turn through gradient matching loss and regularization loss. Compared with the existing optimization process, the optimization efficiency is improved, and a higher quality image can be reconstructed under the same number of optimization rounds;
[0099] (3) Under the same data set conditions, the training cost and difficulty of the conditional denoising diffusion implicit model are much lower than those of the generative adversarial network;
[0100] (4) The present invention uses the gradient-based AdamW optimizer to make the optimization problem easier to solve.
[0101] In some embodiments, the method further comprises:
[0102] S11: Calculate the similarity value between the reconstructed image and the target image, and evaluate the privacy protection performance of federated learning according to the similarity value. In specific implementation, the similarity value range can be discretized into multiple intervals, each interval corresponds to a privacy protection performance level of the evaluated federated learning, so that the privacy protection performance level of the federated learning can be obtained according to the calculated similarity value.
[0103] In a specific implementation, the similarity value between the reconstructed image and the target image is calculated by one of mean square error (MSE), peak signal-to-noise ratio (PSNR) and LPIPS (Learned Perceptual Image Patch Similarity).
[0104] When using mean square error to calculate similarity, the pixel-level mean square error between the reconstructed image and the target image is calculated. The closer the similarity value is to 0, the more similar the two images are. That is, the closer the similarity value is to 0, the worse the privacy protection performance of federated learning.
[0105] When the peak signal-to-noise ratio is used to calculate similarity, the ratio of the square of the maximum possible value of the image pixel to the mean square error between the reconstructed image and the target image is calculated. The higher the similarity value, the more similar the two images are. That is, the higher the similarity value, the worse the privacy protection performance of federated learning.
[0106] When LPIPS is used to calculate similarity, the VGG model is used to extract high-level features of the image and evaluate the perceptual difference between the reconstructed image and the target image. The closer the similarity value is to 0, the more similar the two images are. That is, the closer the similarity value is to 0, the worse the privacy protection performance of federated learning.
[0107] Based on this embodiment, an image reconstruction method is proposed, which provides a new perspective to evaluate the privacy and security issues of federated learning, thereby promoting the development of federated learning defense mechanisms.
[0108] The embodiment of the present invention further provides a cross-participant image reconstruction system in a federated learning context, including:
[0109] Memory on which computer programs or instructions are stored;
[0110] A processor is used to load and execute the computer program or instructions to implement the cross-participant image reconstruction method in the context of federated learning as described above.
[0111] An embodiment of the present invention also provides a computer-readable storage medium having a computer program or instruction stored thereon. When the computer program or instruction is executed by a processor, the cross-participant image reconstruction method in the context of federated learning as described above is implemented.
[0112] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0117] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A cross-participant image reconstruction method in the context of federated learning, characterized in that: The steps include: S1: Sample a tensor of the same shape as the input of the federated learning model from a standard normal distribution as the initial latent variable; S2: Obtain the target gradient uploaded by the client and infer the label of the target image based on the target gradient; S3: Use the conditional denoising diffusion implicit model to generate matching images with latent variables and inferred labels as input; S4: Put the matching image and the inferred label into the federated learning model together, and after a round of forward propagation and back propagation, obtain the matching gradient of the federated learning model; S5: Calculate the loss function, which includes the loss of the matching gradient relative to the target gradient and the regularization loss of generating the matching image; S6: Optimize latent variables according to the loss function; S7: Repeat steps S3 to S6 until the loss function converges to the minimum value or reaches the predetermined number of rounds, and obtain the hidden variable z at time step t t ; S8: The object to be optimized is the hidden variable z at time step t t Update the hidden variable z at time step t-1 t-1 , z t-1 The initial value of z is t It is obtained by one-step sampling of the conditional denoising diffusion implicit model; S9: Then repeat steps S3 to S8 until the optimization of the hidden variables of the first n time steps is completed; S10: Based on the latent variables and inferred labels of the previous n time steps, the reconstructed image is obtained using the conditional denoising diffusion implicit model.
2. The method for cross-participant image reconstruction in the context of federated learning according to claim 1, characterized in that: The label of the target image is inferred based on the target gradient, specifically comprising: Analyze the gradient of each weight of the last fully connected classification layer of the target gradient. If the gradient of the i-th weight of the fully connected classification layer is negative, the label c=i of the target image.
3. The method for cross-participant image reconstruction in the context of federated learning according to claim 1, characterized in that: The sampling process of the conditional denoising diffusion implicit model is expressed as follows: In the formula, x t and x t-1 Represent the images at time step t and time step t-1, ∈ θ is a neural network model. Represents the neural network model ∈ θ In the image x with label c, time step t and the image x at that time step t The output is the same as the image x when the input is t Noise of the same shape; α t and σ t are a set of constants related to t, ∈ t represents random noise.
4. The method for cross-participant image reconstruction in the context of federated learning according to claim 1, characterized in that: The loss function L(z) is expressed as follows: In the formula, Represents the matching gradient g and the target gradient , that is, the loss of the matching gradient relative to the target gradient; R(z) represents the total variation of the generated matching image, that is, the regularization loss of the generated matching image; α represents the regularization loss weight for generating the matching image.
5. The method for cross-participant image reconstruction in the context of federated learning according to claim 4, characterized in that: The matching gradient g is expressed as follows: In the formula, G represents the conditional denoising diffusion implicit model, z represents the latent variable to be optimized, and c represents the inferred label. Represents the gradient of the federated learning model; The total variation R(z) of generating the matching image is expressed as follows: R(z)=TV(G(z)) Where TV(G(z)) represents the total variation of G(z), which is the sum of the absolute values of the differences between adjacent pixel values of G(z) in both the width and height directions.
6. The method for cross-participant image reconstruction in the context of federated learning according to claim 1, characterized in that: The AdamW optimizer is used when optimizing latent variables according to the loss function.
7. The method for cross-participant image reconstruction in the context of federated learning according to claim 1, characterized in that: Also includes: The similarity value between the reconstructed image and the target image is calculated, and the privacy protection performance of federated learning is evaluated based on the similarity value.
8. The method for cross-participant image reconstruction in the context of federated learning according to claim 7, characterized in that: The similarity value between the reconstructed image and the target image is calculated by one of mean square error, peak signal-to-noise ratio and LPIPS.
9. A cross-party image reconstruction system in the context of federated learning, characterized in that: include: Memory on which computer programs or instructions are stored; A processor, configured to load and execute the computer program or instructions to implement the cross-participant image reconstruction method in the context of federated learning as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the cross-participant image reconstruction method in the federated learning context as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
License plate image generation method and system based on adaptive diffusion prior variational auto-encoder
CN115223158A
Knowledge graph completion method and system based on generation diffusion
CN117540797A
Image privacy protection method based on denoising diffusion implicit model
CN118381926A
Low-dose CT image reconstruction method, system and device based on adversarial diffusion mechanism and medium
CN118887125A