<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Explaining Hate Speech Classification with Model-Agnostic Methods</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Durgesh Nandini</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ute Schmid</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Otto-Friedrich Universität Bamberg</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Bamberg</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Germany</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>There have been remarkable breakthroughs in Machine Learning (ML) and Artificial Intelligence (AI), notably in the areas of Natural Language Processing (NLP) and Deep Learning. Additionally, hate speech detection in dialogues has been gaining popularity among Natural Language Processing researchers with the increased use of social media. However, as evidenced by the recent trends, the need for the dimensions of explainability and interpretability in AI models has been deeply realised. Taking note of the factors above, the research goal of this paper is to bridge the gap between hate speech prediction and the explanations generated by the system to support its decision. This has been achieved by first predicting the classification of a text and then providing a post-hoc, model-agnostic and surrogate interpretability approach for explainability and to prevent model bias. The bidirectional transformer model BERT has been used for prediction because of its state-of-the-art eficiency over other Machine Learning(ML) models. The model-agnostic algorithm LIME generates explanations for the output of a trained classifier and predicts the features that influence the model's decision. The predictions generated from the model were evaluated manually, and after thorough evaluation, we observed that the model performs eficiently in predicting and explaining its prediction. Lastly, we suggest further directions for the expansion of the provided research work.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Hate speech</kwd>
        <kwd>Post-hoc Explainaibility</kwd>
        <kwd>Interpretable AI</kwd>
        <kwd>Model-agnostic Methods</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In the past few years, there have been breakthroughs in machine learning, and artificial
intelligence challenged the dimensions of explainability and interpretability. Explainable AI(XAI)
will be essential if users are to understand, appropriately trust, and efectively manage the
Artificially Intelligent systems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Explainability and interpretability are often used with blurred edges of where interpretability
ends and explainability begins. However, Molnar defines explainability as how well the model
can explain its inner workings to human users [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In contrast, interpretability is the association
of the cause and efects of the model. Explainable and interpretable models are frameworks
that inherently involve humans in the loop by providing the users with an understanding of
the model behaviour and enabling the building of robust models with strengthened trust and
improved decision-making capabilities due to transparency, usability, model and/or result in
justification [
        <xref ref-type="bibr" rid="ref3 ref4 ref5 ref6 ref7">3, 4, 5, 6, 7</xref>
        ].
      </p>
      <p>
        Machine interpretability methods are often categorised along with three main criteria [
        <xref ref-type="bibr" rid="ref4 ref8">8, 4</xref>
        ].
The first discriminates based on the coverage of explanation as local or global for an explanation
at instance-level (individual predictions) or model-level (entire model). Local interpretability
methods explain how predictions change when input changes and are applicable for a single
prediction or a group of predictions. Global interpretability methods simultaneously explain the
entire ML model, from input to prediction. The second category of distinction is intrinsic vs
posthoc interpretability models. While intrinsic interpretable models are self-explanatory inherently
and explanations are simply by-products of model training, post-hoc interpretability is realised
only after external algorithms are applied to the trained models. Lastly, interpretability can also
be categorised based on being model-agnostic or model specific. Model-specific means that a
dedicated interpretability model is created for the training model. In contrast, model-agnostic
interpretability methods can be plugged and customised with any Machine Learning model in
use. XAI models may be deployed and used in various domains for real-time use. For instance,
an XAI model in the domain of financial loans may explain why a certain user may be granted
or denied a loan [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. In this work, we analyse the domain of hate speech on social media.
      </p>
      <p>
        Hate speech detection in dialogues has been gaining popularity among NLP researchers with
the increased use of social media. What can be defined as hate speech is that it is understood
to be bias-motivated, hostile and malicious language targeted at a person or group because
of their actual or perceived innate characteristics [
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref14">10, 11, 12, 13, 14</xref>
        ]. Online hate speech is
heterogeneous and dynamic: it takes many forms, which can shift and expand over a relatively
short span of time. The characteristics that add to the dangers that hate speech poses are
accessibility, diversity, instant reaction rates, anonymity and multiplicity [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. This implies
that while users are not compelled to reveal aspects of their ofline identity unless they wish
to do so [
        <xref ref-type="bibr" rid="ref12 ref13">13, 12</xref>
        ], the accessibility that they possess on the internet and social media platforms
is readily high, with the size and reach of the audience is quite large, anybody and everybody
can view, replicate, and support or replicate the hate speech, and because the access is so high,
the reaction rate is also high be it in support of the hate speech or producing hate speech as
a reply to the original hate speech [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The last characteristic, multiplicity, is related to the
above point of reaction rate. Since there is no way to predict the reaction rate, there is no way
to predict the magnanimous multiplicity the hate speech may result in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        The aforementioned forms the motivation for the work presented in this paper. This paper
aims to predict and explain hate speech in tweets in the form of texts. The major goal of our work
is to provide the basis for coherent, comprehensible, contextual, and realistic explanations with
high local fidelity. This is done using the model-agnostic surrogate model approach. The model
agnostic model Local Interpretable Model-agnostic Explanations (LIME) generates explanations
for the output of a trained classifier and predicts the features that influence the decision of the
model [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. Furthermore, the post-hoc interpretability approach has been used to prevent model
bias [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. The interpretability methods show the features that influence the decision of the
model the most and help the user understand how the model is deciding to detect hate speech
in dialogues [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. The presented work provides insights into the decision points and feature
importance used to make predictions about the hate speech disposition of conversations. The
architecture provided in the paper is not limited to the text domain but can also be extended for
multimodal settings.
      </p>
      <p>The sections of the paper are organised as follows: Section ?? provides a walk-through of the
taxonomy of the Explainable Artificial Intelligence (XAI), discussing the types of XAI models
available and the paths that can be chosen when seeking diferent types of explainability, Section
2 discusses a few existing models for explainability and interpretability, and Section 3.1 then
gives details about the data that has been used in this work, Section 3 provides a description of
the methodology used in the paper and the architectural flow of the methodology used, Section
4 describes the experiments conducted for prediction of hate speech and the explanations
provided for them, Section 5 describes the results obtained from the experiments and provides
an evaluation of the model and the outcomes. Lastly, Section 6 has the conclusion and future
works.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>This section provides a brief overview of canonical works and techniques relevant to our study.
We first look at relevant areas of hate speech detection; then, we have a brief overview of the
models that can be used to explain the results of the detected hate speech and the various
modalities of the explainable and interpretable models.</p>
      <p>
        A simple mode of hate speech detection is using a set of keywords and checking for the
availability of the keywords in the text [
        <xref ref-type="bibr" rid="ref12">18, 12, 19</xref>
        ]. The use of word embeddings and a
Bag-OfWords (BoW) model is advancing a bit further. Kwok et al. [20] use a unigram model for hate
speech detection and [21] use embeddings for the same. [20] have also combined their BoW
model with a Naive Bayes classifier. Another popular method of detection is combining NLP
techniques with an ML model. MacAveney et al. [18] in their method propose a multi-view
SVM approach for hate speech detection. Furthermore, Deep Learning (DL) may also be used
for the subject matter at hand, either with a sole method or in an ensemble of one or more
methods. [22, 23, 24] use Convolutional Neural Networks (CNN), [25, 22] use Recurrent Neural
Networks (RNN) and [26, 27, 28] use transformers for the same.
      </p>
      <p>
        Having had an overview of the hate speech detection models, we now look at methods to
introduce interpretability in our model. For this, we are going to go through SHAP [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], anchors
[29] and LIME [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
      <p>
        Inspired by coalitional game theories, SHAP (SHapley Additive exPlanations) is an approach
to explaining the prediction of an instance by computing the contribution of each feature to the
prediction. The resulting SHAP values [30] can be interpreted as a unified measure of additive
feature importance [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. The primary advantages of SHAP are that it ofers global interpretability
by showing whether a variable has a positive or negative influence on the target value, as well as
local interpretability by showing why a case receives its prediction and the contributions of the
predictors. Although Shapley values fulfil desirable properties like local accuracy, missingness,
and consistency, its model-agnostic approximation technique Kernel SHAP is slow concerning
computational time complexity, on the one hand, [31].
      </p>
      <p>Ribeiro et al. [29] propose a novel model-agnostic system that explains the behaviour of
complex models with high-precision rules. The rules are called anchors and represent local,
suficient conditions for predictions. The authors claim that rule-based anchors provide an
intuitive classification and prediction by highlighting the part of the input that sufices the
prediction. An anchor explanation is a rule that suficiently ties up the prediction locally – such
that changes to the rest of the feature values of the instance do not matter. Because of the use of
if-then rules, the explanations generated are easy to understand [29]. However, the rule-based
algorithm does not specify how should conflicting and contrasting rules be resolved or what
should be the coverage area of the anchors.</p>
      <p>
        Ribeiro et al. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] propose LIME, a model agnostic interpretability model that explains an
individual model’s prediction by locally approximating the model’s decision boundary in the
neighbourhood of the given instance. A major advantage of LIME is that each explanation
is easy to understand, even for complex models and tasks. Still, the caveat is that the model
can only capture the model’s behaviour on a local region of the input space [29]. The LIME
methodology ofers local fidelity, local interpretability via instance explanation, and global
interpretability via model explanation. LIME uses a local linear explanation model and can thus
be characterised as an additive feature attribution method.
      </p>
      <p>
        State-of-the-art also gives an insight into the diferent levels and modes in which explanations
might be generated and what may suggest an explanation to be complete. Kumar et al. [32]
suggest that explanations reveal a transactional nature and reflect an attempt to communicate an
understanding between individuals. The authors also suggest that features play an exuberant role
in predicting outcomes as well as generating explanations for interpretability. Another insight
may be that explanations can be generated according to various levels of understanding. Bettina
et al. [33] describe three levels of explanations based on global, local or endless(theoretically)
levels of details for a class of examples or models. What may be understood from this
state-ofthe-art literature is that explanations should stick together and represent an internally consistent
package whose elements form an interconnected, mutually supporting relational structure [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <p>Although black-box ML models have observable input-output relationships, they lack
transparency into their internal functioning. This is typical of deep learning, which models very
complex problems with high nonlinearity and input-input interactions [32]. As such, it is essential
to decompose the model into interpretable components to simplify the model’s decision-making
procedure.</p>
      <p>In this section, we described the steps involved in generating explanations and their analysis.
Our methodology builds on top of the classic LIME model and is characterised by the integration
of a supervised machine learning model and an explanation system. Fig. 1 illustrates the
architecture pertained in the paper. The following subsections discuss the steps applied in our
methodology.
3.1. Data
We used a Twitter dataset for the case study in this work. The dataset was derived from Davidson
et al. [34]. For the dataset, the organisers have collected a large archive of tweets using a Twitter
API and pre-selected potentially problematic posts using lexicons from Hatebase.org1. The
authors collected a total of 85.4 million tweets from 33,458 Twitter users and then they have
taken a random sample of 25,000 tweets. The tweets are then judged and annotated by at least
three humans. They evaluated the intercoder-agreement to be 92%. After the annotation, 24,802
labelled tweets were obtained as the authors suggest that some tweets were not assigned labels
as there was no majority class. It is also interesting to note that the authors also indicate that
the annotators were asked to label the data as per the context in which they were used, meaning
that a mere presence of a word did not indicate the tweet to be a Hate or Ofensive speech. The
class distribution of data is shown in Fig. 2a. For our case study, we have used three classes
from the dataset: ’Hate’, ’Ofensive’ and ’None’. The three classes are defined below.</p>
      <p>Hate: Describing negative attributes or deficiencies to groups of individuals because they
are members of a group. There are hateful comments toward groups because of race, political
opinion, sexual orientation, gender, social status, health condition, or similar. An example of
this category would be "all poor people are stupid".</p>
      <p>Ofensive: Posts which are degrading, dehumanising, insulting an individual, or threatening
with violent acts are categorised into this category. An example for this category would be
"f**king forget that b***h".</p>
      <p>None: Posts that do not belong to any of the above categories are categorised in this set.</p>
      <p>The data was highly imbalanced, the majority were in none class, and only 1,430 were hateful
tweets, as shown in Fig. 2a, so we have used a random sample of 1,430 tweets from each class.
Fig. 2b demonstrates a visual representation of the data as a word cloud. It can be seen that the
most prominent words highlighted are a balanced mix of hate, ofensive and none data. It can
also be observed that a lot of hate words are being targeted toward people, communities, or
organisations. This finding does conform to the aim of the research work focus. The classes
mentioned are not mutually exclusive. A tweet may fall into one or more categories; however,
the class of the tweet is dependent on the probability score of the diferent classes. The class
with the highest probability score is assigned the tweet.
3.1.1. Data Preprocessing
The language ongoing on social media is usually casually written with no special emphasis on
grammar or literary correctness and in combination with emojis, symbols and hashtags. For our
pipeline, we have preprocessed the data to remove smileys, emojis and any other symbol that
may be present. In addition to that, we have also eliminated stopwords as the model performed
almost the same when with or without the stopwords. The hashtags were not eliminated
because we observed that the hashtags contributed to the meaning of sentences and would
often encapsulate the emotions of sentences, hence contributing to categorising a sentence as
hate speech or not.</p>
      <sec id="sec-3-1">
        <title>3.2. Classification Model</title>
        <p>The data is trained using the Bidirectional Encoder Representations from Transformers (BERT)
model [35]. BERT is a state-of-the-art NLP model that applies bidirectional training of attention
mechanism to language modelling tasks. The bidirectional flow of training provides a deeper
insight into the language context. In vanilla form, BERT is composed of an encoder that reads
the text input, which may then be integrated with a classification model to predict a task.
Unlike directional models, which read the text input sequentially (left-to-right or right-to-left),
the Transformer encoder in BERT reads the entire sequence of words simultaneously. This
characteristic allows the model to learn the context of a word based on all of its surroundings.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.3. Post-hoc Explainability Models</title>
        <p>
          Post-hoc interpretability approaches propose to generate explanations for the output of a
trained classifier in a step distinct from the prediction step. These approximate the behaviour
of a black box by extracting relationships between feature values and the predictions. Two
widely accepted categories of post-hoc approaches are surrogate models and counterfactual
explanations. Surrogate model approaches aim to fit a surrogate model to imitate the behaviour
of the classifier while facilitating the extraction of explanations. Often, the surrogate model
is a simpler version of the original classifier. Global surrogates are aimed at replicating the
behaviour of the classifier in its entirety. On the other hand, local surrogate models are trained to
focus on a specific part of the rationale of the trained classifier. This research uses the post-hoc
local surrogate explainability method, Local Interpretable Model-agnostic Explanations (LIME)
[
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. Typically, LIME creates a new dataset or text from the original text by randomly removing
words from the original test and gives the probability to each word to eventually predict based
on the calculated probability.
3.3.1. LIME
LIME is a local surrogate approach that approximates any black-box machine learning model
with a local, interpretable model to explain individual prediction. The model specifies the
importance of each feature to an individual prediction. The model works by tweaking the inputs
slightly and observing the changes in prediction. The tweaked data points are weighed as a
function of their proximity to the original data points, then fitting a surrogate model such as
linear regression on the dataset with variations using those sample weights. Each original
data point can then be explained with the newly trained explanation model [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. The learned
model generates a local prediction model while it may or may not provide a precise global
approximation. Since LIME models treat the machine learning models as a black box, these are
model agnostic. The Fig. 3 shows a flowchart of the LIME methodology.
        </p>
        <p>Mathematically, LIME explanations are determined using the formula:
 () = (, , Π ) + Ω ; ,
(1)</p>
        <p>
          The mathematical formula above states that the explanation for a data point is the model
that minimises the locality-aware loss keeping the model complexity low. The loss function
L measures the closeness of the explanation to the prediction of the original model f while
keeping the model complexity Ω  low. G is the pool of possible explanations, and Π  is the
proximity measure of how large the neighbourhood is around the instance x. LIME optimises
only the loss part of the data [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
        </p>
        <p>The idea for training the LIME model is presented in Fig. 3 :
• Select the instance in which the user wants to have an explanation of the black-box
prediction
• Add a small noisy shift to the dataset and get the black-box prediction of these new points
• Weight the new point samples according to the proximity of the instance x
• Weighted, interpretable models are trained on the dataset with the variations
• With the interpretable local model, the prediction is explained</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.4. Error Analysis</title>
        <p>ML models often face evaluation challenges regarding performance, accuracy, and reliability.
In practice, there might be a possibility that the model accuracy may not be uniform across
subgroups of data and that input conditions might exist for which the model fails. Henceforth,
we analyse the results obtained from the experiments and draw meaningful conclusions from
the results obtained. To achieve this, we perform an error analysis to evaluate the performance
of the classification and the explanation model.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experimental Setup</title>
      <p>For experimental purposes, we have used the tweets collected from Twitter. The data is then
preprocessed following the preprocessing pipeline as mentioned in Section 3.1.1. The stopwords
and pronouns were removed, followed by lemmatisation and stemming. We have used the
NLTK library2 for the removal of stopwords and customised it to remove additional pronouns
from our corpus. The lemmatisation and stemming were performed using the NLTK WordNet
lemmatiserand stemmer. The hashtags of tweets are preserved as they contribute meaningfully
to our experimental scenario. The preprocessed data is then split into a training set, a test set
and a validation set in a standard ratio of 70:20:10. The data is then labelled into their respective
classes for training purposes. The labels are Hate, Ofensive and None. Details about the data
are provided in Section 3.1. Supervised learning is carried on to the preprocessed and labelled
training data for the next step. For the supervised learning classification, we use a BERT model.</p>
      <p>After supervised learning, we then add the LIME pipeline to the prediction outcomes from
the supervised learning model. We perform all our experiments using the Python language.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Results and Discussion</title>
      <p>This section observes and evaluates the results obtained from the experiments conducted. After
preprocessing the data, we use the BERT classification model for supervised learning. A detailed
classification report is given in Tab. 1. We run the classification model for four epochs as the
performance stabilises after the four epochs. The result presents the precision, recall, F1 and
accuracy scores rounded to the third decimal digit. The best accuracy obtained is 82.6%. Then
we add the LIME architecture to the pipeline and evaluate the LIME results. The bottom right
part of Fig. 4 shows an example tweet from our dataset.</p>
      <p>In our experiments, LIME measures similarity between documents using similarity kernels
that are based on distance measures. Context and coherent semantic facts that should reveal a
similar meaning are analysed as basic explanation units regarding their efect on the classification
when being removed. The most relevant classes with their assigned words are presented as
explanations. Currently, a manual evaluation technique has been employed for evaluation
purposes where a human evaluator checks the decision made by the model and the explanation
generated by LIME and assesses their accuracy. In the following paragraphs, we analyse and
discuss the experimental results.</p>
      <p>As discussed in Section 3, we have used supervised learning to generate a one vs all
classification and then interpreted the results via LIME. The classification algorithm generates a
probability distribution for each class and a probability score for each feature per class. This
essentially means that there was an overlap of features for one or more classes, but the model
decision was made in favour of the class that had a maximum hold on the feature scores. We
show an example result to shed light on this discussion.</p>
      <p>Fig. 4 represents a one vs all predictions generated by the LIME classification algorithm and
depict the features that were deemed relevant for the decision-making by the algorithm. Fig. 4
also illustrates the feature probability distribution for each class. The Prediction Probability
in Fig. 4 shows the per class probability distribution, and the Text with highlighted words
illustrates the features that were used to make the decision. As displayed, the feature "ass" has
a score of 0.5, "f**k" has a score of 0.49 and "redskin" has a score of 0.35; depending on which
the classification decision for the ’hate’ class was decided upon by the model. These features
explain the decision of the classifier.</p>
      <p>To evaluate errors in the model, we start by observing 150 tweets, taking 50 random tweets
from each class. Overall, we identified a 21% error rate of our 150 tweet texts, where 5% were
predicted as false positives, and 16% were predicted as false negatives, where false negatives in
our case would be an incorrect classification of tweets. In the observed number of tweets, a
mere 0.6% tweets had an exactly equal probability of ’hate’ and ’ofensive’. For the Hate class,
78% of the analysed tweets were correctly classified, whereas 18% were incorrectly classified as
Ofensive, 4% were incorrectly classified as None class. Similarly, for the Ofensive category, 74%
of the analysed tweets were correctly classified, while 22% were incorrectly classified as Hate,
2% were incorrectly classified as None, and 2% shared an equal probability of Ofensive and
Hate. For the None class, 84% of the analysed tweets were correctly classified, whereas 2% were
incorrectly classified as Ofensive, and 14% were incorrectly classified as Hate. In diagnosing the
predicted tweet texts and their classes, we identified a few words that always caused the results
to fall into a particular category. We also observed that certain words had a higher frequency of
occurrence in each class. The top sixty frequent words for the class Hate, Ofensive and None
are shown in Fig. 5a, 5b and 5c respectively.</p>
      <p>While evaluating the results, we observed that while there may be a feature overlap among
classes, the model decision was the efect of a combined factor of hate words, nouns, and
pronouns. For example, if the features were directly using the words like ’you are hate word
(from the shown hate word list, for example)’, then the model decision was in favour of the
class Hate. At the same time, the tweet text was classified as ofensive if there were an indirect
reference or no direct pointing of objects. Additionally, if the tweet used an ofensive word but
discussed abstract universal concepts, then the tweet was classified as ’ofensive’ as well. If the
tweet had no ofensive or hate words, then the model classified them as ’none’. For instance,
Fig. 5 show that the words like "f**k", "b***h", "black", are frequently occurring in Hate, None,
as well as Ofensive classes. Here the model checks other combinatorial words and then decides
whether a tweet is Hate or Ofensive. So, if the word directly refers to a Noun, Pronoun, for
example, "I’d f**k a dog before I f**k you fish black p***y", then the tweet was classified as
Hate, while "aye yo black car is superior" was classified as None. Another conclusion from the
analysis was that tweets were almost always categorised as Hate when they were racist (use
of stem words such as "black", "n***a", "f****t", "white", etc.), while they were almost always
classified as Ofensive when they were sexist (use of stem words such as "cunt", "b***h", "hoe",
"p*****g wife", "p***y", etc.).</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion and Future Work</title>
      <p>In this work, we shed light on the rising efects of hate speech on social media and the dangers
that they pose due to various factors. To solve this issue, we propose a methodology to detect
hate speech on social media platforms and provide an explanation for the same using feature
vectors. We have worked on the Twitter dataset for experimental purposes.</p>
      <p>This work opens the prospects for numerous future works, such as enriching the architecture
with rule-based learnings using named entity recognition (NER) in association with relational
features. The architecture can also be extended to various dimensions of data, for example,
using image data, spatial relations in textual or image data, or both. Moreover, to evaluate how
human users evaluate the model, a survey can be conducted to evaluate the prediction outcomes
or the explanations.</p>
      <p>(a)</p>
    </sec>
    <sec id="sec-7">
      <title>7. Acknowledgements</title>
      <p>The research presented here has been carried out within the Dare2Del project under the DFG
priority program Intentional Forgetting (SPP 1921). Dare2Del is a joint project of Cognitive
Systems, University of Bamberg and the Chair for Work and Organisational Psychology, University
[18] S. MacAvaney, H.-R. Yao, E. Yang, K. Russell, N. Goharian, O. Frieder, Hate speech detection:</p>
      <p>Challenges and solutions, PloS one 14 (2019) e0221152.
[19] G. K. Shahi, T. A. Majchrzak, Amused: An annotation framework of multimodal social
media data, in: International Conference on Intelligent Technologies and Applications,
Springer, 2022, pp. 287–299.
[20] I. Kwok, Y. Wang, Locate the hate: Detecting tweets against blacks, in: Twenty-seventh</p>
      <p>AAAI conference on artificial intelligence, 2013.
[21] N. Djuric, J. Zhou, R. Morris, M. Grbovic, V. Radosavljevic, N. Bhamidipati, Hate speech
detection with comment embeddings, in: Proceedings of the 24th international conference
on world wide web, 2015, pp. 29–30.
[22] P. Badjatiya, S. Gupta, M. Gupta, V. Varma, Deep learning for hate speech detection
in tweets, in: Proceedings of the 26th international conference on World Wide Web
companion, 2017, pp. 759–760.
[23] B. Gambäck, U. K. Sikdar, Using convolutional neural networks to classify hate-speech, in:</p>
      <p>Proceedings of the first workshop on abusive language online, 2017, pp. 85–90.
[24] S. Zimmerman, U. Kruschwitz, C. Fox, Improving hate speech detection with deep learning
ensembles, in: Proceedings of the eleventh international conference on language resources
and evaluation (LREC 2018), 2018.
[25] F. Del Vigna12, A. Cimino23, F. Dell’Orletta, M. Petrocchi, M. Tesconi, Hate me, hate me
not: Hate speech detection on facebook, in: Proceedings of the First Italian Conference on
Cybersecurity (ITASEC17), 2017, pp. 86–95.
[26] M. Mozafari, R. Farahbakhsh, N. Crespi, A bert-based transfer learning approach for
hate speech detection in online social media, in: International Conference on Complex
Networks and Their Applications, Springer, 2019, pp. 928–940.
[27] M. Mozafari, R. Farahbakhsh, N. Crespi, Hate speech detection and racial bias mitigation
in social media based on bert model, PloS one 15 (2020) e0237861.
[28] G. K. Shahi, D. Nandini, Fakecovid–a multilingual cross-domain fact check news dataset
for covid-19, arXiv preprint arXiv:2006.11343 (2020).
[29] M. T. Ribeiro, S. Singh, C. Guestrin, Anchors: High-precision model-agnostic explanations,
in: Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
[30] S. M. Lundberg, S.-I. Lee, A unified approach to interpreting model predictions, Advances
in neural information processing systems 30 (2017).
[31] S. Kiefer, Case: Explaining text classifications by fusion of local surrogate explanation
models with contextual and semantic knowledge, Information Fusion 77 (2022) 184–195.
[32] A. Kumar, S. Dikshit, V. H. C. Albuquerque, Explainable artificial intelligence for sarcasm
detection in dialogues, Wireless Communications and Mobile Computing 2021 (2021).
[33] B. Finzel, D. E. Tafler, S. Scheele, U. Schmid, Explanation as a process: user-centric
construction of multi-level and multi-modal explanations, in: German Conference on
Artificial Intelligence (Künstliche Intelligenz), Springer, 2021, pp. 80–94.
[34] T. Davidson, D. Warmsley, M. Macy, I. Weber, Automated hate speech detection and the
problem of ofensive language, in: Proceedings of the international AAAI conference on
web and social media, volume 11, 2017, pp. 512–515.
[35] J. Devlin, M.-W. Chang, K. Lee, K. Toutanova, Bert: Pre-training of deep bidirectional
transformers for language understanding, arXiv preprint arXiv:1810.04805 (2018).
[36] M. R. Zafar, N. Khan, Deterministic local interpretable model-agnostic explanations for
stable explainability, Machine Learning and Knowledge Extraction 3 (2021) 525–541.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>T.</given-names>
            <surname>Waefler</surname>
          </string-name>
          , U. Schmid,
          <article-title>Explainability is not enough: Requirements for human-aipartnership in complex socio-technical systems (</article-title>
          <year>2020</year>
          )
          <fpage>185</fpage>
          -
          <lpage>194</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>M. Christoph,</surname>
          </string-name>
          <article-title>Interpretable machine learning. a guide for making black box models explainable</article-title>
          .
          <year>2019</year>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <article-title>Explanation in artificial intelligence: Insights from the social sciences</article-title>
          ,
          <source>Artificial intelligence 267</source>
          (
          <year>2019</year>
          )
          <fpage>1</fpage>
          -
          <lpage>38</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>L. H.</given-names>
            <surname>Gilpin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. Z.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bajwa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Specter</surname>
          </string-name>
          , L. Kagal,
          <article-title>Explaining explanations: An overview of interpretability of machine learning</article-title>
          ,
          <source>in: 2018 IEEE 5th International Conference on data science and advanced analytics (DSAA)</source>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>80</fpage>
          -
          <lpage>89</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Guidotti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Monreale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ruggieri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Turini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Giannotti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pedreschi</surname>
          </string-name>
          ,
          <article-title>A survey of methods for explaining black box models, ACM computing surveys (CSUR) 51 (</article-title>
          <year>2018</year>
          )
          <fpage>1</fpage>
          -
          <lpage>42</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Tepperman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Traum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Narayanan</surname>
          </string-name>
          ,
          <article-title>" yeah right": Sarcasm recognition for spoken dialogue systems</article-title>
          ,
          <source>in: Ninth international conference on spoken language processing</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Lundberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.-I.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>A unified approach to interpreting model predictions</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>30</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Adadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Berrada</surname>
          </string-name>
          ,
          <article-title>Peeking inside the black-box: a survey on explainable artificial intelligence (xai)</article-title>
          ,
          <source>IEEE access 6</source>
          (
          <year>2018</year>
          )
          <fpage>52138</fpage>
          -
          <lpage>52160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Keane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Smyth</surname>
          </string-name>
          ,
          <article-title>Good counterfactuals and where to find them: A case-based technique for generating counterfactuals for explainable ai (xai)</article-title>
          ,
          <source>in: International Conference on Case-Based Reasoning</source>
          , Springer,
          <year>2020</year>
          , pp.
          <fpage>163</fpage>
          -
          <lpage>178</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Whillock</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Slayden</surname>
          </string-name>
          ,
          <article-title>Hate speech</article-title>
          .,
          <source>ERIC</source>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Waldron</surname>
          </string-name>
          ,
          <article-title>The harm in hate speech, in: The Harm in Hate Speech</article-title>
          , Harvard University Press,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Mondal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Silva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Benevenuto</surname>
          </string-name>
          ,
          <article-title>A measurement study of hate speech in social media</article-title>
          ,
          <source>in: Proceedings of the 28th ACM conference on hypertext and social media</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>85</fpage>
          -
          <lpage>94</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Brown</surname>
          </string-name>
          ,
          <article-title>What is so special about online (as compared to ofline) hate speech?</article-title>
          ,
          <source>Ethnicities</source>
          <volume>18</volume>
          (
          <year>2018</year>
          )
          <fpage>297</fpage>
          -
          <lpage>326</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>G. K.</given-names>
            <surname>Shahi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. Kana</given-names>
            <surname>Tsoplefack</surname>
          </string-name>
          ,
          <article-title>Mitigating harmful content on social media using an interactive user interface</article-title>
          ,
          <source>in: Social Informatics: 13th International Conference, SocInfo</source>
          <year>2022</year>
          , Glasgow, UK,
          <source>October 19-21</source>
          ,
          <year>2022</year>
          , Proceedings, Springer,
          <year>2022</year>
          , pp.
          <fpage>490</fpage>
          -
          <lpage>505</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M. T.</given-names>
            <surname>Ribeiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Guestrin</surname>
          </string-name>
          ,
          <article-title>Why should i trust you?" explaining the predictions of any classifier</article-title>
          ,
          <source>in: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>1135</fpage>
          -
          <lpage>1144</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>A.</given-names>
            <surname>Holzinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Malle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Saranti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Pfeifer</surname>
          </string-name>
          ,
          <article-title>Towards multi-modal causability with graph neural networks enabling information fusion for explainable ai</article-title>
          ,
          <source>Information Fusion</source>
          <volume>71</volume>
          (
          <year>2021</year>
          )
          <fpage>28</fpage>
          -
          <lpage>37</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>J.</given-names>
            <surname>Rabold</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Siebers</surname>
          </string-name>
          , U. Schmid,
          <article-title>Generating contrastive explanations for inductive logic programming based on a near miss approach</article-title>
          ,
          <source>Machine Learning</source>
          (
          <year>2021</year>
          )
          <fpage>1</fpage>
          -
          <lpage>22</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>