| In recent years,deep neural network technology has been gradually applied to various fields and achieved good results.In the field of natural language processing,text classification technology has made rapid progress with the help of deep learning theory,and various natural language processing classification models or systems have shown good results in classification experiments.However,due to the vulnerability of deep neural networks,the system based on deep neural networks is vulnerable to adversarial examples,which leads to changes in its prediction results.Adversarial examples are generated from adversarial attacks by adding an undetectable perturbation to the original sample to make a mistake in the judgement of the deep neural network.In the field of image and audio,much progress has been made in the study of adversarial examples.However,due to the discrete nature between texts and semantic restrictions,textual adversarial attacks become more challenging.In the existing textual adversarial attack methods,according to the visibility of model parameters,they can be divided into white-box and black-box methods.However,whitebox attack methods have high requirements for understanding the internal of the model and have great limitations.According to the attack granularity,it can be divided into four ways: character-level,word-level,sentence-level and multi-level methods.Among them,word-level attacks can better ensure the syntax and semantics of the generated adversarial examples.Therefore,this thesis proposes a black-box word-level approach to implement adversarial attacks,which is divided into two steps:(1)In order to exclude invalid or low-quality potential adversarial examples,considering the search space reduction in the first step,a weighted substitutable word generation method based on How Net and Word Net is proposed.It generates substitutable word sets using How Net,a sememe-based corpus,and Word Net,a synonym-based corpus.By introducing word saliency and calculating the frequency of substitutable words in How Net and Word Net,the set of substitutable words is filtered.(2)In order to further improve the efficiency of textual adversarial attack,considering discrete optimization in the second step,a search method based on discrete Harris Hawk optimization is proposed.The Harris Hawk Optimization is introduced into textual adversarial attacks to achieve higher attack efficiency.Three core operations inspired by logical operations are applied to each stage of the Harris Hawk optimization algorithm to perform discrete space search,so as to generate text adversarial examples.In this thesis,the proposed method is implemented and a lot of experiments are carried out.We attack Bi LSTM and BERT on two benchmark datasets to evaluate our adversarial example generation method.In this thesis,numerous experiments show that the proposed method has advantages in success rate and time cost.In addition,the adversarial examples generated by the proposed method are improved in validity,transferability and various quality metrics. |