Research on Text Classification Technology Integrating Contrastive Learning and Adversarial Training
Xuyang Wang, Jiyuan Zhang, Lijie Zhao, Xinran Wang · 2023
Text classification is an important task in natural language processing. Although the current text classification model can achieve good classification accuracy, it still has the shortcomings of poor data expansion consistency and inability to learn noise-invariant representations. The text classification model cannot effectively resist disturbance, the generalization ability is limited, and the prediction distribution of similar samples is inconsistent, and the performance of the text classification model is seriously affected. Aiming at the above problems, a text classification based on contrastive adversarial training (TCCA) model is proposed. Combining contrastive learning and adversarial training to construct a new loss function optimization model enables the model to learn the noise-invariant representation while classifying correctly, and then uses the prior distribution to adjust the model prediction results to improve the accuracy of the classification task. The TCCA model is experimented on THUCNews, iFLYTEK, TNEWS datasets. Compared with other text classification models, the TCCA model can effectively improve the accuracy of text classification tasks.