The invention relates to an
image diffusion reconstruction-based universal anti-
attack defense method, which comprises the following steps of: firstly, uniformly carrying out linear transformation on all images (including clean images or poisoned images),
processing image information by using an up-sampling matrix to obtain transformed images, and carrying out
image fusion on the transformed images; a trigger or disturbance hidden in the transformed image will be invalidated. And then, carrying out
noise addition
processing on the transformed image, adding
Gaussian noise of different degrees into the image by adopting T-step
noise addition in the
processing process, and converting the image into a
Gaussian noise-like image after the T-step noise addition. Then, a
diffusion model reverse
generation process is combined with a range
space decomposition theory, noise in the image is removed step by step by using a newly-defined
diffusion reconstruction reverse process, it is guaranteed that generation formula image information is consistent with original image information in the removal process, and through the T-step denoising and image reconstruction process, the noise in the image is removed; original image information in the image is restored, triggers or disturbances carried in the poisoned image are removed, and the image is purified in this way so as to defend against
attack. According to the method, damage to the
deep learning model caused by most of adversarial
attack methods can be avoided, meanwhile, original image information is reserved to a certain extent, and the defense success rate of most of adversarial attacks reaches 96% or above.