ToxBuster: In-game Chat Toxicity Buster with BERT

Zachary Yang, Yasmine Maricar, MohammadReza Davari, Nicolas Grenon-Godbout, Reihaneh RabbanyarXiv 2023

Abstract

Detecting toxicity in online spaces is challenging and an ever more pressing problem given the increase in social media and gaming consumption. We introduce ToxBuster, a simple and scalable model trained on a relatively large dataset of 194k lines of game chat from Rainbow Six Siege and For Honor, carefully annotated for different kinds of toxicity. Compared to the existing state-of-the-art, ToxBuster achieves 82.95% (+7) in precision and 83.56% (+57) in recall. This improvement is obtained by leveraging past chat history and metadata. We also study the implication towards real-time and post-game moderation as well as the model transferability from one game to another.

Introduction

Online toxicity is a pervasive issue, but in-game chat presents a unique challenge that standard social media moderation tools struggle to solve. Game chat is often fragmented, filled with game-specific jargon, and highly dependent on context. For example, a phrase that seems neutral in isolation might be toxic when directed at a teammate after a mistake.

Existing models like Google’s Perspective API are largely trained on social media comments (like Wikipedia or Reddit), where the language structure is more formal and "complete." When applied to the "wild west" of in-game chat, these models suffer from poor recall—they miss a huge portion of toxic behavior because they lack the context of the conversation and the metadata of who is talking to whom.

Methods

ToxBuster builds on the BERT (Bidirectional Encoder Representations from Transformers) architecture. The core innovations lie in how the model "sees" the conversation:

  1. Chat History as Context: Instead of analyzing a single line of text, ToxBuster treats the conversation like a question-answering task. It uses a "Sentence A / Sentence B" structure where Sentence A contains the preceding chat history and Sentence B is the current line being evaluated.
  2. Chat Speaker Segmentation: The researchers modified the BERT embedding layer to include three additional pieces of metadata: PlayerID (unique player identifier), Chat Type (All vs. Team), and TeamID (relative team membership).
  3. Custom Truncation: A "left-heavy" truncator prioritizes keeping the current message and the most recent history within BERT's token limits.
ToxBuster architecture incorporating chat history and speaker metadata.

Datasets

The researchers curated a substantial new dataset consisting of 194,000 lines of chat from two popular Ubisoft titles: Rainbow Six Siege and For Honor. The data was annotated by over 30 individuals, including those from marginalized groups (LGBTQA1+, BIPOC), ensuring labels reflect the perspectives of those most often targeted. Chat lines were categorized into eight toxic labels, including Hate and Harassment, Threats, and Extremism.

Key Insights and Results

ToxBuster significantly outperformed all commercial and open-source baselines.

Comparison of ToxBuster against state-of-the-art baselines.
  • Metadata and Context: Ablation studies revealed that PlayerID is the most critical feature, allowing the model to track behavioral patterns. Adding chat history alone improved performance by approximately 4%.
  • Performance: ToxBuster achieved 82.95% precision and 83.56% recall. In contrast, the Perspective API managed a recall of only 24.38% on the same dataset, highlighting that social media models do not port well to gaming environments.
  • Real-world Impact: At a high-precision setting (90%), the model identified 82% of players who were actually reported by other users. It was also highly effective at identifying spam (81.11 F1 score).
  • Transferability: A model trained on Rainbow Six Siege performed well on For Honor data with minimal fine-tuning, suggesting a common "toxic gamer culture" across genres.

Limitations and Future Work

While effective, ToxBuster has limitations. The current dataset is primarily English, necessitating future expansion to multi-lingual support. Additionally, the model only processes text, missing toxicity in voice chat or "griefing" actions. The authors emphasize that ToxBuster is intended to assist human moderators by prioritizing reports, rather than replacing them entirely. Future work will also focus on robust "de-biasing" techniques to ensure the model doesn't unfairly flag dialects or non-toxic slang used by marginalized communities.

Summary updated

BibTeX
@misc{yang2023toxbuster,
  author = {Zachary Yang and Yasmine Maricar and MohammadReza Davari and Nicolas Grenon-Godbout and Reihaneh Rabbany},
  title = {{ToxBuster: In-game Chat Toxicity Buster with BERT}},
  year = {2023},
  eprint = {2305.12542},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.12542},
}
Figure