Paper deep dive
In-game Toxic Detection: Bi-directional Representations with Attention Residuals
Yuanzhe Jia
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:In-game toxic language has emerged as a critical concern in the gaming industry and community. While several frameworks and models for online game toxicity analysis have been proposed, detecting toxicity in player chat utterances remains a formidable challenge: stemming not only from the extremely short length of such utterances but also from the heavy reliance on game slang, abbreviations, and domain-specific jargon, which generic language models are poorly suited to recognize. This paper presents a shared task for in-game toxic language detection built upon real-world in-game chat data, and proposes the best-preforming model for the toxic language slot filling: Bi-directional Representations with Attention Residuals (BRAR). Experimental results demonstrate that BRAR effectively captures the global context and outperforms the existing baselines on slot filling.
Tags
Links
- Source: https://arxiv.org/abs/2609.34584v1
- Canonical: https://arxiv.org/abs/2609.34584v1
Trouble viewing inline? Open PDF directly →
Full Text
14,430 characters extracted from source content.
Expand or collapse full text
In-game Toxic Detection: Bi-directional Representations with Attention Residuals Yuanzhe Jia Abstract In-game toxic language has emerged as a critical concern in the gaming industry and community. While several frameworks and models for online game toxicity analysis have been proposed, detecting toxicity in player chat utterances remains a formidable challenge: stemming not only from the extremely short length of such utterances but also from the heavy reliance on game slang, abbreviations, and domain-specific jargon, which generic language models are poorly suited to recognize. This paper presents a shared task for in-game toxic language detection built upon real-world in-game chat data, and proposes the best-preforming model for the toxic language slot filling: Bi-directional Representations with Attention Residuals (BRAR). Experimental results demonstrate that BRAR effectively captures the global context and outperforms the existing baselines on slot filling. The relevant code is publicly available on GitHub11 1 https://github.com/yuanzhe-jia/toxic-language-detection. University of Sydney, Australia yjia5612@uni.sydney.edu.au Introduction Toxic behavior has become a critical concern in online gaming, yet detection is complicated by the distinctive nature of in-game chat: unlike social media or news, it is substantially shorter because players type while playing, with longer utterances confined to pre- or post-game discussions. This brevity, compounded by pervasive game slang, abbreviations, and domain-specific jargon that generic language models often fail to capture, renders slot-level analysis indispensable for detecting in-game toxicity. Slot filling, the core technique underlying such token-level detection, is typically cast as sequence labeling and has progressed from feature-engineered statistical models such as CRF to deep learning approaches, with Mesnil first demonstrating that the bi-directional RNN with CRF decoders can improve the performance (Mesnil et al. 2014). However, RNNs suffer from vanishing/exploding gradients and fail to capture long-term dependencies explicitly; LSTMs and GRUs mitigate this via gating but still lack explicit dependency modeling and parallel processing. The attention mechanism was therefore adopted, and several sequence-to-sequence models with the attention layer have been applied to slot filling, including encoder–decoder enhancement (Liu and Lane 2016), position-aware attention (Zhang et al. 2017), joint delexicalized generation and label prediction (Shin et al. 2018), and pointer-network-based slot value prediction (Zhao and Feng 2018). Nevertheless, few approaches integrate BiLSTM, Attention, and CRF to capture adjacent-word interactions, highlight key words, and exploit label dependencies. To address the gap, this paper describes the established slot (token)-based in-game toxic language detection shared task and presents the best-performing model with its novel components. Shared Task and Dataset We established a shared task competition22 2 https://w.kaggle.com/competitions/2022-comp5046-a2 for sequence token labeling, aiming to identify the semantic category of each slot in chat utterances from CONDA (Weld et al. 2021), a dataset comprising 44,869 utterances derived from chat logs of 1,921 Dota 2 matches and annotated with six distinct slot labels—T (Toxicity), C (Character), D (Dota-specific), S (Game Slang), P (Pronoun) and O (Other)—to facilitate a deeper understanding of game context. Given the informal and noisy nature of in-game chat, the task demanded models capable of handling lexical variants and domain-specific terminology. Hosted on Kaggle, the competition attracted 312 teams, each permitted 20 submissions per day, culminating in 3,646 submissions over four weeks, with evaluation based on overall micro-F1 excluding the O tag. To ensure reproducibility, a standard data split and evaluation script were released, and participants were encouraged to report both overall and per-label F1 scores. Most participants preprocessed the provided data by tokenizing utterances into slots using spaces, as CONDA provides cleaned utterances with slot labels, while some employed data augmentation to enlarge their training sets. For input embeddings, participants leveraged combinations of syntactic, semantic, and domain-related representations: syntactic embeddings typically encoded POS tags and/or dependency parsing results from SpaCy, whereas semantic embeddings either adopted pre-trained GloVe/FastText vectors or were trained from scratch using FastText/Word2Vec on the provided game chat corpus. Diverse sequence labeling architectures were explored, and we subsequently present the methodology and experimental results of the best-performing model. Methodology The proposed model is a combination of BiLSTM cells, attention residuals, the label forcing technique, and CRF decoders. Since the model uses the global information extracted from the attention mechanism as residuals to supplement bi-directional features, it is named Bi-directional Representations with Attention Residuals (BRAR). The overall architecture is shown in Figure 1. The input example, “g SEPA Report my team”, is divided into the sequence x=(x1,x2,…,xt)x=(x_1,x_2,…,x_t) where t denotes the number of tokens. The output of the model is the corresponding slot labels y=(y1,y2,…,yt)y=(y_1,y_2,…,y_t) with c unique values. Figure 1: The figure illustrates the overall architecture of BRAR, in which the dotted arrows denote the attention residuals and the green boxes (labeled “LF”) present the label forcing technique. BiLSTM The BiLSTM layer performs feature extraction on the input data in sequence, and the hidden state obtained at each time step is then passed to the attention layer. Assume the hidden size of LSTM is λ, the hidden state hi∈ℝλh_i∈ R^λ at time step i is represented as the abbreviation below: hi=LSTM(xi,hi−1)h_i=LSTM(x_i,h_i-1) (1) And the bi-directional hidden state hi∈ℝ2λh_i∈ R^2λ that involves the forward hidden state hiforwardh_i^forward and the backward hidden state hibackwardh_i^backward is depicted: hi=[hiforward,hibackward]h_i=[h_i^forward,h_i^backward] (2) Attention Residual The attention layer aims to understand the global information and find the main ideas of the input utterance. The attention a∈ℝ2λa∈ R^2λ is calculated in the following equation where ht∈ℝ2λh_t∈ R^2λ is the last hidden state of the BiLSTM layer, Wa∈ℝ2λ×tW_a∈ R^2λ×t is a trainable weight matrix and H∈ℝt×2λH∈ R^t×2λ is output the hidden state of BiLSTM: a=softmax(ht⋅Wa⋅H)a=softmax(h_t· W_a· H) (3) As the global information is not always helpful for understating each input token, it is treated as the residual of the token-level representation to form the feature fi∈ℝt×cf_i∈ R^t×c, while α is a trainable parameter for scaling and Wf∈ℝ2λ×cW_f∈ R^2λ×c is a trainable weight matrix for dimension transformation. When the global information is beneficial to the token-level interpretation, it will speed up the convergence; otherwise, it will not reduce the prediction performance. fi=Wf(H+α×ai)f_i=W_f(H+α× a_i) (4) Label Forcing The feature representation is enhanced at the label forcing layer to form the emission scores, which will be passed to the CRF layer to predict the tag of each token. As both training and test sets contain a large number of identical words, the classifications of these words are highly likely to be the same in a specific domain. For example, “g” stands for “good game”. If all the words “g” in the training set are classified as “S” (Game Slang), then the word in the test set will have a high probability of being classified as “S”. That is to say, if the probability information of the correspondence between words and labels in the training set can be learned, it will be of great help in predicting the results of the test set. Therefore, the proposed model uses the label forcing technique: the label distribution probability of each token in the training corpus is calculated and normalized by the following equation, where CijC_ij is the frequency of that the token i is annotated as the label j: pi=Cij/∑jCijp_i=C_ij/ _jC_ij (5) After that, the label distribution probability pip_i will be added element-wise along with the feature representation fif_i to form the emission scores ei∈ℝt×ce_i∈ R^t×c for the CRF layer (Ref. Figure 2): ei=fi+pie_i=f_i+p_i (6) Figure 2: The figure illustrates the process by which the parameter matrices in BRAR undergo a series of dimensional transformations and ultimately yield the emission scores for the CRF layer. CRF Given that slot label predictions are inherently interdependent, modeling the transitional dependencies among neighboring labels is beneficial for producing coherent tag sequences. Accordingly, a CRF layer is placed atop the proposed model to jointly decode the optimal chain of labels for the utterance. This design enables the model to enforce valid tag transitions and prevents locally optimal but globally inconsistent predictions. Experiment The proposed model adopts FastText-50 as input embeddings, with a hidden size of 5 per direction in the BiLSTM layer and the number of layers fixed at 1. The SGD optimizer is employed with a learning rate of 0.1 and a weight decay of 1e-4, and training proceeds for 2 epochs with a batch size of 1, following the CONDA setting. Evaluation metrics include the overall micro-F1 and per-slot F1 on the test set, excluding the O tag when computing the overall F1, and five baselines are taken from the CONDA paper. We first conducted an ablation study on the number of stacked BiLSTM layers. As presented in Table 1, increasing the number of layers leads to lower F1 scores, although the differences among the three configurations are not statistically significant. This suggests that deeper architectures tend to overfit the relatively short and noisy in-game chat utterances. Consequently, we use a single BiLSTM layer owing to its lower parameter count and computational efficiency. In comparison with the existing baselines, Table 2 shows that BRAR achieves superior F1 scores across most labels, especially for the T, S, and D labels, attributable to the attention residuals and the label forcing technique that enhance the capture of global context and high-frequency label patterns. Number of Stacks F1 F1(T) F1(S) F1(D) 1 layer 99.9 98.6 99.4 98.1 2 layers 99.6 98.1 99.3 96.4 3 layers 98.6 96.5 98.3 81.8 Table 1: Ablation study with different stacks (%). Model F1 F1(T) F1(S) F1(D) RNN-NLU (2016) 97.0 93.1 93.0 71.8 Slot-gated (2018) 99.1 97.8 98.2 95.2 Inter-BiLSTM (2018) 86.5 87.1 86.9 78.8 Capsule N (2019) 99.1 97.5 98.2 94.9 Joint BERT (2019) 98.9 97.2 97.9 91.4 BRAR (our model) 99.9 98.6 99.4 98.1 Table 2: Comparison with baselines (%). Conclusion In this paper, we established a shared task for slot (token)-based in-game toxic language detection, as well as the best-performing model in the shared task, which integrates bi-directional representations, attention residuals, the label forcing technique, and CRF decoders. Experiments indicate that the proposed model is more effective in capturing global information between the semantic components on slot filling than the existing baselines. Declaration This paper constitutes an extended version of the original paper (Jia et al. 2023), primarily incorporating the related work, and providing a detailed elaboration of the methodology of the proposed model. References Bing and Ian (2016) L. Bing and L. Ian Attention-based recurrent neural network models for joint intent detection and slot filling. In Interspeech 2016, p. 685–689. Cited by: Table 2. Chenwei et al. (2019) Z. Chenwei, L. Yaliang, D. Nan, F. Wei, and P. S Joint slot filling and intent detection via capsule neural networks. In Proceedings of the 57th Annual Meeting of the ACL, p. 5259–5267. Cited by: Table 2. Chih-Wen et al. (2018) G. Chih-Wen, G. Guang, H. Yun-Kai, H. Chih-Li, C. Tsung-Chieh, H. Keng-Wei, and C. Yun- Nung Slot-gated modeling for joint slot filling and intent prediction. In NAACL-HLT 2018, p. 753–757. Cited by: Table 2. Jia et al. (2023) Y. Jia, W. Wu, F. Cao, and S. C. Han In-game toxic language detection: shared task and attention residuals. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 37, p. 16238–16239. Cited by: Declaration. Liu and Lane (2016) B. Liu and I. Lane Attention-based recurrent neural network models for joint intent detection and slot filling. arXiv preprint arXiv:1609.01454. Cited by: Introduction. Mesnil et al. (2014) G. Mesnil, Y. Dauphin, K. Yao, Y. Bengio, L. Deng, D. Hakkani-Tur, X. He, L. Heck, G. Tur, D. Yu, et al. Using recurrent neural networks for slot filling in spoken language understanding. IEEE/ACM Transactions on Audio, Speech, and Language Processing 23, p. 530–539. Cited by: Introduction. Shin et al. (2018) Y. Shin, K. M. Yoo, and S. Lee Slot filling with delexicalized sentence generation. In INTERSPEECH, p. 2082–2086. Cited by: Introduction. Weld et al. (2021) H. Weld, G. Huang, J. Lee, T. Zhang, K. Wang, X. Guo, S. Long, J. Poon, and C. Han CONDA: a contextual dual-annotated dataset for in-game toxicity understanding and detection. In Findings of the Association for Computational Linguistics: ACL 2021, p. 2406–2416. Cited by: Shared Task and Dataset. Yu et al. (2018) W. Yu, S. Yilin, and J. Hongxia A bi-model based rnn semantic frame parsing model for intent detection and slot filling. In NAACL-HLT 2018, Cited by: Table 2. Zhang et al. (2017) Y. Zhang, V. Zhong, D. Chen, G. Angeli, and C. D. Manning Position-aware attention and supervised data improve slot filling. In Conference on Empirical Methods in Natural Language Processing, Cited by: Introduction. Zhao and Feng (2018) L. Zhao and Z. Feng Improving slot filling in spoken language understanding with joint pointer and attention. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), p. 426–431. Cited by: Introduction.