ToXCL: A Unified Framework for Toxic Speech Detection and Explanation
Nhat M. Hoang, Xuan Long Do, Duc Anh Do, Duc Anh Vu, Luu Anh Tuan
TL;DR
ToXCL introduces a unified encoder–decoder framework for simultaneous implicit toxic speech detection and explanation, addressing error propagation seen in prior text-generation approaches. It comprises a Target Group Generator, an Encoder-Classifier with an Explanation Decoder, a Teacher Classifier for distillation, and a Conditional Decoding Constraint to keep explanations aligned with predictions. The model achieves state-of-the-art results on the Implicit Hate Corpus (IHC) and Social Bias Inference Corpus (SBIC) for both detection and explanation tasks, validated by automatic metrics and human evaluations, with ablations confirming the value of each component. The work highlights practical impacts for trustworthy AI in moderating toxic content while acknowledging challenges with coded language, sarcasm, and evaluation biases, and it plans open-source release to spur further research.
Abstract
The proliferation of online toxic speech is a pertinent problem posing threats to demographic groups. While explicit toxic speech contains offensive lexical signals, implicit one consists of coded or indirect language. Therefore, it is crucial for models not only to detect implicit toxic speech but also to explain its toxicity. This draws a unique need for unified frameworks that can effectively detect and explain implicit toxic speech. Prior works mainly formulated the task of toxic speech detection and explanation as a text generation problem. Nonetheless, models trained using this strategy can be prone to suffer from the consequent error propagation problem. Moreover, our experiments reveal that the detection results of such models are much lower than those that focus only on the detection task. To bridge these gaps, we introduce ToXCL, a unified framework for the detection and explanation of implicit toxic speech. Our model consists of three modules: a (i) Target Group Generator to generate the targeted demographic group(s) of a given post; an (ii) Encoder-Decoder Model in which the encoder focuses on detecting implicit toxic speech and is boosted by a (iii) Teacher Classifier via knowledge distillation, and the decoder generates the necessary explanation. ToXCL achieves new state-of-the-art effectiveness, and outperforms baselines significantly.
