The invention belongs to the technical field of
federated learning, and discloses a method and
system for carrying out gradient inversion
attack on privacy image data of a user in a
federated learning system, and the method comprises the steps: firstly, pre-training a
diffusion model and a coder-decoder based on a small amount of prior data similar to the user data through a honest and curious federated
server; through gradient information uploaded by a user, a
server calculates to obtain a user image tag and a high-dimensional feature. The
server constructs a
diffusion sampling schedule and a decreasing iteration schedule. And in the progressive decrease round, the
generation process of
diffusion model sampling is disassembled, gradient matching optimization is carried out on an intermediate result generated by sampling of each
time step, and a feature search space is limited through high-dimensional feature regularization until all time steps are completed. According to the method, the gradient inversion
attack capability on the user image in the
federated learning scene is effectively improved, the similarity and visual quality of the reconstructed image are improved, and more
user privacy features are revealed.