Elamur Research

DeepHateExplainer: Explainable Hate Speech Detection in Under-resourced Bengali Language

Paper · 2021 · Md. Rezaul Karim, Sumon Kanti Dey, Tanhim Islam et al.

Summary

A Bengali social media post can attack a person, a political opponent, or a community, and its wording may point towards several of those targets at once. DeepHateExplainer studies how to assign a hate speech category to such a post and how to give a reader evidence about the resulting decision. The authors focus on Bengali because the available training and evaluation resources were scarce. They extend an existing collection with 5,000 labelled examples and use four categories: political, personal, geopolitical, and religious hate. The annotation process assigns a single category by majority vote, even where the language could support more than one reading.

The authors adapt several pretrained transformer classifiers to the task. These include Bangla BERT-base, the cased and uncased versions of multilingual BERT, and XLM-RoBERTa. The final system combines the strongest candidates by voting. On the held-out data, it reaches an overall F1 score of 88%. Its class-specific F1 scores are 78% for political hate, 91% for personal hate, 89% for geopolitical hate, and 84% for religious hate. The authors associate some of the difficulty of identifying political hate with wording it shares with personal attacks.

The other half of the study concerns interpretability. The authors distinguish explanations about recurring terms across the collection from explanations about individual predictions. For a single post, they use sensitivity analysis to estimate how strongly the score responds to changes in its input and layer-wise relevance propagation to trace a score backward through the network. They also test what happens to a prediction when selected words are removed or kept on their own. These tests address faithfulness, in the sense of how well the proposed explanation reflects the classifier’s behavior.

The classification and explanation evaluations give different rankings. Conv-LSTM is the stronger classifier of the leading conventional and neural baselines, while gradient-boosted trees score higher on the reported explanation measures. XLM-RoBERTa leads the standalone approaches on those measures. The authors also clarify that their sensitivity and relevance-propagation analyses were applied to Conv-LSTM, which limits how far those word highlights can explain the final vote. The study’s strongest evidence is for classification on its Bengali benchmark, with separate evidence about how selected classifiers respond to the proposed rationales.

Deep dive: DeepHateExplainer: Explainable Hate Speech Detection in Under-resourced Bengali Language

DeepHateExplainer classifies Bengali hate speech into four categories and tests how strongly highlighted words influence its predictions. · about 34 minutes to read

The problem and its context

What the classifier has to decide

A system that screens online text can face several distinct questions. Does a post contain hate speech? Who or what does it target? What in the post accounts for the label? DeepHateExplainer concentrates its classification experiment on the category question. It gives a Bengali text one of the labels used in the study, then investigates how to explain decisions of this kind through features of the text. The problem belongs to text classification, where a system learns to assign a label using examples annotated in advance.

The paper places that task in the context of harassment and prejudice on social media. It draws on a United Nations definition in which an attack or discriminatory expression concerns a person or group and invokes some aspect of identity. The labels used in the experiment are an operational scheme for the collected Bengali texts. They distinguish such categories as personal and political hate, and the paper illustrates attacks directed at individuals as well as attacks generalized to groups. The operational question is which of the study’s categories an example belongs to. The broader definition motivates the work and helps explain why identifying the target matters.

The categories become especially consequential where a post mixes kinds of evidence. A political attack can contain an insult that would fit a personal attack elsewhere. A gendered slur can be aimed at a particular individual. A term associated with a religious community can name the group being attacked, appear in a description of somebody else’s speech, or contribute to a different kind of accusation. The authors study texts in which identity, target, and familiar language can overlap. A label therefore depends on the role a term plays in the statement, even though a classifier may learn to use the term as a shortcut.

The authors describe Bengali as under-resourced for natural language processing. They cite a figure of 230 million speakers in Bangladesh and India while pointing to gaps in the resources available for computational study. The distinction is between how widely a language is used and what has been built to process it. A training corpus needs examples in the language, labels that fit the question, and enough coverage to evaluate the learned distinctions. A pretrained text encoder offers a starting point for learning from those examples. It supplies neither the labels nor a definition of what counts as a correct decision on a Bengali post.

Manual review provides another part of the motivation. The paper argues that reviewing large volumes of online content takes substantial labor, and that automatically assigning labels is difficult even when the intended classes are known. An automated classification can help sort material, but the label by itself gives a reviewer little to examine. A word-level explanation can direct attention to the phrase that apparently moved the decision. Whether the highlighted phrase supports the category in context, and whether the classifier genuinely relied on it, are distinct questions.

Earlier approaches to Bengali hate speech

The paper describes a field in which much hate speech research concerned languages with more computational resources, particularly English. Earlier classifiers often began with features supplied by the researcher. A system might count occurrences of words or short stretches of characters, weight those counts, and learn how they relate to the labels. Methods in this tradition include linear classifiers and tree-based classifiers. Their input representation can retain useful spellings and expressions, but isolated word features carry little direct information about how distant parts of a post relate to each other.

The neural approaches described in the paper construct intermediate representations while learning to classify. A convolutional network looks for local patterns across a sequence. In text, those patterns can capture combinations of characters or words. A long short-term memory network, or LSTM, processes a sequence with a state that can carry information across positions. A convolutional LSTM, or Conv-LSTM, combines local feature extraction with sequence processing. The paper situates its neural baselines in this tradition because the words surrounding an insult, and the order in which a speaker introduces a target and a claim, can affect how a statement reads.

Among the earlier Bengali studies, Romim and colleagues assembled a dataset of 30K comments for detecting offensive or hateful statements. DeepHateExplainer highlights the 10K:20K balance between hate and non-hate and notes that the hateful examples were frequently shorter. That length difference matters when interpreting what a classifier could learn: length can become predictive in that collection even though it says little about the content of a particular attack. The earlier study’s reported accuracy was 82% on its own task. Its dataset and label scheme serve as context for the Bengali resource problem, separately from the held-out comparisons in DeepHateExplainer.

Ishmam and Sharmin collected 5,126 hateful statements from public Facebook pages. Their categories covered distinctions such as communal attacks, religious hatred, and political comments. Their recurrent classifier used a gated recurrent unit, a mechanism for controlling how information is carried along a sequence, and the paper reports an accuracy of 70.10% for that earlier task. The category schemes illustrate how Bengali hate speech studies can ask different questions of related material. A system trained to recognize a political comment faces a different labelling decision from a system asked to decide which category of hate best fits an already selected post.

The work most directly connected to the new dataset is the authors’ earlier Bengali classification benchmark. That benchmark covered document classification, sentiment analysis, and hate speech detection. For hate speech, the earlier study paired a multichannel Conv-LSTM with fastText word embeddings, which represent words as numerical vectors. The authors emphasize fastText’s use of character fragments. A word absent during training can still share such fragments with familiar words. This makes the method relevant to colloquial Bengali text and gives the new paper a concrete predecessor to build on in both its data and its baseline design.

Why explanations became part of the task

The authors characterize the earlier Bengali classifiers as opaque because the reported label offered little indication of how the input produced it. A system can correctly label a remark about a political group while relying mainly on a generic insult, or it can pick up a term for the group itself. These possible routes look the same in a tally of correct predictions. They differ as explanations of the behavior, and they suggest different reactions if similar vocabulary appears in another context.

The paper draws on HateXplain as an example of evaluating hate speech explanations alongside classification. It distinguishes plausibility, or whether a proposed rationale resembles one a person would offer, from faithfulness, or whether it reflects the operation of the classifier. A highlighted phrase can read like a convincing justification while leaving the prediction almost unchanged when removed. Conversely, a term can exert a large influence on the score while giving a reader little reason to endorse the label. The distinction provides the reason to investigate both the meaning of important words and the response of the classifier when those words change.

DeepHateExplainer brings those questions together in Bengali. It compares feature-based systems, sequence networks, and pretrained transformers on the same classification task. It then uses lists, heat maps, and edits to the input to ask what evidence selected predictors appear to use. These analyses work at different scales. A term frequently associated with a class across the dataset can help characterize the training problem. A highlighted term in an individual statement explains a class score only in that statement and only for the predictor to which the explanation applies.

The method, step by step

From collected posts to a vote and an explanation

The authors start by extending a labelled Bengali collection. They clean texts and ask annotators to choose among a common set of categories. After training several classifiers on the labelled examples, they select transformer candidates for a majority vote. Separately, they inspect which words matter across the data and which words matter in individual predictions. The final explanation tests edit the input and check what happens to the score for the original class. This sequence matters because the explanation methods are post hoc. They inspect predictors that have already been trained.

From Bengali texts to predictions and explanations

The steps in order.

From Bengali texts to predictions and explanationsStep 1: Collect and clean Bengali texts1. Collect and clean Bengali textsStep 2: Assign hate categories through independent annotation2. Assign hate categories through independent annotationStep 3: Train baselines and adapt pretrained transformers3. Train baselines and adapt pretrained transformersStep 4: Select transformer candidates for majority voting4. Select transformer candidates for majority votingStep 5: Rank words globally and within individual posts5. Rank words globally and within individual postsStep 6: Test rationales by removing or retaining words6. Test rationales by removing or retaining words

Collection, categories, and agreement

The data come from Facebook, YouTube comments, and newspapers. The authors describe a bootstrap collection procedure that seeks texts containing common slurs or other terms associated with hate. It includes material directed at a specific person or entity and material aimed at a group. Using familiar terms gives collectors a practical way to find examples. It also gives the finished benchmark a particular vocabulary profile, which becomes relevant when interpreting the explanations.

The authors add 5,000 labelled examples to the Bengali Hate Speech Dataset. The previous scheme included gender-abusive hate as a category alongside the categories used in the new study. The authors reconsider that distinction after examining statements in which a gendered insult targets an individual. The examples show how identifying the addressee and identifying the language of the insult can lead an annotator towards different labels. The revised task uses political, personal, geopolitical, and religious hate, allowing those examples to be judged under a scheme with fewer overlapping choices. A personal label can therefore coexist with language that has a gendered meaning.

The annotation panel consisted of a linguist, a native Bengali speaker, and a researcher in natural language processing. The annotators made their judgments independently, and the majority determined the final label. This is the stage at which linguistic annotation turns an interpretation into the answer used for training and evaluation. The vote establishes which reading the dataset records. The distribution of the underlying votes gives another kind of information, because a winning label can conceal disagreement about a borderline statement.

The authors use a kappa statistic to quantify agreement while accounting for the prevalence of different categories. The calculation starts by counting how often each label was assigned across all items and annotators.

p̄ⱼ = (∑ᵢ₌₁ⁿ xᵢⱼ) / (n m)

Here, p̄ⱼ is the share of all assignments that used category j. The index i identifies a text, n is the number of texts, and m is the number of annotators. The count xᵢⱼ is the number of assignments of category j to text i. The sum starts at 1, the first indexed text, and ends at n. The denominator n m is the number of individual annotation decisions.

The category-level agreement calculation uses these counts to reflect how often a vote for a category is paired with a vote against it on the same text.

k̂ⱼ = 1 − (∑ᵢ₌₁ⁿ xᵢⱼ(m − xᵢⱼ)) / (n m(m − 1) p̄ⱼ(1 − p̄ⱼ))

Here, k̂ⱼ is the estimated kappa for category j. The indices i and j refer to a text and a category, n and m count texts and annotators, and xᵢⱼ counts the annotators who used that category for that text. The factor m − xᵢⱼ counts those who chose a different label. The product in the numerator counts pairings across those choices. The sum includes all texts. The denominator accounts for the annotation setup and uses p̄ⱼ, the overall share for the category, together with its complement. The constant 1 gives the reference value before the normalized disagreement term is subtracted and also appears wherever the equation takes a complement or excludes an annotator from a pairing.

The final statistic gives the category estimates different weights according to how frequently the categories were assigned.

k̂̄ = (∑ⱼ₌₁ᵏ p̄ⱼ(1 − p̄ⱼ) k̂ⱼ) / (∑ⱼ₌₁ᵏ p̄ⱼ(1 − p̄ⱼ))

The symbol k̂̄ denotes overall kappa, and k is the number of categories. The index j runs from the first category, 1, to category k. For each j, k̂ⱼ is its kappa estimate and p̄ⱼ is its share of the annotations. The factor 1 − p̄ⱼ is the share assigned elsewhere. The numerator adds the weighted estimates, while the denominator adds their weights. The authors report an overall kappa of 0.87 for the annotation scheme that takes the personal and gender-abusive overlap into account. They describe this as a 3% improvement over their earlier approach. The quantity measures agreement among annotators under the scheme.

Preparing features for the baselines

Before annotation, the authors remove web markup, links, image titles, special characters, and excess whitespace. The preparation described for training the conventional and neural baselines goes further. It normalizes hashtags, removes user mentions and duplicates, and strips emojis and emoticons. It also drops tokens found in fewer than 5 documents in the stated vocabulary filtering procedure. A document frequency counts the number of texts containing a token, so several repetitions within a single text give it the same document frequency as one occurrence there. The filter concentrates the feature vocabulary on forms observed across the collection.

The paper lists stemming among its preprocessing steps. A stemmer reduces related written forms to a common base. The authors also compare retaining inflections and using lemmatization, which maps a form to its lexical base, as well as experimenting with lower document frequency thresholds. They report slightly better accuracy with lemmatization and say that the results for the embedding-based approach use it. This distinction matters because the list of preprocessing operations describes options considered during development alongside choices used for the reported configuration.

For the conventional baseline families, the text becomes a collection of character n-grams and individual word features. An n-gram is a contiguous stretch of a sequence. Character stretches can represent parts of words or recurring spellings, while individual word features preserve the identities of complete words. The authors apply TF-IDF weighting, which takes account of how much a feature occurs in a text and how widespread it is in the collection. This representation provides numerical inputs for logistic regression, support vector machines, and the other conventional classifiers. Random search samples configurations, with 5-fold cross-validation used to choose hyper-parameters.

The neural baselines receive ordered vectors. The authors train fastText on Bengali articles from their earlier classification benchmark, then use the resulting embeddings to initialize the input layer. FastText represents a word with information from its character fragments, allowing related forms to share some information. This is useful in a collection where colloquial variants can make observations of a whole word sparse. Each token occupies a 300-dimensional vector, with each coordinate contributing part of the representation that the network receives.

The neural input is standardized to 100 words. The authors truncate longer statements and add zero-valued padding to shorter ones. This gives the networks a consistent input shape while limiting the amount of padding in a dataset where statements are typically short. Truncation and padding serve different purposes. Truncation determines which text reaches the classifier. Padding supplies positions needed for the computation after the available words have been entered.

The convolutional baseline learns local patterns in the sequence. The bidirectional LSTM processes the input in both orders so its representation can use context from either direction. Conv-LSTM combines convolutional feature extraction with recurrent processing. The appendix describes a Conv-LSTM arrangement in which pooled convolutional outputs retain strong responses along the word dimension before a fully connected layer predicts the hate category. In all these baselines, the final softmax converts class scores into a distribution over the available labels.

The authors add Gaussian noise and dropout during neural training. Noise perturbs a representation, and dropout removes selected activations during training, with both intended to encourage generalization. AdaGrad adjusts the optimization steps while training reduces categorical cross-entropy, a loss that penalizes low probability on the annotated category. Each neural architecture is trained 5 separate times in a 5-fold cross-validation setting. The average macro F1 on the validation data guides hyper-parameter selection. A macro average gives each class equal influence on that selection metric, including classes with fewer examples.

Adapting and combining the transformers

The transformer branch uses pretrained encoders, with comparatively light text cleaning. The authors motivate this choice by citing prior findings that BERT-based classification can benefit from keeping natural input. The baseline preparation, including explicit vocabulary filtering and text normalization, and the transformer preparation are therefore different parts of the experiment.

Bangla BERT-base is the Bengali-specific starting point. It was pretrained to predict masked material in Bengali text. The two multilingual BERT candidates are cased and uncased versions, which differ in how they treat letter case. XLM-RoBERTa is a multilingual encoder trained on web-crawled text. These starts let the authors compare an encoder devoted to Bengali with encoders that share training across languages. They also differ in other respects, including the pretraining procedure, so the distinction between monolingual and multilingual training describes the candidates more closely than it identifies a single experimental variable.

During fine-tuning, the authors adapt the pretrained networks to the Bengali labels by adding a fully connected softmax classifier. They set the maximum input length to 256 and experiment with 2, 3, and 4 layers of multi-head attention. An attention layer updates a representation using information from other positions in the input. Multiple heads allow the layer to compute several patterns of such connections. The training procedure uses Adam with a scheduled learning rate, shuffles the data each epoch, clips gradients to constrain large updates, and saves the best epochs for the different candidates.

The paper depicts a cross-validation ensemble optimization stage in which predictions associated with different folds can be combined using weights. The fold weights in that diagram concern the predictions used during optimization and evaluation. For the final majority-voting comparison, the paper describes selecting the top-3 classifiers. It uses performance and WeightWatcher diagnostics in this selection, preferring lower log-norm and higher weighted alpha. The authors use the weight diagnostics as indicators of generalization. The held-out evaluation is where they test the resulting choices against examples reserved for assessment.

The classifiers retained for voting are XLM-RoBERTa, Bangla BERT-base, and uncased multilingual BERT. A majority vote pools their class decisions. The paper motivates combination by analogy with independent annotators who may make different mistakes, and it examines whether the combined prediction improves on the strongest standalone candidate. The analogy explains the motivation for voting. The annotator vote produces the benchmark label, while the classifier vote is a prediction judged against that label.

From corpus-wide importance to a word highlight

The global analysis asks what terms matter across examples. The paper describes lists of often used words, linguist assessments of what some of those terms mean, and a feature-importance procedure based on shuffling. Frequency identifies words that occur frequently in the sampled statements. Linguistic analysis can explain why a word might be associated with a target or category. The shuffling procedure instead asks how a predictor’s score changes after a feature’s values are disconnected from the examples to which they originally belonged.

The procedure starts with a reference score on the original data. To assess a feature, it repeatedly permutes that feature’s column, scores the altered observations, and averages those altered scores.

σₓᵢ = s − (1 / R) ∑ᵣ₌₁ᴿ sᵣ,ₓᵢ

Here, σₓᵢ is the estimated importance of feature xᵢ, where i indexes a feature. The symbol s is the reference balanced score for predictor f on the original set of observations X. The symbol sᵣ,ₓᵢ is the corresponding score after the column for xᵢ is shuffled on repetition r. There are R repetitions, indexed from 1, and 1 / R turns their sum into a mean. A positive value indicates a lower mean score after permutation. Shuffling keeps the feature’s observed values in circulation but changes which examples receive them, so this importance concerns feature use in the collection.

A local explanation starts with an individual post and a class score to explain. Sensitivity analysis asks how much that score changes for a small movement along an input coordinate. The coordinate belongs to the numerical representation the network receives. This distinction matters because changing a coordinate by a tiny amount is a different intervention from deleting a Bengali word and running the sentence through the classifier again.

R_d = (∂f_c(𝐱) / ∂x_d)²

The symbol R_d denotes sensitivity relevance for input dimension d. The vector 𝐱 is the full input, and x_d is its coordinate at dimension d. The function f_c gives the score for target category c. The partial-derivative symbol ∂ expresses the local change in that function with respect to the specified coordinate, holding the other coordinates fixed. The exponent ² squares the derivative. A large derivative in either direction thus gives a large relevance value.

The paper also expresses the total of the coordinate-level sensitivities in terms of the gradient.

‖∇𝐱 f_c(𝐱)‖₂²

The symbol ∇𝐱 means the vector of partial derivatives with respect to the coordinates of input 𝐱. The function f_c still gives the score for category c. The bars with subscript ₂ denote the Euclidean norm, and the outer ² squares it. This expression adds the squared sensitivities across the input dimensions. It summarizes the total local sensitivity, while the individual values give a profile of where that sensitivity lies.

Layer-wise relevance propagation, or LRP, starts from the score already produced for a chosen class. It assigns this score as relevance at the corresponding output and sends relevance backward through the network. For a connection between consecutive layers, the paper first gives the forward computation that produced the upper unit’s value.

zⱼ = ∑ᵢ zᵢ · wᵢⱼ + bⱼ

Here, zⱼ is the value of upper-layer unit j, and zᵢ is the value of lower-layer unit i. The symbol wᵢⱼ denotes the weight from i to j, and bⱼ is the bias of j. The dot denotes multiplication. The sum runs over lower-layer units connected to j. This forward calculation supplies the activations and connections used in the backward allocation.

Rᵢ←ⱼ = ([zᵢ · wᵢⱼ + (ε · sign(zⱼ) + δ · bⱼ) / N] /
         [zⱼ + ε · sign(zⱼ)]) · Rⱼ

Here, Rᵢ←ⱼ is the amount of relevance sent from upper unit j to lower unit i, and Rⱼ is the relevance available at j. The activations zᵢ and zⱼ, the weight wᵢⱼ, and the bias bⱼ are the quantities used in the forward computation. The symbol N counts the lower-layer units connected to j. The stabilizer ε adjusts the denominator, while sign(zⱼ) sets the direction of that adjustment. The factor δ controls the contribution of the bias. The paper sets it to 1 to conserve relevance in the redistribution. The dots denote multiplication.

The convention for the sign function in this rule treats a zero activation with the non-negative case.

sign(zⱼ) = 𝟙[zⱼ ≥ 0] − 𝟙[zⱼ < 0]

The function sign takes the activation zⱼ of upper unit j. Each 𝟙 is an indicator that takes the value 1 when its bracketed condition holds and 0 otherwise. The first condition uses ≥ to include values at or above zero. The second uses < to select values below zero. Subtracting the second indicator from the first supplies the signed factor used in the relevance rule.

A lower unit can receive relevance from several units above it. Its final relevance at that stage accumulates those contributions.

Rᵢ = ∑ⱼ Rᵢ←ⱼ

Here, Rᵢ is total relevance at lower unit i, Rᵢ←ⱼ is the share received from upper unit j, and the sum runs across the contributing upper units. Repeating this redistribution moves the class relevance towards the input. The visualizations then present relevance at the level of words so a reader can examine it against the statement. Sensitivity and propagation answer related questions from different starting points: the derivative describes the response to movement near the input, while LRP assigns portions of a score already computed.

Testing a rationale by editing the input

The paper uses the term rationale for selected text offered as evidence for a classification. In the earlier work it discusses, an annotator can mark the span that supports a label. DeepHateExplainer applies the idea to words identified through its explanation procedure and draws on ERASER for tests of faithfulness. This shifts the question from how a highlight looks to what happens when the same predictor sees a changed version of the text.

Comprehensiveness asks how much confidence is lost when the rationale is removed.

e = f(xᵢ)꜀ − f(xᵢ ∖ rᵢ)꜀

Here, e is comprehensiveness for sample i. The symbol xᵢ stands for the full text, rᵢ is the proposed rationale, and ∖ denotes removing that rationale from the input. The expression f(xᵢ)꜀ is the probability predictor f assigns to its original predicted class c. The expression f(xᵢ ∖ rᵢ)꜀ is the probability assigned to that same class after deletion. The subtraction keeps the reference label fixed. A larger positive value means the class probability fell further under that removal.

Sufficiency asks how well the selected words can sustain the prediction when kept on their own. The equation printed in the paper places the two probabilities next to one another, with the operation between them left unstated.

s = f(xᵢ)꜀ f(rᵢ)꜀

Here, s denotes sufficiency, a different use of s from the reference score in the permutation calculation. The index i refers to the sample, xᵢ is its full text, rᵢ is its extracted rationale, and f is the predictor. The subscript ꜀ selects the original class c for both probabilities. The prose describes judging the adequacy of the rationale as input. The printed formula leaves the precise arithmetic open, so the reported rankings and the intended comparison can be described more securely than the sufficiency calculation itself.

The authors also describe a way to quantify a highlight’s extent by dividing the count of highlighted features by the test item’s total feature count. They refer to overlap with a ground-truth rationale and give a threshold of 0.5 for a match. This overlap criterion and the score-change tests concern different evidence. A match compares the selected text with a reference highlight. The probability comparison tests the behavior of the predictor under an edited input. The paper names DeepHateExplainer as the release containing data, source code, and notebooks for the study.

Experiments and results

The held-out task and its comparisons

The classification evaluation uses the expanded Bengali hate speech collection. The authors report training on 80% of the data and evaluating on the 20% held-out portion. The training procedures use cross-validation to choose settings, while the held-out portion is the basis for the test results. The available labels are all categories of hate in the scheme. A correct test prediction is a match to the recorded category of the statement.

The conventional baselines cover several ways to use the weighted text features. Logistic regression learns a weighted classification rule, a support vector machine seeks a separating boundary, and nearest neighbors classify using related observations. Naive Bayes uses a probabilistic rule with a conditional independence assumption. Random forests aggregate decision trees, while gradient-boosted trees build an ordered series of trees that refine the prediction. Taken together, these systems test whether feature representations based on character fragments and individual words can carry enough information for the task.

The neural baselines compare CNN, Bi-LSTM, and Conv-LSTM using fastText initialization. They give the experiment a comparison with systems that learn from word order and local patterns. The transformer comparisons then include Bangla BERT-base, cased and uncased multilingual BERT, and XLM-RoBERTa. The strongest candidates provide the votes for the final ensemble. Because the different families have their own input preparation and training routines, their scores compare full approaches to the task.

The paper reports precision, recall, F1, and the correlation statistic abbreviated MCC. For a class, precision measures how many predictions of that class are correct, and recall measures how many annotated examples of it the system retrieves. F1 combines precision and recall into a score that requires both to be strong for a high result. MCC summarizes how well the prediction pattern corresponds to the recorded classes. The authors emphasize per-class reporting because an overall accuracy can be dominated by the categories most common in an imbalanced collection.

What the classifiers achieved

Among the conventional baselines, gradient-boosted trees give the highest reported MCC, 0.571. Random forests reach an F1 score of 68%, and the paper reports equal F1 for the random forest and gradient-boosted tree classifiers. The shared F1 and different standings on MCC illustrate why the authors consult several measures. An F1 result compresses information about precision and recall, while MCC evaluates the relationship between the predictions and the recorded labels in a different way.

Conv-LSTM is the strongest neural baseline, with held-out F1 of 0.78 and MCC of 0.694. The CNN yields F1 of 0.73, and Bi-LSTM yields 0.75. Within this family, the strongest result comes from combining convolutional features and recurrent processing. The common fastText initialization makes the choice of classifier especially relevant to this comparison, though the individual training configurations also form part of each result.

Neural baseline F1 on the held-out Bengali hate speech data

Conv-LSTM leads the neural baselines that use fastText embeddings.

Neural baseline F1 on the held-out Bengali hate speech dataCNN: 0.73CNN0.73Bi-LSTM: 0.75Bi-LSTM0.75Conv-LSTM (this paper): 0.78Conv-LSTM (this paper)0.78
The numbers
System or settingF1
CNN0.73
Bi-LSTM0.75
Conv-LSTM (this paper)0.78

Among the standalone transformers, XLM-RoBERTa achieves the highest reported F1, 87%, on the held-out set. It also has the strongest fit according to the authors’ interpretation of their diagnostics. Bangla BERT-base and the uncased multilingual BERT remain competitive enough to join it in the vote. The cased version was evaluated but omitted from the final voting ensemble. The authors report MCC of at least 0.77 for the individual BERT-based systems.

The ensemble reaches an overall held-out F1 of 88%. It also gets the highest MCC, 0.82, compared with 0.808 for XLM-RoBERTa alone. The ensemble comparison is therefore an improvement on an already strong standalone classifier within this dataset. The larger separation in the MCC chart is between the two leading transformer entries and the strongest baselines of the other families.

Overall F1 for the leading standalone classifier and final vote on the held-out Bengali hate speech data

The final vote improves on the strongest standalone classifier.

Overall F1 for the leading standalone classifier and final vote on the held-out Bengali hate speech dataXLM-RoBERTa: 87%XLM-RoBERTa87%DeepHateExplainer majority vote (this paper): 88%DeepHateExplainer majority vote (thispaper)88%
The numbers
System or settingF1
XLM-RoBERTa87%
DeepHateExplainer majority vote (this paper)88%

MCC for selected classifiers on the held-out Bengali hate speech data

The majority vote leads XLM-RoBERTa, and both score above the strongest conventional and neural baselines.

MCC for selected classifiers on the held-out Bengali hate speech dataGradient-boosted trees: 0.571Gradient-boosted trees0.571Conv-LSTM: 0.694Conv-LSTM0.694XLM-RoBERTa: 0.808XLM-RoBERTa0.808DeepHateExplainer majority vote (this paper): 0.82DeepHateExplainer majority vote (thispaper)0.82
The numbers
System or settingMCC
Gradient-boosted trees0.571
Conv-LSTM0.694
XLM-RoBERTa0.808
DeepHateExplainer majority vote (this paper)0.82

The final ensemble’s class-specific F1 scores are 91% for personal hate, 89% for geopolitical hate, 84% for religious hate, and 78% for political hate. The scores identify which distinctions are easier to reproduce under the study’s labels. They also qualify what a reader can infer from the overall result. Political hate sits at the bottom of the class ranking even though the aggregate score is high. The authors point to language shared with personal hate as a possible reason for that difficulty.

The paper compares confusion matrices for XLM-RoBERTa and the ensemble. Each matrix crosses the recorded class with the predicted class, showing which kinds of mistakes remain behind the aggregate scores. The authors describe fewer misclassifications across the categories and mention 21 correctly classified observations in their account of the improvement. The sentence leaves the exact accounting of that count unclear. The direct held-out F1 and MCC figures give the firmer basis for stating the size and direction of the overall improvement.

What the explanation evaluation found

The explanation evaluation compares selected strong classifiers from the conventional, neural, and transformer families. The authors report XLM-RoBERTa as the strongest standalone classifier on both comprehensiveness and sufficiency. They also note that the transformer group generally fares well relative to gradient-boosted trees and Conv-LSTM in the faithfulness comparison. Within the transformer group, Bangla BERT and cased multilingual BERT have the weakest reported faithfulness.

An especially revealing result concerns the baseline pair. Conv-LSTM has the stronger classification results, while gradient-boosted trees score higher on both explanation measures. These rankings ask different questions. The classification comparison rewards closeness to the assigned labels. The explanation comparison reflects how selected text relates to the predictor’s score when presented or removed. A classifier can make more correct decisions while producing a ranking of text evidence that is less effective under the rationale tests.

The word displays add a qualitative view. Globally, the authors identify terms associated with political organizations, national or religious groups, and recurrent forms of personal abuse, and use linguistic analysis to explain some of those associations. Locally, heat maps give readers individual examples for the hate categories. The visual intensity is scaled to the greatest relevance in each statement. It helps locate what matters within one post, while the relative scale leaves the absolute strength of highlights across different posts open.

What the ablations show

Feature selection changes the conventional baselines

The paper offers controlled comparisons and targeted input edits. The scope of a full ablation of DeepHateExplainer would include systematically varying the encoder, preparation, ensemble constituents, and explanation procedure, while the analyses reported here concentrate on particular choices and examples.

The feature-selection experiment asks whether conventional classifiers improve when some of their weighted text features are removed. The authors estimate feature importance with a forest of trees and use that importance to filter the input. A tree uses a feature when splitting observations into groups. The impurity-based importance rewards features whose splits make the resulting groups more uniform with respect to the labels. After selection, a classifier is trained again using the retained features.

The reported effect varies by algorithm. The authors describe improvements for nearest neighbors and both forest and boosting methods. They describe substantial deterioration for logistic regression and naive Bayes. The discussion lists the support vector machine among both the classifiers that benefited and those whose performance declined. This leaves the direction of its effect unresolved. The consistent result across the other descriptions is that a vocabulary filter fitted through tree splits can help some learners and remove evidence that others use.

For logistic regression, the authors suggest that the filter may discard discriminative features whose value lies in a linear combination. For naive Bayes, they question whether the features meet its conditional independence assumption. Character fragments and the whole word containing them illustrate how features can carry related evidence about a text. These are interpretations of the observed performance. The experiment changes which features are available to the learners, while the paper gives the reasons for the different responses as proposed explanations.

Voting helps in the reported configuration

The comparison between the standalone XLM-RoBERTa and the majority vote isolates an operational question. With the task and held-out data held in common, does adding decisions from other selected classifiers improve the final output? The reported aggregate scores favor the vote. The confusion matrices examine the same question at the class level, where a change in prediction can move an observation from a wrong category to the recorded one.

This is evidence for the combination the authors evaluated. The candidate pool contains distinctive sources of pretraining and fine-tuning, and its members can differ in which mistakes they make. A vote can correct a dominant classifier’s decision when the other members agree on the recorded category. It can also change a correct decision for the same mechanical reason. The paper’s test reports the overall effect of those changes for the chosen grouping. The separate contribution of Bangla BERT-base and uncased multilingual BERT, and the effect of adding cased multilingual BERT back into the combination, remain open.

The authors also explore alternative preprocessing choices, including retaining inflections, using lexical base forms, and lowering the document frequency threshold. The reported direction favors lemmatization slightly on accuracy in the embedding experiments. The paper gives this finding as the basis for the choice used in those results. Its magnitude under each preprocessing setting and its effect on the transformer comparison are unspecified.

Word removal exposes class-specific evidence

The leave-one-out analysis takes a test statement, computes scores for the categories, and examines word effects for the two categories with the highest probabilities. Removing one word at a time gives a direct comparison between the original statement and several close variants. The remaining words preserve much of the original input, though deletion can still alter a phrase or the relationship between an insult and its target.

In the example discussed in detail, the predicted label is religious hate with a probability of 59%. The word glossed as race in English has the highest reported positive contribution for that class, 0.27. The authors give 32% as the expected probability for religious hate after its removal. In their analysis of the same statement for personal hate, the word has a negative contribution, while two insults have positive personal-class contributions of 0.23 and 0.17. These quantities concern the sample and class shown in the example.

The directions matter because relevance here is relative to a category. A word in a post can favor the religious interpretation while weighing against the personal one, and other words in the same post can favor the personal interpretation. A reader therefore gets a more informative explanation from asking which class a word supports than from a general ranking of hateful vocabulary. The signed removal analysis also has a different meaning from squared-derivative sensitivity, where the size of a local change is retained and its direction disappears.

Individual deletions are informative when a word has a distinctive effect in context. There can also be overlap between the evidence carried by related words. If several terms make the same target recognizable, removing a single one can leave the score high. Removing a group may have a different effect. The paper’s example establishes that a predictor can respond differently to the same word across competing classes. It leaves interactions among groups of terms and the frequency of such effects across the collection less well characterized.

The ranking depends on the question being measured

The faithfulness comparison functions as a check on the interpretation of the classifier results. Conv-LSTM ranks above gradient-boosted trees for classification, with the order reversed on both reported explanation measures. In this comparison, the choice of metric changes which approach looks preferable. That matters precisely because the paper motivates explanations as evidence about a decision and evaluates classification against the assigned answer. Neither score alone describes both properties.

The global displays give a complementary analysis. The authors compare often used terms, words receiving high or low relevance, and linguistic accounts of those terms. Some prominent terms have recognizable class associations. The displays help a reader see a possible relationship between the classifier’s feature use and the subject matter of a category. A global association still leaves room for an individual post in which the term has a different role. The local deletion test is closer to that individual question because it changes the actual sentence being scored.

Limitations

Limits acknowledged by the authors

The authors identify the amount of labelled data as a constraint. Fine-tuning can fit recurring patterns in a collection, including names, slurs, and preferred phrasings found in that sampling process. The held-out evaluation tests whether those learned distinctions extend to other items reserved from the same collection. The authors explicitly leave open the possibility of overfitting and propose substantially expanding the dataset. The annotation agreement and test scores concern the labels and examples they were able to collect.

They also clarify which classifier received the detailed sensitivity and propagation analyses. Those methods were applied to Conv-LSTM. The authors propose applying them to XLM-RoBERTa, which was the strongest standalone classifier. The limit matters because an explanation is tied to the function whose scores or activations it inspects. A word highlighted for Conv-LSTM can help explain that network’s behavior. The same word’s role inside XLM-RoBERTa or in the ensemble vote would require evidence from those decisions. The separate faithfulness comparison across classifier families does give some such score-level evidence for selected standalone systems.

The authors choose faithfulness measures in place of the System Causability Scale, which they describe as suited to evaluating users’ experience with an explanation interface. Their experiments address changes in predictions under edits to the input. How well reviewers can understand, trust, or use the resulting highlights in a working interface remains a separate empirical question.

Limits of the collection and task

The collection procedure favors examples containing familiar slurs or other terms. As a result, the evaluation has a defined scope: texts drawn from a search process that already uses clues about what hate can look like. This is relevant to the high-ranked words in the explanations. Some of their prominence may reflect the way the corpus was assembled as well as their usefulness for distinguishing labels. The benchmark leaves performance on coded, indirect, and unfamiliar forms of hate open, as well as performance on benign uses of the same vocabulary.

The label space poses another boundary. In the reported evaluation, the system selects among forms of hate, so its score measures a category decision within that space. A general moderation stream would also bring ordinary conversation, criticism, quotations, and other texts whose treatment would require evaluation of a non-hate decision. Precision and recall calculated for the four study labels answer the narrower benchmark question. They leave false positives on a general stream unmeasured.

The decision to adopt a single label also affects how the results should be read. The authors’ discussion of gendered insults makes clear why examples can support overlapping descriptions. With the revised labels, a gendered attack on an individual can be recorded under personal hate. The resulting agreement statistic concerns that choice of annotation scheme. It leaves open how consistently annotators would identify gender targeting as a separate aspect of the same text. Similar questions apply when national, political, and religious targets are invoked together.

The data sources include comments and newspapers, which provide different settings for Bengali text. The reported test result concerns the held-out set as a whole. How well each source transfers to the others, or how performance changes on language from a different period, remains open. Similarly, the paper identifies class imbalance and gives class-wise scores, while the comparison leaves the stability of those scores across new collections unquantified. The finding that political hate was hardest applies to this evaluation.

Limits of attribution and interpretation

The comparison across classifier families changes several things at once. The pretrained systems receive different representations and lighter preparation. The conventional and fastText-based baselines use their own feature construction and training procedures. Higher held-out F1 therefore supports the evaluated transformer configurations as complete approaches. Isolating the effect of a pretraining language, an attention setting, or a preparation step would require a more specific comparison in which the other choices were held fixed.

The strongest standalone XLM-RoBERTa result also leaves an ensemble explanation to be worked out. A probability change for a standalone system measures that system’s reaction to the edit. For a majority vote, the outcome depends on how the other members react and whether their predicted categories change. A rationale can move an individual class probability substantially while keeping the vote the same. Conversely, a small change in a member’s probabilities can matter when it changes the class that member votes for. The reported analyses make the strongest direct claims about individual predictors.

Each explanation procedure makes its own assumptions about how to change an input. Permuting a feature preserves its values across the dataset while breaking some relationships with other features. Removing a word can change grammar or the interpretation of words that remain. Keeping only the rationale can produce a fragment a classifier seldom saw in training. These interventions measure actual responses to those edited inputs. How closely those responses approximate the contribution of a word in natural text depends on the intervention and the example.

Rationale size also affects the interpretation. A highlight that covers a large part of a statement has more opportunities to preserve evidence when kept, and its removal can discard more context. The paper describes a highlight fraction and an overlap threshold, but leaves parts of the reference-rationale and aggregation procedure unclear. The printed sufficiency equation additionally leaves its operation unspecified. The rankings can be reported as the authors give them, with the exact numerical construction of sufficiency and the comparability of rationale sizes remaining uncertain.

The paper motivates voting in terms of fairness and trust. Its measured outcomes address agreement, classification performance, and behavior under explanation tests. Questions such as whether errors fall unevenly across groups, or whether people make better moderation decisions after seeing the explanations, would need evidence tailored to those outcomes. A word can be faithful to the classifier’s decision and still reflect a vocabulary association a reviewer should question. That distinction is especially important in a collection where terms naming political, national, or religious groups can be strongly associated with labels.

What came after

The later citations connect DeepHateExplainer to Bengali hate speech detection and to research on multilingual explainability. They establish that the paper was relevant to those lines of work. The available descriptions leave the exact form of reuse open, including whether either work adopted its data, class scheme, attribution procedure, or voting setup.

Hate Speech and Offensive Language Detection in Bengali cites DeepHateExplainer in work whose scope includes both hate speech and offensive language in Bengali. That scope puts the question of what counts as hate alongside the broader question of how to detect offensive language. DeepHateExplainer provides a related Bengali task with a specific category scheme and an explicit discussion of boundary cases, including personal attacks that use gendered abuse. The citation connects the two studies. It leaves the later work’s treatment of that boundary and its use of the earlier experiments unspecified.

Explainability and Interpretability of Multilingual Large Language Models: A Survey cites the paper in a survey about how multilingual systems can be explained and interpreted. DeepHateExplainer is relevant to that scope because it applies multilingual encoders to a Bengali classification problem and examines whether selected words account for predictions. The survey citation places the Bengali study in the broader literature on multilingual explanations. The particular findings or methods the survey draws from it remain unspecified.

Cite

Cite as Md. Rezaul Karim, Sumon Kanti Dey, Tanhim Islam, Sagor Sarker, Mehadi Hasan Menon, Kabir Hossain, Md. Azam Hossain and Stefan Decker. 2021. DeepHateExplainer: Explainable Hate Speech Detection in Under-resourced Bengali Language. IEEE International Conference on Data Science and Advanced Analytics (DSAA).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/dsaa53316.2021.9564230 · arXiv 2012.14353

@inproceedings{karim2021deephateexplainer,
  title = {{DeepHateExplainer: Explainable Hate Speech Detection in Under-resourced Bengali Language}},
  author = {Md. Rezaul Karim, Sumon Kanti Dey, Tanhim Islam, Sagor Sarker, Mehadi Hasan Menon, Kabir Hossain, Md. Azam Hossain and Stefan Decker},
  booktitle = {IEEE International Conference on Data Science and Advanced Analytics (DSAA)},
  year = {2021},
  doi = {10.1109/dsaa53316.2021.9564230},
  eprint = {2012.14353},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/dsaa53316.2021.9564230}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/karim-2021-deephateexplainer-explainable-hate-speech-detection/

References

28 references, from the paper's own bibliography.

  1. Mai Sherief, Vivek Kulkarni, Elizabeth Belding. 2018. Hate lingo: A target-based linguistic analysis of hate speech in social media. 12th AAAI Conference on Web and Social Media. OpenAlex ↗ · Scholar ↗
  2. Md\bibnamedelima Rezaul Karim, Bharathi\bibnamedelima Raja Chakravarthi, John\bibnamedelima P McCrae, Michael Cochez. 2020. Classification benchmarks for under-resourced Bengali language based on multichannel convolutional-LSTM network. 2020 IEEE 7th International Conference on Data Science and Advanced Analytics (DSAA). our card
  3. Manoel\bibnamedelima Horta Ribeiro, Pedro\bibnamedelima H Calais, Virg\'\i Almeida, Wagner Meira\bibnamedelima Jr. 2018. Characterizing and detecting hateful users on Twitter. 12th AAAI conference on web and social media. OpenAlex ↗ · Scholar ↗
  4. A Guterres. 2019. United Nations Strategy and Plan of Action on Hate Speech. Taken from: https://www. un. org/en/genocideprevention/documents/U. OpenAlex ↗ · Scholar ↗
  5. MS Islam. 2009. Research on Bangla language processing in Bangladesh: progress and challenges. 8th International Language and Development Conference. OpenAlex ↗ · Scholar ↗
  6. Ziqi Zhang, David Robinson, Jonathan Tepper. 2018. Detecting Hate Speech on Twitter Using a Convolution-GRU Based Neural Network. ESWC. OpenAlex ↗ · Scholar ↗
  7. R. Izs´ak. 2015. Hate speech and incitement to hatred against minorities in the media. UN Humans Rights Council, A/HRC/28/64. OpenAlex ↗ · Scholar ↗
  8. Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805. our card
  9. Yinhan Liu, Myle Ott, Naman Goyal, Mike Lewis, Luke Zettlemoyer, Veselin Stoyanov. 2019. RoBERTa: A robustly optimized BERT pretraining approach. arXiv:1907.11692. our card
  10. Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ\bibnamedelima R Salakhutdinov, Quoc\bibnamedelima V Le. 2019. XLNET: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems. our card
  11. Kevin Clark, Minh-Thang Luong, Quoc\bibnamedelima V Le, Christopher\bibnamedelima D Manning. 2020. Electra: Pre-training text encoders as discriminators rather than generators. arXiv:2003.10555. OpenAlex ↗ · Scholar ↗
  12. Sagor Sarker. 2020. Bangla-BERT: Bengali Mask Language Model for Bengali Language Understading. https://github.com/sagorbrur/bangla-bert OpenAlex ↗ · Scholar ↗
  13. Joni Salminen, Hind Almerekhi, Milica Milenkovic, Jung. 2018. Anatomy of Online Hate: Developing a Taxonomy and ML Models for Identifying and Classifying Hate in Online News Media.. ICWSM. OpenAlex ↗ · Scholar ↗
  14. Nauros Romim, Mosahed Ahmed, Hriteshwar Talukder, Md\bibnamedelima Saiful Islam. 2020. Hate Speech detection in the Bengali language: A dataset and its baseline evaluation. arXiv preprint arXiv:2012.09686. our card
  15. Alvi\bibnamedelima Md Ishmam, Sadia Sharmin. 2019. Hateful Speech Detection in Public Facebook Pages for the Bengali Language. 2019 18th IEEE International Conference On Machine Learning And Applications~(ICMLA). OpenAlex ↗ · Scholar ↗
  16. Brian\bibnamedelima Kenji Iwana, Ryohei Kuroki, Seiichi Uchida. 2019. Explaining Convolutional Neural Networks using Softmax Gradient Layer-wise Relevance Propagation. arXiv:1908.04351. OpenAlex ↗ · Scholar ↗
  17. Andreas Holzinger, Andr\'e Carrington, Heimo M\"u. 2020. Measuring the quality of explanations: the system causability scale~(SCS). KI-K\"unstliche Intelligenz. OpenAlex ↗ · Scholar ↗
  18. Binny Mathew, Punyajoy Saha, Seid\bibnamedelima Muhie Yimam, Chris Biemann, Pawan Goyal, Animesh Mukherjee. 2020. HateXplain: A Benchmark Dataset for Explainable Hate Speech Detection. arXiv preprint arXiv:2012.10289. OpenAlex ↗ · Scholar ↗
  19. Omar Zaidan, Jason Eisner, Christine Piatko. 2007. Using annotator rationales to improve machine learning for text categorization. Prof. of Human language technologies 2007: The conference of the North American chapter of ACL. our card
  20. Andrea Saltelli. 2002. Sensitivity analysis for importance assessment. Risk analysis. OpenAlex ↗ · Scholar ↗
  21. Bin Chen, Dennis Zaebst, Lynn Seel. 2005. A macro to calculate kappa statistics for categorizations by multiple raters. Proceeding of the 30th Annual SAS Users Group International Conference. OpenAlex ↗ · Scholar ↗
  22. Thierry Declerck, Piroska Lendvai. 2015. Processing and normalizing hashtags. Proceedings of the International Conference Recent Advances in Natural Language Processing. OpenAlex ↗ · Scholar ↗
  23. Edouard Grave, Piotr Bojanowski, Tomas Mikolov. 2018. Learning Word Vectors for 157 Languages. Proc. of the International Conference on Language Resources and Evaluation~(LREC). our card
  24. Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzm\'a, Edouard Grave, Myle Ott, Luke Zettlemoyer, Veselin Stoyanov. 2019. Unsupervised cross-lingual representation learning at scale. arXiv:1911.02116. our card
  25. Leila Arras, Gr\'e Montavon, Klaus-Robert Muller, Wojciech Samek. 2017. Explaining recurrent neural network predictions in sentiment analysis. arXiv:1706.07206. OpenAlex ↗ · Scholar ↗
  26. Jay DeYoung, Sarthak Jain, Nazneen\bibnamedelima Fatema Rajani, Eric Lehman, Caiming Xiong, Richard Socher, Byron\bibnamedelima C Wallace. 2019. ERASER: A benchmark to evaluate rationalized nlp models. arXiv preprint arXiv:1911.03429. our card
  27. Elize Herrewijnen, Dong Nguyen, Jelte Mense, Floris Bex. . Machine-annotated Rationales: Faithfully Explaining Text Classification. OpenAlex ↗ · Scholar ↗
  28. Charles\bibnamedelima H Martin, Michael\bibnamedelima W Mahoney. 2019. Traditional and heavy-tailed self regularization in neural network models. arXiv:1901.08276. OpenAlex ↗ · Scholar ↗