---
title: "Abusive and Threatening Language Detection in Urdu using"
description: "This study compares Urdu tweet classifiers and finds that prior Arabic hate-speech training gives the best results for detecting abuse and threats."
canonical: "https://research.elamur.ai/free/en/papers/das-2021-abusive-threatening-language-detection-urdu/"
---
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/das-2021-abusive-threatening-language-detection-urdu/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Abusive and Threatening Language Detection in Urdu using Boosting based and BERT based models: A Comparative Approach

# Abusive and Threatening Language Detection in Urdu using Boosting based and BERT based models: A Comparative Approach

Paper · 2021 · Mithun Das, Somnath Banerjee and Punyajoy Saha

**Authors:** [Mithun Das](https://md.research.elamur.ai/free/en/authors/mithun-das/), [Somnath Banerjee](https://md.research.elamur.ai/free/en/authors/somnath-banerjee/) and [Punyajoy Saha](https://md.research.elamur.ai/free/en/authors/punyajoy-saha/) · **Year:** 2021 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[Cited by **9** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/das-2021-abusive-threatening-language-detection-urdu/cited-by/) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [arXiv 2111.14830](https://arxiv.org/abs/2111.14830)

## Summary

A social media post can be abusive without threatening anyone. Asking a system to recognize abuse and asking it to identify a threat therefore create different problems, even when the posts come from the same platform and are written in the same language. Das and colleagues study both problems for Urdu tweets in the FIRE 2021 HASOC shared task. The organizers supplied separate datasets with human-assigned labels, one for abusive language and one for threatening language. Urdu gave the authors a setting in which to ask whether earlier work on harmful language could help a language with relatively few resources for these tasks. The study concerns a basic operation in automated moderation, [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/).

The authors compare two ways of using previous training. In the first, they give XGBoost and LightGBM numerical representations of Urdu tweets from a pretrained LASER system. In the second, they adapt multilingual BERT and a related system, `dehatebert-mono-arabic`, that had already been trained to recognize hate speech in Arabic. The Arabic-trained system still learns from labeled Urdu tweets before it makes either set of predictions. That additional stage matters because the source language and labeling task differ from the target language and labeling tasks. Adapting an already trained system to a new dataset is known as [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/).

The Arabic-trained system took first place in both subtasks. The paper reports a test F1 score of 0.8806 for abuse and 0.5457 for threats. F1 brings together how often a predicted label is correct and how much of the labeled material the system finds. The authors regard the threat result as weak despite its ranking. Threatening tweets were the minority in that dataset, and the training procedure gave their mistakes more weight. The authors also report that changing the random seed could substantially affect performance. The results show that prior training on a related detection task can be useful across languages, while leaving open how much of the advantage comes from that prior training and how reliably it carries over to other data. The authors released the code for the experiments.

## Deep dive: Abusive and Threatening Language Detection in Urdu using Boosting based and BERT based models: A Comparative Approach

This study compares Urdu tweet classifiers and finds that prior Arabic hate-speech training gives the best results for detecting abuse and threats. · about 32 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

#### Abuse and threats pose different labeling questions

The paper starts from a practical problem for social media platforms. People can publish responses instantly, and the volume of posts makes individual review difficult. Platforms such as Twitter and Facebook have policies governing harmful conduct and employ people to enforce them. The authors describe automatic detection as a way to help identify material at a scale that makes comprehensive manual screening difficult. They also motivate the work by discussing harm to the people addressed by abusive posts and by noting reports of online hostility accompanying violence against minority communities.

The research question is narrower than the moderation problem. For the abuse subtask, the input is an Urdu tweet and the output is a choice between Abusive and Non-Abusive. For the threat subtask, the input is again an Urdu tweet, but the output is Threatening or Non-Threatening. The organizers drew on Twitter policies for these definitions. A prediction concerns how the text fits a designated label. It cannot independently settle questions about a writer's intent, the likelihood of violence, or the decision a moderator ought to make.

The distinction matters even before a classifier is trained. Consider the difference between a message that disparages someone and one that communicates an intention to do them harm. The presence of an insult can be relevant to the abuse judgment, while the meaning of the statement about harm bears more directly on the threat judgment. A phrase can be relevant to one decision without resolving the other. The shared task makes the questions separable by giving each its own examples and labels. It consequently measures agreement with two sets of judgments, instead of treating abuse and threats as grades on a single scale.

The paper places this distinction in a broader discussion of how abusive language varies. In the typology it cites from Waseem and colleagues, abuse can be directed towards a particular person or entity, or generalized towards a group. A further distinction concerns whether the abuse is explicit or implicit. These are properties of how an utterance works. They need not line up with the presence of familiar offensive vocabulary. Explicit wording can provide a strong clue in some cases, while an indirect expression may depend on what the reader understands about who is being discussed and what is being implied. The relevance of implied meaning is captured by the concept of [implicature](https://md.research.elamur.ai/free/en/concepts/implicature/).

The authors use such distinctions to describe the field. Their experiments do not assign separate labels for directedness or explicitness. That boundary matters when reading the results. An overall abuse score can reflect success on a mixture of different expressions, but it cannot tell a reader how well the system handles each kind. The paper's earlier examples of how abuse can be defined explain why a binary label leaves substantial variation inside the positive class.

#### Why study Urdu?

The authors describe a gap between the amount of research on abusive language in English and the resources available for Urdu. They characterize threat detection as relatively understudied even within the larger research area. These gaps overlap in Subtask B. Researchers must work with a task that the paper describes as less developed and with a language for which the authors identify a shortage of task-specific resources.

The scarcity is a matter of research data and tools, even though Urdu has a large community of speakers. The paper discusses its role in Pakistan, its use in other countries, and its growing presence on social media. A language can be widely used and still have few labeled examples for a question such as whether a particular tweet is threatening. For a classifier trained on examples, that shortage constrains what distinctions it can learn and what distinctions researchers can measure. This is the sense in which the study belongs to work on [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/).

The Urdu shared task continued a line of efforts that had already moved beyond an English-only focus. The paper mentions HASOC 2019 as an initiative for hate and offensive content in other languages. It also points to a HASOC 2020 subtask involving offensive posts in code-mixed data, where more than one language can appear in the same material. The FIRE 2021 task made Urdu tweets the common input language and provided distinct datasets for abuse and threats. With shared labels and test material, participants had a common basis for comparing systems within each subtask.

The value of a shared task is partly in making the question concrete. A broad claim that a classifier recognizes harmful language could refer to several categories and many settings. A submission for Urdu abuse detection has to return the labels that the organizers defined on the tweets they selected. The task design specifies where agreement will be measured. Differences in category definitions, collection procedures, or language can create a different assessment even when another study uses a similar name for the task.

#### From word patterns to multilingual training

The earlier approaches described in the paper give some context for the authors' choice of comparators. Davidson and colleagues compiled tweets labeled as hate, offensive, or neither. Their classifiers used features such as recurring sequences of characters and words, alongside information about hashtags, mentions, retweets, URLs, and tweet length. A recurring sequence offers a way to detect a fragment or phrase wherever it occurs. Such sequences are called [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/).

That earlier study is relevant for the difficulty it exposed. The paper recounts that even strong classifiers had trouble separating hateful posts from offensive ones. Two categories can share conspicuous vocabulary, leaving the system with evidence that a post is objectionable but less evidence about which label it should receive. The details of the feature set show how much information a classifier can have about a tweet while still facing ambiguity in the distinction that matters.

The paper then discusses work that learned from word order and surrounding text. It cites Pitsilis and colleagues for using recurrent neural networks in offensive-language detection in English. A recurrent network processes a sequence while carrying information from earlier steps forward. That makes its representation of an expression sensitive to the material around it. The authors also refer to other neural approaches in hate and offensive speech research, including work with convolutional networks and long short-term memory. The historical progression is toward learning more from context, after earlier systems frequently depended on manually specified counts and patterns.

The immediate starting point for the Urdu experiments is BERT, including its multilingual variant. In the paper's account, earlier work on hate speech had reported stronger performance for systems based on the Transformer than for several other neural approaches. Here the appeal of multilingual BERT is that its general training already spans languages. Its adaptation to a particular detection job can begin with representations learned before the Urdu labels are introduced. The underlying architecture uses attention to connect information across the input, a defining feature of the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/).

The authors then ask whether there is a better starting point than general multilingual training alone. A system previously trained for Arabic hate-speech detection brings both multilingual training and experience with a related labeling problem. The authors motivate the language choice by invoking a connection between Arabic and Urdu. The experiment uses that motivation to choose a checkpoint, meaning a saved set of learned parameters. It does not examine the historical relationship between the languages or test a mechanism by which such a relationship would affect classification. The immediate question is empirical. When each starting point is adapted to Urdu tweets, which one gives the better predictions on the shared task?

### The method, step by step

#### Start with the organizers' labels

The authors work with tweets collected and annotated by the Natural Language and Text Processing Laboratory at the Center for Computing Research of Instituto Politécnico Nacional in Mexico. The shared-task organizers supply the labeled examples and designate the training and test data. A training example pairs text with a judgment about the relevant category. Providing those judgments is the work of [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/).

An example in Subtask A tells the classifier whether a tweet is abusive. An example in Subtask B tells it whether a tweet is threatening. Both labels can be represented in the same mathematical form because each decision has two possible outcomes. The meaning of the positive outcome changes between subtasks. A classifier adapted to abuse examples learns to approximate abuse judgments. Its output has no corresponding interpretation as a threat decision unless a separate setup defines and trains for that judgment.

There is no joint training procedure in the authors' description. They adapt classifiers separately to the Urdu datasets. This carries through to evaluation, where a tweet's predicted label is compared with the annotation for the subtask at hand. In particular, the procedure does not require an abuse prediction before making a threat prediction. A threat classifier is trained directly with threatening and non-threatening examples.

The comparison then branches according to how the tweet is represented. In the boosting baselines, the representation comes from LASER and the supervised classifier learns from that representation. In the BERT-based approach, a pretrained system supplies the starting parameters and the authors update the Transformer together with a classification layer. Both routes reuse previous work, although they give the target labels different roles in shaping the representation that reaches the final decision.

From labeled Urdu tweets to shared-task predictions The steps in order.

#### Fit the boosting baselines to tweet representations

A numerical classifier needs a representation of its input. For the boosting baselines, the authors use pretrained Urdu LASER embeddings. An embedding represents an input by a vector, an ordered set of numerical values. The tweet is therefore available to the classifier through values produced by the pretrained representation system. This differs from the feature engineering described in the earlier work, where a researcher might explicitly include a count of mentions or the presence of a character sequence.

The authors give the LASER representations to XGBoost and LightGBM. Both are boosting methods based on decision trees. A tree learns to split examples according to feature values, progressively grouping observations as it goes. Boosting fits a succession of trees so that later additions improve the predictions made by the combination built so far. In this study the splits concern the numerical representation of a tweet, and the labels provide feedback about whether the procedure is distinguishing the relevant classes. The tree never needs an explicit descriptor such as the number of hashtags in a particular post.

An important feature of this baseline is that it already benefits from prior learning. The Urdu tweets are represented by LASER before the trees learn the abuse or threat labels. A comparison with the BERT systems therefore asks about different ways to reuse pretrained resources. The boosting system learns its task-specific decision from an existing representation. BERT fine-tuning can change the parameters of the component that produces the representation as it learns the task.

The paper says that both tree classifiers use their default settings and are trained on the supplied data for each subtask. It does not describe a search over tree configurations or say that the LASER representation is updated during this training. The resulting baselines are comparisons with these particular recipes. A claim about the best possible use of either boosting library would require a different investigation into how to tune the classifier and choose its features.

#### Adapt BERT from two starting points

The first starting point is multilingual BERT, also called mBERT. The paper describes earlier general training on a multilingual corpus without using labels from the two detection tasks. That initial training gives the Transformer its learned parameters before the authors show it a labeled Urdu example. On top of the Transformer they place a classification layer, the part of the system that converts the tweet representation into scores for the possible labels.

During fine-tuning, the Urdu labels guide changes to both the classification layer and the Transformer beneath it. A training tweet is processed using the current parameter values, and the result receives a penalty according to how well it fits the assigned label. Repeated adjustments change how the system represents tweets as well as how it uses the resulting representations to select an outcome. This is why the BERT procedure and the LASER-plus-boosting procedure can both reuse pretrained resources yet differ in what they learn from the target data.

The second starting point is `dehatebert-mono-arabic`. The paper identifies it as derived from multilingual BERT, with an additional stage of fine-tuning for Arabic hate-speech detection before the Urdu experiments begin. The difference that the authors want to investigate lies in the state of the parameters at the start of Urdu training. Plain mBERT brings its general multilingual training. The Arabic checkpoint brings learned changes from an intervening detection task as well.

Arabic labels do not supply the final decision for either Urdu subtask. The authors fine-tune this checkpoint with Urdu abuse examples for Subtask A and with Urdu threat examples for Subtask B. Any influence of the earlier Arabic stage arrives through the starting parameters. The Urdu labels still specify what a correct output means. In this sense the procedure is a transfer across both language and task. Hate speech in Arabic is the source task, while the two target tasks ask about abuse and threats in Urdu. Using knowledge learned in one language to help solve a problem in another is part of [multilingual and cross-lingual NLP](https://md.research.elamur.ai/free/en/topics/multilingual-nlp/).

The term *starting point* also helps clarify the conclusion's comparison with training from scratch. The ordinary mBERT comparison uses an already pretrained Transformer. It starts the target detection task without the intermediate Arabic hate-speech stage. Both BERT approaches thus use previous training, and the study compares whether an extra stage in a related area gives a better initialization for supervised Urdu training.

There are two plausible sources of relevance in the authors' choice of checkpoint. The source material is in Arabic, which the authors view as a meaningful language choice, and it is labeled for a category related to both target tasks. These properties arrive together. The system description therefore supports a question about the value of the available checkpoint, a bundled starting point whose language and training purpose are both known. The training procedure provides no independent switch that turns one of those properties off while holding the other in place.

#### Penalize confidence in the wrong label

The paper describes the BERT training objective using binary cross-entropy. The loss expresses how poorly the scores for a tweet agree with its annotation. If the true label is assigned a high score, the loss is smaller. If the true label is assigned a very low score, the loss is larger. This gives the learning procedure more information than a count of mistaken decisions would. A correct label assigned modest confidence and a correct label assigned high confidence can have different losses even when the final decision would be the same.

```
Loss = −∑ᵢ₌₁ᶜ′⁼² tᵢ log(sᵢ) = −t₁ log(s₁) − (1 − t₁) log(1 − s₁)
```

`Loss` is the penalty for one labeled tweet. The summation sign `∑` adds the class contributions, with `i` indexing the classes from `1` through `C′`. The symbol `C′` is the number of classes and equals `2` in these subtasks. The subscripts `1` and `2` identify the first and second classes, called `C1` and `C2` in the paper. The class index is a position in the expression. It does not by itself identify which position the implementation gives to abuse or threats.

`tᵢ` is the target for class `i`. It takes the value `1` for the annotated class and `0` for the alternative. `sᵢ` is the system's score for the same class. The operator `log` takes the logarithm of that score. The minus sign makes a smaller score for the true label produce a larger penalty. The symbol `=` shows that the sum and the expression on the right give the same loss under the binary setup. The parentheses group the score or complement used as an argument or factor.

The expression on the right is possible because the two targets and the two scores are complementary. `t₁` is the target for the first class, and `1 − t₁` gives the target for the second. `s₁` is the score for the first class, and `1 − s₁` gives the score for the second. The value `1` is the total assigned across the alternatives in each complementary pair. When the first class is the annotated label, its target activates the first term. When the second class is the annotated label, its target activates the term involving the second class's score. This formulation makes the link between the two possible labels explicit.

The loss is part of training. The competition result is measured separately with F1. An optimizer can use the loss to decide which parameter changes improve the fitted classifier because the loss varies with the score it assigns each tweet. F1 summarizes the decisions after scores have been used to select labels. The written objective specifies how training treats scores, while the evaluation measures the predictions against the test annotations.

#### Give the rarer threat label more influence

The two target datasets have different label distributions. The authors treat the abuse data as roughly balanced between its classes. In the threat data, threatening tweets are less frequent. If mistakes on all individual examples receive the same weight, the more frequent class has more opportunities to influence the average loss. A system can then improve that loss by making progress on common cases even if rare but important threat cases remain difficult.

The authors respond by giving additional weight to the minority class during threat training. The procedure changes how much a training error contributes according to the example's class. Accordingly, mistakes on threatening tweets can have more influence than they would in a plain average over examples. The paper describes this as a property of the loss used to learn from the dataset. The threat labels themselves keep the same meanings.

The paper mentions oversampling and undersampling as other ways of dealing with imbalance. Oversampling would increase the representation of the rarer cases in the stream of examples used for training. Undersampling would reduce the representation of the more common cases. Class weighting addresses the imbalance through the penalty, so the authors can train on the full threat training set. The paper gives the ordinary binary cross-entropy expression and describes the weighting in prose. It supplies no numerical class weights or weighted-loss formula.

Class weighting can alter the importance of the evidence supplied by a threatening example. It cannot add types of evidence that are absent from the training collection. If the available threats express only a limited variety of threatening behavior, increasing their weight still exposes the classifier to that same variety. This makes the distinction between frequency and coverage especially important. The training adjustment addresses unequal influence in the loss. The authors' later discussion of limited learning about different kinds of threats concerns what the dataset actually contains.

#### Use different stopping rules for abuse and threats

For the BERT-based runs, the paper specifies training for 10 epochs, using the Adam optimizer and an initial learning rate of 2e-5. An epoch is a pass through the training data. Adam is the procedure used to translate information from the loss into parameter updates. The learning rate controls the scale of those updates, and the stated value applies at the beginning of training. These settings describe the optimization run. The rule for which trained parameters to use for prediction differs by subtask.

For abuse detection, the authors split the designated training data into 85% for parameter fitting and 15% for validation. A validation set provides labeled examples that can be used to compare checkpoints during development without using the competition test labels. The authors select the checkpoint with the best validation performance and use it to predict labels for the abuse test tweets. The reported training length describes the run from which the checkpoint is selected. Selection may prefer a checkpoint reached before the final epoch.

For threat detection, the authors cite imbalance as their reason for training on the full designated training set. Reserving labeled examples for validation would leave fewer examples for fitting, including potentially scarce threats. They instead predict test labels from the state reached after 10 epochs. This procedure uses all the training labels for fitting, while giving up the checkpoint selection step used in abuse detection. The paper's reference to full-data training concerns the supplied training split. Test predictions remain a distinct stage.

The workflows differ in ways that matter to the interpretation of the scores. The threat training loss accounts for class frequency and training runs to the fixed endpoint. The abuse procedure reserves examples for selecting a checkpoint. The paper does not present an experiment varying one of these choices while keeping the other conditions fixed. They are parts of the actual recipes used for separate datasets.

Finally, the authors say they used multiple random seeds. A seed determines the starting state for the random choices made by a run. Several runs can therefore have the same stated architecture, data, and training settings while following different paths through the training procedure. The paper reports this variation as important to the outcome, without specifying enough of its run-by-run details to reproduce the distribution of scores from the description alone.

### Experiments and results

#### The two datasets and their splits

Subtask A evaluates whether a classifier can distinguish abusive from non-abusive tweets in Urdu. In the dataset description the authors give 2400 instances for training and 1100 for testing. For the BERT experiments, the 85% and 15% division is made within those 2400 designated training instances. The 1100 test instances belong to a separate split. The paper describes the abuse dataset as balanced or nearly balanced between its two labels. That description concerns the relative frequency of the labels in the dataset. It provides no evidence by itself about the variety of expressions represented within either label.

The paper's introduction gives 3400 as the size of the abuse dataset. That figure conflicts with the train and test counts in the dataset description. The split-level counts give the more specific account of which data are designated for training and which for testing. The paper does not reconcile the discrepancy. A reader reconstructing the experiment needs to preserve the distinction between the stated split counts and the incompatible headline total.

Subtask B evaluates whether a tweet is threatening or non-threatening. The dataset description gives 6000 training instances and 3950 test instances. The introduction reports 9950 posts for the threat dataset overall. The authors describe the class distribution as imbalanced and give the ratio as 1:5. The rarer side corresponds to threatening material. In contrast with the abuse procedure, all 6000 designated training instances are available for fitting the BERT classifiers, and the prediction checkpoint comes from the end of the stated training run.

These are separate benchmark datasets within the same shared task. The larger threat training split supplies more examples overall, while the class ratio describes how unevenly the evidence about the two labels is distributed. The amount of data available for a distinction depends partly on what kinds of examples bear on that distinction. A dataset can have many non-threatening tweets and still provide comparatively sparse evidence about different ways to make a threat. The class distribution is thus relevant even before considering the reported scores.

The paper describes the training and test tweets as annotated. The job of the evaluation is to check the submitted decisions against those labels. It does not ask a participant to decide which tweets should be collected or how to revise the organizers' categories. This common target makes comparison within each competition subtask possible. It also means that the scores inherit the categories and selection of material made by the organizers.

#### Which systems were compared?

The boosting baselines are XGBoost and LightGBM, both using the pretrained LASER representation. The two BERT starting points are general multilingual BERT and `dehatebert-mono-arabic`. This design gives the experiment a broad comparison and a narrower one. Boosting versus BERT compares different classifier and representation pipelines. Ordinary mBERT versus Arabic-trained BERT compares more closely related approaches that start Urdu fine-tuning with different parameters.

The broad comparison is useful as an assessment of complete submissions. A participant deciding how to use the available Urdu training examples could start with numerical tweet representations and train a tree-based classifier, or adapt a pretrained Transformer. These are practical alternatives. The choice affects how the representation is learned and how the label is predicted. If one submission works better, that result pertains to the package of choices. The comparison cannot assign the difference to trees, embeddings, or end-to-end fine-tuning individually.

The narrower comparison is more directly related to the authors' research question. Both systems rely on BERT and both adapt to the target dataset. Only one is described as having the extra Arabic hate-speech training before the Urdu stage. The authors report that this system was consistently strong among the BERT approaches they tested. The paper's prose does not give a complete set of numerical baseline scores with which to quantify its margin over each comparator. It refers to a private leaderboard results table for the threat task and gives the winning scores explicitly.

The tree classifiers use default settings, while the BERT runs use the paper's stated optimizer, learning rate, and training procedures. The resulting comparison evaluates different recipes at the settings chosen for the shared task. Similar opportunities for learning from the labeled target data do not imply identical opportunities for tuning. The strongest interpretation is therefore about the best reported submission and the checkpoint used to produce it.

#### What F1 captures

The main result is reported in F1. It combines precision and recall. For a specified label, precision asks how many tweets the classifier assigned that label actually have it in the annotations. Recall asks how many tweets annotated with that label the classifier managed to find. The denominators differ in an important way. One begins with what the system retrieved, while the other begins with what the dataset says should be retrieved.

This distinction matters for a rare class. A classifier might flag only tweets for which it has especially strong evidence. It could then be correct about many of the tweets it flags and still miss many of the relevant ones. Another classifier might flag a wide range of material, finding more of the annotated cases while making more false alarms. F1 favors a balance of precision and recall. It gives a compact comparison measure while leaving some information about those error patterns unresolved.

The paper labels its headline scores F1 without specifying their averaging convention in the account of the results. In a binary task, an F1 score can refer to a selected class or to a combination of class-level scores. Those choices affect what a value means when one class is much larger than the other. In particular, the threat F1 does not tell the reader what share of all annotated threatening tweets was found. The corresponding recall value is not given. Nor does the headline identify how frequently a threat prediction was correct, which would require precision.

F1 measures a set of predictions against a set of labels. A leaderboard rank orders entries according to the benchmark measure. A system can lead its competitors on that measure while making errors that the authors still consider substantial. Conversely, the distance between the abuse and threat scores cannot identify how much the learning procedure struggled with threats relative to abuse in otherwise identical conditions. The category, examples, class distribution, and training recipe all change between the subtasks.

#### The winning scores

With the Arabic hate-speech checkpoint further fine-tuned on the Urdu abuse data, the authors report 0.8806 F1 for the Subtask A test competition. With the same kind of checkpoint separately adapted to the Urdu threat data, they report 0.5457 F1 for Subtask B. The paper associates its threat result with the private leaderboard. The submissions ranked first in both subtasks. The abstract reports the respective scores as 0.88 and 0.54, while the results discussion gives the more detailed values.

Arabic-trained BERT on the FIRE 2021 Urdu abuse and threat test tasks, F1 The abuse entry has the higher reported F1, and each entry led its own subtask.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Subtask A abuse, Arabic-trained BERT (this paper) | 0.8806 |
| Subtask B threats, Arabic-trained BERT | 0.5457 |

The chart compares the test outcomes of two adaptations of the same starting checkpoint. Each row uses the labels, data, and training procedure of its own subtask. The scores describe how well each fit its particular assessment. The comparison contains no paired experiment in which a fixed set of tweets is scored under both definitions. It therefore offers a view of how the entries performed in the competition, while leaving the source of the difference unsettled.

The authors describe a marked difference in how they view those outcomes. They regard the abuse performance as good and the threat performance as weak, even though both led their competition. These judgments are compatible because the rank identifies the strongest entry among the competitors and the absolute score describes agreement with the benchmark's labels under the chosen measure. Leading a challenging competition can coexist with limited success at the underlying classification job.

There is also an important distinction between the reported winning outcome and the behavior of a randomly chosen run. The authors say that performance was heavily affected by the random seed and that they used multiple seeds in reaching their results. They do not report per-seed scores, a mean across runs, or an interval showing the spread. As a result, the leaderboard scores identify achieved results. They do not specify the stability a reader should expect when training is repeated.

### What the ablations show

The paper has no formal ablation study. It offers a comparison of classifier pipelines, a comparison of BERT starting points, and observations about sensitivity to the random seed and the difficulty of threat detection. Each provides a different kind of evidence, with the checkpoint comparison coming closest to isolating a decision in the authors' design.

#### The most informative training comparison

The ordinary mBERT and Arabic-trained BERT runs share a broad training approach. Both begin with an existing Transformer, both get a classification layer for the target job, and both learn from annotated Urdu tweets. What changes is whether the saved parameters have already been adapted for Arabic hate-speech detection. The stronger reported outcome for the latter supports the authors' practical decision to reuse that checkpoint.

The comparison can be read as evidence for transfer at the level of a starting point. An intervening course of training on related material produced a set of parameters the authors found useful for both target subtasks. A system developer can understand that outcome without assuming that Arabic tweets and Urdu tweets use the same expressions or that the labels have the same boundaries. A useful initialization only needs to help subsequent adaptation. It need not supply finished rules for a new task.

The experiment does not determine what made the Arabic starting point useful. There is no comparison with the same amount of further training in Arabic on unrelated material. Such a result would speak to the relevance of the detection task while keeping the additional language exposure closer to constant. There is also no comparison with a corresponding checkpoint fine-tuned for hate speech in some other language. Such a comparison would bear on the role of Arabic. The paper's evidence concerns the checkpoint as used, with both properties together.

The numerical record further constrains the interpretation. The authors say the Arabic-adapted system was consistently strong, and the winning scores provide concrete evidence that it could reach the top of both shared-task rankings. Without the baseline scores in the prose, the scale of its advantage over ordinary mBERT remains unspecified. The observation can support a preference among the reported systems without establishing a numerical effect attributable to the extra training stage.

#### The boosting comparison changes several things at once

The boosting baselines let the authors compare practical systems that take a different route to the same output labels. LASER supplies the numerical representation, then the supervised tree classifier learns to make the decision. In the BERT systems, the Urdu labels also affect the Transformer parameters. This changes representation, classifier, and adaptation procedure together.

A leaderboard outcome can tell a reader which submitted pipeline worked best, even when several parts changed at once. It cannot resolve whether a specific part caused the outcome. For instance, the experiments do not hold the representation fixed while swapping just the decision mechanism, or hold the decision mechanism fixed while comparing representations. The default configurations for the tree methods add another consideration when reading the comparison. The study tests these workable baselines, with no separate claim about how they would perform after an extensive search over settings.

The division between pipelines also cautions against attributing the result simply to the use of pretraining. The LASER-based systems use a pretrained representation, and both BERT systems have pretrained parameters. The most specific advantage the study identifies is for a particular form of previous training in a BERT pipeline, as observed after adapting the whole system to the Urdu labels.

#### Class weighting and seeds tell different stories

The threat dataset supplies the reason for weighting the loss. The rare label would otherwise have less influence on an average over individual examples. The authors follow the weighted procedure for threat identification, but they do not report a matched run with the weighting removed. Its contribution to the winning threat score is therefore undetermined. The reported performance shows what the complete recipe achieved, including its starting checkpoint, its weighted training objective, and its fixed endpoint.

The abuse result cannot fill this gap as a comparison case. Abuse uses another set of labels, different examples, a more even distribution, and validation-based checkpoint selection. Those differences affect what is learned and how the version used for testing is chosen. Comparing the two winning F1 scores shows the difference in outcomes across tasks. It gives no estimate of the effect of weighting within either task.

The seed observation identifies a separate issue. Changing a random seed is a way for runs of the same intended setup to differ without changing the research question or the main configuration. If performance is sensitive to that choice, the score from a single run can reflect the particular course training took. The authors report that this mattered. The paper gives no series of matched runs showing whether the Arabic checkpoint improved the average result, reduced the risk of a weak run, or chiefly provided a better highest-scoring run. These effects have different implications for repeat use.

The authors connect the weaker threat result to scarce and varied positive examples. Their reasoning is that an imbalanced set gives the classifier too little opportunity to learn the different forms of threatening posts. The dataset ratio is compatible with that concern. The paper does not classify errors by form of threat, so it cannot demonstrate which forms caused the difficulty. The proposed explanation is useful as an interpretation of the setup and result, with the seed observation reminding the reader that data composition and run variability can both matter.

### Limitations

#### Limits the authors identify

The authors explicitly distinguish winning the threat subtask from performing well at identifying threats. Their main explanation for the weaker result is the imbalance of the training data. Threatening tweets are much less frequent than non-threatening tweets. The authors argue that this shortage makes it difficult for the classifier to learn the variety of ways a threat can be expressed. Giving those examples more weight changes their influence during optimization, while their diversity still depends on what was collected and labeled.

This issue matters at the level of individual decisions. A positive training example provides evidence of a particular way that a tweet can satisfy the threat definition. More influence for that example can help the system pay attention to it. Coverage of another form of threat depends on whether the data provide examples or whether a pattern learned elsewhere carries over. Class weighting does not address that distinction by itself. The paper presents it as a response to imbalance and still treats the resulting threat performance as unsatisfactory.

The authors also acknowledge substantial performance sensitivity to the random seed. This caveat applies to how the shared-task scores should be read. The system reached the reported results, and a run using the same stated settings could yield a different outcome. With no run-level results, the extent of that variability cannot be distinguished from other aspects of the comparison. The authors' observation also prevents the leaderboard value from standing in for an expected score under repeat training.

#### Limits visible in the experiment

The study measures predictions on selected Urdu tweets under the organizers' definitions. Its scope comes from the data source, annotation choices, and test splits. The design leaves performance on other platforms, other kinds of Urdu writing, and tweets selected under different policies unmeasured. The paper invokes platform moderation as motivation, but its evaluation does not include a deployment with moderation decisions and their consequences.

Tweet-level predictions also leave open questions about the context required for a judgment. The described systems classify the text of a tweet. The evaluation provides no breakdown of posts whose interpretation depends on the wider conversation, on who is being addressed, or on references that are clear to participants but obscure in isolation. Some evidence for a label may be recoverable from the text, and some may depend on surrounding circumstances. A single overall score cannot tell the reader how frequently context of that kind would change the relevant decision.

There is a related boundary around what the labels represent. The threat subtask asks for a decision about the language in a tweet. It does not require identification of the target, an account of the wording that justifies the decision, or an estimate of the likelihood the threat will be acted on. The abuse task similarly assigns one of two labels without explaining which aspect of the text supports the decision. This limits what a correct prediction can establish about the system's understanding.

Though the paper discusses a typology of abuse, the experiments do not report performance separately for explicit and implicit language or for posts aimed at individuals and groups. There is likewise no breakdown by different forms of threat. The overall F1 scores can reflect strengths and weaknesses across all those kinds of example. They cannot locate them. The author's interpretation of diversity in the threat class remains a hypothesis about what the learning procedure found hard, given the imbalance and the limited evidence from individual errors.

The absence of a stated F1 averaging convention leaves the class-level meaning of the scores unclear. This especially matters for the imbalanced threat dataset, where good handling of the more common label and good handling of the rare label are distinct achievements. Precision and recall for threats would show whether the larger issue was missed threats, incorrect threat flags, or a combination. The reported F1 and rank alone cannot answer that question. The evidence supports the authors' overall comparison within the shared task and their caution about the threat result.

The different checkpoint rules also limit comparisons across the subtasks. In abuse detection, validation performance helps pick which state to test. In threat detection, the end of training determines that state. This is understandable given the authors' concern about retaining threat examples for fitting. Still, a score achieved at the endpoint of threat training provides no evidence about whether an earlier checkpoint would have scored better. The study does not measure how using a validation set would have changed threat performance or how using the full training split would have changed the abuse result.

The role of the Arabic source data is similarly bounded. The winning system had been fine-tuned on Arabic hate speech, and that checkpoint performed well after further Urdu training. The study has no experiment disentangling the source language, the source labels, and the extra training. The authors' linguistic motivation can explain why they tried the checkpoint. It cannot establish the causal contribution of any particular resemblance between the languages. Testing that explanation would require comparisons that make the language and task vary separately.

Some details needed to reconstruct the exact runs are also missing from the prose. The paper gives the learning rate, optimizer, epoch count, and the abuse validation split. It does not specify the threat class weights, the outcomes for individual seeds, or the distribution of the resulting scores. The released code is a named resource for readers interested in implementation. The findings as reported in the paper still provide limited evidence about how much any of those choices contributed to the outcome.

Finally, the conflict between the abuse dataset total in the introduction and the split counts in the dataset section leaves a small but consequential ambiguity for reproduction. A reader can report the split counts as stated and reproduce the experimental account associated with them. The paper offers no explanation that would justify silently reconciling them. For the results, the central evidence remains specific to the declared subtasks and their observed leaderboard outcomes.

### What came after

A later work from 2022 cites the Urdu study in a different classification setting. [Ensembling Multi-Modalities for Tamil TrollMeme Classification](https://md.research.elamur.ai/free/en/papers/das-2022-hate-alert-dravidianlangtech-acl2022-ensembling/) describes a submission for classifying Tamil troll memes through an ensemble that combines modalities. An ensemble brings together evidence or predictions from multiple components to make a decision. The later work's title identifies the use of multiple modalities as part of its approach, placing it in [vision and language](https://md.research.elamur.ai/free/en/topics/multimodal/).

The connection is a continuation of work on language-specific classification of online material, with a change in both the input and the design question. The Urdu study classifies tweet text and asks whether starting from a classifier trained on a related detection task helps after further training in Urdu. The Tamil work concerns memes and asks how to combine multiple modalities for their classification. The former changes the training history from which a system starts. The latter combines sources of evidence used to make its decisions.

The later study's citation establishes a bibliographic connection. The stated scope of the Tamil work gives no basis for attributing reuse of the Urdu datasets, the weighted threat loss, or the Arabic checkpoint to it. Nor does troll-meme classification replicate the Urdu abuse or threat experiments. Its relation to the earlier paper is clearest at the level of research questions. Both treat the language and form of social media material as consequential to the classification problem, while investigating different ways to build a system for the task at hand.

## Cite

Cite as Mithun Das, Somnath Banerjee and Punyajoy Saha. 2021. Abusive and Threatening Language Detection in Urdu using Boosting based and BERT based models: A Comparative Approach. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2111.14830](https://doi.org/10.48550/arxiv.2111.14830) · [arXiv 2111.14830](https://arxiv.org/abs/2111.14830)

```bibtex
@misc{das2021abusive,
  title = {{Abusive and Threatening Language Detection in Urdu using Boosting based and BERT based models: A Comparative Approach}},
  author = {Mithun Das, Somnath Banerjee and Punyajoy Saha},
  year = {2021},
  doi = {10.48550/arxiv.2111.14830},
  eprint = {2111.14830},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2111.14830}
}
```

> 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)
