Skip to content
Open access

Adversarial Robustness Evaluation of Traditional and Transformer-Based NLP Models for Toxic Comment Detection

Jul 2026 · International Journal of Grid Computing & Applications · Vol 17, pp. 25-34 · 0 citations · 6 references

TL;DR

Investigation of the effectiveness and adversarial robustness of two NLP classification approaches: a traditional TF-IDF Logistic Regression model and a transformer-based Bidirectional Encoder Representations from Transformers model demonstrate the advantages of transformer-based architectures for cybersecurity-oriented content moderation systems operating in adversarial online environments.

Abstract

The increasing prevalence of toxic online content has created significant challenges for digital platforms, necessitating the development of automated and robust toxic comment detection systems. Traditional Natural Language Processing (NLP) approaches based on statistical text representations often achieve strong baseline classification performance but remain vulnerable to adversarial text obfuscation techniques designed to evade content moderation systems. This research investigates the effectiveness and adversarial robustness of two NLP classification approaches: a traditional TF-IDF Logistic Regression model and a transformer-based Bidirectional Encoder Representations from Transformers (BERT) model. Using the Jigsaw Toxic Comment Classification dataset, the problem was simplified into binary toxic versus non-toxic classification. To evaluate robustness, adversarial augmentations including leetspeak substitution, character deletion, and spacing attacks were applied to toxic comments. Experimental results demonstrated that the BERT model significantly outperformed the Logistic Regression baseline in both standard classification performance and resilience against adversarial perturbations. While the Logistic Regression model experienced substantial performance degradation due to its dependence on exact lexical matching, the BERT model maintained strong performance through contextual embeddings and subword tokenization mechanisms. Among the evaluated attacks, substitution based obfuscation produced the greatest reduction in transformer performance, indicating that adversarial NLP remains an ongoing research challenge. The findings highlight the limitations of traditional bag-of-words approaches and demonstrate the advantages of transformer-based architectures for cybersecurity-oriented content moderation systems operating in adversarial online environments.

Read PDF

Similar papers

Open access Jun 2026

A Comprehensive Approach to Fake News Detection with Adversarial Training and Model Explainability

This paper explores the application of natural language processing and machine learning techniques to automatically detect and classify fake news articles and develops a web-based application to integrate the trained models into an interactive platform.

Vlad-Constantin Cristescu, Stelian Spinu · 0 citations
Open access 2026

Response-Only Adversarial Detection of LLM Outputs: A Comparative Study of Lexical, Contrastive, and Contextual Representations

This study investigates response-only adversarial classification of LLM outputs through a comparative evaluation of lexical, contrastive, and contextual representations and provides a realistic benchmark for response-only adversarial detection and clarify the limits of contrastive representations when prompt informatio...

A. Nasution, Ahmet Emre Ergün, Aytu˘g Onan et al. · 0 citations
Preprint Aug 2026

Adversarial Robustness in Smishing Detection: A Comparative Analysis of Adversarial Fragility in Classical vs. Transformer-Based Detection Systems

It is demonstrated that clean-text performance is not a reliable predictor of adversarial robustness, and the results underscore the necessity for architecture-specific defences and frame smishing detection as an adversarial cybersecurity challenge rather than a static classification task.

Denzel Chiuseni, A. Bahizire, Silva Hama et al. · 0 citations
Open access Jul 2026

Lightweight and Effective Coded-Slang Detection for Cyber-Drug Intelligence

Findings indicate that models optimized for local n-gram patterns provide a highly cost-effective deployment solution while outperforming representative pre-trained language models in specialized adversarial digital forensics tasks.

Tao Leng, Yong Dai, Xinyang Yan · 0 citations
Conference Jul 2026

Enhancing Adversarial Defense in Phishing Detection Using Deep Reinforcement Learning

Phishing classifiers trained on static data can underperform when slight adversarial modifications are made to URLs and HTML to evade both humans and traditional machine learning algorithms. During this research, a published XGBoost baseline from Aljofey et al. was reproduced and verified for reproducibility with multi...

Derrick Asiedu Aboagye, Stones Dalitso Chindipha · 0 citations
Open access Jan 2024

Gradient-guided hierarchical feature attack for object detector

Gradient-guided Hierarchical Feature Attack (GHFA) is proposed to solve problems, which disrupts detector-extracted features using gradient-guided feature weighting and incorporates receptive field scaling and gradient scaling to balance the focus among feature maps and enhance attack performance.

Yang Wang, Yunfei Zheng, Lei Chen et al. · 3 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.