Not-in-Perspective: Towards Shielding Google's Perspective API Against Adversarial Negation Attacks
Michail S. Alexiou, J. Sukarno Mertoguno
TL;DR
The paper tackles the vulnerability of Google's Perspective API to negation-based adversarial attacks in toxicity detection. It introduces a formal reasoning wrapper that operates as both pre-processing and post-processing around ML-based toxicity detectors, explicitly handling negation segments and exploring antonym substitution and paraphrase-based augmentation. The hybrid approaches M1.2-P and M1.5-P emerge as the strongest performers, delivering improved accuracy on Perspective-based negated test sets and reducing reported toxicity for many sentences, while Perspective remains a strong baseline. The work demonstrates that combining formal reasoning with statistical toxicity detectors yields more robust toxicity scoring, with practical implications for safer content moderation on social platforms.
Abstract
The rise of cyberbullying in social media platforms involving toxic comments has escalated the need for effective ways to monitor and moderate online interactions. Existing solutions of automated toxicity detection systems, are based on a machine or deep learning algorithms. However, statistics-based solutions are generally prone to adversarial attacks that contain logic based modifications such as negation in phrases and sentences. In that regard, we present a set of formal reasoning-based methodologies that wrap around existing machine learning toxicity detection systems. Acting as both pre-processing and post-processing steps, our formal reasoning wrapper helps alleviating the negation attack problems and significantly improves the accuracy and efficacy of toxicity scoring. We evaluate different variations of our wrapper on multiple machine learning models against a negation adversarial dataset. Experimental results highlight the improvement of hybrid (formal reasoning and machine-learning) methods against various purely statistical solutions.
