Have a personal or library account? Click to login
TextGuard: Identifying and neutralizing adversarial threats in textual data Cover

TextGuard: Identifying and neutralizing adversarial threats in textual data

By: Marwan Omar and  Luay Albtosh  
Open Access
|Dec 2025

Abstract

Adversarial attacks in the text domain pose significant challenges to the integrity of Natural Language Processing (NLP) systems. Addressing this, our study introduces “TextGuard,” a groundbreaking technique utilizing the Local Outlier Factor (LOF) algorithm for detecting adversarial examples in NLP. This study not only empirically validates the effectiveness of TextGuard on various real-world datasets but also compares its performance with traditional NLP classifiers such as Long Short-Term Memory (LSTM), Convolutional Nueral Nets (CNN), and transformer-based models. Remarkably, TextGuard demonstrates superior detection capabilities with F1 detection accuracy scores reaching up to 94.8%, outperforming recent state-of-the-art methods like Discriminative Perturbations (DISP) and Frequency Guided Word Substitution (FGWS). This marks the first instance of applying the LOF technique in the text domain for adversarial example detection, setting a new benchmark in the field.

Language: English
Submitted on: Nov 26, 2023
Accepted on: Sep 1, 2024
Published on: Dec 14, 2025
Published by: Harran University
In partnership with: Paradigm Publishing Services
Publication frequency: 2 issues per year

© 2025 Marwan Omar, Luay Albtosh, published by Harran University
This work is licensed under the Creative Commons Attribution 4.0 License.

AHEAD OF PRINT