The invention discloses an adversarial sample generation method based on
content awareness GAN, which changes a training process on the basis of WGAN_GP, directly generates an adversarial sample witha target by inputting
random noise, adds a content
feature extraction part, restrains the quality of the generated sample under the condition of not influencing an
attack effect, and improves the accuracy of adversarial sample generation. Content characteristics of adversarial samples can be kept unchanged as much as possible. The
system comprises a generator G, a
discriminator D, a target model f, a disturbance evaluation part and a
feature extraction network, wherein the generator is responsible for generating a sample from
random noise, the generator is trained according to a loss functionof the
discriminator D, the target model f, the disturbance evaluation part and the
feature extraction network, and the generator directly generates an unlimited adversarial sample from the
noise. Onthe basis of the
generative adversarial network, the
semantic information of the concerned sample and a mode of directly generating the adversarial sample instead of a superimposed disturbance mode, direct generation of the adversarial sample of the specified target is realized by using unsupervised GAN training, the sample generation speed is increased, and the quality of the generated sample isimproved; the change of the adversarial sample in the content feature region is reduced while the high
attack success rate is maintained.