A Novel Dataset for Classifying G erman Hate Speech Comments with Criminal Relevance (2025)

Abstract: The consistently high prevalence of hate speech on the Internet continues to pose significant social and individual challenges. Given the centrality of social networks in public discourse, automating the identification of criminally relevant content is a pressing challenge. This study addresses the challenge of developing an automated system that is capable of classifying online comments in a criminal justice context and categorising them into relevant sections of the criminal code. Not only technical, but also ethical and legal requirements must be considered. To this end, 351 comments were annotated by public prosecutors from the Central Office for Combating Internet and Computer Crime (ZIT) according to previously formed paragraph classes. These groupings consist of several German criminal law statutes that most hate comments violate. In the subsequent phase of the research, a further 839 records were assigned to the classes by student annotators who had been trained previously.

## introduction the number of hate comments reported on social media continues to increase, as confirmed by the latest statistics from the german federal criminal police office (bka) @xcite . the european union's digital services act aims to protect users from insults, threats, and harassment by requiring platform providers to review and, if necessary, delete reported content within a specified timeframe. in addition, platforms must report offensive content to authorities, who evaluate its legal relevance for possible prosecution @xcite . however, due to the high volume of cases, courts and prosecutors are often overwhelmed @xcite . developing reliable automated methods for legally classifying digital thus remains a central challenge for authorities. these methods must strike a balance between technical capabilities and the legal requirement for a robust and reliable dataset, which this paper provides. despite efforts to define clear boundaries between legal and illegal content, practical application often reveals ambiguity, with seemingly similar statements judged differently depending on context and interpretation. the dataset presented here serves as a foundation for further research on automated classification of potentially criminal content. while these tools can aid in identifying such content, the final judgment ultimately rests with the courts. the paper contains examples of hate speech to illustrate the issues. the authors explicitly disagree with these examples and use them solely for analytical purposes. ## experiments to demonstrate the usability of the newly annotated dataset, we introduce a baseline classifier as an initial benchmark. this baseline ensures that the dataset provides sufficient signal for meaningful learning and serves as a reference for future models. specifically, we assess the dataset using an in-context learning approach with the open foundation llm llama-70b, using the hyperparameters specified in given the legal complexity and multi-label nature of our task, prompt design is particularly important. including class descriptions in the prompt enables the model to distinguish between overlapping legal categories more effectively, thereby reducing ambiguity and improving classification precision. this approach aligns with findings that structured, informative prompts can elicit more accurate reasoning and output from llms. by comparing the model's performance with and without class descriptions, we provide empirical evidence of the importance of prompt clarity in multi-label classification scenarios involving nuanced legal distinctions. ## conclusions in this study, we introduced a novel dataset for classifying legally relevant hate speech and conducted