---
title: "Hate and Offensive Speech Detection in Hindi and Marathi (2021)"
description: "A study of Hindi and Marathi hate speech detection compares neural classifiers on tweets and tests how best to separate hate, offense, and…"
canonical: "https://research.elamur.ai/free/en/papers/velankar-2021-hate-offensive-speech-detection-hindi/"
---
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/velankar-2021-hate-offensive-speech-detection-hindi/)

[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/) / Hate and Offensive Speech Detection in Hindi and Marathi

# Hate and Offensive Speech Detection in Hindi and Marathi

Paper · 2021 · Abhishek Velankar, Hrushikesh G. Patil, Amol Gore et al.

**Authors:** Abhishek Velankar, Hrushikesh G. Patil, Gore, Amol, Shubham Salunke and Raviraj Bhuminand Joshi · **Year:** 2021 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[Cited by **17** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/velankar-2021-hate-offensive-speech-detection-hindi/cited-by/) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

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

## Summary

A post can be easy to flag as harmful and harder to classify as hate, offense, or profanity. The authors study both decisions using manually labeled Hindi and Marathi tweets from the HASOC 2021 shared task. They treat detection as [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/), in which a system assigns a label to a post. The Marathi task asks for a binary decision about whether a post belongs to the combined hate and offense category. Hindi has a comparable binary task and a finer task that separates hate, offense, and profanity and includes a category for posts outside those groups. The paper addresses a shortage of labeled material for these languages and asks how much the choice of classifier matters when training data are limited.

The authors compare convolutional and recurrent neural networks with pretrained classifiers based on the [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). For the convolutional and recurrent systems, they vary how the input represents words. The word vectors can start from random values, start from pretrained FastText vectors and change during task training, or use the pretrained vectors as fixed inputs. For the detailed Hindi task, the authors also compare direct prediction with a hierarchy. The hierarchy first makes the broad binary decision and sends only the flagged tweets to a classifier that distinguishes hate, offense, and profanity.

The best binary system among those tested for Marathi was IndicBERT. Hindi RoBERTa led the binary Hindi comparison. The simpler networks remained competitive, especially with fixed FastText vectors. The strongest configuration within that group was an LSTM for Marathi and a bidirectional LSTM for binary Hindi. For detailed Hindi classification, Hindi RoBERTa benefited from making the decisions in stages. The strongest reported result for that task nevertheless came from a direct convolutional classifier with fixed FastText vectors, which the authors describe as slightly ahead of the Hindi RoBERTa hierarchy.

The paper identifies uneven class representation as a difficulty for detailed Hindi prediction, particularly for the pretrained transformer systems it tested. Its results show why the broad and detailed tasks are worth evaluating separately. The Hindi system that leads when all flagged content shares a label can lose that lead when the same benchmark asks it to distinguish kinds of flagged content. The authors publicly share their selected BERT-family checkpoints for the tasks.

## Deep dive: Hate and Offensive Speech Detection in Hindi and Marathi

A study of Hindi and Marathi hate speech detection compares neural classifiers on tweets and tests how best to separate hate, offense, and profanity. · 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

#### When a flag needs a more specific meaning

The paper starts from an issue of scale. People post large amounts of text on social media, and the authors want a way to identify potentially harmful material automatically. They discuss hate speech as language that can be used to attack, intimidate, demean, or harm a person or group, including attacks grounded in traits such as race, religion, ethnic origin, disability, or gender. The tweet classification experiments give this broad concern a narrower, measurable form. Each system receives text and tries to predict the category human annotators assigned to it.

That distinction between the motivating problem and the measured task matters. A person assessing a harmful post may consider its target, its purpose, and the situation in which it was written. The experiment asks whether a classifier can reproduce a particular set of judgments from tweet text. The labels determine the distinctions that count in the evaluation. A binary label can register that a post falls within the benchmark’s harmful-content category while leaving open which kind of harmful content the annotators identified.

The Hindi tasks make those levels of specificity explicit. Under the broad task, posts in the combined category share the label HOF. The other binary label is NOT. In the detailed task, the category codes are HATE, OFFN, PRFN, and NONE. These correspond to hate, offensive content, profanity, and the remaining category. A tweet assigned OFFN and one assigned PRFN can belong to the same broad category while demanding different answers in the detailed task. Thus a classifier can make the broad decision correctly and still make a substantive error about the category.

The paper introduces the problem alongside [sentiment analysis](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/), which concerns the polarity expressed in text. The presence of a negative attitude and the assignment of a hate or offense label answer different questions. A category scheme such as HASOC’s asks what kind of content is present, with distinctions that go beyond the valence of a statement. This is one reason a successful approach to general sentiment classification supplies a starting point for the paper’s comparison. The HASOC annotations supply the more specific judgments against which the approaches are evaluated.

#### Why the authors focus on Hindi and Marathi

The authors motivate their language choices through everyday use and the availability of research data. They describe Hindi as an official language of India and cite an estimate that around 45% of the country’s population speaks it. They draw attention to Hindi social media activity in Devanagari. They identify Marathi with Maharashtra and cite an estimate of around 83 million speakers in India. Their argument is that widespread use gives harmful speech detection practical importance in these languages, while the amount of work and data available for training and evaluating detectors remains limited.

The introduction places the study within work on [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/). In this context, the resource in short supply is annotated material for the particular prediction problem. There can be abundant ordinary writing in a language and still be comparatively little text labeled according to a scheme that distinguishes hate, offense, and profanity. The authors draw on both kinds of material indirectly. They use HASOC labels to teach the classifiers the task, and they use representations learned from other text to give some systems a starting point.

The paper describes earlier sentiment and hate speech work as concentrated on [English](https://md.research.elamur.ai/free/en/topics/english/). Its focus on Hindi and Marathi broadens the comparison while retaining the same general classification procedure. Both languages have a binary benchmark in the study, which makes it possible to ask which approaches are strongest within each language under a broadly similar label scheme. The detailed Hindi task adds a different question about label granularity. It also gives the researchers a reason to compare methods for organizing decisions, alongside their comparison of ways to represent text.

#### Why earlier comparisons left room for several approaches

The paper’s account of prior work gives reasons to take several families of classifiers seriously. One study on Hindi–English tweets examined code mixing, where a post uses material from more than one language. It evaluated convolutional and recurrent networks with vectors trained for the domain. In that comparison, the neural approaches did better than traditional systems such as support vector machines and random forests. The authors cite this as a precedent for pairing a classifier with a representation that is suited to its input text.

The related work also discusses a comparison on English tweets that used features built from counts or weighted word occurrences. A bag-of-words representation treats a text as a collection of word occurrences and gives the classifier information about which words it contains. [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/) weights terms using their frequency in a document and their prevalence across documents. The English study tried these kinds of features with conventional classifiers and used [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) and custom vectors in recurrent experiments. The paper mentions this study as an example of comparing representations along with the classifiers that use them.

An earlier HASOC study on Hindi reached a different conclusion from the study of code-mixed tweets. It compared recurrent neural methods with approaches such as a linear support vector machine, boosting, random forests, and voting. The earlier authors found the conventional approaches stronger in their low-resource setting. That finding belongs to its own dataset and comparison. In the present paper’s account of the field, it gives a concrete reason to test simpler alternatives and to treat performance as an empirical question.

The authors also discuss previous experiments on Hindi text classification more generally. Those experiments compared a bag-of-words approach with several neural approaches and found that a convolutional system using Hindi FastText vectors performed best in that study. A representation called LASER also came close to the reported leader and was closer to it than BERT. The precedent is relevant because it links a relatively simple classifier to word representations that already contain information learned from text outside the classification dataset.

A separate Hindi hostility study considered single and multiple convolutional architectures, recurrent systems, and pretrained transformers. It included FastText vectors from IndicNLP and Facebook. In that study, systems based on BERT were slightly ahead of the simpler approaches, while the strongest simpler configuration paired multiple convolutional components with IndicNLP FastText. Together, the earlier results describe a field in which the ordering varies with the task, the training data, and the combination of text representation and classifier.

The new comparison therefore concerns more than whether a newer architecture can assign the correct labels. It asks whether simpler networks can use existing word vectors effectively, whether task training should be allowed to alter those vectors, and whether the detailed label scheme benefits from being split into successive decisions. Those questions have practical consequences for a scarce-data setting. They determine what the system must learn from the available annotations and which parts of the decision can draw on information learned beforehand.

### The method, step by step

#### From a tweet to a label

Each experiment starts with a tweet and an associated task label. The label identifies the prediction the classifier is being trained to make. For Marathi and binary Hindi, the output is one of the broad categories. For detailed Hindi, the output must identify a specific category or assign NONE. The authors compare systems that make that detailed decision directly with systems that first decide whether to consider the detailed categories at all.

The input text has to become a numerical representation before a neural classifier can process it. For the simpler classifiers, the authors work with [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). A word embedding represents a word as a vector, a collection of numerical values used as input to the network. The paper varies where those values come from and whether training can change them. For the pretrained transformers, the starting point is a checkpoint that has already learned to represent text and can be adapted to predict task labels.

Training on the labeled examples adjusts the trainable parts of the classifier. After a pass through the training data, called an epoch, performance on validation examples provides a basis for choosing a checkpoint. The authors select the epoch with the highest validation accuracy for each system. The test procedure then uses the selected system, or the selected components of the hierarchy, to produce the task predictions.

From a labeled task to tweet predictions The steps in order.

The branching in the final part of the diagram is a choice between experimental setups. A binary classifier produces the label needed for its task directly. A direct detailed classifier also ends after its first decision. In the hierarchy, the initial Hindi classifier handles the broad decision, and its output determines whether a separate classifier contributes the final label.

#### What changes when a word vector is fixed

The authors consider random initialization for the convolutional network and both recurrent networks. In this setup, the embedding layer starts without pretrained word vectors. Its values have to become useful through the task training. The classifier and its input representations therefore develop together under supervision from the labeled tweets.

The other configurations initialize the embedding layer from pretrained FastText vectors supplied by IndicNLP for the corresponding language. The classifier can start from word representations learned before exposure to the HASOC labels. The authors distinguish two uses of those vectors. In the trainable configuration, the label prediction objective can change the embeddings along with the later layers. The vectors start with pretrained information and can specialize to this particular training data.

In the static configuration, FastText supplies the same kind of starting representation, and its vector values remain fixed during task training. The layers above the embeddings still learn how to use the inputs. For instance, the convolutional layers can learn that a local pattern is informative even when the word vectors making up that pattern stay fixed. The recurrent layers can likewise adapt how they combine information from a sequence.

The distinction is important when interpreting the comparisons. Random initialization changes where the input representation comes from. Freezing and unfreezing FastText changes whether supervision from the tweets can modify a pretrained representation. The comparison between the FastText variants is therefore especially relevant to the question of how much adaptation to permit. Both have a pretrained starting point, while only the trainable version can reshape that starting point during the task.

The paper gives learning rates of 0.001 for the CNN and recurrent classifiers and 5e-5 for the BERT-family systems. A learning rate controls the scale of updates made as training adjusts the system to the task. Within each family’s reported setup, epoch selection is based on validation accuracy. That criterion is separate from the architecture and from the decision to freeze embeddings. The paper supplies these settings as part of the implementation of its comparison and does not provide a mathematical derivation of them.

#### How the convolutional classifier reads a sequence

The simplest way to understand the convolutional neural network, or CNN, in this experiment is as a detector for useful patterns that can occur at different positions in a tweet. A convolution applies the same learned operation as it moves along the input. Here the operation is one-dimensional, following the sequence of word representations. The kernel size determines the span handled by a single application of the operation. The stated kernel size is 3, so the first operation processes local groups of neighboring input positions.

The paper describes the convolution with a filter setting of 300 and a rectified linear activation, commonly called ReLU. That activation passes positive values and suppresses negative ones. Max pooling follows the convolution. The pool size is 2, and the pooling operation retains the strongest value within each local pooling window. The authors repeat the convolution and pooling arrangement. Repeating these operations lets the later convolution operate on patterns that earlier processing has already extracted and condensed.

The network then uses global max pooling. Local pooling retains a strongest response inside each small window. Global max pooling retains a strongest response across the sequence for each feature, giving the later layers a fixed-size representation. This is a natural arrangement for detecting a feature whose location can differ among tweets. Where the strongest response occurred is no longer represented explicitly at that stage.

After global pooling, a dense layer of size 50, with ReLU, combines the extracted features. A dense layer can use each input feature in producing each of its outputs. The reported binary output has 2 nodes with softmax activation. Softmax turns the output scores into competing class values on a common scale, with the prediction given by the highest-scoring class. The authors report dropout of 0.3 after the one-dimensional max-pooling layer. Dropout temporarily removes activations during training, reducing the opportunity for the later layers to rely on a particular activation always being present.

These details describe the binary architecture given in the paper. The detailed Hindi result also uses a CNN with fixed FastText, but the fine-grained implementation is described through its prediction setup and embedding choice. The paper gives the binary output size explicitly and gives a separate account of how the detailed label scheme is handled.

#### How the recurrent classifiers read a sequence

The long short-term memory network, or LSTM, processes an ordered sequence and carries a learned state through it. As it reads each successive input, the state can retain information from previous positions or update it in response to the new input. This gives the recurrent classifier a different way to assemble evidence from the CNN. The convolution starts with a local window and stacks operations over the resulting features. The LSTM can carry information forward as it proceeds through the tweet.

The authors use an LSTM layer with 32 nodes, then apply global max pooling along the sequence. The pooling operation makes the strongest recurrent feature responses available to the final classifier. The pooled representation passes through a dense layer with 16 nodes using ReLU, followed by dropout of 0.2. A dense layer with 2 nodes and softmax gives the reported binary output.

The bidirectional LSTM, or BiLSTM, processes the sequence in both directions. This lets its internal representation draw on words that come later in the tweet as well as words that come earlier. The paper gives its bidirectional layer a size of 300 nodes and again follows it with global max pooling. The dense layer has 100 nodes and uses ReLU. Dropout is 0.2 before the final binary layer, which has 2 softmax nodes.

The recurrent configurations thus differ in more than reading direction. They also have different recurrent and dense layer sizes. The point is worth keeping in view even at the level of the method. When a BiLSTM configuration finishes ahead of an LSTM configuration, the comparison is between the specified systems as a whole. It cannot isolate how much of the ordering is due to access to both directions of the sequence.

All of these simpler networks have a shared division of labor. The embedding layer supplies a vector for each word, the convolutional or recurrent layers produce features from sequences of vectors, and pooling collects the strongest features for the final decision. The details of feature construction vary substantially. The shared embedding conditions allow the authors to ask how much of the behavior travels across those architectural differences.

#### What the pretrained transformers bring to the task

In the BERT-family experiments, the starting checkpoint has already been trained on text. The paper characterizes BERT as bidirectional, so text representations can incorporate context on either side of a position. It describes the original pretraining through masked language prediction and next-sentence prediction. In the masked task, the system uses the surrounding text to predict hidden input. In next-sentence prediction, it learns to judge a relationship between sentences. These pretraining objectives help explain what kind of prior experience a BERT classifier brings to the task. The task training itself teaches it to predict HASOC labels.

The authors evaluate checkpoints with different language coverage. Multilingual BERT was pretrained on 104 languages, including Hindi and Marathi. IndicBERT was pretrained on 12 Indian languages and was released by Ai4Bharat. These are both multilingual starting points, at different scales and with a different focus. Their comparison asks how the complete checkpoints transfer to the tasks.

The paper also examines language-specific alternatives. The Marathi RoBERTa checkpoint was released by flax-community and was pretrained on Marathi through masked language prediction. The Hindi RoBERTa checkpoint came from flax-community as well. The Hindi experiments include a separate Hindi BERT checkpoint from neuralspace-reverie, pretrained on the OSCAR corpus. These systems give the study a way to compare multilingual pretraining with checkpoints intended for the particular language.

The transfer step is [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). The checkpoint starts with parameters learned in pretraining and is then trained on the task data. Its familiarity with text from a target language does not supply the task labels in advance. The annotated examples still determine how the system adapts to the benchmark categories. A classifier that represents words in context must learn how that context maps to a label such as HOF or PRFN.

These transformer runs and the static FastText runs use prior text experience in different ways. FastText provides the inputs to a separate task-trained network, and those inputs can be held fixed. The pretrained transformer supplies a contextual text processor that is itself adapted to the labeled task. The paper compares the resulting classifiers under the same benchmark questions, so these are comparisons of complete approaches to transfer.

#### How the Hindi hierarchy routes a tweet

Direct detailed prediction asks a classifier to choose among NONE, HATE, OFFN, and PRFN. Its training objective has to support both the broad distinction between the remaining class and flagged content and the finer distinctions inside flagged content. At prediction time, all the labels are available to the same decision.

The hierarchy gives those jobs to separate classifiers. The first is trained on the binary Hindi task, with HOF and NOT as the possible labels. For the second classifier, the authors start from the detailed Hindi training data and remove entries labeled NONE. The remaining examples provide training for the distinction among HATE, OFFN, and PRFN. The second classifier has a narrower assignment and encounters a different mix of categories during training.

Every Hindi test tweet first goes to the binary classifier. If it predicts NOT, the detailed output takes the NONE branch. If it predicts HOF, the second classifier receives the tweet and supplies one of the detailed categories. The authors combine those branches to produce the final outputs for the detailed task. Hindi RoBERTa is used for both stages of the reported transformer hierarchy, with each stage trained for its own labels.

There are two implications of the routing rule. The subtype classifier can concentrate on the differences among tweets that the training annotations place in the flagged classes. At test time, its input consists of tweets the first classifier predicts to belong there. A missed case in the first stage never reaches the subtype decision, and a false alarm at that stage is assigned one of the flagged subtypes. Those consequences follow from how the hierarchy makes its decision. The experiments compare whether the completed pipeline works better on the task than predicting the detailed labels directly.

### Experiments and results

#### What the shared-task datasets contain

The benchmark comes from HASOC 2021 and uses text collected from Twitter. The labels are manual judgments. The fine-grained requirements are specific to Hindi in this study, so there are two kinds of comparison to keep separate. The binary comparisons concern Marathi and Hindi individually. The comparison between detailed prediction methods concerns Hindi alone.

For Marathi, the authors give 1874 training samples, with a reported average sentence length of 13 words. They give 625 testing samples. The broad category scheme makes a single binary classifier sufficient for one complete prediction. The paper identifies the Marathi dataset through the earlier work on offensive language identification that supplied the shared-task material.

For Hindi, the authors give 4594 training samples across the task setup and a reported average sentence length of 26 words. The paper states that 1532 test samples were provided for both Hindi tasks. The same reported test size therefore belongs to the Hindi benchmark’s broad and detailed evaluations. The detailed task changes which answers count as correct by replacing a simple flag with a finer category.

The difference in dataset size matters for interpreting the comparison across languages. The Marathi and Hindi runs have their own training and test collections, and their reported lengths differ. A system’s order within either dataset is evidence about its performance against the other systems on that task. The study does not hold dataset size, length, or language constant to test each of those factors independently.

Reported HASOC 2021 test sample counts for Marathi and Hindi Hindi has the larger test set in the paper’s comparison.

**The numbers**

| System or setting | Test samples |
| --- | --- |
| Marathi binary | 625 |
| Hindi shared task (this paper) | 1532 |

The bars describe the size of the evaluation collections. The marker denotes the larger reported test count. A larger count in this figure conveys no performance advantage for any classifier.

#### What is measured and what can be compared

Accuracy is explicitly named in the training procedure. Validation accuracy is the share of validation predictions that match their labels, and the authors choose a checkpoint at the epoch where that measure is highest. The evaluation results are described through relative performance, and the paper refers to separate result tables for the simpler and transformer systems. Its numerical performance entries and test scoring details are unspecified in the written results. The reported orderings can therefore be stated, while score magnitudes and gaps remain undetermined.

The main comparison systems are the CNN, LSTM, and BiLSTM with randomly initialized embeddings. Each also gets the opportunity to use IndicNLP FastText, either with further training of the embeddings or in static form. This creates a baseline at the level of input representation. Testing the same architecture family with random initialization and pretrained inputs asks how much a starting word representation changes performance under task supervision.

The pretrained checkpoints form another set of comparisons. Results among those systems show which complete checkpoint worked best once trained on a particular task. Because the checkpoints differ in their original pretraining, the ranking can guide a choice among the systems as evaluated. It gives limited leverage for deciding whether language coverage, pretraining data, or some other checkpoint property accounts for the ranking.

For the detailed Hindi task, direct prediction is the baseline for the hierarchy. The reported hierarchy is evaluated through its combined output, after the binary decision has routed each tweet. That is the output that can be judged against the detailed label. An accurate early decision is relevant to the overall result, but it is only part of what must go right for a tweet to receive its correct fine-grained category.

#### Marathi binary classification

IndicBERT is the strongest transformer in the Marathi binary comparison. The alternatives include multilingual BERT and the Marathi RoBERTa checkpoint. As the best system in a family that leads the binary comparisons, IndicBERT gives the best reported Marathi result among the tested approaches. Here the Indian-language multilingual checkpoint is ahead of both the broadly multilingual alternative and the Marathi-specific one.

Among the simpler Marathi systems, the top configuration is the LSTM with fixed FastText embeddings. This establishes which combination the authors found best within that group for the Marathi binary dataset. A useful detail in this result is that the embeddings have already been trained and remain fixed, while the recurrent and dense parts learn the distinction from the labeled tweets. The word vectors and the task decision can therefore be learned from different text collections without updating both together.

The authors describe simpler systems with static FastText as competitive in the binary tasks. This is a statement about their standing in the reported comparison. With the scores unspecified, the Marathi result supports the identity of the leader and the strongest simpler alternative, while the size of the lead remains open.

#### Hindi binary classification

For the binary Hindi task, the best reported transformer is Hindi RoBERTa. Its pretraining is specific to Hindi, whereas Marathi’s leading checkpoint covers multiple Indian languages. The differing results show that the language-specific and multilingual options each can win within the particular comparisons in which they were tested. The experiments concern those checkpoints on their corresponding datasets.

The leading simpler configuration for binary Hindi is a BiLSTM with fixed FastText. This differs from the Marathi binary result in its recurrent architecture. It retains the same choice to freeze pretrained word vectors. The paper therefore finds the same embedding treatment in the best simpler setting for both binary tasks, alongside different choices about how to process the sequence.

The authors present a confusion matrix for the strongest binary system in each language. A confusion matrix organizes predictions by the annotated class and the predicted class. For a binary task, it can help a reader see whether errors more often take the form of missed flagged posts or false alarms on other posts. The figure is part of the authors’ analysis of the winners. The written account gives the comparison outcomes without assigning numerical error counts to those categories.

#### Detailed Hindi classification

For detailed Hindi, the authors train the RoBERTa hierarchy using the Hindi checkpoint at both stages. The first stage uses the binary labels. The second uses the training entries carrying the flagged subtype labels. The resulting system performs better than direct detailed classification with Hindi RoBERTa. That comparison is evidence that, for this checkpoint in the authors’ setup, organizing the decisions into stages can improve the final subtype predictions.

The simpler systems show a different pattern. The paper reports that direct detailed classification works better for them than the hierarchical approach. Its strongest detailed result is the direct CNN with fixed FastText embeddings. The authors place it slightly above the Hindi RoBERTa hierarchy. This is the case where a simpler network finishes first overall, following the transformer wins in both binary tasks.

The results identify both a within-family improvement and a comparison across families. Hierarchy improves the reported Hindi RoBERTa result relative to the direct variant. The best reported CNN nonetheless stays ahead of that improved result. For a reader choosing among these systems for the benchmark, the distinction matters. The best way to use one checkpoint can be a different question from which complete system finishes first.

A separate confusion matrix covers the best detailed Hindi classifier. It can represent a kind of error absent from the binary comparison. A correctly flagged tweet may be assigned the wrong subtype. Such a prediction is wrong for the fine-grained task even though it would lead to the same broad flag. The existence of that finer error category helps explain why a strong result on binary Hindi offers only part of the evidence needed to judge a classifier on the detailed task.

### What the ablations show

#### Freezing the embeddings is a consequential choice

The paper includes configuration comparisons that serve as component analyses. The clearest is the treatment of word embeddings in the simpler classifiers. The authors try random initialization, pretrained FastText with task updates, and pretrained FastText kept fixed. Across these options, the paper describes static FastText as the most promising. The top simpler configuration in each binary task uses it, and the top detailed Hindi configuration uses it too.

The comparison between trainable and static FastText is the closest test of the effect of permitting embedding updates. In both cases, task training begins with pretrained word values. Freezing keeps those values available throughout the run, while updating them lets the classifier reshape how individual words are represented. The reported preference for freezing shows that additional flexibility can be unhelpful in these configurations and with these labeled data.

The authors interpret the static results as evidence that freezing helps avoid overfitting the embeddings to the training data. Overfitting here would mean adapting so closely to patterns in the training tweets that the resulting representation works less well on new tweets. The comparison supports the practical preference for fixed embeddings in the reported settings. The proposed explanation concerns the training process, and the paper does not show a separate measurement of embedding changes or trace the generalization gap for each configuration.

The random-initialization condition provides a complementary comparison. A randomly initialized embedding has to acquire its useful numerical structure through task training. FastText starts with structure learned previously. Since the strongest simpler settings use fixed pretrained vectors, the findings show that the downstream networks can make effective use of that prior structure even when they have no ability to rewrite it. They do not isolate which words or features contribute most to the gains.

#### Hierarchy helps one family and hurts another

The direct-versus-hierarchical comparison tests how to divide supervision and how to organize inference for detailed Hindi. The direct classifier sees the full label set in training and chooses a detailed label in one decision. The hierarchical version learns the broad decision separately, then learns the fine distinction on examples from the flagged classes. The second stage has no NONE output and depends on the first stage for access to tweets.

The RoBERTa comparison favors the hierarchy. Using Hindi RoBERTa for both stages improves on direct detailed prediction by the same checkpoint family. That finding makes the routing design relevant to a system that already performs strongly on the binary Hindi task. The broad task supplies a decision the pipeline can reuse, and the subtype training objective can focus on the remaining distinctions.

The simpler classifiers favor the direct setup in the authors’ account. A direct CNN with frozen vectors is the strongest member of that group and the overall detailed Hindi leader. Thus the hierarchy changes performance in different directions depending on which classifier is used. The result concerns the particular way the study implements hierarchy, with a separately trained broad classifier and hard routing based on its prediction.

Several features change together when the study goes from a direct classifier to the hierarchy. The subtype training pool excludes NONE, the final decision is distributed across separate trained classifiers, and early errors can determine which final labels are available. The headline comparison captures the effect of the package. It does not isolate whether the result is mainly due to the training pool, the better fit between a checkpoint and the binary objective, or what happens at the routing boundary.

#### Class imbalance and error analysis

The paper highlights class imbalance in the fine-grained Hindi task. Class imbalance occurs when labels are represented unevenly in the training examples. A classifier can get frequent practice on the common classes while seeing relatively few examples of a rarer distinction. The authors report that the BERT-family classifiers are more susceptible to this imbalance in their detailed Hindi experiments and say that underrepresented classes require oversampling. Oversampling increases their representation during training by presenting examples from those classes more often.

The authors describe the simpler systems as more robust to that imbalance in this setting. Their better performance with direct detailed prediction is consistent with that observation. The paper gives no separate numerical comparison that isolates oversampling from the other choices in the transformer runs. It also does not identify a measured benefit for each subtype. Accordingly, the imbalance discussion offers an interpretation of the observed behavior and a reported training consideration, with the detailed ranking supplied by the complete systems.

The confusion matrices give a different view from the comparisons of configurations. They describe the decisions of the strongest system for each task by recording how reference and predicted labels coincide or diverge. In principle, they let a reader inspect which errors account for the final performance, including confusions inside the flagged content categories. They do not compare matched ablation pairs, so their role is to characterize the best reported predictions. The evidence for the effect of freezing or routing comes from comparing configurations with those choices changed.

### Limitations

#### Difficulties the authors identify

The authors identify limited annotated data as a central difficulty for research in Hindi and Marathi hate and offense detection. Their study uses labeled tweets from an existing shared task. This gives the classifiers a defined set of examples on which to learn and a fixed benchmark on which to be assessed. It also makes the scope of evidence depend on the coverage of those collections. The paper addresses the data constraint by reusing pretrained representations and comparing different ways to adapt them.

The other difficulty they emphasize is unequal representation in the detailed Hindi task. Their discussion ties it particularly to the behavior of the pretrained transformer classifiers and notes a need to increase the presence of underrepresented labels in training. The class imbalance observation is specific to the fine-grained Hindi experiments as described. The authors’ claim about resilience in the simpler approaches is similarly tied to those runs.

The paper also recognizes a distinction between competing closely and finishing first. The detailed CNN advantage over Hindi RoBERTa is described as slight. For the binary tasks, the authors say that the simpler alternatives remain competitive while the transformers perform best. Those descriptions set the scale of the conclusions as far as the qualitative results allow. They support the reported ordering, with the practical magnitude of a gain left unspecified.

#### Limits that follow from the evaluation setup

The tests establish performance on labeled Hindi and Marathi tweets from HASOC 2021. The article’s motivating concern is broader than those collections. The experiments do not test performance on another platform, a different sample of social media language, or a later period. The results also do not separately establish how the systems handle alternate scripts, code mixing, or other varieties of input the paper discusses indirectly through earlier work. Those remain outside the tested scope.

The target is the annotators’ label for a post. That is an appropriate target for the benchmark because every prediction can be judged by the same rule. The experiments do not examine the success of a real moderation decision made with conversations, competing interpretations, or additional background. A system can be useful for reproducing benchmark labels while questions about context and consequences remain beyond what the evaluation measures.

The label schemes also constrain generalization across tasks. Binary Marathi and binary Hindi use a similar broad distinction, but the datasets differ in size, average length, and language. Before–after effects of changing the label scheme can be studied within Hindi, where the paper has both versions. The paper supplies no corresponding detailed Marathi test. A conclusion about whether hierarchy helps in the Marathi setting cannot be drawn by transferring the Hindi ranking alone.

The study discusses hate speech in relation to attacks on people and groups, but its reported results do not provide separate comparisons by target, identity, or kind of linguistic expression. A performance ranking on the tweets as a whole does not establish consistent behavior for those slices. That is a limit on the scope of the measured claim, especially given the paper’s account of the different ways harmful language can appear.

#### Limits on explaining the rankings

The checkpoint comparison combines multiple differences. Multilingual BERT, IndicBERT, and language-specific RoBERTa start from different pretraining histories. Their performance is evidence about the available systems as complete choices. A stronger experiment for the effect of language coverage alone would hold the other ingredients constant and vary coverage. The comparison here supports the observed results for IndicBERT on Marathi and Hindi RoBERTa on Hindi, with the causal contribution of each pretraining choice left open.

The recurrent comparison has a similar constraint. The Marathi binary LSTM and the Hindi binary BiLSTM differ in reading direction and layer sizes, and their strongest results concern different data collections. The architectures do show that useful classifiers can be built with the paper’s recurrent setups. The study does not estimate how much difference bidirectionality makes with other architectural features held fixed.

The embedding analysis is more focused because the authors try fixed and trainable versions of the same kind of pretrained vectors. Even there, the paper’s explanation involving overfitting goes beyond the ordering itself. Fixed vectors reduce what the system can change during task training. The finding indicates that this restriction works well in the tested systems. Demonstrating its precise effect on the learned representation would require observations the paper does not report, such as how the vectors change or which errors become more common after updating them.

Hard routing adds a further limit to the hierarchy comparison. The subtype stage trains on examples annotated as members of the flagged categories. At test time it receives examples selected by the binary predictor. A wrongly flagged example may therefore reach a classifier trained to assign only flagged subtypes. A wrongly cleared example skips subtype classification. The paper evaluates the completed procedure, but it does not quantify the separate effects of these routing errors or compare with routing that uses the reference binary labels. The observed improvement for RoBERTa describes the net result of specialization and routing together.

#### Limits on judging the size and stability of the results

The paper identifies the best configurations in prose, names its checkpoint selection criterion, and gives enough architecture information to explain the comparisons. It gives no numerical test scores or test metric details in its written discussion. The numerical claims available for the data sizes and training configurations are therefore more precise than the claims possible about the performance gaps. In particular, the small reported advantage of the CNN in the detailed Hindi task cannot be converted into an estimate of the number of extra correct predictions.

The paper also supplies no run-to-run variation or significance analysis in its discussion of the results. Randomly initialized parameters and task training can make stability a relevant question for close rankings. The evidence here supports the ordering the authors report. Whether that ordering persists across repeated training runs or alternate validation splits is left open.

Checkpoint selection by validation accuracy is clear as a rule. For the detailed Hindi task, the authors’ own discussion of imbalance raises a further question about what determines the selected epoch. Accuracy counts each example equally, so the more numerous labels can have more influence on the selection than rare labels. The paper does not show whether a criterion that gives each class equal influence would select the same checkpoints. That is a limit on interpreting the balance of errors from the reported selection procedure, especially for the rare subtype labels.

### What came after

#### Where the shared-task overview fits

The [HASOC subtrack overview at FIRE 2021](https://md.research.elamur.ai/free/en/papers/mandl-2021-overview-hasoc-subtrack-fire-2021/) concerns the shared evaluation for hate speech and offensive content in English and Indo-Aryan languages. It belongs to the same evaluation effort as the Hindi and Marathi classifier study. The overview gives the event a broader scope, while the classifier paper examines particular approaches and language tasks within it. The shared-task connection explains why the works can be read together even though they address different questions about the benchmark.

The relationship is reciprocal in the bibliographic record. The classifier paper points to the overview when describing the origin of the Hindi dataset. The overview also cites the classifier study. The meaningful connection is therefore the shared [evaluation benchmark](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/), which gives work on different systems a common task setting. The available description does not identify a reuse of the Hindi hierarchy or a separate repeat of the embedding comparison by the overview. Its documented connection is through the event and its evaluation.

This distinction matters for how the comparison travels. The overview can locate the Hindi and Marathi experiments in a multilingual shared task. The ranking of the particular classifiers remains evidence from their own evaluation. Looking at the works side by side gives a reader both the level of the shared exercise and the level of the specific choices tested on its data.

#### Marathi resources beyond hate and offense detection

[L3Cube-MahaCorpus and MahaBERT](https://md.research.elamur.ai/free/en/papers/joshi-2022-l3cube-mahacorpus-mahabert-marathi-monolingual/) describes a Marathi corpus, Marathi-specific BERT resources, and related materials. Its connection to the classifier paper lies in the problem of finding suitable representations for Marathi text. The HASOC comparison uses existing pretrained checkpoints to learn a particular prediction task. The later paper concerns Marathi resources themselves, including the corpus and the Marathi BERT work named in its title.

That direction relates to the earlier study’s comparison between multilingual and language-specific starting points. The classifier paper can assess the checkpoints available to it on labeled Marathi tweets. Work on a Marathi corpus and Marathi pretraining addresses what researchers can use as an input to future comparisons. The citation establishes the relation between the papers in the literature. The account of the later work does not specify adoption of a classifier, reuse of HASOC data, or an evaluation of the hierarchy, so the documented connection is at the level of language resources.

[L3Cube-MahaNER](https://md.research.elamur.ai/free/en/papers/litake-2022-l3cube-mahaner-marathi-named-entity/) develops a Marathi dataset and BERT resources for [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/). Named entity recognition identifies and types mentions of entities within text. Its annotation problem differs from assigning a content category to a complete tweet. The units being labeled and the meaning of a correct prediction change, even though both lines of work use annotated Marathi data and investigate what pretrained BERT resources can contribute.

MahaNER illustrates that the problem of developing labeled Marathi datasets extends across tasks. The earlier classifier paper uses manual tweet labels to distinguish forms of harmful content, while the later title identifies a dataset designed around entity mentions. The citation connects these efforts without establishing that their label schemes, training data, or classifiers were carried from one task to the other.

The documented follow-on work thus leads from the common HASOC evaluation to broader Marathi resources and to a distinct Marathi annotation task. The overview supplies the shared-task context for the original comparison. MahaCorpus and MahaBERT address the supply of language-specific material and pretrained representations. MahaNER brings data development and BERT resources to entity labeling. Each is connected to the classifier paper through the evaluation or resource problem it addresses, with the original performance conclusions remaining specific to the Hindi and Marathi HASOC experiments.

## Cite

Cite as Abhishek Velankar, Hrushikesh G. Patil, Amol Gore, Shubham Salunke and Raviraj Bhuminand Joshi. 2021. Hate and Offensive Speech Detection in Hindi and Marathi. arXiv (Cornell University).

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

```bibtex
@misc{velankar2021hate,
  title = {{Hate and Offensive Speech Detection in Hindi and Marathi}},
  author = {Abhishek Velankar, Hrushikesh G. Patil, Amol Gore, Shubham Salunke and Raviraj Bhuminand Joshi},
  year = {2021},
  doi = {10.48550/arxiv.2110.12200},
  eprint = {2110.12200},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2110.12200}
}
```

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