SafeSpeech: A Comprehensive and Interactive Tool for Analysing Sexist and Abusive Language in Conversations

Xingwei Tan, Chen Lyu, Hafiz Muhammad Umer, Sahrish Khan, Mahathi Parvatham, Lois Arthurs, Simon Cullen, Shelley Wilson, Arshad Jhumka, Gabriele Pergola

TL;DR

SafeSpeech is a unified, interactive platform that bridges the gap between isolated message-level toxicity detection and context-dependent conversation analysis. By combining fine-tuned classifiers, LLMs, and explainability tools like perplexity gain heatmaps, it enables researchers to detect subtle harms like coercive control and profile speaker behaviors across multi-turn dialogues.

What Problem Does This Paper Address?

Online toxicity isn't always explicit. While direct insults are relatively easy for standard classifiers to catch, harmful behaviors like microaggressions, gaslighting, and coercive control often manifest subtly over multiple turns of a conversation. A single sentence might seem benign in isolation, but its toxic nature reveals itself when viewed within the broader conversational context—a pattern frequently observed in cases of violence against women and girls (VAWG).

Existing content moderation tools primarily operate at the isolated message level, completely ignoring conversational dynamics. Furthermore, there is a lack of comprehensive, open platforms that integrate message-level classification with conversation-level analysis, summarization, and interpretability tools. SafeSpeech addresses this gap by providing an interactive, no-code interface for multi-granularity toxicity analysis.

Methods

The SafeSpeech platform is built using a Streamlit frontend and a FastAPI backend, allowing users to interactively analyze text files or benchmark datasets.

Figure 1: The structure of SafeSpeech platform.

Its core technical pipeline consists of:

  • Multi-Granularity Classification: For message-level analysis, the platform uses fine-tuned Transformer models (RoBERTa-Large, DeBERTa-v3-large, and Mistral 7B). It introduces a voting-based ensemble model called M7-FE specifically optimized for fine-grained sexism detection.
  • Soft-Explainability (Perplexity Gain): To explain LLM predictions, the system calculates "perplexity gain." It measures how much the model's confidence drops when a specific phrase is removed from the conversation. This is visualized as a text heatmap to show which lines drove the toxicity label.
  • Toxic-Aware Summarization: Long conversations are segmented into semantically coherent chunks using customized semantic chunking. These chunks are then summarized using InstructDS (a Flan-T5-XL variant), conditioned on the toxicity labels to ensure abusive context isn't lost in the summary.
  • Persona Profiling: SafeSpeech maps speaker behaviors to the Big Five Personality Traits framework. Instead of processing raw, noisy chat logs, it feeds the toxic-aware summaries into an LLM (like Llama 3.1) to generate trait scores and linguistic justifications.

Datasets

The authors evaluate SafeSpeech using several established toxicity and sexism benchmarks:

  • EDOS (SemEval 2023 Task 10): A dataset for fine-grained online sexism detection, featuring three levels of granularity (binary, 4-class categories, and 11-class specific vectors).
  • OffensEval 2019: For offensive language identification.
  • AbusEval: Focused on abusive language detection.
  • HatEval: Centered on hate speech against immigrants and women.
  • EXIST 2024: Used in the appendix to validate performance on sexism identification in social networks.

Key Insights and Ideas

  • Summaries as Feature Compressors: Feeding raw, lengthy chat logs into LLMs for personality profiling often introduces noise and sparsity. SafeSpeech demonstrates that using toxic-aware summaries preserves critical behavioral signals while drastically improving computational efficiency.
  • Borrowing from Summarization Metrics: Adapting perplexity gain—originally a source-identification metric for abstractive summarization—proves to be an effective proxy for classification explainability, highlighting the exact sentences that trigger an LLM's safety flags.
  • The Overlap of Sexism and Hate Speech: Out-of-domain evaluations showed that models trained purely on sexism datasets (like EDOS) still perform competitively on generalized hate speech datasets (like HatEval), confirming a high degree of linguistic overlap between these domains.

Key Results

The platform's specialized ensemble model, M7-FE, achieved state-of-the-art performance on the EDOS sexism benchmark:

  • Subtask A (Binary Sexism): Reached a 0.88 Macro F1, outperforming the previous SemEval winning system by 1%.
  • Subtask C (11-Class Fine-Grained): Reached a 0.60 Macro F1, a 4% improvement over prior state-of-the-art systems.
Model performance on benchmark datasets.

For generalized offensive and abusive speech (OffensEval and AbusEval), specialized models like HateBERT still hold the top performance (0.81 and 0.77 F1, respectively). However, LLMs like Llama 3.1 (4-bit) showed superior zero-shot/in-context learning capabilities on the HatEval dataset (0.59 F1).

Limitations and Future Work

  • Implicit LLM Bias: The authors note that they have not yet systematically analyzed the implicit biases embedded within the commercial and open-weight LLMs used by the platform.
  • Proxy Interpretability: Perplexity gain provides a useful post-hoc visualization, but it remains an external reference rather than a direct look into the internal attention mechanisms of the classifiers.
  • Exploratory Persona Profiling: The Big Five personality profiling feature is strictly exploratory and relies on context correlations; the authors emphasize it has not been clinically validated and should not be used for operational or professional diagnosis.
  • Compute Constraints: Local execution is currently limited to smaller or quantized models due to hardware restrictions, though external APIs can mitigate this.

Summary updated

BibTeX
@inproceedings{tan2025safespeech,
  author = {Xingwei Tan and Chen Lyu and Hafiz Muhammad Umer and Sahrish Khan and Mahathi Parvatham and Lois Arthurs and Simon Cullen and Shelley Wilson and Arshad Jhumka and Gabriele Pergola},
  title = {{SafeSpeech: A Comprehensive and Interactive Tool for Analysing Sexist and Abusive Language in Conversations}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
}
Figure