---
title: "Automatic Hate Speech Detection using Machine Learning: A"
description: "A close look at Abro and colleagues’ hate speech detection study, its feature and classifier comparisons, and the limits of its results."
canonical: "https://research.elamur.ai/free/en/papers/abro-2020-automatic-hate-speech-detection-machine/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/abro-2020-automatic-hate-speech-detection-machine/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / Automatic Hate Speech Detection using Machine Learning: A Comparative Study

# Automatic Hate Speech Detection using Machine Learning: A Comparative Study

Paper · 2020 · Sindhu Abro, Sarang Shaikh, Zahid Hussain et al.

**Authors:** Sindhu Abro, Sarang Shaikh, Zahid Hussain, Zafar Ali, Sajid Ullah Khan and Ghulam Mujtaba · **Year:** 2020 · **Venue:** International Journal of Advanced Computer Science and Applications · **Licence:** [CC BY (OpenAlex best open-access location)](https://creativecommons.org/licenses/by/4.0/)

International Journal of Advanced Computer Science and Applications · [licence](https://creativecommons.org/licenses/by/4.0/)

- [PDF](http://thesai.org/Downloads/Volume11No8/Paper_61-Automatic_Hate_Speech_Detection.pdf)
- [DOI 10.14569/ijacsa.2020.0110861](https://doi.org/10.14569/ijacsa.2020.0110861)

## What it is about

A close look at Abro and colleagues’ hate speech detection study, its feature and classifier comparisons, and the limits of its results. · about 33 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Detecting hateful language automatically requires more than recognizing an insult. A system must distinguish speech directed against a protected group from language that is offensive without meeting that definition, while also recognizing ordinary messages. Abro and colleagues study this distinction through a comparative [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) experiment. They ask which combinations of numerical text representations and supervised learning algorithms work best on a publicly available collection of labeled tweets. Their contribution is a shared experimental comparison instead of a new definition of hate speech or a new classification algorithm.

The study uses a CrowdFlower-labeled dataset containing 14,509 tweets. Its categories distinguish hate speech, offensive language outside that category, and messages belonging to neither category. The authors clean the text, construct alternative numerical representations, and divide the data using an 80-20 training–test split. They compare bigrams weighted with TF-IDF against Word2vec and Doc2vec representations. Each representation is paired with eight classifiers, producing 24 experimental combinations. The measurements include precision, recall, F-measure, and accuracy.

The strongest reported combination is a support vector machine, or SVM, using TF-IDF-weighted bigrams. It obtains 79% accuracy, with reported precision of 0.77, recall of 0.79, and F-measure of 0.77. AdaBoost performs nearly as well on accuracy with that representation, while the weakest reported bigram configuration is the nearest-neighbor classifier. The comparison therefore supports a practical conclusion within this experiment: a relatively direct representation of neighboring words can outperform the evaluated alternatives based on learned word or document vectors. It does not establish that bigrams or SVMs are universally superior.

The most important qualification appears in the class-level analysis. The winning system recognizes only 155 of the 490 hate-speech tweets discussed in its test-set confusion matrix. Many are assigned to the offensive-language category instead. In contrast, the paper reports 1427 correct predictions among 1459 messages in the non-offensive category. Overall accuracy consequently gives a much more favorable impression than the performance on the category named in the research problem. The authors suggest that limited hate-speech training material and overlapping expressions across categories contribute to this difficulty. These explanations are plausible interpretations, rather than conclusions established through separate interventions.

The paper is useful as a baseline comparison and as a reminder to examine the interaction between features, algorithms, and label distributions. Its reporting also leaves important uncertainties. The multiclass averaging procedure is unspecified, implementation settings are sparse, and the conclusion’s classifier ranking does not fully agree with the numerical tables. The authors themselves acknowledge inadequate prediction performance for real-time use and the absence of severity assessment. The defensible result is therefore narrower than a general solution to hate-speech detection: among the reported configurations, TF-IDF bigrams with SVM give the strongest aggregate scores, while identifying hate speech remains substantially harder than recognizing the other categories.

### Ideas worth borrowing

Compare representations and decision procedures together. A text representation can appear weak because it is paired with an unsuitable classifier, while a classifier can appear weak because its inputs conceal useful distinctions. The paper evaluates combinations rather than treating either choice as independent. This design applies to document routing, sentiment analysis, and other classification tasks where the same source material can be expressed through several kinds of evidence.

Retain a transparent lexical baseline. Neighboring-word features provide an accessible reference against which more elaborate representations can be judged. Their value is not that local word sequences express every relevant meaning, but that they offer a concrete account of what evidence reaches the classifier. A strong lexical baseline can reveal whether a proposed representation contributes useful information under the available data conditions.

Inspect the category that matters most. An aggregate score can look satisfactory while a practically important category remains poorly recognized. The paper’s confusion-matrix discussion makes this visible for hate speech. The reusable lesson is to connect evaluation to the intended purpose: examine the relevant class, its missed instances, and the destinations of those errors before deciding that a system is useful.

Treat neighboring categories as a substantive boundary. Offensive language and hate speech share vocabulary, but their labels express different judgments. Separating them exposes an ambiguity that a broader harmful-language category would conceal. Similar boundary problems arise when distinguishing criticism from abuse, uncertainty from contradiction, or a reported belief from an asserted fact. Label design should preserve distinctions that downstream decisions need.

Match the representation to the evidence available. The authors consider limited training material, unfamiliar words, and short documents when interpreting representation performance. Those explanations are not separately verified, but they identify useful questions for subsequent experiments. A representation should be assessed against the actual length, vocabulary, and quantity of its input, rather than selected solely because it is more sophisticated.

Make preprocessing part of the scientific claim. Lowercasing, deleting tokens, and stemming determine which distinctions survive into the experiment. The paper applies a common cleaning pipeline, but does not isolate its individual effects. Elsewhere, recording these transformations and testing consequential ones separately can prevent a gain attributed to a classifier from actually depending on an undocumented change to its input.

Separate an observed ranking from its explanation. The tables show which configurations perform better under the reported setup. The discussion proposes reasons involving word order, vocabulary coverage, data quantity, and classifier behavior. Keeping those levels separate makes the findings easier to reuse: an engineer can adopt the empirical baseline while treating the proposed explanation as a hypothesis requiring another experiment.

### How Mova uses it

Mova is a small language system written in Rust whose native understanding proceeds through dependency trees, event frames, and a maintained world of the text. Its documented mechanisms include explicit lexical knowledge, deterministic inference, reviewed training material, and evaluation controls. The connections below concern those mechanisms and possible extensions. They do not establish an implemented hate-speech detector, and the paper supplies no measurements for Mova. The status marks indicate proposed relationships to documented capabilities; they are not records of applying this paper.

Idea: Compare representations and decision procedures together. Where: Experimental Settings and Results. Area: evaluation. Mova: частково є (parser comparisons, tree agreement, and held-out self-play). Mova already compares alternative analyses and evaluates proposed changes, but the particular experiment suggested here would cross alternative evidence representations with alternative decision rules on the same items. Frames, lexical features, and retained-world observations could be compared without assuming that any representation has a universally best consumer. The resulting ranking would remain specific to that task and evaluation set.

Idea: Retain a transparent lexical baseline. Where: Feature Engineering and Results. Area: lexical evidence. Mova: частково є (compiled English lexicon, explicit rules, and dictionary occurrence frames). Mova’s explicit vocabulary and inspectable rules provide much of the infrastructure for a simple baseline, but they do not establish the paper’s TF-IDF bigram classifier. A task-specific lexical comparator could show whether a more structural reader gains anything beyond recurring phrases. This would help interpret improvements without replacing Mova’s native reading pipeline.

Idea: Inspect the category that matters most. Where: Results, the SVM confusion-matrix discussion, and Classwise Performance. Area: evaluation. Mova: частково є (course traces, benchmark reports, and reader miss analysis). Existing traces preserve individual answers and reasons, while the fast-reader analysis distinguishes kinds of failure. A further task-specific report could foreground the category whose mistakes matter most instead of letting an aggregate hide it. For a classifier with neighboring labels, it should retain both the missed item and the category that received it.

Idea: Preserve neighboring categories that serve different purposes. Where: Methodology and Data Collection. Area: label design. Mova: нове. A proposed language-analysis module could distinguish a description of harmful speech, an offensive expression, and an actual harmful act represented in context, with definitions established before evaluation. The digest does not establish this particular task or label inventory. Why Mova: Explicit boundaries would let a logical module state what it has recognized without silently upgrading a lexical cue into a broader judgment.

Idea: Evaluate representations against document length. Where: Discussion, Feature Engineering. Area: data and evaluation. Mova: нове. The authors suggest that short tweets disadvantage Doc2vec, but do not isolate length experimentally. Mova could test whether the same reader or retained-graph procedure behaves differently on short statements and longer passages, using declared length strata. This proposal has no demonstrated effect in Mova. Why Mova: It could reveal when structural evidence is absent because the text is brief, rather than because the inference rule is defective.

Idea: Audit unfamiliar vocabulary separately. Where: Discussion, Feature Engineering. Area: lexical coverage. Mova: частково є (global knowledge gaps and the dictionary occurrence index). Mova already records missing knowledge links and retrieves source-bound lexical witnesses. A task evaluation could distinguish missing vocabulary from incorrect reasoning over known words, following the paper’s concern about out-of-vocabulary items. The useful transfer is diagnostic separation: expanding a dictionary should be credited with resolving a coverage gap only when the corresponding decision improves.

Idea: Test data sufficiency rather than presuming it. Where: Discussion, Feature Engineering and Machine Learning Classifier. Area: statistics. Mova: нове. The paper invokes limited training material to explain several weak configurations without presenting a controlled data-size analysis. Mova could evaluate a fixed procedure on separately declared training subsets while keeping assessment items unchanged. Such a study would need its own admission and leakage controls. Why Mova: It would help decide whether further teaching data is likely to address a weakness or whether the representation itself needs revision.

Idea: Make preprocessing inspectable. Where: Text Preprocessing. Area: data processing. Mova: частково є (tokenization, morphology, reversible storage, and source-preserving occurrence records). Mova already preserves original examples and provides explicit linguistic transformations. A classification experiment could additionally record which normalization produced each feature and which source distinctions disappeared. The paper motivates examining these choices, but does not demonstrate that its cleaning pipeline would suit Mova. Source text and task-specific normalized text should remain distinguishable.

Idea: Evaluate destructive cleaning independently. Where: Text Preprocessing. Area: controlled evaluation. Mova: нове. The paper removes several categories of textual material together. Mova could compare individual removals against a source-preserving reference, especially when punctuation, names, or function words contribute to a frame. This would be a new experiment, not an established improvement. Why Mova: Mova relies on syntactic and pragmatic evidence, so identifying which deletions damage interpretation could prevent an apparently helpful cleaning step from weakening native understanding.

Idea: Compare stemming with linguistic normalization. Where: Text Preprocessing. Area: morphology. Mova: частково є (native lemmatization and inflection in en/src/morph.rs). The paper uses Porter stemming, whereas Mova has explicit morphological mechanisms. A controlled comparison could ask whether stems, lemmas, or original forms give the best evidence for a particular classifier. Existing morphological measurements establish behavior on their own tasks; they do not establish performance on this classification problem. The proposed transfer is a comparison between normalization choices.

Idea: Keep local sequence evidence available. Where: Feature Engineering and Discussion, Feature Engineering. Area: syntax and lexical features. Mova: частково є (token sequences, dependency trees, and indexed lexical frames). Mova already represents relationships richer than adjacency, but that does not make adjacent words irrelevant. A lightweight local feature could serve as supporting evidence where a recurring phrase is informative. Its value should be measured alongside structural features, since the paper’s result concerns its own bigram representation rather than a general argument against parsing.

Idea: Examine long-distance relationships separately. Where: Related Works, the discussion of N-gram limitations. Area: syntax. Mova: вже є (en dependency parsing and prag frame roles). Mova already uses syntactic links and semantic roles rather than relying exclusively on neighboring words. The paper’s observation that relevant words may be separated motivates testing where that existing structure helps. A suitable evaluation would compare decisions on items requiring a distant dependency with items recoverable from local phrases. No such Mova comparison is reported here.

Idea: Audit expressions shared across labels. Where: Discussion, Classwise Performance. Area: lexical semantics. Mova: частково є (dictionary occurrence frames, source strata, and reviewed selectors). The paper suggests that recurring expressions in neighboring classes weaken hate-speech recognition. Mova’s occurrence index can expose examples and contextual features without declaring a sense automatically. A proposed classification analysis could use those witnesses to inspect shared expressions, while keeping corpus frequency distinct from the meaning or acceptability of a particular utterance.

Idea: Keep a phrase’s occurrence separate from its judgment. Where: Discussion, Classwise Performance. Area: pragmatics. Mova: частково є (pragmatic frames, attribution, and world-state predicates). The paper’s lexical-overlap explanation suggests that a phrase alone may not settle its category. Mova could require additional contextual predicates before issuing a task-specific judgment. Existing attribution handling provides relevant machinery, but its presence does not establish reliable abuse analysis. The proposed use would need examples where identical wording participates in different represented situations.

Idea: Define labels before learning their predictors. Where: Introduction and Methodology. Area: annotation. Mova: частково є (source-bound annotation review, staged admission, and explicit knowledge predicates). The authors identify disagreement about hate-speech definitions as a basic difficulty. Mova could keep each task’s label definitions and disputed cases alongside its review material, instead of treating a class name as self-explanatory. Existing review gates provide a place for such evidence, but a dedicated policy for these labels is not established in the digest.

Idea: Keep annotation confidence distinct from prediction confidence. Where: Introduction and Data Collection. Area: annotation and statistics. Mova: нове. The paper combines a discussion of contested definitions with a labeled dataset, but does not quantify uncertainty in those labels. Mova could record a disputed annotation separately from uncertainty produced by a decision procedure. This would require an explicit annotation protocol. Why Mova: It would prevent the logical module from presenting disagreement in the teaching material as if it were merely hesitation in inference.

Idea: Specify multiclass metric aggregation. Where: Classifier Evaluation and Results. Area: statistics. Mova: нове. The paper gives binary precision and recall formulas but does not state how its multiclass table values are combined. A proposed Mova reporting contract could require the averaging rule, the class inventory, and the evaluation population whenever it exports an aggregate classification score. Why Mova: This would make comparisons interpretable and stop identically named metrics from concealing different evaluation procedures.

Idea: Validate confusion-matrix consistency. Where: Results, the SVM confusion-matrix discussion. Area: data validation. Mova: нове. A report generator could check that narrative counts, category totals, and recorded predictions agree before publishing an evaluation. The paper’s aggregate metrics and class-level discussion illustrate why this matters, although its inconsistencies do not establish their cause. Why Mova: Mechanical checks would catch reporting errors while preserving the underlying receipts needed to diagnose them.

Idea: Separate training from final assessment. Where: Data Splitting. Area: evaluation. Mova: вже є (held-out gates, release assessment boundaries, and exclusion of assessment labels from training). This is an existing Mova principle, and the paper uses a training–test division for its own comparison. The transfer is to maintain that boundary throughout feature preparation and candidate selection. The paper does not describe enough fitting detail to establish how every transformation respected its split.

Idea: Treat weak configurations as diagnostic evidence. Where: Results and Discussion, Machine Learning Classifier. Area: experimental analysis. Mova: вже є (self-play journals retaining positive and negative experiments). Mova already records unsuccessful proposals rather than remembering only gains. The paper’s weak nearest-neighbor and perceptron results reinforce the value of preserving unfavorable combinations with their settings and inputs. Their diagnostic use depends on reproducibility; a score without sufficient configuration evidence cannot identify which component caused the failure.

Idea: Separate empirical ranking from causal explanation. Where: Results and Discussion. Area: scientific reasoning. Mova: частково є (reason-bearing decisions, source provenance, and evidence-typed operational results). Mova already distinguishes several kinds of evidence. An experimental report could likewise mark a measured ordering separately from an explanatory hypothesis about vocabulary, sequence, or training quantity. That would prevent a plausible account of an improvement from becoming admitted knowledge merely because it accompanies a successful run.

Idea: Keep severity outside an untrained class decision. Where: Conclusion. Area: task scope. Mova: нове. The authors explicitly distinguish category prediction from assessing how severe a message is. A future Mova module should declare whether it recognizes a linguistic category, estimates severity, or recommends an action, and provide separate evidence for each capability. Why Mova: A bounded logical interface becomes easier to review when its output cannot quietly acquire a stronger operational meaning.

Idea: Combine lexical and structural evidence through a measured gate. Where: Conclusion, the proposed investigation of lexicon-based methods. Area: knowledge representation. Mova: частково є (compiled lexical knowledge, prag frames, and regression-gated extensions). Mova already combines explicit vocabulary with structural interpretation, but the paper’s proposed lexical extension remains future work. A relevant experiment could introduce reviewed lexical evidence while retaining contextual constraints and negative controls. Neither the paper nor the digest establishes that this particular combination improves hate-speech recognition.

### The problem and its context

#### Recognizing a category is harder than locating an insult

The paper addresses a practical problem in [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/): assigning a socially meaningful category to a short piece of language. The immediate setting is social media, where the authors argue that the scale of communication makes manual identification and removal of harmful material expensive and slow. They discuss policy pressure on platforms and describe an expectation that reported hate speech be removed within 24 hours. That background motivates automation, but the experiment itself concerns classification accuracy instead of the operation of a complete moderation service.

The distinction matters because a text classifier produces a label, while a moderation process must decide what to do with it. A predicted category does not on its own establish the speaker’s intent, the surrounding circumstances, the severity of harm, or an appropriate response. The authors do not build a system covering all those decisions. Their target is the narrower task of assigning tweets to the categories supplied with their dataset.

Even that task depends on definitions. The introduction recognizes that people may disagree about whether particular language qualifies as hateful. It adopts a definition concerned with promoting violence against people on the basis of protected characteristics. The experiment then relies on an existing annotation instead of developing and testing a new definition. The relationship between the conceptual definition and the individual labels is therefore important, but not examined in detail.

The neighboring offensive-language category makes the problem more demanding than detecting negative or rude wording. A message may contain an offensive expression without being assigned to hate speech. Conversely, the intended category cannot safely be reduced to whether a recognizable insulting word occurs. The paper’s later error analysis returns to exactly this issue: expressions shared between categories may encourage the classifier to favor the category in which they occur more frequently.

#### What earlier approaches supplied

The related-work discussion groups earlier systems by the evidence they extract. Dictionary-based approaches begin with an existing collection of relevant words or expressions. The paper describes studies in which dictionary information feeds a supervised classifier, as well as a study using lexical and sentiment-related evidence with rules. Their common advantage is a direct connection between selected vocabulary and the task. Their common burden, as the authors present it, is the need to build or obtain an adequate domain dictionary.

The paper contrasts this with bag-of-words representations, where the vocabulary comes from the training material. A document is represented through the words it contains instead of a pre-defined specialist list. That reduces dependence on an external dictionary, but discards the order in which words occur. The authors view this loss as potentially consequential because the same vocabulary can participate in different meanings.

[N-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) approaches retain limited sequence information. A word bigram records neighboring words together, while character sequences operate below the word level. The paper discusses earlier hate-speech and abusive-language work using both kinds of evidence. It also acknowledges the limitations of extending the sequence window: related expressions may remain far apart, and longer sequences can increase processing demands.

Another group of studies uses TF-IDF to weight textual features. The idea is to distinguish material that is informative within a document collection from material that occurs broadly across that collection. In the authors’ review, TF-IDF is used with different sequence sizes and different classifiers. This history gives the current experiment a familiar, comparatively accessible baseline instead of a newly invented representation.

The review also considers learned vector representations. It describes a German hate-speech study using Word2vec with SVM and interprets limited training evidence as a possible reason for its performance. The current paper takes up that representation family directly, comparing word-level vectors and document-level vectors against the bigram alternative.

#### Why another comparison seemed useful

The authors’ central complaint is not that earlier research lacked classifiers. It is that different studies used different feature constructions, algorithms, and datasets, making their reported performance difficult to compare. A favorable result in one setting does not settle which method would win in another setting. The paper therefore holds the dataset fixed and varies the representation and classifier.

It positions itself alongside the earlier [survey by Schmidt and Wiegand](https://md.research.elamur.ai/free/en/papers/schmidt-2017-survey-hate-speech-detection-natural/). As Abro and colleagues describe it, that survey organizes work on supervised hate-speech detection but does not run the comparative experiment they want. Their own contribution is experimental evidence across a shared collection of configurations.

The earlier results discussed in the paper should remain background rather than a leaderboard for the current experiment. They concern different languages, categories, and evaluation procedures, and some report accuracy while others report F-score or precision. The comparative study’s advantage is that its own configurations are intended to share a task and test material. It does not make the surrounding literature directly comparable by placing its results beside theirs.

This framing also explains why the result can be useful without a novel algorithm. A baseline study can reveal which established configuration deserves serious consideration, expose interactions between representation and learning procedure, and make a difficult class boundary visible. Its usefulness depends on how clearly the shared experiment is specified and how carefully its aggregate results are interpreted.

### The method, step by step

#### From labeled tweets to evaluated predictions

The study follows a conventional supervised-learning pipeline. “Supervised” means that the training examples already carry the category that the learner is expected to predict. The algorithm receives numerical descriptions of those examples and attempts to learn a decision procedure that also works on unseen tweets.

The authors organize the process around collecting data, cleaning text, creating features, dividing examples, fitting classifiers, and evaluating predictions. Those stages are conceptually distinct even though choices in an early stage affect everything downstream. Removing a word changes the features; changing the features changes the information available to the classifier; changing the split changes which evidence is available during learning.

From labeled tweets to comparative evaluation The steps in order.

The experimental object is a pipeline, not merely a classifier name. “SVM with bigrams” refers to decisions made after the authors’ particular cleaning and representation procedure. Another implementation using the same classifier family but different vocabulary construction or normalization would not automatically reproduce the reported result.

#### Collecting the labeled material

The dataset is publicly available and is described as compiled and labeled by CrowdFlower. It contains 14,509 tweets. The paper reports 16% in the hate-speech category, 50% as non-offensive, and 33% as offensive without being hate speech. These are the stated percentages; the study does not provide a detailed explanation of their precision or rounding.

The methodological importance of that distribution is that the labels are unevenly represented. A learner has more examples of some categories than of others, and a metric counting all correct decisions can be strongly influenced by the larger categories. The paper later invokes the comparatively limited hate-speech training material when discussing errors.

The account does not provide a full annotation protocol. It does not explain how annotators were instructed to handle difficult boundaries, how disagreements were resolved, or how consistent the labeling was. Consequently, the method can be described as learning from the supplied labels, but not as independently establishing that every label follows a fully documented, uniformly applied definition.

#### Cleaning and normalization

The tweets are first lower-cased. This merges distinctions based on capitalization before numerical features are constructed. Such merging can reduce variation between otherwise similar forms, but it also means that capitalization cannot subsequently serve as evidence unless retained elsewhere. The paper does not report a separate experiment measuring that tradeoff.

The authors then remove URLs, user references, hashtags, punctuation, stop words, and whitespace material using pattern-based processing. Stop words are words selected for exclusion because they are treated as insufficiently informative for the task. The exact list is not given. Similarly, the description does not establish whether removing a hashtag deletes only its marker or its entire associated expression.

The cleaned tweets are tokenized, meaning divided into units treated as words. They are then processed with the Porter stemmer. [Stemming](https://md.research.elamur.ai/free/en/concepts/stemming/) reduces surface variation through form-based rules; in the paper’s example, “offended” becomes “offend.” This allows related surface forms to share evidence in the classifier input.

That sequence should not be mistaken for a neutral preparatory step. If function words are deleted before bigrams are extracted, neighboring retained tokens need not have been neighbors in the original tweet. If punctuation is removed, distinctions marked by punctuation disappear. The study does not specify enough procedural detail to reconstruct every resulting sequence, and it does not compare the cleaning pipeline against a version retaining those cues.

#### Representing the text numerically

The classifiers require numerical inputs. Feature engineering supplies the bridge between a tweet and a numerical object on which a learning algorithm can operate. The experiment constructs alternative representations instead of assuming a single numerical description is adequate.

The first uses word bigrams with [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/). A bigram joins neighboring words into a feature. This preserves a small amount of local order that an unordered vocabulary representation would lose. TF-IDF then weights features using their occurrence within a document and their distribution across the collection.

The paper explains this weighting conceptually but does not present a precise TF-IDF equation or specify an implementation variant. It does not give a vocabulary threshold, a feature limit, or a normalization rule. The method therefore establishes the representation family without defining every calculation needed for exact replication.

The second representation uses [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) through Word2vec. These are numerical descriptions intended to capture relationships among words learned from textual evidence. The paper cites [Mikolov and colleagues’ work on distributed representations](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/) as its reference for this approach.

An important missing detail is how the word vectors become a tweet-level input. A classifier needs a representation for the whole example, but the paper does not explain its aggregation procedure. It also does not report the vector dimensionality, training objective, vocabulary threshold, or whether the vectors were initialized from another collection.

The final representation is Doc2vec, described as learning a fixed-size numerical representation for a document. Here the document is a tweet. Its purpose is to provide a whole-example representation instead of deriving the classifier input solely from explicit word sequences. Again, the paper does not specify the configuration deeply enough to reconstruct the representation training.

The distinction between these alternatives is therefore clear at a high level: locally ordered lexical features are compared with learned word and document vectors. Their exact implementations remain less clear. This matters when interpreting why a representation performed poorly, because weak results can arise from insufficient evidence, unsuitable settings, or an ineffective interface between representation and classifier.

#### Dividing the data

The study uses an 80-20 split: 80% of the examples are assigned to training and 20% to testing. Training data supports fitting the predictive procedure. Test data is reserved for checking its decisions after fitting.

The authors present this as a common division for the comparative experiment, but do not describe repeated splits, a random seed, or a stratification procedure. Stratification would concern preserving category proportions across subsets; the paper does not state whether it was used. The numerical cells of the classwise split table do not supply a complete recoverable account of the training allocation.

The account also does not say whether every representation was fitted exclusively using training text. That is a reporting uncertainty, not evidence that test information was used improperly. Vocabulary selection, document-frequency estimation, and representation training all need an explicit boundary if a future reproduction is to demonstrate a strictly held-out evaluation.

#### Applying the classifiers

The experiment uses eight classifier families. Naïve Bayes makes probabilistic predictions under a conditional-independence assumption about its features. Logistic regression learns a decision relationship from numerical inputs. The paper includes both as established alternatives rather than proposing modifications to either.

SVM seeks a separating decision boundary, with the discussion emphasizing margins and the possibility of kernel-based decisions. Nearest-neighbor classification assigns a new example using similarity to available examples. These procedures consume the same kind of task label but make different assumptions about how numerical similarity or separation should determine a category.

Decision trees express classification through branching conditions. Random forests combine decisions from multiple trees. AdaBoost combines weak learners through an adaptive procedure, while the multilayer perceptron uses a feedforward neural architecture.

The paper does not provide the kernel, regularization settings, neighbor count, tree constraints, boosting configuration, or perceptron architecture. These omissions limit how precisely the experiment can be reproduced and how strongly the results can be generalized to each algorithm family. A named family contains many possible configurations.

#### Defining the evaluation quantities

The paper introduces true positives, false positives, false negatives, and true negatives. For a particular category, a true positive is an example correctly assigned to that category. A false positive receives that category incorrectly, while a false negative belongs to it but receives another prediction. A true negative belongs elsewhere and is not assigned to the category.

Precision asks how reliable positive predictions are.

```
Precision = TP / (TP + FP)
```

TP denotes true positives, and FP denotes false positives. The denominator counts the examples predicted positive. Precision is high when a large share of those predictions is correct.

Recall asks how much of the actual positive category the classifier recovers.

```
Recall = TP / (TP + FN)
```

TP again denotes true positives. FN denotes false negatives. The denominator counts actual positive examples, including those missed by the classifier.

F-measure combines precision and recall through their harmonic mean.

```
F-measure = 2 × (precision × recall) / (precision + recall)
```

Here precision and recall are the quantities just defined. The paper uses the standard F1 interpretation, giving them equal importance. This measure discourages treating strong precision as sufficient when recall is weak, or strong recall as sufficient when many positive predictions are wrong.

Accuracy is described as the share of examples classified correctly. The paper refers to an additional equation for it, but does not supply a usable displayed expression in its methodological account. More importantly for the reported experiment, it does not explain how the precision, recall, and F-measure values are aggregated across the categories.

That missing aggregation rule affects interpretation. A category-specific score and an average over categories answer different questions. An average that gives every example equal influence also differs from one that gives every category equal influence. The tables cannot be assigned one of these meanings confidently without further specification.

### Experiments and results

#### What the comparison covers

The experiment crosses the representations with the classifiers, yielding 24 combinations. Its strongest internal comparison is therefore among configurations evaluated on the same described task. There is no separately reported external test collection, platform-transfer experiment, or temporal evaluation.

The results appear in tables for precision, recall, F-measure, and accuracy. Accuracy is written as a proportion in the tables, while the surrounding prose also expresses the best result as 79%. The charts below preserve the table values and identify their metric as a proportion.

For the bigram representation, SVM leads on accuracy. AdaBoost follows closely, while logistic regression and random forest have the same reported value. The remaining configurations show that supplying the same lexical representation does not make classifier choice inconsequential.

Classifier accuracy with TF-IDF bigrams on the tweet test set SVM gives the strongest reported accuracy for the bigram representation.

**The numbers**

| System or setting | accuracy proportion |
| --- | --- |
| Logistic regression | 0.75 |
| Naïve Bayes | 0.73 |
| Random forest | 0.75 |
| SVM (this paper) | 0.79 |
| KNN | 0.57 |
| Decision tree | 0.73 |
| AdaBoost | 0.78 |
| Multilayer perceptron | 0.70 |

This ordering supports selecting the SVM configuration as the study’s aggregate winner. It does not show whether the ordering would persist under other splits or tuned settings, because the paper reports neither repeated-run uncertainty nor a detailed tuning procedure.

#### Holding the classifier fixed

Looking only at SVM makes the representation comparison easier to follow. The bigram configuration has the highest accuracy, while the Word2vec and Doc2vec alternatives are lower. This is the clearest direct evidence for the paper’s headline representation claim.

SVM accuracy across representations on the tweet test set TF-IDF bigrams outperform the evaluated vector representations when paired with SVM.

**The numbers**

| System or setting | accuracy proportion |
| --- | --- |
| TF-IDF bigrams (this paper) | 0.79 |
| Word2vec | 0.73 |
| Doc2vec | 0.72 |

The paper interprets this result in part through local order. A bigram records neighboring words together, whereas the other representations are not documented as preserving those explicit pairs in their classifier input. That is a possible explanation for the observed ordering, but the experiment does not independently isolate order preservation.

The tables also make clear that the representation ranking is not identical for every classifier. The perceptron obtains accuracy of 0.70 with bigrams and 0.71 with each vector alternative. The nearest-neighbor classifier also does better with the vector alternatives on several reported metrics. As a consequence, “bigrams win” describes the strongest configuration and a broad pattern, instead of an invariant ordering across the entire experiment.

The reported bigram SVM scores are precision 0.77, recall 0.79, and F-measure 0.77. For Word2vec with SVM, precision and F-measure are both 0.70, while recall is 0.73. For Doc2vec with SVM, precision is 0.70, recall is 0.72, and F-measure is 0.72. These values reinforce the aggregate ordering without clarifying how the multiclass measurements were averaged.

#### A representation can help one classifier and hurt another

The nearest-neighbor results are especially useful for resisting an overly simple conclusion. Its bigram F-measure is the lowest reported F-measure in the experiment, but its vector-based results are stronger.

KNN F-measure across representations on the tweet test set The nearest-neighbor classifier works better with the evaluated vector representations than with bigrams.

**The numbers**

| System or setting | F-measure |
| --- | --- |
| TF-IDF bigrams | 0.47 |
| Word2vec | 0.61 |
| Doc2vec (this paper) | 0.65 |

The star marks the strongest setting in this comparison. This chart does not overturn the overall winner; it shows that a representation’s usefulness depends on the classifier consuming it. The paper’s own experimental grid contains evidence for that interaction.

The precision table places the bigram perceptron at 0.58, while bigram KNN has precision 0.61. Their weaknesses are therefore not identical. The lowest reported precision, recall, and F-measure do not all belong to a single configuration, even though the narrative groups the poorest results together.

AdaBoost also illustrates why metric choice matters. With bigrams it has precision 0.75, recall 0.78, and F-measure 0.73. Random forest has precision 0.73, recall 0.75, and F-measure 0.74. AdaBoost therefore ranks higher on accuracy and recall, but the forest has the higher reported F-measure. A single ordering cannot represent every evaluation objective.

#### What the class-level counts reveal

The SVM confusion-matrix discussion is more consequential than the small distinctions among aggregate scores. For hate speech, the authors report 490 test examples. Only 155 receive the correct label. They describe 335 incorrect assignments, with 54 sent to the non-offensive category and 281 sent to the offensive-language category.

The destination of these errors matters. The largest described confusion is not between hate speech and ordinary language; it is between hate speech and the neighboring offensive category. The system often recognizes that the language belongs near the harmful end of the label inventory without resolving the distinction the task requires.

For the non-offensive category, the paper reports 1459 examples and 1427 correct predictions. It assigns the remaining errors to hate speech and offensive language, reporting 5 and 27 respectively. This comparatively strong recognition contributes substantially to the favorable overall impression.

For offensive language outside hate speech, the discussion gives 953 examples and 698 correct predictions. It reports 122 assignments to hate speech and 133 to the non-offensive category. The surrounding text identifies 2902 test instances overall, but its category totals and row-level descriptions contain numerical inconsistencies. Those values should not be silently repaired or used to reconstruct a supposedly exact confusion matrix.

The authors also present an AdaBoost confusion matrix and state that its overall behavior is weaker than the SVM’s, while it performs well on offensive language. The numerical matrix entries are not supplied in the accompanying discussion with the same detail. The defensible comparison therefore relies on the aggregate table and the authors’ qualitative account, rather than invented classwise values.

### What the ablations show

The paper contains a crossed representation–classifier comparison and a class-level error discussion, but no ablation study that removes individual preprocessing steps or isolates the proposed causes of the results.

#### What changing the representation establishes

Holding SVM fixed while changing its input representation establishes an empirical ranking for those evaluated pipelines. It supports the claim that the particular bigram configuration works better than the particular Word2vec and Doc2vec configurations on the reported test data. It does not determine which property of the representation caused the advantage.

Several things change together. Explicit bigram features differ from learned vectors in vocabulary treatment, feature geometry, training requirements, and the information exposed to the classifier. The paper does not provide a control that changes local word order while leaving those other properties unchanged. Its explanation about sequence information should therefore be read as an interpretation.

The same caution applies to vocabulary coverage. The authors suggest that Word2vec struggles with unfamiliar Twitter words, but report no coverage audit and no experiment that repairs those words while preserving the remaining setup. The results are compatible with a coverage problem; they do not measure its contribution independently.

#### What changing the classifier establishes

Holding the bigram representation fixed shows that the learning procedure matters. SVM, AdaBoost, and random forest produce different results even when they are described as receiving the same feature family. This is useful evidence against choosing a classifier solely from its general reputation.

However, the classifier comparison does not isolate algorithm family from configuration quality. Without a documented tuning procedure, an unfavorable result could reflect a poor choice of settings as well as a poor fit between the method and the data. The paper’s broad rejection of nearest-neighbor classification for this application consequently goes beyond what its specific experiment can establish.

The discussion offers general explanations for the relative performance of probabilistic classifiers, trees, and the perceptron. These explanations draw on their characteristic behavior, but the experiment does not test them directly. It does not vary feature dependence for Naïve Bayes, threshold choices for trees, or training quantity for the perceptron while controlling the remaining factors.

#### What the error analysis adds

The class-level analysis identifies a concrete weakness that aggregate scores obscure. Hate speech is often mapped to offensive language. That observation narrows the next research question: why does the classifier fail at this particular boundary?

The authors suggest that expressions occurring in both categories may be more frequent in the offensive category. Their examples illustrate a plausible mechanism in which a lexical feature becomes associated with the more common surrounding label. Yet they do not report a systematic feature-frequency analysis or an intervention that changes those associations.

Similarly, the category distribution makes limited hate-speech training material a reasonable concern. But label imbalance and lexical overlap are not separated experimentally. Rebalancing the training set, gathering additional hate-speech examples, or comparing context-sensitive features would each address a different hypothesis. None is reported as a completed controlled comparison.

#### What remains untested

The preprocessing choices are bundled. There is no comparison retaining stop words, preserving punctuation, keeping user references, or replacing stemming with another normalization. Accordingly, the study cannot establish that each cleaning operation helps.

There is also no reported learning curve to substantiate the explanation that the vector representations need more data, and no length-controlled experiment to substantiate the explanation about short tweets. These are useful directions for follow-up work because they turn broad speculation into testable questions. They should not be presented as findings already demonstrated by the comparison.

### Limitations

#### Limits the authors acknowledge

The authors explicitly identify inadequate predictive performance for real-time use. Their wording concerns real-time prediction accuracy, but the experiment does not include a latency benchmark or a deployed evaluation. It would therefore be incorrect to turn this admission into a measured claim about processing speed.

They also state that the system does not assess severity. A category decision distinguishes kinds of messages, but does not say how serious a particular case is. Their proposed future direction includes predicting severity as an additional capability. That proposal is separate from the classifier comparison they actually conduct.

The conclusion also proposes investigating lexical approaches and collecting more examples. These are plans, not results. The paper does not show that either change improves its system, nor does it establish how a lexical component would interact with the existing bigram features.

#### Limits visible in the experimental design

A careful reader sees a narrower evidence base than the general language of automatic hate-speech detection might suggest. The study uses a tweet collection with a particular label inventory. It does not test transfer to another platform, longer documents, another language, or a later period of communication.

The use of a single described split also limits confidence in the ranking. The paper does not report repeated runs, variability across splits, confidence intervals, or a statistical test of competing configurations. This does not make the observed scores meaningless, but it prevents a strong claim that a close ordering is stable.

Implementation details are insufficient for exact reproduction. The missing information covers both representations and classifiers: how embeddings were trained, how word vectors became tweet vectors, how the vocabulary was selected, and how learning settings were chosen. A result attributed to an algorithm family may depend strongly on those unreported choices.

The dataset description leaves another uncertainty. CrowdFlower supplies the labels, but the paper does not explain annotation agreement, adjudication, or difficult cases. Because the introduction itself emphasizes contested definitions, the absence of a detailed connection between the definition and annotation procedure matters. Classification performance measures agreement with those labels, not an independently demonstrated universal boundary.

#### Aggregate metrics have an unspecified meaning

The paper introduces precision and recall with formulas for a positive category, then reports a value for each multiclass configuration. It does not say how the categories are combined. That missing definition prevents a reader from confidently interpreting the table as a macro-average, a weighted average, or another aggregation.

The recall and accuracy tables contain the same reported values across the configurations. Such agreement does not on its own establish an error, because metric relationships depend on the evaluation procedure. However, without the averaging rule, the reader cannot explain the agreement from the method.

The reported F-measures should likewise not be reconstructed from the aggregate precision and recall values. Averaging class-level quantities and calculating a combined quantity from already averaged inputs are different operations. The paper does not provide enough detail to select the correct reconstruction.

More generally, a favorable overall metric is a limited answer to the practical question. The paper’s hate-speech counts show that the category at the center of the research remains difficult. Any assessment of usefulness should therefore retain class-level performance rather than treating the headline accuracy as sufficient.

#### Some numerical and narrative claims conflict

The conclusion emphasizes SVM and random forest over the remaining classifiers. The accuracy table, however, places AdaBoost above random forest for the bigram representation, and the discussion also highlights AdaBoost. The conclusion’s broad ranking should not replace the more specific evidence in the tables.

There are also inconsistencies in the confusion-matrix narrative. The stated category counts do not align cleanly with the overall test-set account, and the offensive-language row description is not internally consistent. These problems do not establish that every reported result is wrong, but they prevent exact reconstruction from that discussion.

The appropriate response is to preserve the reported values and identify their limits. Quietly correcting a count would introduce an unsupported result. Treating every printed count as jointly consistent would conceal a real reporting problem.

The absence of a clear implementation identifier or sufficiently detailed experimental recipe compounds this uncertainty. The paper offers a useful comparative pattern, but not a fully auditable record from which every decision and metric can be regenerated.

#### The proposed explanations remain hypotheses

The discussion attributes weak Word2vec performance to unfamiliar vocabulary and limited data. It attributes Doc2vec difficulties to short documents. It also explains classifier differences through their general learning characteristics. These are the authors’ suggested mechanisms, not separately measured effects.

The same distinction applies to claims about SVM handling nonlinear data. The paper does not state which kernel was used. The general availability of nonlinear kernels cannot establish that a nonlinear decision boundary explains this experiment’s result.

For [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/), bigram features offer an accessible representation, but accessibility is not a complete explanation of a prediction. The paper does not present a systematic audit of the decisive features, their weights, or their behavior on carefully matched examples. A reader can understand the feature family without knowing why each tweet received its label.

Finally, the experiment does not evaluate disparities among protected groups or quantify the consequences of different error types. Those questions are relevant to [bias, fairness, and safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/), but they require evidence beyond overall classification scores. The paper’s results do not establish that the system is suitable for autonomous moderation or that its errors would be acceptable in a particular operational setting.

### What came after

The paper ends with research directions rather than a demonstrated successor: improve predictive performance, investigate lexical evidence, collect more training examples, and extend the task towards severity assessment. Each direction responds to a weakness visible in the study, but none is validated by a later experiment reported in the paper.

No documented later citing study is available to establish how subsequent researchers developed these ideas. It would therefore be unwarranted to attach a later system, result, or methodological improvement to this work. The identifiable contribution remains the comparative experiment itself: a shared evaluation in which TF-IDF bigrams with SVM achieve the strongest aggregate result, accompanied by class-level evidence that the central hate-speech boundary remains unresolved.

## Cite

Cite as Sindhu Abro, Sarang Shaikh, Zahid Hussain, Zafar Ali, Sajid Ullah Khan and Ghulam Mujtaba. 2020. Automatic Hate Speech Detection using Machine Learning: A Comparative Study. International Journal of Advanced Computer Science and Applications.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.14569/ijacsa.2020.0110861](https://doi.org/10.14569/ijacsa.2020.0110861)

```bibtex
@article{abro2020automatic,
  title = {{Automatic Hate Speech Detection using Machine Learning: A Comparative Study}},
  author = {Sindhu Abro, Sarang Shaikh, Zahid Hussain, Zafar Ali, Sajid Ullah Khan and Ghulam Mujtaba},
  journal = {International Journal of Advanced Computer Science and Applications},
  year = {2020},
  doi = {10.14569/ijacsa.2020.0110861},
  url = {https://doi.org/10.14569/ijacsa.2020.0110861}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
