Skip to main content
QUICK REVIEW

[Paper Review] Towards Robust Toxic Content Classification

Keita Kurita, Anna Belova|arXiv (Cornell University)|Dec 14, 2019
Adversarial Robustness in Machine LearningComputer Science30 references16 citations
TL;DR

This paper proposes a model-agnostic method to generate realistic adversarial attacks on toxic content classifiers by using character-level perturbations and non-toxic distractor tokens, significantly reducing detection recall by over 50% in some cases. It introduces the Contextual Denoising Autoencoder (CDAE) and adversarial training to improve robustness, showing that combining CDAE with BERT via ensemble learning yields the most resilient defense against both attack types.

ABSTRACT

Toxic content detection aims to identify content that can offend or harm its recipients. Automated classifiers of toxic content need to be robust against adversaries who deliberately try to bypass filters. We propose a method of generating realistic model-agnostic attacks using a lexicon of toxic tokens, which attempts to mislead toxicity classifiers by diluting the toxicity signal either by obfuscating toxic tokens through character-level perturbations, or by injecting non-toxic distractor tokens. We show that these realistic attacks reduce the detection recall of state-of-the-art neural toxicity detectors, including those using ELMo and BERT, by more than 50% in some cases. We explore two approaches for defending against such attacks. First, we examine the effect of training on synthetically noised data. Second, we propose the Contextual Denoising Autoencoder (CDAE): a method for learning robust representations that uses character-level and contextual information to denoise perturbed tokens. We show that the two approaches are complementary, improving robustness to both character-level perturbations and distractors, recovering a considerable portion of the lost accuracy. Finally, we analyze the robustness characteristics of the most competitive methods and outline practical considerations for improving toxicity detectors.

Motivation & Objective

  • To investigate the vulnerability of state-of-the-art toxic content classifiers to realistic, model-agnostic adversarial attacks.
  • To develop defenses that improve robustness against character-level perturbations and injected distractor tokens.
  • To evaluate the effectiveness of adversarial training and a novel contextual denoising autoencoder (CDAE) in restoring classifier performance under attack.
  • To compare the robustness characteristics of different models, including BERT and CDAE, under combined attack types.
  • To provide practical guidelines for building more robust toxicity detection systems in real-world deployment.

Proposed method

  • Generates adversarial examples using a large background corpus (Jigsaw 2019) and a lexicon of toxic tokens to apply character-level perturbations (e.g., replacing 'u' with '*') or inject non-toxic distractor tokens.
  • Employs adversarial training by augmenting training data with synthetically noised examples to improve robustness against similar noise patterns.
  • Proposes the Contextual Denoising Autoencoder (CDAE), which leverages both character-level and contextual information to reconstruct and denoise obfuscated tokens during representation learning.
  • Trains CDAE to predict original tokens from perturbed inputs using masked token reconstruction, integrating character-level embeddings with transformer-based contextual encodings.
  • Combines CDAE with BERT in an ensemble model to leverage complementary robustness: CDAE excels on character-level obfuscations, while BERT resists distractor injections.
  • Evaluates defenses on multiple datasets (Jigsaw 2018, Jigsaw 2019, OffensEval 2019) using standard metrics like F1 and recall under attack conditions.

Experimental results

Research questions

  • RQ1How vulnerable are state-of-the-art neural toxicity detectors to simple, model-agnostic adversarial attacks using character-level perturbations and distractor injection?
  • RQ2To what extent does adversarial training on synthetically noised data improve robustness without degrading performance on clean data?
  • RQ3Can a Contextual Denoising Autoencoder (CDAE) learn robust representations that effectively denoise character-level obfuscations while preserving contextual meaning?
  • RQ4How do different models (e.g., BERT vs. CDAE) differ in their robustness characteristics against distinct attack types?
  • RQ5Can an ensemble of CDAE and BERT achieve superior robustness by combining their complementary strengths against multiple attack vectors?

Key findings

  • Character-level perturbations and distractor injections reduce the recall of state-of-the-art toxicity detectors, including those based on ELMo and BERT, by more than 50% in some cases.
  • Adversarial training improves robustness against synthetic noise but leads to a measurable drop in performance on clean, non-adversarial data.
  • The CDAE model significantly improves robustness against character-level obfuscations by leveraging character-level and contextual information for denoising.
  • BERT-based models show stronger resilience to distractor injections compared to CDAE, which is vulnerable to such attacks.
  • An ensemble of CDAE and BERT achieves the highest overall robustness, outperforming individual models by combining their complementary strengths.
  • The study demonstrates that model-agnostic attacks are highly effective and that robustness requires defense mechanisms that consider both noise types and contextual semantics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.