Benchmarking Offensive and Abusive Language in D utch Tweets (2023)

Abstract: We present an extensive evaluation of different fine-tuned models to detect instances of offensive and abusive language in Dutch across three benchmarks: a standard held-out test, a task- agnostic functional benchmark, and a dynamic test set. We also investigate the use of data cartography to identify high quality training data. Our results show a relatively good quality of the manually annotated data used to train the models while highlighting some critical weakness. We have also found a good portability of trained models along the same language phenomena. As for the data cartography, we have found a positive impact only on the functional benchmark and when selecting data per annotated dimension rather than using the entire training material.

## introduction being able to correctly detect instances of offensive and abusive language plays a pivotal role in creating safer and more inclusive environments, especially on social media platforms. since current methods for these phenomena are based on supervised techniques, a pending issue is represented by the quality of the data used to train the corresponding systems. standard evaluation methods based on held-out test sets only provide a partial picture of the actual robustness of fine-tuned models while being silent about potential annotators' bias, topic and author biases @xcite . recent work has show that held-out tests may result in overly optimistic performance estimates which do not translate into real-world performance @xcite . to get a realistic performance estimate, models should be evaluated on out-of-corpus data, i.e. a different data distribution but within the same language variety @xcite , or even on a held-out test set from a different but related domain. out-of-corpus evaluation requires the devel-opment of multiple datasets which can be expensive, time consuming, and, in the case of less-or poor-resources languages, unfeasible. a complementary solution is the use of functional tests, i.e., sets of systematically generated test cases aiming at evaluating in a task-agnostic methodology trained models @xcite @xcite @xcite . functional testing enables more targeted insights and diagnostics on multiple levels. for instance, the systematic categorisation as hateful of messages containing a protected identity term (e.g., "gay", "trans", among others) of a system trained to detect hate speech against lgbtqia+ people is an indicator of the weakness of the model(s) as well as of biases in the training data. although limited in terms of number of datasets and annotated phenomena, dutch covers a peculiar position in the language resource panorama: it has a comprehensively annotated corpus for offensive and abusive language whose standard heldout test set does not present any overlap with the training set; it includes a dynamic benchmark for offensive language, op-nl @xcite ; and it presents a functional benchmark, hatechek-nl, that extends multilin-gual hatechekck @xcite . this puts us is an optimal position to conduct an extensive benchmarking of different models for offensive and abusive language in dutch and reflect on the potential shortcomings of the dutch abusive language corpus v2.0 (dalc-v2.0) @xcite . in addition to this, we apply data cartography @xcite to carve out different subsets of training materials to investigate whether this method is valid on dalc-v2.0 to identify robust and good quality training data. ## data in this section, we present the data we use to fine-tune and evaluate the models based on bertje @xcite . dalc-v2.0 dalc-v2.0 contains 11,292 messages from twitter in dutch, covering a time period between november 2015 and august 2020. messages have been annotated using a multi-layer annotation scheme compliant with @xcite for two dimensions: offensive and abusive language. offensive language in dalc-v2.0 is the same as in @xcite , i.e., messages "containing any form of non-acceptable language (profanity) or a targeted offence, which can be veiled or direct". abusive language corresponds to "impolite, harsh, or hurtful language (that may contain profanities or vulgar language) that result in a debasement, harassment, threat, or aggression of an individual or a (social) group, but not necessarily of an entity, an institution, an organisations, or a concept." @xcite . each dimension is further annotated along two layers: explicitness and target. the explicitness layer is used to annotate whether a message is belonging to the positive category or not. in the former case, the values explicit (exp) and implicit (imp) are used to distinguish the way the positive category is realised. the target layer is used to annotate towards who or what the offence, or abuse, is directed to. target layers inherit values from @xcite , namely individual (ind), group (grp), other (oth). here we focus only on the explicitness layer, considering each dimension separately and jointly. in particular, when addressing each dimension separately, we frame the task as a binary classification by collapsing the explicit and implicit labels either into off and abu for the offensive and abusive dimension, respectively. when working on both dimensions jointly, we face a multi-class classification where systems must distinguish between two positive classes (off and abu) and one negative (not). labels are skewed towards the negative class as in previous work @xcite @xcite . when considering each dimension separately, the offensive dimension is larger than the abusive one (approx 33% of the total vs. ≈ 19%, respectively). in the joint setting, the off messages drop to ≈ 15%. this reflects the definitions of offensive and abusive language and how the two phenomena interact: abusive language is more specific and subject to a stricter set of criteria for its identification (e.g., a target must always be present), resulting in a "specialized instance" of offensive language @xcite . in other words, while every abusive message is also offensive, the contrary does not hold. in their analysis of the corpus, the authors do not report evidence of any specific topic bias and they state that train and test splits have no overlap @xcite . hatechek-nl hatechek-nl extends mul-tilingual hatechekck (mhc) @xcite . mhc defines hate speech as "abuse that is targeted at a protected group or at its members for being a part of that group." @xcite . this definition is more specific than the language phenomena in dalc-v2.0, although it is compatible. mhc has 27 common functionalities for 10 languages, including dutch, 18 specific for expressions of hate and nine non-hateful to contrast the hateful cases. each test is realised by a short text uniquely identifying a gold label (e.g., hateful vs. non-hateful). to massively generate tests, mhc makes use of templates @xcite . we have extended the functionalities in mhc with two extra tests to include the use of reclaimed slurs and profanities in a non hateful way (f8, f9). these two functional tests are present in the original english hatecheck @xcite but they were excluded from mhc to maintain a more homogeneous distribution of functional tests across all languages. @xcite observe that these functionalities have no direct equivalents in most of the languages in mhc, but this is not the case for dutch. for the functionality f8 (non-hateful homonyms of slurs), we have identified four slurs that are each aimed at one of the target identities and have a non-hateful homonym. for instance, the term "f*****r" is used to refer to gay men or as a verb meaning flickering of a light, to fall or to drop something. reclaimed slurs (f9) have been partially translated from english, excluding terms such as "n****r" and "b***h" for which we have not found evidence of their use in dutch nor have we identified corresponding terms. hatechek-nl contains 3,835 functional tests across the 29 functionalities. a total of 2,640 (68.83%) tests are hateful and 1,195 (31.16%) are non-hateful, a distribution in line with the original hatecheck. an overview of all the functionalities in hatechek-nl is in table a .1 in appendix a. on the basis of the annotated dimensions in dalc-v2.0, we expect that models trained on offensive language may overgeneralise the identification of hateful messages, also for challenging non-hateful cases (e.g., f8, f9). on the other hand, we expect models trained on abusive language (both in isolation and jointly) to perform better, although the emphasis on "protected group and its members" in hatechek-nl may present an extra challenge since no specific protected group is part of dalc-v2.0. op-nl offend the politicians benchmark (op-nl) is a dynamic test set composed by 1,500 tweets collected in march 2021 containing at least one mention of a dutch politician from the tweede kamer (i.e., the dutch house of representatives). the messages have been annotated for offensive language using the same definition of dalc-v2.0, making op-nl perfectly compatible and suitable as a dynamic benchmark. the labels in op-nl are distributed as follows: 961 messages (64%) are not offensive (not) and 539 (36%) are offen-sive (off). the ratio between non-offensive and offensive messages is 1.78 : 1, very close to the label distribution in dalc-v2.0. in this case, we expect offensive language models (in isolation or jointly with abusive language) to obtain good performances, i.e., in-line with those on dalc-v2.0 for offensive language. on the contrary, models trained for abusive language are expected to struggle, mainly on the recall for the positive class. ## experiment settings we have designed three sets of experiments for each annotated dimension to fine-tune a monolingual pre-trained language model for dutch, bertje, with varying training splits. all fine-tuned models are evaluated both on the official dalc-v2.0 held-out test set, hatechek-nl, and op-nl. all pre-processing steps and fine-tuning (hyper)parameters are detailed in appendix b for replicability. the first block of experiment has a standard setting: for each annotated dimension (in isolation or jointly) we fine-tuned bertje using all available training data in dalc-v2.0. we will refer to these models as standard (std). for the second block, we use data cartography @xcite . the cartography approach uses a model's confidence in the true class and the variability of this confidence across multiple training epochs (i.e., training dynamics) to identify a subset of training instances that qualify as more reliable and informative. in this way, it is possible to train a model using less data and still achieve state-of-the-art results, if not better. when plotting statistics from the training dynamics into a map, they result into a spectrum of data points: some easy (high-confidence, low variability), some hard (low-confidence, low variability), and some ambiguous (mid-range confidence, high variability). previous work @xcite has shown that, in classification tasks, the use of ambiguous data points at training time results in better models than those obtained when using the entire training split. our goal is to test the validity of this method on dalc-v2.0, a smaller dataset than those where data cartography has been successfully applied. to identify the ambiguous data points, we have used the training dynamics from the fine-tuned models from each classification task from dalc-v2.0. given its skewed distribution and size, we have investigated two methods to select the ambiguous data: the first (amb-dim) follows the approach in @xcite by retaining 1/3 of the original training data (i.e., 2,272 examples) corresponding to the top ambiguous cases per annotated dimension (separately and jointly). the second (amb-class) independently retains the top ambiguous examples for each class. in particular, we have carved three training splits of 2,272 examples where the distribution of instances per class is perfectly balanced (50-50 for binary settings, and 1/3 each for the multi-class setting). as the figures in the values of the amb-dim and the amb-class data, with the latter being always lower of ≈ 0.1 points. although in both cases the selected data instances qualifies as "ambiguous", the relatively low variability questions their efficacy as more robust training instances. figures 1a , 1b , and 1c illustrate the data maps of the training examples for the offensive and abusive dimension, separately and jointly. we can observe a consistent overlap between the easy and the ambiguous cases which questions the use of the ambiguous instances as effective training material from dalc-v2.0. at the same time, we observe that the hard examples are limited and well clus-tered for each dimension separately (figures 1a and 1b ), while this does not hold in the joint case (figure 1c ). in this case, the overlap between the hard and the ambiguous instances is larger, indicating, on one side, that the classification task is more challenging and, on the other side, that the distinction among the three classes is less clear than it seems. the last set of training data has the same size of the ambiguous data (2,272 instances) but it is randomly extracted from the original training set (rand). it is a control to better asses the effectiveness of the data cartography on dalc-v2.0. random splits have been sampled three times with different seeds and no substitution. ## results for the analysis of the results we first focus on dalc-v2.0, and subsequently on hatechek-nl and op-nl. all fine-tuned models are compared against a baseline. for dalc-v2.0 and op-nl, we use a dummy classifier that always assigns the most frequent class, i.e., not; for hatechek-nl, we use a random classifier (balanced for the hateful and non-hateful class distribution). the random classifier for hatechek-nl represents a more realistic baseline than a majority label classifier given the nature of the benchmark. detailed results for each dataset are illustrated in appendix c. dalc-v2.0 while the results of the amb-class set may suggest a different way of selecting robust sub-samples using data maps, the rdm blocks question the validity of data maps with small datasets. when narrowing down the analysis to the differences between the reduced training data, we identify a peculiar behaviour of the data map splits. in particular, amb-dim and amb-class tend to overgeneralise the positive classes, with higher recall values at the cost of precision. given the distribution of the labels (see ## discussion concerning data maps, we observe inconsistent behaviours of the fine-tuned models: on dalc-v2.0, they are unsuccessful while they achieve either the best performances or very competitive results on hatechek-nl and op-nl. by analysing the variability per class across amb-dim, ambclass, and rdm, we can see that amb-dim is the data split that contains core ambiguous cases for all classes, separately and jointly. the ambiguity for the positive class remain relatively high also in amb-class, but we observe a drop in the values for the not class (0.096 for offensive language, 0.062 for abusive language, and 0.095 when the two dimensions jointly). this means that in the negative class we mainly have easy examples and relatively ambiguous cases for the positive classes. a similar distribution can be observed for the variability for all rdm splits, where the variability for the negative class is substantially lower than that of the positive classes. when compared to our expectations on the behaviour of the models based on the ambiguous and the random splits, these observations help to explain the results of these models. overall, the use of ambiguous examples only on the positive class(es) forces models to pay more attention towards the challenging cases and "disregard" the contributions of the easy ones. this confirms our explanation for the overgeneralisation of the positive class(es). as for the randomly extracted data (rdm), it appears that their better performances on dalc-v2.0 is an effect of the distribution of the training instances closer to those in the held-out test data. as for the amb-dim, there is a consistent pattern of underperformance across all test data. rather than issues in the variability scores, i.e., not very "strong" ambiguous cases, it appears that the culprit for the low results should be found in the size of the original dalc-v2.0 training data which makes it difficult to identify good ambiguous cases with respect to the easy (or hard) ones. a similar pattern has been identified by @xcite when applying data cartography to low-and very-low machine translation settings. furthermore, across all the test sets, we found that only for hatechek-nl the use of ambiguous training instances leads to improved out-of-domain performance as reported by @xcite . when comparing the results of our models against the english hatecheck for a bert model fine-tuned on @xcite , the core set of non-hateful functional tests (i.e., f9, f20-21, f23-24) are consistently failed in both languages. things are quite different for mhc. in this case, the tested model is fine-tuned by concatenating three datasets whose definitions of hate speech perfectly matches the one adopted in mhc. while for f9 results are excellent, the model still struggles for f20-21, f23-24 foot_1 6 conclusions and future directions in this paper we have presented an extensive benchmarking of models fine-tuned with dalc-v2.0 across three test portions: an internal held-out test, a functional benchmark, hatechek-nl, and a dynamic test, op-nl. our experiments have investigated the reliability of dalc-v2.0 as a training set for three classification tasks: offensive and abusive language detection in isolation and jointly. overall, addressing each task in isolation results in better performances than when running a joint experiment. the challenge here lies both in the strict connections between the two language phenomena in analysis and in the limited training data. when the fine-tuned models are applied on the out-ofcorpus test sets, we observe a good performance on op-nl and less satisfying results on hatechek-nl. the compatibility of the annotated phenomena in the training data actually plays a major role on this behaviour and it indicates that the quality of the annotated data in dalc-v2.0 contributes to develop robust models. we have further investigated the effectiveness of the use of data cartography to identify more informative subsets of training materials. unlike previous work, we observe a limited beneficial effects of this data selection method with dalc-v2.0. while the size of the dataset appears limited for an effective application of this method, we have found that selecting training subsets on the basis of the training dynamics of each annotated dimension results in better systems than when using training dynamics of the whole training split. the results on hatechek-nl clearly identify limitations of the use of dalc-v2.0 to detect hate speech. while its abusive dimension can be considered a good proxy, all fine-tuned models systematically fails on core non-hateful functional tests, indicating limitations in the annotated data. future work will focus on extending dalc-v2.0 with multiple hate speech datasets and further validate the functionalities of hatechek-nl.