---
title: "Exploring Data Augmentation Strategies for Hate Speech"
description: "This study compares ways to expand Roman Urdu training data and tests how they affect hate speech detection and recall on two benchmarks."
canonical: "https://research.elamur.ai/free/en/papers/azam-2022-exploring-data-augmentation-strategies-hate/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/azam-2022-exploring-data-augmentation-strategies-hate/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / Exploring Data Augmentation Strategies for Hate Speech Detection in Roman Urdu

# Exploring Data Augmentation Strategies for Hate Speech Detection in Roman Urdu

Paper · 2022 · Ubaid Azam, Hammad Rizwan and Asim Karim

**Authors:** Ubaid Azam, Hammad Rizwan and [Asim Karim](https://md.research.elamur.ai/free/en/authors/asim-karim/) · **Year:** 2022 · **Venue:** Proceedings of the Thirteenth Language Resources and Evaluation Conference · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

Cited by **3** papers in our library of the 163,136 papers whose bibliographies we read · Proceedings of the Thirteenth Language Resources and Evaluation Conference · [licence](https://creativecommons.org/licenses/by-nc/4.0/)

- [Publisher's page](https://aclanthology.org/2022.lrec-1.481/)
- [PDF](https://aclanthology.org/2022.lrec-1.481.pdf)

## Summary

A hate speech detector trained on a small collection of posts may learn how abuse is expressed in that collection and still miss it when people use different words. For Roman Urdu, Urdu written in the Latin script, the authors argue that the expense of collecting and annotating more posts makes this a difficult problem to solve by expanding datasets from scratch. They ask whether existing examples can supply useful variation. Data augmentation gives a classifier new training examples by editing a labeled post or generating text from it. The test is whether those examples help the classifier recognize content in held-out posts.

The paper compares several ways to create that variation. Some alter individual words, using replacements, insertions, swaps, or deletions. Others fill in words from their context or generate a new passage conditioned on an existing one. The authors test these strategies on RUSHOLD, which distinguishes categories such as religious hate, sexism, and profanity, and on Roman Urdu Toxic, or RUT, which asks whether a comment is toxic. They use the established benchmark splits and measures for each dataset and apply augmentation to the training portions.

On the RUSHOLD test split, the strongest result comes from training BERT+CNN-gram with mT5-generated text. Its Macro F1 rises from 75.0 to 76.0 and its reported recall from 74.0 to 75.0. A different strategy, synonym replacement, raises multilingual BERT’s Macro F1 from 67.0 to 73.0 on the same split. On RUT, the ensemble trained with augmentation achieves a mean F1 of 86.48 across the evaluation folds, compared with 86.35 for the original ensemble. Mean recall rises from 82.64 to 86.28, while mean precision falls from 90.41 to 86.76.

The differences among classifiers are as important as the highest scores. Some edits improve RUSHOLD Macro F1 while reducing recall, and every tested augmentation reduces the RUT support vector machine’s mean F1. The paper gives recall particular attention because a detector could flag posts for people to review. In that setting, missing harmful posts and sending extra benign posts to reviewers have different consequences. The benchmark results show that an augmentation can shift that balance even when its effect on the headline score is small.

## Deep dive: Exploring Data Augmentation Strategies for Hate Speech Detection in Roman Urdu

This study compares ways to expand Roman Urdu training data and tests how they affect hate speech detection and recall on two benchmarks. · about 34 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why Roman Urdu training data are difficult to expand

Writing Urdu in the Latin script makes it possible to express the same message with different spellings. The paper illustrates that variation in its examples, which include multiple written forms of related words and profanity. A training collection can therefore leave gaps even when it contains examples of the relevant topic or category. A classifier has to learn which differences are incidental to the label and which change what a post is doing. Those are distinct problems when both vocabulary and context carry information about whether a message is abusive.

The authors place the study in the context of social media moderation. They describe platforms using reports, human moderation, and automated detection to find harmful content. They also argue that coverage is uneven across languages and regions. In their account, much of the work on datasets and detection concerned English, and availability of labeled data for another language did not by itself imply that a platform could recognize harmful content in that language reliably. The paper treats Roman Urdu as a case where obtaining useful supervision remains a problem for [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/).

More data could help address gaps in vocabulary, topics, and kinds of abuse, but the authors explain why the usual collection process is expensive. A new post needs a label, and deciding on one can require familiarity with regional language and cultural context. The paper contrasts the use of crowdsourcing services for English datasets with the smaller pool of suitably qualified workers it describes for regional languages. The difficulty goes beyond knowing how to read a word. A reviewer may need to understand what the word refers to, whom the post addresses, and how the expression is used locally. This is part of the cost of [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/).

The authors also distinguish success on a benchmark from success outside it. They cite earlier work by Arango and colleagues for evidence that supervised detectors can perform well on their own datasets and deteriorate when the evaluation changes. A dataset collected over a relatively short period can offer recurring vocabulary, subjects, or patterns. These regularities help a classifier fit the available examples. They may offer much less help with posts written about a different event or by a different group of users. In this setting, additional training examples are valuable to the extent that they broaden the evidence a classifier sees.

The two Roman Urdu collections give the authors different reasons to try augmentation. RUSHOLD contains a substantial share of examples outside its Normal category, but the more specific categories divide that material into smaller groups. A classifier trying to distinguish sexism from religious hate or profanity needs examples of each. RUT is larger overall, and toxic comments form a much smaller share of it. The challenge there is to find the toxic class among many non-toxic examples. These differences make it possible to ask whether the same edits help under different kinds of supervision and class balance.

#### What earlier detectors tried to distinguish

One strand of earlier work asked how to represent a social media post for classification. The Roman Urdu study points to a Twitter dataset whose labels distinguished racism, sexism, and neutral content. Its benchmark used features such as text length and sequences of nearby words or characters, known as [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/). The related-work discussion then describes systems that combined learned representations and classifiers to improve performance on that dataset. The starting point for this history is [Hateful Symbols or Hateful People?](https://md.research.elamur.ai/free/en/papers/waseem-2016-hateful-symbols-or-hateful-people/).

Improved classification scores led to closer attention to the labels themselves. A post can contain an offensive expression without satisfying a study’s definition of hate speech. A rule that assigns a class whenever a listed word appears has trouble with this distinction because it acts on the word in isolation. The discussion is relevant to augmentation because a word edit can change the evidence needed to distinguish classes. Removing a term may erase the signal that justified the label, and adding one may change who appears to be targeted. The paper draws the distinction between hate speech and offensive language from [Automated Hate Speech Detection and the Problem of Offensive Language](https://md.research.elamur.ai/free/en/papers/davidson-2017-automated-hate-speech-detection-problem/).

The related-work review describes adjacent tasks with different boundaries. It cites work that distinguishes cyberbullying from hate speech and uses deep learning to benchmark the resulting data. The paper also points to shared evaluations that give participating teams annotated datasets and ask them to identify offensive content or classify it more specifically. Those efforts help explain why a score must be understood in relation to the categories it measures. The cyberbullying example is [Deep Learning for Detecting Cyberbullying Across Multiple Social Media Platforms](https://md.research.elamur.ai/free/en/papers/agrawal-2018-deep-learning-detecting-cyberbullying-across/).

The shared tasks named in the paper include OffensEval at SemEval and HASOC at FIRE. They provide labeled tasks at different levels of detail, and the paper describes HASOC in connection with research across languages. It also notes work on locating the span that makes a post toxic, or assessing which words influenced a prediction. A whole-post label tells a training procedure which class to associate with the post. A span points to a smaller piece of evidence. The Roman Urdu study edits and classifies entire examples, so it must consider the possibility that an edit touches the decisive part of a post. The related shared tasks include [OffensEval](https://md.research.elamur.ai/free/en/papers/zampieri-2019-semeval-2019-task-6-identifying/) and [Toxic Spans Detection](https://md.research.elamur.ai/free/en/papers/pavlopoulos-2021-semeval-2021-task-5-toxic/).

#### What earlier augmentation work offered

Augmentation starts from a labeled example and attempts to produce another example that can receive the same label. In a text task, the constraint is semantic as well as grammatical. An edit can leave a sentence easy to read while changing its target or intent. Another edit can make the sentence awkward while leaving the evidence for the class visible. The authors need ways to vary the features that detectors encounter in training while managing the risk of teaching them from examples with the wrong label.

A group of inexpensive operations gives the study its starting point. Earlier work called Easy Data Augmentation, or EDA, uses synonym replacement, insertion, swapping, and deletion. Its control parameter α represents the share of words affected by an operation. An edit to a small part of a post leaves more of the original available, though its effect still depends on which word changes. The Roman Urdu paper uses these operation types and adapts how they find words and protect selected vocabulary. The starting point is [Easy Data Augmentation](https://md.research.elamur.ai/free/en/papers/wei-2019-eda-easy-data-augmentation-techniques/).

The authors also discuss augmentation that edits syntactic structure. Dependency tree morphing can remove links to crop material or reposition fragments around a root. That approach assumes a usable analysis of how words depend on one another. Azam and colleagues point to difficulties extracting reliable part-of-speech information for informal romanized text and regard those difficulties as an obstacle to using tree-based editing in their setting. Their experiments instead use operations that can act directly on words or rely on learned contextual representations. The earlier proposal is [Dependency Tree Morphing for Low-Resource Languages](https://md.research.elamur.ai/free/en/papers/sahin-2018-data-augmentation-dependency-tree-morphing/).

The paper describes other ways to obtain new wording when a synonym resource is unavailable. One earlier study uses vector similarity for replacement, experiments with mixing words, and considers round-trip translation. The Roman Urdu authors highlight its finding that vector-based alternatives are viable without a formal synonym resource and its account of the cost of translation. Another approach predicts a replacement from the words around the position being edited. This makes the candidate depend on the sentence where it will appear, whereas a fixed embedding lookup starts with the word itself. The relevant contextual work is [Contextual Augmentation](https://md.research.elamur.ai/free/en/papers/kobayashi-2018-contextual-augmentation-data-augmentation-words/).

Related work also supplied a precedent for generating larger pieces of text. The authors describe English hate speech experiments that created sequences with GPT-2 and used them to train a detector. They also discuss Hate-GAN, which trained a generator and a discriminator and was intended partly to address class imbalance. Such work motivates testing generation in Roman Urdu, where a suitable system has to handle the language of the input. The current paper puts generation alongside word-level editing so it can compare the resulting classifiers under the same benchmark.

#### Why the authors care about missed posts

In the moderation workflow that motivates the study, a classifier would flag material for human review. Recall measures how much of the material belonging to a target class the classifier catches. Precision measures how frequently an assignment to that class is correct. A flag that turns out to be wrong consumes reviewer attention. A harmful post that receives no flag bypasses that review process. This gives the authors a reason to examine recall separately from the benchmark’s headline F1 measure.

That motivation changes the research question. One question is whether augmentation improves the established score for a dataset. Another is whether the trained classifier catches more examples of interest. A setting can do well on either question and worse on the other. When the two move together, the remaining issue is whether a drop in precision accompanies the gains. The experiments preserve the benchmark measures and report precision and recall alongside them so that these differences remain visible.

### The method, step by step

#### From labeled posts to edited training examples

The experiment begins with the labeled training portion of an existing benchmark. The authors create new text by changing a source post or conditioning generation on it. The training procedure uses the augmented data to learn the same classification task as before. For RUSHOLD, that means predicting the supplied classes. For RUT, it means distinguishing toxic from non-toxic comments. The classification task stays fixed while the authors vary the kind of training examples available to the classifier.

A useful way to understand the operations is by asking where the new material comes from. Swapping and deleting draw only on words already in the post. Replacement and insertion use an outside source of plausible words. Contextual replacement asks a predictor to fill a gap in the post. Conditional generation uses the example as the basis for a larger passage. All of these operations depend on an inheritance assumption. The resulting text is used as supervision for the category associated with its source. The examples in the paper show why this assumption deserves scrutiny, particularly when an edit changes several words or generation produces a new proposition.

How the authors test Roman Urdu data augmentation The steps in order.

The authors keep augmentation on the training side of the benchmark. A test score then reflects predictions on the original evaluation examples, even when training included quite different-looking text. The RUSHOLD experiment uses its existing train, validation, and test partitions. For RUT, the authors use the earlier study’s cross-validation setup. In both cases, the comparison asks how changing the data used for learning affects the same underlying [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) task.

#### Finding words to replace or insert

Synonym replacement and random insertion share a step: both need a candidate word related to something in the source. The authors discuss dictionaries as one possibility and say that Roman Urdu lacks suitable lexical resources for their implementation. They consider several kinds of learned word representation and choose an existing Roman Urdu Word2Vec resource. These representations put words in a vector space based on patterns in their training text. The lookup uses the geometry of that space to make a practical choice about which words resemble one another. The approach builds on [Word2Vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/).

The starting vectors come from the RUSHOLD authors, who trained them on more than 4.7 million tweets. Azam and colleagues adapt the vectors further using an openly available Roman Urdu collection. The paper distinguishes the role of this collection from that of the benchmarks. It supplies material for adapting the word representations, and the authors say they leave it out of evaluation because it was unpublished and lacked proper benchmarking. Its role is to improve the usefulness of the vocabulary lookup, a form of [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/).

For synonym replacement, the procedure randomly chooses source words to edit. For each selected word, it retrieves the top 5 neighbors by cosine similarity and samples 1 of them as the substitute. Cosine similarity measures how closely the vectors point in the same direction. Words that end up near one another by that measure can include alternative spellings and terms that occur in similar contexts. Similarity is evidence that the word may be useful as a replacement. Its appropriateness in a particular sentence remains a separate question because the lookup operates on the selected word’s representation.

Random insertion uses the same retrieval and sampling step. It keeps the selected source word and puts the new word at a randomly chosen position. The extra item thus acquires a role from where it lands, and that position need not be one where a writer would have used it. In the paper’s example, insertion retains the basic source wording while adding changes in emphasis and an additional offensive expression. The operation can introduce vocabulary without requiring the classifier to lose the original clue. It can also alter the character of the post by adding a clue that was absent before.

Sampling among several candidates is a deliberate choice for both operations. Always using the closest neighbor would give the same proposed word whenever the same source word is selected. Sampling makes repeated occurrences a source of variation while limiting the candidates to a ranked set. The paper’s example of replacement shows both sides of this decision. A variant spelling can help represent informal writing, while a substitute elsewhere in the same example alters the action expressed by the post. The name synonym replacement describes the intended role of the edit. The actual candidates come from [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/).

A search parameter governs the share of words selected for replacement or insertion. Its effect differs between the operations. Replacement removes the observed form and teaches the classifier with an alternative in its place. Insertion keeps the original and makes the example longer, with a new word at a sampled location. Using the same selected share for both methods controls the extent of the operation in their respective implementations. It does not make the linguistic changes equivalent.

#### Changing position or removing a word

Random swapping takes words already present in the post and switches their positions. The procedure selects a pair at random, and a setting determines how many swaps to apply. The vocabulary remains available after the edit, including any term that helped support the original label. The resulting sequence can make different words appear next to one another or put them in less plausible positions. In the paper’s example, the swapped version keeps the source’s recognizable words while making their order harder to interpret.

This operation changes the evidence available to classifiers that use order. A neighborhood of words can carry a cue even when each word on its own is ambiguous. Shuffling changes those neighborhoods, so it can make a useful cue harder to rely on and expose the learner to unfamiliar arrangements. The effect depends on how the classifier represents the text and on which words move. A swap is a small change in the set of words and potentially a large change in how they combine.

Random deletion also works directly with the words in the post, but it needs a way to avoid removing all the explicit evidence for its label. The authors use a lexicon, a list of words treated as potentially hateful. RUSHOLD already comes with a lexicon from its dataset creators. For RUT, the augmentation study constructs one by manually inspecting the dataset vocabulary. The resource is used as a constraint on editing. It does not supply a replacement annotation for the whole post.

The implementation assigns each word a score in the 0 - 1 interval and considers words below a chosen threshold for deletion. A listed word can be removed when another listed word remains. The procedure blocks deletion when it would remove the last remaining hateful word identified by the lexicon. Thus the safeguard can preserve an explicit cue without requiring the augmented example to retain every such cue in the source. In the example shown in the paper, the augmented text keeps its offensive word after losing part of the clause around it.

The safeguard is narrower than preserving the full meaning. A post can depend on the grammatical relation between an expression and its target, or on surrounding words that change the force of a statement. Retaining a lexicon entry establishes that an explicit item survived the operation. The label also depends on what the remaining sentence says. This distinction matters when comparing deletion with swapping. Deletion can reduce the set of cues available as well as changing their context, while swapping preserves the items and redistributes them through the sequence.

#### Generating a passage from a source post

The generation experiment uses mT5, which the authors describe as a multilingual text-to-text system trained on tasks that include paraphrasing and completing text. A source example serves as the condition for generating a new hateful sample. In practical terms, the system receives text from the dataset and produces text influenced by that input. Its output can go beyond changing a word or its position and introduce wording that has no matching slot in the source. The system is based on the [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) architecture.

The paper’s generation example keeps a religious reference from the source and adds a new clause with a more explicit threat. It illustrates why generation offers a different kind of diversity from synonym replacement. The training example can express a related theme through newly generated material, rather than relying on a set of interchangeable words. It also illustrates why conditioning should be understood as an influence on the produced text. The generated passage can say something substantively different from the post that prompted it.

Length is the generation setting specified in the experimental setup. The authors use a minimum of 50 characters and a maximum of 100 characters, which they describe as about 10 to 30 words. These are constraints on the generated text. The use of a character window gives the authors a way to constrain output size in short-post experiments, while the example shows that even a short passage can introduce a different action or relationship. The paper evaluates this form of [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/) through the classifier trained with its outputs.

#### Filling in a word from its context

The contextual replacement technique also begins with an existing post. The authors randomly choose positions, mask the words at those positions, and ask multilingual BERT to predict the missing content. Masking hides an item while leaving the surrounding text available. The resulting ranking can depend on the wording around the gap, so the technique looks for an expression that fits into the particular post. The source of these predictions is [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/).

The authors again sample among the top 5 candidates, this time ranked by the probability assigned by the masked-word predictor. This differs from choosing one of the nearest neighbors of the original word. The prediction is framed as filling a gap given the surrounding text. A plausible filler can therefore differ in meaning from the hidden word. In the paper’s example, a specific destination becomes an indefinite one, and an offensive term appears in a different spelling. The output is visibly related to the source even though it changes what a part of the sentence refers to.

The initial contextual outputs led the authors to adapt multilingual BERT. They take the collection used for further training of the Word2Vec resource and add randomly sampled tweets. They then train BERT on its usual task of recovering masked content. The authors report that this produces examples with greater variation in wording and improved quality. Their evaluation of downstream detection treats the adapted masked-word method as one augmentation option alongside the others. It does not separately compare detectors trained with outputs from the initial and adapted versions.

Multilingual BERT has distinct roles in the study. In this operation, it proposes wording for the training examples. In the RUSHOLD experiments, multilingual BERT also appears as a classifier, and its representations supply the input to the CNN-gram classifier. Those uses need to be kept separate when reading the results. An augmented dataset generated using a contextual predictor can be fed to a different classifier, and a BERT-based classifier can receive examples created by a method that uses no masked prediction.

#### Choosing settings and running the comparisons

To start, the authors use benchmark classifiers for both datasets to search for augmentation settings. For synonym replacement, random insertion, and masked-word replacement, they explore a ratio from 0 to 1 in increments of 0.1. The ratio controls the proportion of words selected for that operation. They choose 0.2 for the main experiments. Their account says that higher settings reduced performance, while lower settings had little effect. The setting identifies the amount of editing they carried forward under these conditions. Its interpretation depends on the operation to which it applies.

Deletion has its own scale for choosing which words to remove. The authors search thresholds from 0 to 1 and choose 0.4. A threshold is a cutoff on the assigned scores, with the lexicon safeguard applied to the result. It does not specify an exact proportion of words removed from every post. Swapping is configured by a count. The authors test between 1 and 5 swaps and settle on 2. The generation experiment uses its stated length window.

The comparisons then pair each augmentation method with the classifier families selected from the earlier benchmarks. The procedure ranks alternatives by the primary measure already associated with each dataset and also reports accuracy, precision, and recall. Most rows concern one augmentation applied to the training data for one classifier. The augmented RUT ensemble is constructed from components trained with their respective augmentation choices. The experimental unit in that comparison is the ensemble of trained classifiers, with its components described separately below.

### Experiments and results

#### What the two benchmarks measure

RUSHOLD contains 10,012 tweets and was originally collected with the help of a hate lexicon. Its creators supply fine-grained and coarse-grained annotations. The fine-grained inventory includes Normal, Abusive/Offensive, Religious Hate, Sexism, and Profane. The paper lists 5349 examples as Normal and 2,402 as Abusive/Offensive, with 782 for Religious Hate, 839 for Sexism, and 640 for Profane. In the coarse grouping, all the categories other than Normal are combined. The augmentation results discussed here use the fine-grained task, as reflected in the primary Macro F1 measure and the category-level error comparison. The benchmark comes from [Hate-Speech and Offensive Language Detection in Roman Urdu](https://md.research.elamur.ai/free/en/papers/rizwan-2020-hate-speech-offensive-language-detection/).

The RUSHOLD partition sizes reported for training, validation, and testing are 7209, 801, and 2003 respectively. The authors use the available partitions and report test performance from them. Because the classifier can assign one of several labels, the result depends both on detecting that a tweet is outside the Normal class and on choosing the appropriate specific category. Macro F1 gives each class’s F1 equal weight in the average. It makes a change in a smaller class relevant to the headline score even when that class accounts for relatively few messages.

RUT has 72,771 comments collected across social platforms that include YouTube, Facebook, and Twitter. The authors report 13,097 toxic and 59,674 non-toxic examples. Toxic examples account for 18 percent of the collection as stated in the paper. The dataset uses binary labels, so the key decision is whether a comment belongs to the toxic class. The earlier RUT work supplied the partitioning seeds, including the seed used to form validation data from the training portion. The training, validation, and test sizes reported in the augmentation paper are 49,483, 8733, and 14,555.

The RUT experiment uses 5-fold cross-validation. Under this procedure, training and testing are repeated across partitions, and the paper reports the average performance over the test folds. This differs from reading the RUSHOLD table as scores on its designated test split. The RUT table includes a value after a ± sign for each mean. Both are worth retaining when comparing close results, since a small difference in the means alone gives little information about consistency across folds. The paper uses F1 as the primary RUT metric and separately reports the other measures, in keeping with the original [benchmark evaluation](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/).

The measures answer related questions. Accuracy counts how frequently the predicted label matches the reference across examples. Precision for a class concerns the examples assigned to it, and recall concerns the examples that belong to it. F1 combines precision and recall so that a low value on either affects the score. Macro F1 computes the combination within each class before averaging those class scores. The precision and recall columns in the RUSHOLD table are best read as the paper’s reported measures. The paper does not specify an averaging convention for those columns in the experimental description.

#### RUSHOLD classifiers and headline results

The authors compare augmentation on multilingual BERT, XLM-RoBERTa, and BERT+CNN-gram. The first pair consists of multilingual transformers trained for classification in the benchmark setup. BERT+CNN-gram uses multilingual BERT embeddings with a convolutional classifier, which can learn from local patterns in the input representations. It is the strongest classifier from the original benchmark among those used in the study. Its unaugmented row provides the comparison for deciding whether the strongest augmented result advances the benchmark.

The best BERT+CNN-gram setting uses mT5 generation. It reports RUSHOLD test Macro F1 of 76.0, compared with 75.0 for the unaugmented classifier. Accuracy is 83.0 for the generated-text setting and 82.0 for the baseline. Precision is 77.0 compared with 75.0, and recall is 75.0 compared with 74.0. The same setting therefore has higher reported values on each of the listed measures. Its main benchmark gain is small relative to the gap seen with augmentation for some of the weaker baseline classifiers.

BERT+CNN-gram settings on RUSHOLD test Macro F1 Conditional generation gives the highest Macro F1, while masked replacement ties the unaugmented baseline.

**The numbers**

| System or setting | Macro F1 |
| --- | --- |
| No augmentation | 75.0 |
| Synonym replacement | 74.0 |
| Random swap | 74.0 |
| Random insertion | 73.0 |
| Random deletion | 74.0 |
| mT5 generation (this paper) | 76.0 |
| Masked-word replacement | 75.0 |

The rest of the BERT+CNN-gram rows show how a close result can change with the measure selected. Masked-word replacement ties the unaugmented Macro F1 at 75.0 and recall at 74.0. It posts precision of 76.0 and accuracy of 83.0, both higher than the corresponding unaugmented values. Random insertion has Macro F1 of 73.0 and recall of 72.0. The other word-editing settings shown in the chart each report Macro F1 of 74.0. For this classifier, the strongest generated-text result is an exception within the comparison.

Multilingual BERT begins at Macro F1 of 67.0. Every augmentation row has a higher value. Synonym replacement reaches 73.0, random insertion reaches 72.0, and swapping reaches 71.0. Generation reports 69.0, while deletion and masked-word replacement each report 68.0. The ordering gives a concrete example of why the dataset’s best strategy and a given classifier’s best strategy are different questions. Generation leads the BERT+CNN-gram comparison, while replacement by embedding neighbors leads the multilingual BERT comparison.

Multilingual BERT’s recall also rises under each of the augmentation settings. The baseline reports 65.0, whereas synonym replacement reports 73.0 and insertion 71.0. Under synonym replacement, precision reaches 73.0 from 72.0 and accuracy reaches 81.0 from 77.0. The same relationship between measures does not hold across all settings. With deletion, recall is 70.0 while precision is 67.0 and accuracy is 76.0. The recall improvement in this case accompanies lower scores on measures that penalize additional mistakes elsewhere.

For XLM-RoBERTa the highest augmented Macro F1 comes from swapping, at 74.0 compared with a baseline of 72.0. Synonym replacement, deletion, and generation each score 73.0. Insertion reaches 72.0, and masked-word replacement falls to 70.0. The baseline’s recall of 75.0 exceeds every augmented setting for this classifier. Swapping comes closest with recall of 74.0. At the same time it reports precision of 75.0, against 70.0 without augmentation. This is a setting in which a better headline score accompanies a decline in how much of the target material the classifier finds under the paper’s recall measure.

The three RUSHOLD comparisons therefore offer different empirical patterns on the same test split. The strongest overall setting improves both Macro F1 and recall. Multilingual BERT benefits broadly from edits under both measures. XLM-RoBERTa has higher Macro F1 for several edits while recall consistently declines. The common dataset makes the differences especially relevant. Changing the classifier is enough to change which augmentation is preferred and whether the preference survives a switch from Macro F1 to recall.

#### RUT components and the augmented ensemble

RUT’s component baselines include a support vector machine, abbreviated SVM, and logistic regression, abbreviated LR. Both use TF-IDF features. These give a text representation based on word usage within each example and the wider collection. The other components are bidirectional recurrent networks. BiLSTM uses long short-term memory units, and BiGRU uses gated recurrent units. Both take fastText skipgram embeddings as input. Their training and input representations give different ways to respond to edited or additional text. The first pair share [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) as their input representation.

The strongest system from the original RUT benchmark is an ensemble that combines the SVM, BiLSTM, and BiGRU. For the augmented counterpart, the authors use random insertion for the SVM and BiLSTM components and random swapping for BiGRU. These are selected component settings, so the resulting ensemble combines classifiers that saw differently augmented training data. A majority vote combines their decisions. The comparison reports the performance of this combination as well as the scores for the components.

The original ensemble’s mean test F1 is 86.35 ± 0.66. The augmented ensemble reports 86.48 ± 0.88. The paper describes the gain as 0.13 on the F1 scale in its results discussion. Mean test accuracy moves from 95.30 ± 0.20 to 95.14 ± 0.34. The much clearer numerical shifts occur in precision and recall. Mean precision moves from 90.41 ± 0.32 to 86.76 ± 2.17, and mean recall moves from 82.64 ± 1.13 to 86.28 ± 2.02.

Original and augmented RUT ensembles by mean test F1 The ensemble built from augmented components has a slightly higher mean F1.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Original majority-vote ensemble | 86.35 |
| Majority-vote ensemble with augmented components (this paper) | 86.48 |

Original and augmented RUT ensembles by mean test recall The ensemble trained with augmented data catches more of the toxic class on average.

**The numbers**

| System or setting | Recall |
| --- | --- |
| Original majority-vote ensemble | 82.64 |
| Majority-vote ensemble with augmented components (this paper) | 86.28 |

The ensemble is the clearest instance in the paper of a small F1 gain accompanying a larger change in the kinds of predictions the system makes. More toxic comments are recovered on average, and a smaller share of the comments flagged as toxic actually belongs to that class. If the predictions determine what people review, both quantities matter. The row gives evidence about the balance on the RUT folds. It leaves reviewer workload and outcomes to be measured in an operational evaluation.

#### How individual RUT classifiers performed

For the SVM, the unaugmented mean F1 is 83.08 ± 0.30, higher than every augmented SVM score in the comparison. Insertion is the strongest augmented SVM setting by F1 at 81.25 ± 0.82, which helps explain its selection as the SVM member of the augmented ensemble. Deletion yields an F1 of 79.28 ± 0.56. Swapping produces the highest mean SVM precision in the table, 92.20 ± 4.71, alongside mean recall of 68.89 ± 8.20. Without augmentation, its precision is 82.69 ± 2.00 and its recall is 83.56 ± 1.70. The precision improvement under swapping comes with substantially fewer toxic examples recovered.

Logistic regression responds differently despite using the same input feature type. Its original mean F1 is 82.00 ± 0.52 and its best augmented value is 82.06 ± 0.46 with swapping. Its highest mean recall in the table comes from deletion, at 81.98 ± 1.43 compared with 80.19 ± 1.91 for the baseline. Mean precision for deletion is 79.74 ± 1.22 and mean F1 is 80.83 ± 0.79. A choice based on maximum recall would thus favor a different version from a choice based on maximum F1.

BiLSTM’s best augmented F1 is 85.51 ± 0.96 after insertion, compared with 85.60 ± 0.70 without augmentation. Insertion is the setting used in the ensemble. Its mean recall is 83.74 ± 4.22, above the baseline’s 81.80 ± 1.20, while mean precision is 87.71 ± 3.52, below the baseline’s 89.78 ± 0.35. The deletion setting reaches a higher mean recall of 85.25 ± 1.24, alongside F1 of 84.94 ± 0.81. These alternatives give the authors separate evidence about a component selected for overall score and a setting that catches more of the toxic class.

For BiGRU the highest mean F1 comes from swapping, the setting included in the augmented ensemble. It reaches 85.51 ± 0.79 compared with the baseline’s 85.37 ± 0.72. Its mean recall is 84.72 ± 1.66, against 80.59 ± 0.82 without augmentation. Deletion reaches a mean recall of 84.95 ± 1.60, with F1 of 84.41 ± 0.48. The recurrent classifiers therefore offer examples of higher recall with different outcomes on F1, and the ensemble shows what happens when the authors combine selected variants.

### What the ablations show

#### What a change in augmentation can establish

The paper offers controlled comparisons among augmentation strategies, an initial search over edit settings, and class-level error analyses. Its closest equivalent to an ablation compares a classifier trained without augmentation with the same classifier trained using examples from a particular operation. The differences indicate whether that operation, with its chosen settings and resources, helped that classifier under the benchmark. They give less direct evidence about the individual design choices inside the operation.

The replacement method, for instance, includes choosing positions, retrieving neighbors, and sampling one of them. The experiment tests the package. The paper does not present separate downstream scores for taking the closest neighbor every time or for using the original vectors before their adaptation. The contextual method likewise bundles the amount of masking, adaptation of the predictor, and candidate sampling. Each comparison can establish the performance of the implemented variant without assigning a portion of the gain or loss to one of those choices.

The clearest differences come from holding the benchmark fixed and looking across classifiers. RUSHOLD synonym replacement is helpful to multilingual BERT on both Macro F1 and recall, while the same operation yields lower Macro F1 and recall for BERT+CNN-gram than its unaugmented baseline. Swapping gives XLM-RoBERTa the highest Macro F1 among its tested settings, even though that classifier finds a larger share of target material without augmentation. Generation yields the best BERT+CNN-gram result by both measures. These comparisons show that a method’s value depends on what is learning from the edited examples.

A comparison of insertion and replacement helps illustrate how little can be inferred from sharing a resource. The operations use the same embedding lookup, but one adds a word at a new location and the other substitutes it at the selected position. For multilingual BERT, both are among the strongest RUSHOLD options by Macro F1 and recall. For the RUT SVM, insertion scores better on F1 than replacement, while neither reaches the unaugmented score. Keeping the original word available is a concrete procedural difference. The experiments do not isolate it from all the other consequences of insertion.

The RUT deletion results make the dependence on classifier and measure particularly clear. The lexicon constraint lets deletion preserve an explicit cue while taking other material away. Under this procedure, deletion gives both recurrent components their highest mean recall among the tested settings. Their F1 scores are lower than those of their respective unaugmented classifiers. The SVM also loses mean F1, and its mean recall declines. Deletion can therefore yield a training set with useful evidence for recovering more toxic text under some classifiers. The design of the experiment leaves the exact cues responsible unresolved.

#### What the search says about edit strength

The authors’ initial search indicates that increasing the share of changed words beyond the chosen setting can reduce downstream performance. For the operations governed by the selected ratio, the search favors 0.2, with relatively little effect reported from choosing less. That is consistent with a practical tension in augmentation. Editing creates additional surface variation, while changing too much can weaken the connection to the text that supplied the label. The search reports a performance pattern. It does not measure changes in meaning or give a rating of label preservation at each edit strength.

Searches for swapping and deletion are interpreted on their own terms. Swapping uses an operation count, with 2 preferred among the tested choices. Deletion uses a score threshold, with 0.4 preferred. The paper gives the selected settings and a narrative description of the search, rather than full score curves for each classifier and dataset. These comparisons identify the configurations carried forward into the main experiment. They leave open how sensitive any individual classifier is near the selected value or whether a different setting would improve a specific class’s recall.

The masked replacement results also separate the reported quality of generated examples from measured classification performance. The authors say that adaptation improved the outputs they observed. On the RUSHOLD test set, the final masked-word method still reduces Macro F1 for XLM-RoBERTa, ties the BERT+CNN-gram baseline, and exceeds the multilingual BERT baseline by a small margin. Example quality and downstream score refer to different properties. The results offer direct evidence about the latter for the implemented technique and qualitative observations about the former.

#### Which errors change

For RUT, the authors show a confusion display comparing unaugmented BiLSTM with BiLSTM trained using random insertion. A confusion display breaks predictions down by the reference class and the assigned class. In the toxic row, the fraction of examples predicted toxic rises from 0.816 to 0.826, and the fraction predicted non-toxic falls from 0.184 to 0.174. In the non-toxic row, the fraction predicted toxic rises from 0.02 to 0.024. The same comparison therefore reveals both the reduction in missed toxic examples and the increase in non-toxic examples assigned to the toxic class.

The BiLSTM display is a separate presentation from the table of test-fold means. It supplies an example of how predictions move between the binary classes. The authors explain that they used BiLSTM because reproducing the ensemble for a confusion display would require substantial computation. The display consequently illustrates a component’s error pattern under insertion. It does not locate the ensemble’s errors or show which disagreements among its members produced the ensemble’s recall result.

The RUSHOLD comparison shows BERT+CNN-gram with and without generated training text. The correct-class fraction for Abusive/Offensive rises from 0.71 to 0.73. The corresponding fraction for Normal rises from 0.92 to 0.93, and the one for Profane rises from 0.63 to 0.64. The Religious entry remains at 0.75. The sexism entry moves from 0.72 to 0.70. Reading the diagonal entries by class shows that the higher overall Macro F1 coexists with reduced correct classification for sexism.

That last distinction matters because the class-level display and aggregate score answer different questions. Macro F1 includes the precision and recall of individual classes before averaging. A diagonal entry shows only the share of reference examples of a class that went to its correct prediction. The rise in Macro F1 cannot be attributed just to the higher diagonal entries without examining the off-diagonal errors as well. The display does establish that the effects of augmentation are uneven across labels and that the improved benchmark score does not describe each category equally well.

The example edits and the error displays give complementary evidence. An example edit shows the type of change a training post can undergo. A confusion display shows how error patterns differ after training. The paper does not trace individual test predictions back to particular edits. It can therefore show that some changes in training data accompany improved detection of particular classes, while leaving the mechanism at the level of plausible explanations drawn from the operations.

### Limitations

#### Limits the authors state

The authors frame augmentation as a response to the expense and difficulty of collecting more annotated text. They describe concerns about detectors that fit the dataset assembled for them and then struggle in use. Their experiments evaluate Roman Urdu on existing benchmarks. Their conclusion calls for developing and evaluating more methods, both for Roman Urdu and for other languages. The scope of the evidence is therefore the datasets, classifier families, and augmentation procedures investigated in the paper.

They also identify practical limitations in the resources used for the edits. The supplementary text collection helps adapt the word representations and the masked-word predictor, but the authors exclude it from their benchmark evaluation because it is unpublished and lacks adequate benchmarking. They report inferior initial outputs from masked prediction, which motivates adapting BERT with Roman Urdu text and sampled tweets. Their lexicon safeguard for deletion addresses a narrower, identifiable problem. Removing the last explicit hateful word can strip away an important cue for the training label.

The authors explicitly discuss unfavorable outcomes. They identify the decline in XLM-RoBERTa recall when augmentation is applied and the loss of F1 for the RUT SVM. They describe precision falling in settings where recall rises, including the augmented RUT ensemble. Their argument for recall is tied to a workflow in which moderators review flags. The study’s measurements establish how frequently the benchmark examples are caught and how reliable the resulting positive predictions are under the reported settings.

The paper also states a computational limit on its error analysis. It uses BiLSTM rather than the RUT ensemble to illustrate changes in class errors because constructing the ensemble display would require reproducing a costly run. That choice leaves an informative binary comparison for insertion, with directly visible changes on both sides of the decision. The strongest RUT system is characterized by its aggregate test-fold results.

#### Limits visible in the experimental design

The concern about performance outside the training collection motivates the work, but the experiments use the original RUSHOLD partitions and RUT cross-validation protocol. Those evaluations estimate performance on held-out data under each benchmark setup. They do not test a different collection period, a new platform held apart for transfer, or a move between datasets. RUT includes data from multiple platforms. The reported fold average leaves open how well the augmented systems would perform on a platform excluded from training, or whether a gain is concentrated in material from a particular source.

The use of both benchmarks broadens the evidence about Roman Urdu, while their differences limit how directly the results can be compared. RUSHOLD uses several classes with different meanings and averages their F1 scores. RUT has a single toxic label alongside a non-toxic one and uses F1 for the binary task. The training approaches also differ. A method that leads one comparison and trails another has been tested under different class definitions, data distributions, and classifiers. The results do not identify which of those changes explains the differing rankings.

Label preservation is assumed by the training procedure and remains incompletely measured. A word found through cosine similarity can have the wrong meaning in a particular sentence. A masked filler can be fluent and still change the target. Swapping can disturb the relationship between clauses, and deletion can remove words that show why a term is being used. The example of conditional generation goes further by adding new threatening content. The paper illustrates these kinds of changes and reports performance after training. It gives no rate of label agreement between source and augmented posts based on fresh human annotations.

The lexicon protection offers a concrete safeguard with a limited reach. Keeping a listed expression can preserve explicit evidence, but the categorization also depends on how the expression is used. RUSHOLD separates kinds of material that can share offensive words. A safeguard based on the last surviving lexicon entry does not establish that the grounds for the original fine-grained category survive an edit. The paper does not compare protected deletion with otherwise identical deletion lacking the safeguard, so its contribution to the reported scores remains unresolved.

The comparison also leaves questions about which aspects of augmentation account for a gain. A classifier receives edited or generated examples, and the amount and type of training text change together. The paper does not describe a matched comparison against simply repeating original examples, a systematic per-class accounting of added examples, or separate downstream tests of candidate sampling and resource adaptation. A score improvement evaluates the full training setup as implemented. It is insufficient to attribute the improvement solely to greater variety, changes in label balance, or regularization through noisier training input.

Some changes are small in relation to the variation shown in the RUT table. The mean F1 of 86.48 ± 0.88 for the augmented ensemble and 86.35 ± 0.66 for the baseline establishes the ordering of the reported means. The paper does not give a paired significance test or show that every fold improves. Likewise, the fixed-split RUSHOLD table gives the scores reported for that benchmark without repeated-run variation. The empirical rankings are informative for the displayed runs, with limited evidence about how stable close differences would be under new training runs or samples.

The assembled RUT ensemble provides evidence for a specific combination of augmented classifiers. Its random insertion and random swapping settings were chosen with reference to component performance. The paper does not remove each augmented component in turn or compare the reported ensemble with every alternative composition. It cannot identify which component accounts for the extra recall, or whether another combination would offer a better precision–recall balance. The component confusion display provides some insight into insertion for BiLSTM, while the role of interactions among ensemble members remains open.

Finally, the moderation motivation does not establish a deployment outcome. The experiment reports precision and recall at the evaluated classification settings. It does not compare thresholds, track time spent by reviewers, or measure what happens to missed or incorrectly flagged content after a human decision. Higher recall has a concrete benchmark interpretation and a plausible role in a flagging workflow. Whether the precision cost is acceptable would depend on the stream of posts, the review process, and the consequences of each type of error. The paper supplies evidence for the classifier comparison within that larger question.

### What came after

No later study is documented as extending or independently evaluating this comparison. The authors close by proposing further augmentation experiments for Roman Urdu and other languages. That agenda follows from the differences they observed within Roman Urdu itself. Generation yielded the strongest RUSHOLD result with BERT+CNN-gram, while simple word edits were part of the strongest RUT ensemble. The paper thus leaves open whether those choices would carry over to another collection, a different class inventory, or a language with different resources for creating plausible edits.

## Cite

Cite as Ubaid Azam, Hammad Rizwan and Asim Karim. 2022. Exploring Data Augmentation Strategies for Hate Speech Detection in Roman Urdu. Proceedings of the Thirteenth Language Resources and Evaluation Conference.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{azam2022exploring,
  title = {{Exploring Data Augmentation Strategies for Hate Speech Detection in Roman Urdu}},
  author = {Ubaid Azam, Hammad Rizwan and Asim Karim},
  booktitle = {Proceedings of the Thirteenth Language Resources and Evaluation Conference},
  year = {2022},
  url = {https://aclanthology.org/2022.lrec-1.481/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
