Engineering Science and Technology, an International Journal (Oct 2024)
A hybrid approach for adversarial attack detection based on sentiment analysis model using Machine learning
Abstract
One of the main subfields of Machine Learning (ML) that deals with human language for intelligent applications is Natural Language Processing (NLP). One of the biggest problems NLP models encounter is adversarial assaults, which lead to inaccurate predictions. To increase an NLP model’s resilience, adversarial text must be used to examine assaults and defenses. several strategies for detecting adversarial attacks have been put forth; nonetheless, they face several obstacles, such as low attack success rates on particular datasets. Some other attack methods can already be effectively defended against by existing defensive strategies. As a result, such attackers are unable to delve further into the limitations of NLP models to guide future advancements in defense. Consequently, it is required to develop an adversarial attack strategy with a larger attack duration and better performance. Firstly, we train the Convolutional Neural Network (CNN) using the IMDB dataset, which consists of labeled movie reviews that represent positive and negative sentiments on movie reviews. The CNN model performs the sentiment classification of data. Subsequently, adversarial examples are generated from the IMDB dataset utilizing the Fast Gradient Sign Method (FGSM), a well-liked and effective method in the adversarial machine learning domain. After that, a Long Short-Term Memory (LSTM) model is developed utilizing the FGSM-generated hostile cases to identify adversarial attempts on sentiment analysis systems. The LSTM model was trained using a combination of original IMDB data and adversarial cases generated using the FGSM technique. The models are tested on various standard metrics including Accuracy, precision, F1-score, etc., and it achieve about 95.6% accuracy in detecting adversarial attacks.