---
title: "Evaluation of Deep Learning Models for Hostility Detection in"
description: "A study of Hindi social media posts compares convolutional, recurrent, and BERT classifiers for detecting hostility and assigning overlapping labels."
canonical: "https://research.elamur.ai/free/en/papers/joshi-2021-evaluation-deep-learning-models-hostility/"
---
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/joshi-2021-evaluation-deep-learning-models-hostility/)

[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/) / Evaluation of Deep Learning Models for Hostility Detection in Hindi Text

# Evaluation of Deep Learning Models for Hostility Detection in Hindi Text

Paper · 2021 · Ramchandra Joshi, Rushabh Karnavat, Kaustubh Jirapure et al.

**Authors:** Ramchandra Joshi, Rushabh Karnavat, Kaustubh Jirapure and Ravirai Joshi · **Year:** 2021 · **Venue:** International Conference for Convergence in Technology (I2CT) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

International Conference for Convergence in Technology (I2CT) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1109/i2ct51068.2021.9418073](https://doi.org/10.1109/i2ct51068.2021.9418073)
- [arXiv 2101.04144](https://arxiv.org/abs/2101.04144)

## Summary

A Hindi social media post can be hostile in several ways at once. It may be offensive and also target someone in a way that the annotators classify as defamation or hate. A system that flags the post as hostile has answered a broad question. Assigning the relevant categories requires a more detailed judgment. The authors compare ways to make both decisions using the words of the post. Their study uses the Constraint@AAAI 2021 Hindi hostility dataset, which contains 8192 posts and distinguishes non-hostile posts from posts labeled fake, hate, defamation, offensive, or some combination of those categories.

The authors approach the task as hierarchical [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/). A first classifier decides whether a post is hostile. Posts that pass that stage go to separate classifiers, each responsible for a particular hostility category. Each of those decisions is binary, so several category classifiers can accept the same post. The authors test convolutional networks that look for local patterns, recurrent networks that process text in both directions, and a network that combines those operations. They also test mBERT and IndicBERT, pretrained multilingual systems based on the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) architecture.

For the convolutional and recurrent systems, the authors compare [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) that start from random values with Hindi FastText embeddings pretrained by Facebook or IndicNLP. The pretrained vectors continue to learn during task training. The BERT systems start from pretrained text encoders and undergo task-specific [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). The authors compare performance using weighted F1, which combines how reliably predictions match the reference labels with how much of the labeled material they recover.

The BERT systems lead on fine-grained classification, while the simpler neural systems remain competitive and the authors describe coarse hostile-versus-non-hostile scores as broadly similar across the neural approaches. IndicBERT has a slight edge over mBERT in the reported comparison, though the authors find no clear winner between them. Against a baseline that uses a support vector machine with mBERT embeddings, the test discussion reports absolute F1 improvements for IndicBERT of 11.84 % on the coarse task and 7.09 % on the fine-grained task. Among the simpler approaches, the conclusion singles out the convolutional system with parallel filter widths and IndicNLP FastText. Across architectures, pretraining the input word vectors gives no consistent advantage over starting them at random.

## Deep dive: Evaluation of Deep Learning Models for Hostility Detection in Hindi Text

A study of Hindi social media posts compares convolutional, recurrent, and BERT classifiers for detecting hostility and assigning overlapping labels. · about 34 minutes to read

**In this deep dive**

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

### The problem and its context

#### From flagging a post to describing it

The authors begin with a moderation problem. Social media makes it easy to circulate useful information, publish creative work, and take part in public discussion. The same channels can carry derogatory remarks, attacks on individuals or groups, and malicious claims. The paper describes the consequences in terms of bullying, distress, and conflict. The scale of online posting makes a system that can flag potentially hostile material appealing. A finer categorization may also be valuable because a broad flag leaves open what prompted the judgment.

The benchmark gives that distinction a concrete form. At the coarse level, the question is whether the post belongs to the hostile or non-hostile group. At the fine level, the question is which of the benchmark’s hostile categories apply. The label fake is one of those categories, alongside hate, defamation, and offensive. Thus hostility in the paper has a specific operational meaning. It covers the cases grouped together under the dataset’s hostile label, and the fine labels describe the dimensions recognized by the benchmark.

Overlap matters because a social media post is a unit of text that can perform several functions. A claim can damage the reputation of a named person and express hostility toward that person in the same passage. The presence of one dimension leaves room for another. The task therefore differs from choosing a single best category from a menu. A classifier can identify one applicable label correctly and still give an incomplete account of the post. Giving credit at the broad level and examining the individual labels at the fine level helps expose that distinction.

The paper motivates automated detection partly through the difficulty of manual review. Reviewing large quantities of material takes substantial labor. The authors also point to differences in judgment, since readers can interpret the same language differently. Automation changes how those judgments are applied at scale. In this study, the annotations provide the target against which automated predictions are judged. Questions about how to determine the correct policy for a platform sit beyond the classification experiment.

#### Why simple cues can be insufficient

Among the early approaches the authors describe is searching for words associated with hostility. The attraction of a word-based rule is straightforward. A term can be registered in advance and checked wherever it occurs. The paper identifies two difficulties with treating such matches as decisive. A vocabulary of derogatory expressions is hard to make comprehensive, and the meaning of a word in a post depends on its context. The same surface cue can therefore have different significance in different texts.

The related work describes supervised approaches that draw on more kinds of evidence. One study of offensive tweets used an ensemble of long short-term memory classifiers, abbreviated LSTMs, and supplied information about users along with the tweet text. Another study of hate speech on Facebook considered LSTMs and support vector machines with features such as [part-of-speech tags](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/), distributed representations of words, and [sentiment](https://md.research.elamur.ai/free/en/topics/sentiment-emotion/). These studies illustrate what a designer can vary besides the classifier itself. The input might consist of the text alone, or it might include linguistic features and information about the account that posted it.

The authors also discuss earlier work on representing comments or their words as numerical vectors. A distributed representation can encode aspects of a text across many coordinates. The values can then inform a classifier even when there is no explicit rule for the expression. A prior hate speech study compared conventional and neural classifiers with different input representations. The conventional approaches used features including character [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/), which are short contiguous sequences, and [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/), which weights terms partly according to how widely they occur across documents. The neural approaches used learned representations, including [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) vectors adapted during training. The authors cite that study as evidence that neural approaches could be effective for this kind of task. It also provides a precedent for comparing the way text is represented as well as the way it is classified.

These strands of earlier research motivate choices that the Hindi study makes explicit. One is whether to feed a classifier relatively local textual patterns or to use a representation that incorporates surrounding words. Another is whether to learn lexical representations from the labeled examples or begin with representations learned from a larger corpus. The authors keep the input to the post text. Within that scope, they compare neural approaches that differ in how they obtain and use textual context.

#### Why Hindi calls for its own evaluation

The paper describes Hindi hostility detection as a [low-resource language](https://md.research.elamur.ai/free/en/topics/low-resource-languages/) problem in the sense relevant to this research. Hindi is widely used, including on social media, while the authors find comparatively little published work and a more limited set of resources for this particular task. Those observations can coexist. The ability to type in Devanagari on a phone or computer increases the availability of online Hindi text, but building a labeled collection for a specific decision still takes separate work.

Hindi research had already supplied examples to build on. The authors describe an annotated corpus of offensive Hindi tweets used with a FastText classifier for a binary decision. They also review work on offensive or hateful language in code-mixed Hindi and English. Those studies address related questions. An offensive-versus-non-offensive annotation calls for a specific binary distinction, and a code-mixed dataset presents its own linguistic conditions. The shared task used here calls for a broad hostility decision and for several labels that can coexist. The introduction describes its Hindi setting in terms of Devanagari posts.

The paper also draws on earlier comparisons of convolutional and recurrent networks for Hindi [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/). Those comparisons provided reason to include these architectures as serious candidates. Resource development for Indic languages made another part of the study possible. The authors could use Hindi word vectors supplied by IndicNLP and a pretrained encoder supplied by AI4Bharat, alongside resources from broader or different training efforts. That lets the paper ask how much practical benefit pretraining gives on this benchmark, both when it supplies the initial vector for a word and when it supplies the encoder for an entire post.

The benchmark belongs to a shared task the authors describe as concerned with regional languages, emergencies, and early detection. Their experiment addresses the textual classification part of that agenda. For each post, the system receives the text and predicts a broad flag and, where applicable, finer labels. This defines the experiment tightly enough to compare several systems on the same task, even though real moderation can require decisions involving further context.

### The method, step by step

#### Turn the label structure into decisions

The starting point is the structure of the [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/). Non-hostile posts form one side of the broad binary task. Every post with a hostile label belongs on the other side, regardless of the category or combination of categories assigned to it. The first classifier can therefore learn from a single target for every example. At this stage, a post tagged offensive and a post tagged offensive and defamation both supply positive examples for the same broad decision.

For fine classification, the authors use a one-versus-all strategy. Training for a particular category treats presence of that category as the positive outcome. An example can participate positively in other fine classifiers as well. If a post carries both hate and defamation, its broad target is hostile and it counts as positive in both of those fine training problems. A category that the annotation leaves absent receives a negative target when the example is included in training for that category.

The paper illustrates the overlap with a training post about the Chandrayan mission. The post blames Modiji for a disruption and says scientists’ work was wasted. The paper reports that the same post was assigned hate, defamation, and offensive. Its purpose in the dataset discussion is to show how the targets are structured. The first classifier sees a hostile example. The fine classifiers responsible for those annotations each see a positive example for their own category. The hierarchy turns these decisions into a possible set of predictions at inference.

The stage order matters at inference because the broad decision controls which posts reach the fine classifiers. A broad negative ends the process for that post. A broad positive sends the text to the individual category classifiers, which can accept it independently. The available labels can consequently overlap in the final output, just as they do in the reference annotations.

How the hierarchy classifies a Hindi post The steps in order.

The broad classifier and the fine classifiers occupy different roles in this procedure. The broad system pools all evidence available for any kind of hostility into one decision. Each fine system learns a boundary specific to its own label. In the fake classifier, examples marked fake are positive wherever that annotation is present. In the offensive classifier, offensiveness determines the target. The binary training problems share a common overall design while asking different questions of the text.

The paper's description leaves the outcomes of all-negative fine predictions unspecified. With independent binary decisions, a post can in principle pass the broad classifier and receive no fine category. A forced choice, a ranking rule, and acceptance of an empty set would handle that case differently. The authors identify the hierarchy and describe how posts are routed, which is enough to explain the intended handling of overlap. They leave that particular output case open.

#### Choose the training examples for each task

The organizers supply training, validation, and test sets. The authors use the training portion to fit the classifiers and the validation portion to guide a limited amount of tuning and to select the training epoch. An epoch is a pass through the training examples as arranged for the run. The authors select the epoch by validation loss, so the checkpoint decision uses performance on examples outside the fitting set. The test split serves as the final basis for the comparisons.

The coarse classifier uses the hostile posts together as positive examples and the non-hostile posts as negative examples. The authors use the available distribution for this stage. Their oversampling is confined to the training of the individual hostility classifiers. Oversampling gives examples from a category additional representation in training. It changes how frequently the classifier receives those examples relative to other examples. The paper describes this as a way to balance training for the fine decisions and leaves the precise resampling counts unspecified.

The fine classifiers also differ in how the authors assemble the negative class. For the convolutional and recurrent experiments, the negative pool can include non-hostile posts. It also includes hostile material that lacks the category being learned. In the fine BERT experiments, the authors omit non-hostile posts from the negatives after observing worse performance when they included them. The resulting BERT setup trains a fine classifier to distinguish its category from the other hostile material that lacks that label.

This choice changes what distinctions the fine classifiers encounter during training. A negative example from the non-hostile pool can be far from a positive example in ways that have little to do with the specific target category. A hostile negative can share signs of hostility with the positive examples while differing in the category annotation. This is one reason to pay attention to the population that supplies the negatives when reading a comparison. The paper establishes that the authors tried including non-hostile negatives for BERT and observed a degradation. It leaves the nature of that degradation and the value of particular kinds of negative examples unexplained.

The hierarchy also means the ideal train-time population and the run-time population can differ. Fine classifiers trained only on examples with a hostile reference label will receive posts with a hostile prediction when the full system is used. Those predictions can admit non-hostile examples. A negative pool that includes non-hostile posts gives the fine classifier exposure to such text during training. A pool restricted to hostile text concentrates training on the distinctions among hostility categories. The observed BERT result favors the latter configuration in the authors’ comparison, with the reported scope discussed below.

#### Represent the words for convolution and recurrence

The simpler neural systems begin with a sequence of word embeddings. An embedding supplies a numerical vector for a word, and the sequence preserves the order in which those vectors occur in the post. The simple convolutional architecture specifies vectors of dimension 300. These vectors are the input to the part of the network that looks for patterns extending over several words or that accumulates information along the sequence.

The experiments try several ways to initialize the vectors. One choice starts with random values and lets the labeled task shape them. The other choices use Hindi FastText vectors from Facebook or IndicNLP. These vectors were learned from Hindi text before the hostility classifier was trained. FastText builds word representations using sub-word information, which gives parts of words a role in the representation. The authors regard that property as suitable for noisy text because recurring pieces can provide information even when the full form varies.

The pretrained vectors remain trainable after initialization. That detail matters for understanding the experiment. The comparison concerns the value of two kinds of starting point, each followed by learning on the labeled hostility data. It does not isolate the quality of frozen lexical representations. For the FastText alternatives, the authors explicitly adapt the embeddings because the target posts come from a different domain from the data used for pretraining.

Word vectors and sequence processing therefore form distinct parts of these systems. The word vectors determine how each word enters the classifier. The architecture above them determines how those vectors are used together. A change in initialization can affect several architecture families. A change in the architecture can alter which patterns are useful even when the input vectors start from the same resource. Keeping these choices visible makes the embedding comparison easier to understand.

#### Look for local patterns with convolutions

A convolutional neural network, or CNN, applies learned filters repeatedly along the text. Each filter examines a local span of vectors. If the span resembles a pattern the filter has learned to respond to, the resulting activation can be high. Applying the same filter across the post lets it detect a pattern wherever it occurs.

The simple CNN has a 1D convolution with kernel size 4 and 128 filters. The kernel size gives the number of adjacent positions visible to a filter at a time. After rectified linear activation, called ReLU, a global max-pooling layer keeps the strongest response from each filter over the sequence. ReLU allows positive activations to pass and sets negative activations to zero. Max pooling produces a fixed-size representation of the responses that were strongest somewhere in the post.

The network then uses dropout with a rate of 0.3 and a dense layer of size 64, followed by a dense layer of size 1. Dropout suppresses part of the representation during training, so the next layer learns to work with varying subsets of the available inputs. A dense layer combines the features it receives through learned weights. A sigmoid activation maps the final score to the range used for the binary decision. The paper describes the use of ReLU for convolutional layers and sigmoid for dense layers in these architectures.

Max pooling gives this classifier a particular way to retain evidence. A strong response to a short sequence can survive pooling even when the rest of the post produces weak responses. The pooling output identifies the strengths of those responses. Their exact positions and order across the post fall out of that pooled representation. For a label that can be signaled by a short phrase, this is a plausible design. If the relevant relationship is spread across the post, the way the architecture retains sequence information becomes more consequential.

The multi-CNN replaces the single convolutional width with 3 parallel widths, using kernels of sizes 2, 3, and 4. These branches apply different spans to the same input sequence. The authors keep the other settings of the simple CNN and describe concatenating the outputs before sending the combined representation to dense layers of sizes 64 and 1. Concatenation places the branch features together so that the final prediction can use evidence from several span lengths.

The motivation can be understood without assuming that particular filters learned identifiable phrases. A short span gives a filter focused access to a nearby combination of words. A wider span can take in additional words that change the interpretation of that combination. The multi-CNN makes both receptive fields available at the same point in the system. The comparison in the paper evaluates the complete parallel architecture, so its outcome speaks to that design as a package.

#### Track context across the sequence

The bidirectional long short-term memory network, or Bi-LSTM, processes the vectors as an ordered sequence. An LSTM is a recurrent network that updates a state as it moves through the text and can retain information across positions. Bidirectionality gives the network a forward pass and a backward pass. A representation associated with a position can therefore incorporate information from each side of it.

The authors put a single Bi-LSTM layer with 128 units over the word embeddings. They use recurrent dropout of 0.3. The resulting sequence of hidden representations is then max-pooled over time, which means pooling across the positions in the text. The final dense layers have sizes 64 and 1. This architecture and the convolutional system both reduce a sequence to a pooled representation. Their difference lies in what each position contains by the time pooling occurs. In the Bi-LSTM, the position has already been processed in light of the sequence in both directions.

The hybrid CNN+Bi-LSTM first uses a convolution to turn local arrangements of word vectors into features. Those features then become an ordered input to a Bi-LSTM layer. Global max pooling follows the recurrent processing, and dense layers of sizes 64 and 1 produce the output. The order of the operations is important. The recurrent layer works over a sequence of local feature representations. Pooling at the end can retain a feature whose significance depends on the context in which that local pattern occurred.

The three designs make different assumptions about where useful evidence sits. The simple CNN makes it easy to detect a strong local pattern at any position. The recurrent system adds context before selecting strong signals across positions. The hybrid makes a local pattern explicit before asking the recurrent part to incorporate surrounding information. These are ways to understand the architectures. The paper evaluates them by their predictions, so the score comparisons do not identify what the networks learned to attend to in particular posts.

#### Adapt pretrained encoders to the labels

The BERT experiments start from pretrained multilingual text encoders. The paper describes BERT in terms of bidirectional representations and pretraining tasks that involve predicting masked tokens and the relationship between sentences. The study chooses multilingual BERT, or mBERT, and IndicBERT because they provide pretrained encoders applicable to Hindi. The paper gives mBERT a pretraining scope of 104 languages and IndicBERT a scope of 10 Indian languages. Those are descriptions of the resources used in the study, rather than variables the authors adjust during the experiment.

For classification, the authors use the output embedding associated with the special `[CLS]` token. In this setup that vector provides the representation of the post delivered to the classification layer. A single dense layer sits above it and produces the binary decision. The authors fine-tune the encoders for the target task, allowing the pretrained representations to adapt to the labeled examples. The same general arrangement supports both a broad hostility classifier and the category-specific classifiers.

This gives pretraining a different role from the FastText experiments. FastText initializes the vectors that enter a convolutional or recurrent sequence processor. The BERT systems begin with a pretrained sequence encoder and add a task-specific output layer. Their comparison with the simpler architectures therefore involves the initial representation, the architecture that processes the text, and the fine-label training setup. The paper’s evidence concerns the performance of these complete alternatives.

#### Optimize the binary objectives

The authors use Adam and binary cross-entropy throughout. Adam updates the trainable weights using information from recent gradients, which describe how changes to those weights affect the loss. Binary cross-entropy measures the cost of assigning a predicted probability to an outcome when the training target says the category is present or absent. A confidently wrong prediction contributes a larger penalty than a prediction that assigns substantial probability to the annotated outcome.

The binary objective fits the broad task directly. It fits the fine task because each label has its own classifier and can be optimized independently as present or absent. The authors identify the loss and optimizer by name and describe selection by validation loss. They do not state an equation for the objective or for the weighted F1 evaluation. The study's methodological commitments here are the choice of these standard procedures, the construction of their training targets, and the sequence in which the trained classifiers are applied.

### Experiments and results

#### The benchmark and its splits

The Constraint@AAAI 2021 Hindi hostility dataset contains 8192 online posts. The dataset description names Twitter, Facebook, and WhatsApp among the platforms represented. Across the whole collection, 4358 posts are non-hostile and 3834 are hostile. The category counts within the hostile material are 1638 for fake, 1132 for hate, 1071 for offensive, and 810 for defamation. Each of those counts is the number of posts with the stated annotation. A post with several annotations contributes to several of the counts.

The counts help explain what the classifiers face. Each fine decision has a different number of positive examples available before any changes to the training distribution. Defamation is the least represented of the categories listed, while fake is the most represented. The others can contribute their own positive examples and can also contribute negatives for a particular classifier when its target label is absent. Overlap means that a count for one category by itself says little about which other labels occur with it.

The authors use the organizers’ split of 70% train, 10% validation, and 20% test. The organizers designed the split to keep label distributions comparable. Using the common split gives the approaches the same partition of original examples, even when the authors oversample some training categories or vary the negatives. It also gives validation and test distinct roles. Validation is involved in choosing settings and epochs. Test figures summarize performance after those choices.

Platform diversity is part of the dataset description. The reported comparison combines material within this shared partition, so a score describes performance over the benchmark as split. It does not identify how well any architecture handles the writing conventions of an individual platform. The test discussion likewise treats the benchmark as a whole when reporting the absolute improvements over the baseline.

#### What weighted F1 measures here

The authors use weighted F1 to compare the approaches. For a classification label, precision asks how many predicted instances of that label are supported by the reference annotations. Recall asks how many reference instances the system recovers. F1 combines these aspects of performance through their harmonic mean, which makes the result sensitive to a low value on either side. Weighting gives labels with more reference examples more influence in an aggregate score.

This is relevant to a dataset with unequal label counts. A single weighted figure can summarize how well a system works over the observed label distribution. Reading the individual label scores would answer another question, namely whether a score reflects broad gains or stronger performance on particular categories. The paper identifies validation and test tables whose captions refer to overall and individual-label F1. The numerical discussion reports aggregate gains and qualitative comparisons, leaving those category-level values unspecified.

Coarse F1 concerns the broad labels hostile and non-hostile. It measures the output of the first decision in the hierarchy. Fine-grained F1 concerns the separate type assignments. A broad prediction can be correct even when the final answer misses one of a post’s reference labels. The distinction matters for reading the two reported improvements. Each compares a system with the baseline at a different level of the same benchmark.

Consider the training example that carries hate, defamation, and offensive labels. If the broad classifier flags it, its coarse decision agrees with the reference. If the fine stage then supplies only offensive, it has recovered one annotation and missed the others. If the broad stage rejects it, there is no opportunity for a fine classifier to recover any of those labels in the end-to-end output. Weighted F1 is an aggregate over decisions like these. It leaves room for systems with similar coarse scores to differ in the specificity or completeness of what they predict.

#### The baseline and the comparison groups

The external baseline discussed in the results is a support vector machine, abbreviated SVM, using mBERT embeddings. An SVM is a classifier that learns a boundary between examples represented as vectors. Here the vectors already incorporate a pretrained BERT resource. This baseline is especially relevant to the interpretation of the IndicBERT gains. Pretrained representations are present on both sides of the comparison. The evaluated BERT approach fine-tunes its encoder and uses the post representation with a dense classification layer.

Within the study, the convolutional and recurrent architectures also provide comparisons among plausible ways to process the same input. The simple CNN gives a single convolutional span. The multi-CNN broadens the available spans. The Bi-LSTM provides recurrence in both directions, and the hybrid puts convolution ahead of that recurrence. These approaches are tested with random initialization and with the Hindi FastText alternatives. The resulting configurations let the authors discuss architecture and initial word representations separately to a degree.

The remaining comparison is between mBERT and IndicBERT as task-adapted classifiers. The authors evaluate them in the common hierarchical design and include the first-stage and fine-stage outcomes in their discussion. The distinction between the mBERT-based SVM baseline and the fine-tuned mBERT classifier is important. They use the same pretrained resource by name, but their classification arrangements are different. The reported absolute gains are against the SVM baseline. The direct comparison between the fine-tuned encoders is described qualitatively.

#### Benchmark results

On the test data, the authors place the BERT classifiers ahead on fine-grained F1. They describe the coarse results across their neural approaches as similarly strong. The broad decision therefore offers little separation among those approaches in the discussion, while the fine decisions more clearly favor the pretrained encoders. The paper characterizes the overall BERT advantage over the simpler architectures as slight, which is compatible with both families being competitive on the shared task.

The authors give IndicBERT a small lead over mBERT in the results discussion and leave the ordering open. Their conclusion treats the two as performing comparably. This is a narrower comparison than the one with the SVM baseline. An improvement against the baseline gives a before-and-after result for a particular pair of systems. It supplies no numerical margin between IndicBERT and the fine-tuned mBERT classifier.

The reported IndicBERT improvement over the SVM with mBERT embeddings is 11.84 % in coarse-grained F1 and 7.09 % in fine-grained F1 in the discussion of test performance. The paper calls these absolute improvements. Each figure gives the reported gain in F1 for the stated task on the test split. The figures themselves do not give the achieved F1, so the size of the final score and the distance between the neural contenders cannot be recovered from them.

IndicBERT’s absolute F1 improvement over the SVM baseline on the Hindi hostility test set The reported gain over the baseline is larger for the broad hostility decision.

**The numbers**

| System or setting | absolute weighted F1 improvement % |
| --- | --- |
| IndicBERT fine-grained classification | 7.09 |
| IndicBERT coarse-grained classification (this paper) | 11.84 |

Among the simpler architectures, the authors report a slight advantage for multi-CNN across embedding variants. They single out multi-CNN with IndicNLP FastText as the strongest simpler configuration in the conclusion. The hybrid CNN+Bi-LSTM also fares better than the corresponding standalone CNN and Bi-LSTM approaches in the results discussion. These comparisons indicate that changing how the classifier combines text features can matter even when the basic family of word representations is held in view.

The embedding comparison is less directional. The authors see no consistent advantage for pretrained FastText vectors over random initialization. The best simpler configuration can still use IndicNLP FastText. A single architecture and initialization can work well together even when the same initialization gives no uniform improvement across the other architectures. The paper's claims support reading the result at both levels. There is a preferred simpler configuration among those tested, and the overall comparison gives limited support for choosing pretrained word vectors as a rule.

The authors also describe a tradeoff between coarse and fine performance across configurations. This tells the reader to check both classifications when comparing systems. A strong ranking on the broad decision can coexist with weaker fine classifications, and the fine stage has additional distinctions to make even with a strong coarse classifier. The paper gives no quantified relationship between the two scores. Its observation is about the pattern across the evaluated settings.

The reported results thus answer the comparative question at the level the experiments support. BERT gives the strongest fine-grained results, with a slight qualitative advantage for IndicBERT within that group. The simpler networks are close enough to merit comparison, and the multi-CNN is a strong option among them. The available numerical gains show how IndicBERT compares with the cited baseline on each task. A detailed ordering by category or a numerical comparison between every pair of configurations remains beyond the reported values.

### What the ablations show

The paper presents no formal component-removal ablation of its full hierarchy, and its closest evidence comes from comparisons of embedding initializations, architectural variants, and the composition of the fine-label negative class.

#### Varying the initial word vectors

The embedding experiment asks whether knowledge learned from other Hindi text gives the word-level classifiers a more effective starting point. The authors compare random initialization with pretrained Facebook and IndicNLP FastText vectors in the convolutional and recurrent families. Task training can change the vectors in all these settings. This puts the emphasis on any benefit that remains from initialization after the classifier has adapted to the hostility data.

The lack of a clear overall gain is evidence about those particular embedding resources under the authors' training procedure. There is room for a useful result in an individual configuration, as the selection of IndicNLP FastText with multi-CNN shows. The evidence becomes weaker when the claim is widened to all of the simpler architectures. Their ways of converting word representations into post features differ. A starting representation that works well with parallel local filters may play a different role in a recurrent or hybrid classifier.

The authors suggest domain mismatch as an explanation. They describe the pretrained resources in terms of Wikipedia and news data, while the target examples come from social media. If lexical cues used for the task differ across those settings, a general representation of a word may be an imperfect starting point for deciding how it is being used in a hostile post. The experiment varies the sources of the embeddings, so it establishes their comparative usefulness here. It does not isolate domain difference as the cause. A comparison of pretraining corpora that holds the embedding method fixed and measures domain effects specifically would answer a different question.

The setup also bears on what the experiment says about sub-word information. The authors motivate FastText in part through its use of sub-word units. The measured comparison involves FastText as a whole, including the corpus on which it was trained and the subsequent task adaptation. The findings give no separate estimate for the contribution of its sub-word features. They leave open how valuable those features were for particular spellings or word forms in the benchmark.

#### Changing the sequence architecture

The simple CNN and multi-CNN provide a useful comparison because the paper describes the latter as an extension of the former. The single kernel width is replaced by parallel widths, and the resulting features are combined before classification. The authors report that multi-CNN has a slight edge among the simpler approaches across the embedding variants. The persistence of that qualitative advantage across initializations makes it harder to explain solely by the source of the word vectors.

The architectural comparison gives evidence for parallel convolutions as implemented. Adding branches jointly changes the available spans, the set of learned filters, and the representation delivered to the dense classifier. The experiment offers no separate score for each convolutional width with other factors controlled. It therefore cannot determine whether the advantage came from a particular span length, from combining several spans, or from having more learned features. The design makes all of those possibilities compatible with the result.

The hybrid provides a second architectural comparison. The authors report that convolution followed by bidirectional recurrence performs better than either the standalone CNN or the standalone Bi-LSTM. This supports the usefulness of the tested combination. In architectural terms, the convolution supplies local feature sequences and the recurrent layer supplies contextual processing over them. The scores concern the resulting classifier. They do not tell us which decisions used local features, which used surrounding context, or which arose from interactions between the two.

Putting both comparisons together helps narrow the conclusion. The simpler architectures have meaningful internal variation, despite their common dependence on word embeddings and a final binary output. The reported multi-CNN and hybrid results show that some arrangements of sequence processing outperform simpler arrangements in this benchmark. The comparisons do not give a general ranking of local and recurrent features for Hindi or for each subtype of hostility.

#### Changing the negative class

The authors also vary what counts as a negative training example in the BERT fine task. A classifier for a category can learn from hostile posts without that annotation, and its negative class can be expanded with non-hostile posts. The paper reports degradation when the latter examples were added, so the BERT fine classifiers in the described setup use the restricted negative pool. The simpler networks include non-hostile examples in the negative class.

Here the change is directly tied to a specific training choice. In both versions, a fine classifier still asks whether the target category is present. Adding non-hostile examples changes the examples that define what absence looks like. The degraded outcome indicates that the choice matters for the authors' BERT system. The paper does not specify a separate numerical result, the categories most affected, or whether the change mainly affected precision or recall. Its implication is correspondingly local to that configuration.

Several properties of the training problem can change together when the negatives are expanded. Their diversity changes, the balance of categories presented to the learning algorithm can change, and the classifier may encounter more examples that are easy for the broad hostility decision. The authors’ observation cannot distinguish those explanations. It does explain why their final BERT setup and their simpler architectures do not use identical fine-stage negatives. This difference is part of the comparison when reading the BERT advantage.

#### Understanding the results at both levels

The comparison of coarse and fine F1 provides another form of analysis. At the first stage, the classifier can be successful whenever it detects evidence shared by one or more hostility categories. At the fine stage, it must distinguish categories whose examples can overlap. The paper reports that the strongest fine results come from BERT and that all the neural approaches are competitive on the broad decision. That pattern shows where the tested approaches appear to diverge.

The authors' reported tradeoff also has a practical interpretation within the experiment. A broad classifier that admits more candidate posts can create more opportunities to recover fine labels and more opportunities to assign them in error. A broad classifier that rejects more posts can have the opposite effects. The paper does not report a threshold sweep or an experiment running the fine classifiers on reference-hostile posts and predicted-hostile posts side by side. The observed tradeoff belongs to the reported configurations as a whole. The causal contribution of routing is left unresolved.

The small qualitative difference between mBERT and IndicBERT poses a similar interpretive question. Each configuration brings a different pretrained encoder, and the authors tune only a limited set of hyper-parameters. The results describe how those two choices fare under the training used here. The experiment cannot identify the contribution of pretraining language coverage or of the selection of a particular training configuration to the observed ordering.

### Limitations

#### What the authors acknowledge

The authors describe their hyper-parameter tuning as minimal and raise this point when interpreting the difference between mBERT and IndicBERT. Hyper-parameters are choices about the configuration or training of a classifier, such as the network settings fixed before training. Validation-based checkpoint selection gives the study a consistent selection procedure, but performance can still depend on those broader choices. With a slight observed difference, the authors treat the apparent IndicBERT lead as tentative and describe both encoders as performing comparably.

They also qualify the result for pretrained word vectors. The study's domain differs from the sources of the FastText vectors, and the authors propose that this mismatch may explain why the pretrained starting points fail to yield a consistent benefit. They present this as a possible explanation. The finding applies to the tested vector sources and the process that adapts them on the hostility data. It does not establish what would happen with word vectors pretrained on text drawn from the same social media domain.

A further boundary is the authors' choice to use the post text alone. The earlier work they review considers inputs such as information about users and additional linguistic features. Their own comparison fixes the source of evidence at the textual content supplied for a post. Accordingly, it can compare those textual classifiers directly. Its outcomes say little about how much surrounding discussion, account history, or supporting evidence could contribute to the different labels.

The authors likewise note the degradation caused by adding non-hostile negatives in the BERT fine classifiers. That observation motivates a change in the reported training setup. It also means the authors' best configurations answer a practical question about how to train each family on the benchmark, with differences allowed where the experiments suggested a benefit. An architecture-only interpretation would require tighter control of those differences.

#### What follows from the benchmark design

The experiment measures agreement with the dataset's annotations. The label fake, for example, is available to the system as a training target. The classifier receives words from the post and learns patterns associated with that target. The setup involves no independent check of a claim against external evidence. Its performance therefore concerns recognition of the benchmark's fake label from text. Claims about factual verification would require a different source of evidence and a different evaluation.

The same scope applies to the other fine labels. Offensive, hate, and defamation are categories used by the dataset, and the paper emphasizes that seemingly similar labels can have different meanings. Their application may depend on who or what a post targets and how readers understand the remark. The paper motivates the task partly by noting variation in human judgments. The reported classifier scores measure success against the reference labels available here. They do not measure whether those judgments would transfer to a new group of annotators or moderation policy.

The benchmark's pre-defined split supports comparison on held-out posts from that collection. The experiment reports no separate evaluation for a later time period, a held-out platform, or a different language or script setting. Those conditions matter because the linguistic cues available for classification can vary with audience, writing style, and events. The presence of several platform sources establishes breadth within the collection. A test that holds a platform out of training would supply distinct evidence about transfer.

The shared task's focus on emergency and early detection is also broader than what these measurements establish. The classifiers operate once the text is available, and F1 measures agreement with labels on that text. The paper gives no evaluation of how quickly hostility is found after posting, how the system handles an emergency as it develops, or how detection changes with the amount of context available at different times. Those outcomes cannot be inferred from the common test split.

#### What the scores leave unresolved

Weighted F1 summarizes a label distribution in which the fine categories have different supports. That weighting means a useful gain for a frequent category can contribute more to the aggregate than a gain of the same size for a less frequent one. In this benchmark, fake has the highest full-dataset count and defamation the lowest. The aggregate figures leave the performance balance between those categories open. Recovering it would require the individual results and the split-specific counts used in their weighting.

There are also differences that F1 alone cannot describe. Systems can arrive at similar F1 with different relative strengths in precision and recall. One could flag more ambiguous cases and recover more positives. Another could predict fewer positives with a higher rate of agreement among the predictions it makes. The consequences of those patterns depend on the use of the output. The reported absolute improvements do not indicate how those error profiles changed or which mistakes the systems share.

The hierarchy introduces a further ambiguity. Coarse errors can affect which examples the fine stage evaluates when the complete system is run. A coarse false negative withholds the post from the fine classifiers. A coarse false positive admits a post whose fine predictions may add further errors. An evaluation that supplied the correct broad category to the fine stage could show how well those classifiers distinguish labels when routing succeeds. The paper's reported execution uses the predicted broad category and provides no separate figure establishing what portion of the fine-stage errors originated in routing.

Independent binary decisions also mean the hierarchy does not explicitly learn how the labels occur together. The data allow co-occurrence, and the system can produce co-occurring predictions. Each fine classifier still learns its own boundary, with no described mechanism that enforces or scores a particular combination. A measure of whether the entire predicted set matches the entire reference set would ask a different question from an aggregate of per-label decisions. The paper's main discussion uses weighted F1 and does not supply an exact-match result for those sets.

#### What the comparisons can attribute

The strongest causal claims would require experiments that hold more of the design constant. The SVM baseline uses mBERT embeddings, while IndicBERT in this study uses a different pretrained encoder and a different classification and adaptation procedure. The measured improvements apply to the full systems being compared. They do not identify how much of the change comes from any one design choice.

The gap between the simpler networks and the BERT systems also spans several changes. They differ in how they represent text, how they process its sequence, and which negative examples they use in fine training. Embedding initialization is varied within the simpler families, giving some direct evidence about that choice. The broader comparison still concerns bundles of choices. Attributing the entire fine-stage advantage to the Transformer architecture would go beyond that evidence.

The comparison between IndicBERT and mBERT has a similar limit. The paper states that they were pretrained with different language coverage, but that difference does not isolate the effect of pretraining on Indian languages. The encoders are existing resources trained through their own procedures. The study compares them as available. It does not repeat pretraining while changing language coverage alone or quantify the uncertainty of the slight lead across repeated runs. The restrained conclusion is that both perform well in the tested setting.

Finally, competitive F1 does not establish a ranking in training cost, speed of prediction, or memory use. The architecture descriptions explain why a reader might be interested in those comparisons. The reported experiment supplies no measurements for them. The simpler classifiers can therefore be described as competitive in predictive performance on this benchmark, with their practical resource costs left unmeasured.

### What came after

[L3CubeMahaSent](https://md.research.elamur.ai/free/en/papers/kulkarni-2021-l3cubemahasent-marathi-tweet-based-sentiment/) cites the Hindi hostility study in work on sentiment in Marathi tweets. The connection is at the level of the research setting. Both concern classification of social media text in an Indian language. The Hindi paper asks which kinds of hostility a post expresses. L3CubeMahaSent concerns sentiment in Marathi tweets, so the target judgment and the language both change.

That citation documents a connection between the studies. It leaves open whether the Marathi work reused an architecture, a training decision, or the Hindi paper’s hierarchical treatment of labels. The scope of the later work establishes a related application of social media text classification. Any closer methodological inheritance, or claim about how a result from the Hindi benchmark carried over to Marathi sentiment, would require evidence about the later study's experiments.

## Cite

Cite as Ramchandra Joshi, Rushabh Karnavat, Kaustubh Jirapure and Ravirai Joshi. 2021. Evaluation of Deep Learning Models for Hostility Detection in Hindi Text. International Conference for Convergence in Technology (I2CT).

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

```bibtex
@inproceedings{joshi2021evaluation,
  title = {{Evaluation of Deep Learning Models for Hostility Detection in Hindi Text}},
  author = {Ramchandra Joshi, Rushabh Karnavat, Kaustubh Jirapure and Ravirai Joshi},
  booktitle = {International Conference for Convergence in Technology (I2CT)},
  year = {2021},
  doi = {10.1109/i2ct51068.2021.9418073},
  eprint = {2101.04144},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/i2ct51068.2021.9418073}
}
```

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