Towards Context-Based Violence Detection: A K orean Crime Dialogue Dataset (2024)

Abstract: In order to enhance the security of society, there is rising interest in artificial intelligence (AI) to help detect and classify in advanced violence in daily life. The field of violence detection has introduced various datasets, yet context-based violence detection predominantly focuses on vision data, with a notable lack of NLP datasets. To overcome this, this paper presents the first Korean dialogue dataset for classifying violence that occurs in online settings: the Korean Crime Dialogue Dataset (KCDD). KCDD contains 22,249 dialogues created by crowd workers assuming offline scenarios. It has four criminal classes that meet international legal standards and one clean class (Serious Threats, Extortion or Blackmail, Harassment in the Workplace, Other Harassment, and Clean Dialogue). Plus, we propose a strong baseline for the proposed dataset, Relationship-Aware BERT. The model shows that understanding varying relationships among interlocutors improves the performance of crime dialogue classification. We hope that the proposed dataset will be used to detect cases of violence and aid people in danger. The KCDD dataset and corresponding baseline implementations can be found at the following link: https://sites.google.com/view/kcdd .

## introduction in the pursuit of bolstering societal security, an increasingly prominent focus has emerged on harnessing the potential of artificial intelligence (ai) for the identification and categorization of sophisticated forms of aggression in everyday scenarios @xcite . in particular, ai is effective in discovering and preventing various forms of harm, as it can automate violence detection, allowing for early-stage awareness and prompt action @xcite . however, these figure 1 : an example from the kcdd dataset. our dataset was created by crowd workers, featuring conversational scenarios that could occur offline. the example data meets the criteria of the serious threat class according to the international classification of crime for statistical purposes (iccs). currently, there are three main branches of application of violence detection, including surveillance of potential threats in offline situation @xcite @xcite @xcite , automatic prevention of harmful media @xcite @xcite @xcite , and monitoring of language toxicity @xcite @xcite to prevent its use in online forums or large language models (llm) @xcite @xcite generation. however, currently, the publicly available datasets are con- we present the korean crime dialogue dataset(kcdd) to enhance violence detection. kcdd was manuscript by crowd workers, assuming potential real-world offline contexts. figure 1 shows an example. the dataset includes 22,249 conversational scenarios of four classes of threatening situations that comply with the international classification of crime for statistical purposes (iccs) @xcite and one class of general conversations, enabling the detection of violence in dialogue situations. to ensure data collection and review is based on strict quality control, we provide a protocol for data gathering and control guarantees for generative datasets, which requires detailed data analysis and collaboration with legal experts. moreover, we release relationship-aware bert, a robust baseline model for our dataset, which presents a methodology to enhance performance by comprehending the characteristics of conversations. our main contributions are summarized as follows : this study bridges two categories of datasets: violence detection datasets and dialogue comprehension datasets. it is necessary to understand both aspects of these datasets because the primary objective of our dataset is to comprehend and detect violence in conversations. in this paper, violence encompasses a range of phenomena including acts of physical violence and expressions of hate. ## the kcdd dataset in this section, we describe the data construction protocol named legal expert collaborative data building process. the entire process can be seen in figure 2 . furthermore, we examine the statistics, and characteristics of the constructed data. ## relationship-aware bert for kcdd we propose the strong baseline for kcdd to classify dialogues according to the crime situation. we consider this task not simply text classification but a dialogue comprehension task that requires understanding context. therefore, we exploit methods for models to learn the characteristics of the dialogue format. to this end, we introduce relationship-aware bert, a multi-task transformer model @xcite ) that is jointly trained for crime dialogue classification, as well as classifying types of interlocutors. we used klue-bert @xcite a model that was further pretrained in korean using bert as a backbone. figure 4 shows the proposed model. we use two types of special tokens to learn two tasks jointly: @xcite token of bert @xcite for classifying crime dialogue situation, and predefined special [s peaker] token for classifying the type of interlocutors (perpetrator, victim, normal person). consider the entire dialogue data @xmath0, d 1 , . . . , d t } where t represents the total number of dialogue, and each dialogue data @xmath1, u 1 , . . . , u n } comprises individual utterances u. for constructing the input of the proposed model, @xcite token and [s ep] token are appended at the beginning and end of each dialogue d respectively. the special token [s peaker] is prepended to each utterance to identify the type of speaker for each utterance. therefore, the input of relationship-aware bert is as follows: the number of @xcite tokens is equal to the number of utterances. to distinguish the speaker type, each [s peaker] token goes through randomly initialized a multi-layer perceptron (mlp) layer. next, followed by a softmax function @xcite , the probability of a speaker type (perpetrator, victim, normal) i sp p , i sp v , i sp @xmath2. to classify the crime situation, the [cls ] token is sequentially passed through the mlp layer and softmax function. finally, the probability of five classes (serious threat, extortion or blackmail, harassment in the workplace, other harassment, clean dialogue) ŷs , ŷe , ŷh , ŷo , ŷc ∈ r is predicted for a dialogue. for loss of classifying the type of speaker, we employ cross-entropy loss between the predicted probability i sp and the ground truth i sp according to each [s peaker] token. adding all the values of the loss on each [s peaker] token, the final ℓ in a dialogue is obtained. similarly, the loss for crime situation classification is obtained by taking the cross-entropy loss between the predicted probability ŷ and ground truth y on @xcite token in the data. finally, the multi-task loss is composed as equation 3 . λ is a hyper-parameter, controlling the ratio of two losses. basically, λ was set to 1 so that both losses could be appropriately reflected. the effect of λ is described in appendix ??. exploiting multi-task learning, performance is improved for both tasks. this is because the classification tasks exchange signals with each other to comprehend the whole context of a dialogue during model training. ## experiments considering the characteristics of kcdd, we explored several methodologies to properly reflect the conversational context in classifying crime situations. therefore, we compared the proposed model, relationship-aware bert, with other methods. ## discussion influence of input format for learning speaker relationships we experimented with various input formats to find the most efficient way to predict the relationship between speakers. we compared two methods: (a) grouping utterances by the speaker and adding [s peaker] tokens in front of the group so that tokens appear equal to the number of speakers. (b) adding [s peaker] in front of each utterance. appendix f gives examples of the input (a) and (b) and the results of the crime classification task. ## conclusion in this paper, we introduced the korean crime dialogue dataset (kcdd), comprising 22,249 dialogues adhering to the international classification of crime for statistical purposes (iccs). we also developed the legal expert collaborative data building process for crowd-sourced data creation, ensuring quality through expert collaboration. moreover, we proposed the relationship-aware bert, demonstrating superior performance on kcdd dataset. we hope that our dataset can be utilized for various context-based violence detection studies.