Font Size: a A A

The Research And Implementation Of Text Classification Based On Adversarial Training

Posted on:2022-11-25Degree:MasterType:Thesis
Country:ChinaCandidate:J Y CaiFull Text:PDF
GTID:2558306488492444Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of Internet technology,the era of the information explosion has come.While acquiring abundant information,people are also facing a huge information disaster.Therefore,people have higher requirements for the accuracy of text classifiers to extract information.How to design a higher-accuracy text classification model has become an urgent problem to be solved.However,the traditional classification algorithm is difficult to improve the accuracy of the text classification algorithm again due to the limitation of its own framework.Therefore,the Transformer classification model was proposed,which uses a unique self-attention calculation method to break the constraints brought by the traditional model framework.At the same time,adversarial training is also widely used as a tool to improve the accuracy of the model,and has demonstrated a powerful ability to improve the accuracy of the model.In order to improve the accuracy of the classification model,it is of great practical significance to combine the Transformer classification model with adversarial training.Therefore,we built a text classification algorithm model based on adversarial training.The model first adds a named entity recognition module in the text data processing stage to eliminate useless words such as empty words,and then converts the input vocabulary into word vectors through the constructed two-channel vocabulary representation model.After that,the FGM fast gradient attack method is used to add a perturbation attack on the gradient of the word vector to generate a confrontation sample,and add position information to the confrontation sample through position encoding.Finally,input the adversarial samples into the Transformer text classification model to calculate the similarity,and then input the calculation results into the softmax network to complete the classification.The main work is as follows: 1.State the research background and significance of text classification algorithms,analyze the shortcomings of current text classification algorithms,and introduce the current research status of text classification algorithms.Finally,introduce text classification algorithms based on adversarial training.2.Introduced in detail the relevant knowledge of the confrontation generative network GAN,attention mechanism,named entity recognition,and loss function.3.And on this basis,we built a Transformer text classification model based on adversarial training.4.After the model design is completed,we conducted an experimental evaluation,which proved that the text classification model based on adversarial training proposed in this article can indeed improve the accuracy of text classification.5.Completed the design and development of a text classifier system based on adversarial training through the designed text classification model.
Keywords/Search Tags:natural language processing, adversarial training, named entity recognition, text classification, accuracy
PDF Full Text Request
Related items