Hate Speech Detection on Vietnamese Social Media Text using the Bidirectional-LSTM Model
Paper · 2019 · Hang Thi-Thuy, Huy Duc Huynh, Kiet Van Nguyen et al.
Summary
A social media comment can be offensive without expressing hatred, and a message can promote hatred without using profanity. An automated system that reads Vietnamese posts and comments has to draw that distinction while recognizing ordinary conversation. The authors study this problem in the VLSP 2019 shared task. They treat it as text classification, assigning each item one of the task’s labels: CLEAN, OFFENSIVE, or HATE. The labels separate everyday expression from offensive language and from hostility aimed at people or groups because of their characteristics.
The authors clean the comments and turn each one into a sequence of token identifiers. They use pretrained word embeddings, which represent words as vectors of numbers, to supply the sequence with an initial representation. Their strongest system uses FastText vectors and a bidirectional long short-term memory network, or Bi-LSTM. That network reads the sequence in both directions, so its representation at a given position can draw on wording that comes before and after it. The authors compare the approach with a support vector machine, logistic regression, and a gated recurrent unit network. They also compare pretrained embeddings within the Bi-LSTM itself.
The Bi-LSTM with FastText earned an F1-score of 71.43% on the public test leaderboard and placed 2nd. The submission placed 6th on the private leaderboard. In the experiments drawn from the labeled training collection, the FastText configuration had higher reported recall and F1 than the alternative embedding configuration, which had higher precision. The label distribution makes that difference worth examining. CLEAN accounts for 91.49% of the supplied training items, while HATE accounts for 3.49%. The study identifies the strongest submission among the authors’ trials and shows how the choice of word representation changes the reported results. The aggregate scores leave open how well the system distinguished HATE from OFFENSIVE in particular.
Deep dive: Hate Speech Detection on Vietnamese Social Media Text using the Bidirectional-LSTM Model
How a bidirectional LSTM with FastText classifies Vietnamese social media comments and what its VLSP results reveal about detecting hate speech. · about 31 minutes to read
The problem and its context
How the labels define the task
The paper starts from a practical problem with social networking. People can communicate and share their views easily, and the same channels can carry insults and expressions of hatred. The authors connect the visibility of such material with the ease of commenting and the anonymity available to some users. They regard individual review and removal of abusive comments as time-consuming. An automated prediction could help identify material for attention. The work itself evaluates the assignment of labels to text, so the experimental outcome is a score for that prediction task.
The shared task gives the authors a concrete definition of what to detect. Its classes belong to a single decision about an item, whether that item is a post or a comment. That design matters because different readers might use the everyday term hate speech to cover a wide range of hostile language. The classification task gives the term a more specific role. During evaluation, the question is how well predicted labels agree with the labels used by the organizers. The linguistic annotation determines what correct classification means.
The paper defines HATE as a message that singles out people or groups because of their characteristics and displays an intent to promote harm or hatred. Profanity is optional. This creates a distinction between recognizing a word and interpreting what a message does. The presence of an insult can help establish that some wording is abusive. Evidence about whom the message targets and what the speaker encourages may be expressed elsewhere in the item. The task’s definition therefore gives a classifier a reason to consider surrounding words.
OFFENSIVE covers items that may use objectionable language but lack the characteristic-based targeting described for HATE. CLEAN covers ordinary conversation and ordinary expressions of feeling without offensive or hateful content. A detector that assigns labels from a vocabulary of objectionable terms would have difficulty with both boundaries. It could confuse the uses of an offensive term across hostile messages, and it could miss hostility expressed in otherwise ordinary language. Those are consequences of the task definition. The paper does not give individual examples tracing either kind of error through the authors’ system.
The input and the output also operate at different levels. A word or phrase can give evidence about the category, but the prediction concerns the whole item. Knowing where an insult occurs would not itself settle the label. Likewise, the classification can agree with a reference label without identifying the exact words that persuaded the system. The shared task provides a way to score the item decision. Questions about which phrase is decisive, or whether a system can identify that phrase, would require evidence at a finer level.
Where the authors’ approach fits
In discussing Vietnamese text analysis, the authors describe earlier approaches that require people to choose features. They mention conditional random fields, hidden Markov models, and maximum entropy methods in connection with extracting information and labeling strings. The point of the comparison is the effort involved in deciding which properties of text a system receives. The authors turn to deep neural methods so a classifier can learn useful representations from its inputs. Their own design still involves choices about cleaning the text, identifying tokens, and selecting pretrained vectors. The learned part begins with the representation those choices make available.
The related work also gives examples of how researchers had framed abuse detection. Davidson and colleagues distinguished hate speech, offensive language alone, and material in neither category. This is the closest parallel in the discussion to the division of labels used for Vietnamese posts and comments. Qian and colleagues studied tweets under a different division, asking whether a tweet was racist, sexist, or neither. Taken as descriptions of tasks, these examples show how the choice of categories determines what a detector must separate. Broadly similar research aims can lead to different prediction problems.
Gao and Huang used a bidirectional recurrent network with attention. The paper recounts their hypothesis that signals of hatred can cluster in a short passage, especially when the comment is long. That suggests a possible role for attention, a mechanism intended to emphasize selected parts of an input. The Vietnamese study draws on the precedent of bidirectional recurrence. Its method description establishes that the sequence is read in both directions and leaves the question of attention in its own implementation unspecified.
The authors also discuss a SemEval entry that tried bidirectional recurrent classifiers with and without attention, alongside logistic regression. The SemEval task addressed multilingual detection of hostility towards immigrants and women on Twitter. In the Vietnamese paper, that work serves as an example of recurrent and feature-based methods being considered for the same detection problem. The difference in the targets described for the two tasks is a reason to keep their evaluation questions distinct. The earlier study serves as background for choosing systems to try.
The remaining examples emphasize different comparisons. Koratana and Hu evaluated several approaches to toxic language and found a bidirectional LSTM strongest in their study, according to the authors’ account. Malmasi and Zampieri compared features for detecting hate speech. The first example motivates testing a sequence architecture, and the second motivates paying attention to what a classifier sees. Both considerations enter the Vietnamese design. The authors try multiple ways of classifying text and vary the pretrained representation within their preferred recurrent architecture.
These precedents lead to an empirical question about the Vietnamese shared task. The label definitions suggest why context could help. Prior research supplies reasons to consider recurrent processing and also to retain conventional classifiers as points of comparison. How much the architecture or the input representation helps has to be judged on the Vietnamese data. In this paper, that judgment is made through experiments within the labeled collection and through submissions evaluated by the task organizers.
The method, step by step
From a social media item to a sequence
The recurrent route begins with the text of an item. The authors normalize it, convert it into token identifiers, and associate tokens with pretrained vectors. The bidirectional network then processes the vector sequence from each end. Training uses items with known categories, and the resulting classifier assigns a category to an unlabeled item. The paper describes these stages in words and gives an architecture illustration. It presents no mathematical equations for the recurrent updates, the prediction rule, or the training objective.
From Vietnamese comment text to a Bi-LSTM prediction
The steps in order.
The first change is to lower-case the comment. When forms differ only in capitalization, this step makes them identical at the input to subsequent processing. It is a choice about what counts as the same visible form for the classifier. For a system that works from repeated token identities, collapsing such variants affects which tokens share a representation. The paper specifies this operation for the comments and gives no separate analysis of the evidence capitalization might contain.
The authors remove URLs and mentions written with an at sign. They also describe removing nonalphabetic material, with numbers and surplus spaces among the examples, and replacing a few characters with an empty string. This reduces the material passed to the token conversion stage. The resulting sequence may describe the words surrounding a mention, for example, while omitting the mention itself. The task’s definition of HATE concerns targets, but the system description offers no separate input field that preserves an account identifier after it has been removed from the text.
The treatment of stopwords is selective. A stopword is a word that a preprocessing routine chooses to discard, commonly because the routine treats it as unlikely to help with the target task. The authors say that some such words affect results, so they retain part of the set. This distinction matters in a sequence method. Removing a word can change both which evidence remains and which words become neighbors in the sequence that the network receives. The paper gives the reason for keeping some stopwords but does not identify the list of retained or discarded forms.
After cleaning, a tool called Tokenizer converts each comment to a series of integers. In tokenization, a token is a unit the system treats as an input element. The integer stands for its identity. Its size does not say anything about the token’s offensiveness or its relationship to surrounding words. It gives the system a way to refer to that token, and the resulting list retains the order in which the tool found the elements of the comment.
This operation is important for reading the rest of the method. A sequence of integers and a sequence of vectors are separate representations of the same processed item. The integers identify the tokens. The vectors supply the numeric features that the recurrent layers operate on. When the authors change pretrained embeddings, they change this second representation. The paper identifies the token conversion tool but leaves the precise segmentation convention, vocabulary construction, and handling of unknown tokens unspecified.
The preprocessing description is shared at the level of the paper’s procedure, while the feature representation varies by classifier. For the recurrent methods, sequence order is part of what they can use. In the logistic regression experiment, the paper explicitly describes a different vectorization step using the item’s text. The named operations give the reader a route through the proposed system. They do not establish that every baseline received an identical processed vocabulary or that all classifiers retained the same information.
What pretrained vectors supply
A word embedding represents an input unit by a vector, a list of numerical values that the classifier can use as features. The authors use pretrained entries, meaning the vectors are available before the supervised task of predicting CLEAN, OFFENSIVE, and HATE. In the sequence pipeline, the embedding matrix acts as a store of such representations. Looking up a token replaces the identifier with the values associated with it. Instead of reading an arbitrary integer as though it carried a magnitude, the recurrent network sees a vector intended to represent the word.
The paper compares FastText with a Vietnamese Word2Vec resource named baomoi.vn.model.txt. It describes a preference for large pretrained vectors but supplies no exact dimensional setting. It also mentions GloVe in the description of applying the sequential classifier. The scored embedding comparisons are explicitly attached to FastText and the named Word2Vec file. The GloVe mention has no clearly identified result attached to it, and the description leaves its role in the scored configurations unclear.
The choice of vector resource can change what the network receives even when the cleaned input is the same. If both resources have an entry for a token, they can represent it with differently organized values. If either lacks an entry, the classifier’s input will also depend on how missing entries are handled. The authors do not report coverage or the fallback behavior. Their experiment evaluates the configurations as used. It does not characterize the vectors token by token or show which properties of the resources matter most.
Pretraining and supervised learning contribute at different points. The vectors provide word representations before the task labels are used. The classifier learns how information in a sequence of those representations relates to the shared task categories. The paper does not specify whether the task training updates the embeddings or leaves them fixed. Either procedure would still begin from a pretrained resource. The distinction would matter for a reproduction because it determines which parameters can adapt to the labeled items.
The authors describe the chosen network as benefiting from the use of a word embedding matrix. Their results compare different sources of pretrained vectors. Those experiments can inform a choice between the reported resources for that network. A separate comparison with a randomly initialized representation or another starting point would address the contribution of pretraining itself. Such a comparison is absent from the paper.
How the network uses order and context
The authors introduce the LSTM through the idea of memory over a sequence. A recurrent network processes successive positions, carrying an internal state along the way. Its state at a position depends on what it receives there and the state passed to it from the preceding operation. For an ordinary forward recurrence, this gives later positions access to information accumulated from earlier words. In a comment, the information that survives can help the network interpret a word using what has already appeared.
Long short-term memory adds a cell and gates that control access to the information it carries. A gate regulates what can be written, retained, read, or reset. The ordinary sense of a gate is enough to understand the motivation. Some earlier evidence may continue to matter after several more words have been read, while other information can be displaced or suppressed. The architecture gives the classifier a learned way to manage that state. The paper describes these operations qualitatively, without specifying a gate equation or parameter setting.
In a forward LSTM, the state at a word has no information from words that have yet to be processed. This creates an asymmetry in how the network represents an individual position. The model can use the earlier part of a comment when representing a late word, but the state assigned to an early word by that forward pass has only early information. The authors motivate bidirectionality by pointing out that the surrounding context can matter on either side of a word.
A Bi-LSTM uses a separate recurrence in the reverse direction. That recurrence starts at the end of the input and moves towards the beginning. From its perspective, the already processed words are those that follow the current position in the original comment. At an interior position, the two passes have approached the word from opposite sides. A representation that draws on both directions can therefore use evidence from earlier and later wording when the system predicts a category.
In this setting the entire item is available at the time it is classified. Reading backward through an existing comment uses words that are already part of the input. The paper’s reference to previous and subsequent context concerns positions within that text. It does not describe a system that reads later replies, looks up the author’s earlier posts, or anticipates a message that has yet to appear. The sequence whose context is available is the tokenized item.
The label definitions help explain why this might be useful. A negative expression can be followed by words identifying a target or by language indicating what the speaker wants others to do. Earlier wording can also establish a target that a later phrase refers to. Bidirectional processing can make both kinds of information available within the comment representation. That is a way to understand the design. The paper gives no item-level analysis showing a particular label change that can be attributed to either direction.
The eventual output is a label for the whole text. The paper does not specify how the directional states or representations of individual positions are combined for that decision. The framework description also refers to an ensemble of Bi-LSTMs. An ensemble would combine outputs or other information from several classifiers. The paper leaves the components, the combination rule, and the relationship between that description and the named FastText submission unspecified. The sequence route can thus be described with much greater confidence than the exact configuration of the final decision stage.
How the authors train and compare approaches
The work uses labeled examples from the VLSP shared task as supervision. In supervised machine learning, the supplied labels are the targets the system is trained to predict. The authors describe an internal split of the labeled collection with 80% for training and 20% for testing. That arrangement makes it possible to assess a classifier on a portion of labeled material after fitting it on another portion. The paper refers to the resulting scores as being obtained on the training dataset, which is the name of the official collection from which both portions are drawn.
The public evaluation serves a different role. The organizers supply test text without labels, and the authors submit predictions for scoring. Their own labeled data therefore supply the examples for learning and the basis of the internal comparison, while the public leaderboard supplies a result for their predictions on the organizer’s test. The private leaderboard supplies a further ranking. The paper does not detail the sequence of decisions about settings across all of these stages, so the documented comparisons and the submitted results each have to be read in their stated context.
The support vector machine is described as a pairwise procedure. The authors first compare labels indexed as 0 and 1, then labels indexed as 1 and 2. Each of those subproblems asks the classifier to distinguish between the examples in the pair. The paper reports separate metrics for the two decisions and a later result for the submitted system. It does not map the numeric indices to the named categories or say how the binary decisions produce a final label when the whole task is scored. It also leaves the feature representation for this baseline unspecified.
Logistic regression receives feature vectors produced by TfidfVectorizer. TF-IDF stands for term frequency and inverse document frequency. In an item-level representation it combines evidence about how often a term occurs in the item with evidence about how widespread it is across the collection. The resulting vector describes the item through term features. Logistic regression uses the supervised examples to learn how those features support the discrete labels. The paper identifies the vectorizer but leaves details such as the feature inventory and settings open.
The gated recurrent unit, or GRU, represents another way of carrying information along a sequence. The experiment uses Tokenizer to prepare the input and FastText to represent its tokens. This gives the GRU and the preferred Bi-LSTM a recognizable common element in their word vector resource. Their scores can be compared as implemented classifiers. The description does not supply the architectural settings or training controls needed to attribute any score difference specifically to their memory mechanisms or to the direction of processing.
Experiments and results
The data and what the metrics measure
The official VLSP 2019 collection for hate speech detection on social networks has 25,431 items in CSV format. Its labeled training file contains 20,345 items, and its unlabeled test file contains 5086. The training items carry one of the three categories. The test file is supplied without those labels, so the authors obtain a result for it through the shared task evaluation. The paper does not specify how the public and private portions relate to the item count given for the official test file.
In the labeled training collection, CLEAN represents 91.49% of the items, and HATE represents 3.49%. These figures describe label prevalence, meaning how common each category is among the supplied training examples. They establish that the observed distribution is heavily weighted towards ordinary material. The paper draws attention to the difficulty that this creates for learning a classifier. A small category can contribute little to an overall count of correct answers even if it is central to the purpose of the task.
The authors report accuracy, precision, recall, and F1 for their internal experiments. Accuracy measures how often the prediction matches the reference label across the evaluated items. Precision for a class asks how many predictions of that class are correct. Recall for the same class asks how many items belonging to it are recovered. F1 combines precision and recall through a harmonic mean, which gives the lower of the two measures substantial influence. These are different questions about the same predictions.
For multiple classes, precision, recall, and F1 can be summarized using different averaging rules. The paper does not specify the rule used for the aggregate internal metrics or identify the public F1 averaging convention. A reader can use the reported results to compare entries on a named metric. The tables of scores cannot be used to reconstruct class-specific behavior or to infer the exact treatment each label receives in an aggregate. For the SVM’s binary comparisons, the report also leaves the choice of positive label unspecified.
The authors state the 80% training and 20% testing division before presenting the internal results. They subsequently describe the scores as coming from the training dataset. The most specific common description is that these experiments are drawn from the official labeled training collection. Details such as the membership of the held-out portion and whether every reported figure was computed on that same portion are not supplied. The distinction affects how strongly one can compare internal results with those from public scoring.
The public leaderboard
The public scores put the Bi-LSTM ahead of the other systems the authors tested. The conclusion gives 71.43% as the entry’s public F1-score. In the public comparison, the GRU is the closest of the listed alternatives, followed by the SVM and logistic regression. This ordering describes the authors’ submitted alternatives within the task. It gives a direct result for the system choice the paper was designed to inform. Evaluation & benchmarks
Vietnamese hate speech classifiers on the VLSP 2019 public test leaderboard
The Bi-LSTM with FastText leads the public results reported for the authors’ submissions.
The numbers
| System or setting | F1 % |
|---|---|
| Logistic regression | 51.15 |
| Support vector machine | 63.87 |
| GRU with FastText | 65.01 |
| Bi-LSTM with FastText (this paper) | 71.43 |
The authors place their strongest entry 2nd on the public scoreboard. Their reported private placement is 6th. The public rank is a comparison with teams on that scoreboard, while the chart compares the authors’ own submissions. The paper gives no private score for the entry and no private results for the alternative classifiers. The reported change in placement therefore says that the system occupied a different position among submissions. The change in its underlying score remains unknown.
The leaderboard is the clearest basis for calling the FastText Bi-LSTM the authors’ strongest submission. Its numeric result is tied to the shared task’s public evaluation and the competing methods have the same reported destination. The public results do not supply the underlying distributions of predictions. They consequently leave open which items were responsible for the advantage, whether the same classes drove each system’s score, and how the top configuration would compare with the others under a different metric.
Results within the labeled training collection
For logistic regression with TF-IDF features, the authors report accuracy of 94.17%, precision of 88.87%, recall of 55.54%, and F1 of 64.15% in the experiments using the labeled collection. The precision and recall give the accuracy some context. The reported recall is lower than the reported precision, so the performance looks different depending on whether the emphasis is on the correctness of predictions made for a category or on how much labeled material is recovered.
For the GRU with FastText, the reported accuracy is 94.61%, precision is 67.12%, recall is 59.66%, and F1 is 64.15%, again in the labeled-collection experiments. It shares the reported F1 value of logistic regression. The separate precision and recall figures distinguish the two: logistic regression has higher reported precision, and the GRU has higher reported recall. Their public scores give a further distinction, with 65.01% for the GRU and 51.15% for logistic regression.
This is a place where the kind of comparison matters. The reported internal F1 values alone would leave the two methods tied on that measure in those experiments. The public leaderboard separates them. The test data, the aggregation, and the details of fitting or selection could all matter when interpreting a comparison across settings. The paper does not identify which explanation applies. The evidence is the equality of the reported internal F1 values and the different scores after public submission.
The pairwise SVM results answer a narrower question. On the subproblem with labels 0 and 1, the paper reports accuracy of 96.00%, precision of 93.37%, recall of 98.96%, and F1 of 96.08% in the experiment on the labeled collection. On the subproblem with labels 1 and 2, the corresponding figures are 84.34%, 87.38%, 78.86%, and 82.90%. The two reports give a measure of performance for each binary decision on its own set of labels.
The second SVM pair has lower reported values on all the listed metrics. The authors identify it as the more difficult comparison for this classifier. Because the label indices are not mapped to class names, the result concerns the indexed pair. The binary F1 scores also apply to subproblems with restricted label sets and cannot be equated with a score from assigning all the labels in the public task. The system’s public result of 63.87% supplies the available comparison on the common submission basis.
A closer comparison within the Bi-LSTM
With the Vietnamese Word2Vec resource baomoi.vn.model.txt, the Bi-LSTM achieves 93.26% accuracy, 90.74% precision, 50.30% recall, and 53.62% F1 in the labeled-collection experiment. With FastText, the reported figures are 95.67% accuracy, 85.61% precision, 67.36% recall, and 73.84% F1. This is the most direct component comparison because both entries are described as Bi-LSTMs and the paper identifies the embedding resource that changes.
Bi-LSTM embedding comparison on the labeled VLSP 2019 training collection
The Bi-LSTM using FastText has higher reported F1 than the version using the Vietnamese Word2Vec resource.
The numbers
| System or setting | F1 % |
|---|---|
| Bi-LSTM with baomoi.vn.model.txt | 53.62 |
| Bi-LSTM with FastText (this paper) | 73.84 |
The FastText version has the higher reported accuracy, recall, and F1. The Word2Vec version has higher reported precision. This direction matters for the paper’s finding. The authors’ preference for FastText is supported by the reported balance of precision and recall reflected in F1, even though precision by itself favors the other configuration. The evidence does not settle which setting would make better decisions for a specific label under a particular cost for false alarms or missed items.
The paper gives a public score for the preferred FastText Bi-LSTM, but it does not give a public score for its paired Word2Vec configuration. The embedding comparison and the public leaderboard answer related questions with different evidence. The internal comparison supports the choice to use FastText within the authors’ Bi-LSTM. The leaderboard establishes how the chosen configuration scored among the submitted alternatives. A public comparison of the two embedding settings would require a reported result for each.
What the ablations show
Changing the input representation
The paper reports no systematic ablation of the Bi-LSTM’s internal components, but it compares embedding resources, several complete classifiers, and two pairwise SVM decisions. The embedding experiment is the closest to an ablation. It makes a specific substitution within the same named architecture. The result is more informative about the contribution of the input representation than a comparison that simultaneously changes the classifier and the information it receives.
The metric pattern narrows the interpretation. In the embedding comparison, FastText raises the reported recall and lowers the reported precision relative to the other resource, and the resulting F1 is higher. If the paper had provided only the F1 values, it would have been easy to assume that every listed aspect of the prediction improved. Here the reader can see that the changes go in different directions. This matters because recall and precision describe different consequences of assigning a label.
The finding applies at the level of the scored configurations. The paper does not report coverage measurements for the two resources, matched dimensional settings, or the behavior of missing vocabulary entries. Those details would help distinguish possible reasons for the outcome. The vectors may provide different representations for overlapping tokens, and the lookup stage may treat some tokens differently across resources. The reported experiment leaves those possibilities open. It establishes which named embedding configuration scored higher on the principal aggregate used in the comparison.
There is also a distinction between the presence of an embedding and the choice of embedding. Both tested Bi-LSTMs receive pretrained word vectors. The comparison can inform a choice between those two ways of representing the text. It supplies no estimate of what either one contributes relative to training the sequence classifier with a different initialization. In the same way, the paper’s concern with large embeddings is a design motivation without a series of dimensional settings to evaluate.
The reported precision and recall are overall figures whose class aggregation is unspecified. Higher recall in the FastText run therefore cannot be assigned specifically to the HATE class. It could reflect changes across multiple classes under the scoring rule. Establishing that the new vectors recover more hateful items would require a recall value for HATE or prediction counts broken down by reference and predicted labels. The current experiment locates the advantage at the aggregate level.
Comparing complete classifiers
The GRU and the preferred Bi-LSTM both use FastText. That shared choice makes their comparison closer than the comparison between the Bi-LSTM and logistic regression, which uses TF-IDF features. The GRU comparison shows that the preferred classifier produced the stronger public score among the recurrent alternatives the authors describe. The difference might arise from architecture, training, or other implementation choices. The paper does not hold those elements constant in a documented way that would assign the gain to a particular mechanism.
In particular, the authors’ explanation of bidirectionality is a reason to try it, while its separate contribution remains unmeasured. A comparison against a matched forward-only LSTM could ask whether reading backward supplies useful information under otherwise similar conditions. The paper does not report that counterpart. Nor does it compare the contribution of forward and backward states at individual positions. The full Bi-LSTM’s performance is consistent with the motivation for reading both directions, and the available scores establish performance only for the complete system.
The logistic regression comparison examines another route through the task. It represents the comment by weighted term features and then makes a supervised category decision. The recurrent route uses an ordered sequence of vectors. The public results favor the recurrent submissions among the reported alternatives, but the two routes differ in several respects at once. Sequence order, pretrained vectors, and the decision procedure vary across them. The comparison indicates which route scored better as implemented. It provides no separate estimate for the value of preserving order.
The SVM’s pairwise results add a different sort of analysis. Using the same kind of classifier on a different pair of labels changes the discrimination problem. The consistently lower metrics on the pair indexed 1 and 2 identify a weaker binary result in that setup. This can help explain why a strong result on a selected pair gives an incomplete view of the full task. It stops short of identifying the hardest named category boundary, since the indices and the underlying errors are not explained.
The internal and public results also provide a check on how much one can conclude from a single evaluation setting. Logistic regression and the GRU share an internally reported F1, while their reported public values differ. The authors’ rankings of these approaches are consequently easier to understand when both settings are in view. This comparison exposes variation in the result across evaluations. It does not isolate a cause, because the paper gives insufficient information about the internal split and the properties of the test sets.
Which design choices remain unevaluated
Some preprocessing decisions have a rationale without a reported comparison. The authors keep certain stopwords because they say those words affect results. They remove mentions, URLs, numbers, and other material as part of cleaning. The paper supplies no scores for enabling or disabling these operations individually. It therefore leaves the direction and size of each contribution open, along with any interaction between cleaning and the vocabulary of the embedding resource.
The same issue applies to the reference to an ensemble. The authors describe the overall framework in ensemble terms, but the paper gives no paired result for an individual classifier and a specified combination. Its main result cannot be decomposed into an effect of the recurrent architecture and an effect of combining predictors. The evidence is strongest for choosing the reported FastText configuration among the alternatives the authors tested. The contribution of individual processing and architectural decisions remains a separate question.
Limitations
What the authors identify
The authors explicitly call attention to the imbalance of the labeled training collection. Ordinary clean items dominate, and hateful ones are the least common category. This is a limitation of the example distribution available to the participants. A classifier learns from the occurrences it sees, and the training data offer fewer labeled examples of some decisions than others. The paper raises that problem without documenting any particular sampling scheme or adjustment used to give the rarer labels greater weight.
The authors also report differences in how well their approaches behave. They regard the second SVM pair as harder for that classifier, and logistic regression fares less well on the public leaderboard than its internal accuracy might suggest. Their main submission has a different rank on the private scoreboard. By retaining these results alongside the public success of the Bi-LSTM, the paper gives the reader several places where the evaluation did not produce a uniform assessment.
In their future work, the authors propose further comparisons involving conventional machine learning and deep learning. They also consider combining a learned system with rules for detecting hate speech. Such a combination could supply explicit conditions as well as predictions derived from examples. The paper presents this as a subject for further investigation. It supplies no evaluated hybrid system and no basis for judging how rules would interact with the Bi-LSTM’s decisions.
What can be inferred from the evaluation design
The score imbalance is important to distinguish from the label imbalance. The training proportions describe the supply of labels, while the accuracy and F1 figures describe evaluation outcomes. A high accuracy can coexist with weak recognition of a rare class because frequent clean items contribute heavily to the overall count of correct predictions. The paper does not report a majority-class baseline, and the stated training prevalence is insufficient to calculate its score on an evaluation split. The test distribution and the scoring convention would matter.
Class-level results would clarify how the system treats the task’s defining distinction. For example, a class-by-class record could show whether hateful items often receive the offensive label, whether ordinary items are flagged as offensive, or whether mistakes tend to follow another pattern. Such a record would also connect the precision and recall discussion to concrete categories. The paper provides no confusion matrix or set of class-specific results. Its aggregate measurements cannot settle those questions.
A further uncertainty concerns the averaging of precision, recall, and F1. In a three-label task, an average can give equal influence to categories, give greater influence to common categories, or combine prediction counts before computing a score. These choices can affect what the aggregate says about a rare category. Reporting a public F1-score makes the metric identifiable in broad terms. The omission of its averaging convention limits interpretation beyond the published public ordering and value.
The internal split is described by its proportions. The paper gives no details on how items were assigned to it, whether label prevalence was preserved in each portion, or whether the comparison was repeated under different splits. It also gives no measure of score variability. A size or ordering observed in one comparison could depend on the particular items in that evaluation. The reported experiments give an empirical result of the described run, with no evidence about how reliably its ordering would recur.
The vocabulary is another point at which evaluation procedure matters. The paper identifies Tokenizer and, for logistic regression, TfidfVectorizer. It does not say explicitly which portion of the labeled collection was used to fit the vocabularies or term statistics. That information would help a reader reproduce the intended separation between fitting and evaluation. The absence of a description leaves the procedure unresolved. It provides no basis for concluding that information from the held-out portion was used or excluded at those stages.
The same distinction applies to public and private evaluation. Public and private ranks reflect standing relative to other submissions on the respective scoreboards. The private score and the composition of the private test are absent. A ranking change alone cannot show whether the classifier’s absolute performance rose or fell, or whether the competing entries changed relative position. The evidence supports the reported placements and leaves the magnitude and explanation of their difference open.
What can be inferred from the method description
Reproducing the Bi-LSTM would require details beyond the architecture name and the vector resource. The paper does not give the vocabulary limits, handling of unseen items, sequence length settings, recurrent layer sizes, or prediction layer configuration. It also does not identify such training choices as the objective, optimization procedure, or stopping criterion. Those choices can affect what information reaches the recurrent layers and how the network learns from the examples. The paper is more specific about the route the data take than about how to reconstruct the trained classifier.
The inconsistent embedding terminology adds a narrower ambiguity. The paper describes a comparison between Word2Vec and FastText and attaches explicit scores to the Vietnamese file and to FastText. The mention of GloVe is not accompanied by a corresponding scored entry. A reconstruction can identify the intended comparison from the named results. Which part, if any, of the scored procedure used GloVe is unclear.
The reference to an ensemble leaves similar uncertainty about the final submission. To reproduce an ensemble, a reader would need the participating classifiers and the rule that turns their outputs into a final prediction. The paper supplies neither detail. Its public score can be attributed to the submission the authors call their Bi-LSTM system with FastText. The exact relationship between that submission and the ensemble description remains unresolved.
For the SVM, the missing labels and combination rule are especially consequential. The binary results are well enough specified to compare metrics for the pairs as indexed. Reproducing the full three-label procedure requires knowing which named categories correspond to those indices and how disagreements between binary decisions are handled. The reported full-task score confirms that the authors submitted predictions for public evaluation. It does not reveal the route from restricted comparisons to those predictions.
Preprocessing poses a different reproducibility problem. The authors describe lowercasing and several kinds of removal, but leave the precise character rules and stopword choices unstated. Readers cannot determine from the description what happens to every informal form in the input. In addition, information discarded during cleaning is unavailable to the classifier described later. Data about how often discarded forms occur in each category or how changes to the rules affect predictions would be needed to judge the cost of those choices.
Where the conclusions apply
The benchmark tests the assignment of labels to supplied Vietnamese social media text. The paper’s motivation extends to identifying material that a service might remove, while its measured outcomes concern agreement with reference labels. An evaluation of a live moderation system would also need to account for how predictions are acted on and the consequences of mistaken actions. Neither the public F1-score nor the private rank measures those outcomes.
The scope of available context is also relevant. The authors condition the bidirectional representation on the item’s text. The paper does not evaluate information from a conversation thread or other material outside the item. A reader may need such context to determine the target or intent of an ambiguous comment. The reported results show what the system can do under the shared task’s setup, with the evidence and labels defined for that setup. They do not establish a general capacity to resolve ambiguous intent.
The relationship between the reference labels and a judgment about hate speech also depends on the labeling procedure. The paper gives class definitions and says the training items are pre-labeled. It does not discuss how annotators resolved disagreements, how reliably they applied the categories, or what context they saw while labeling. This limits the interpretation of errors in potentially ambiguous examples. A mismatch with the reference category is a classification error under the scoring procedure, while the reasons for the disagreement are unknown.
Finally, the reported results come from the VLSP shared task. The paper supplies no independent evaluation of the chosen system on a separate Vietnamese collection with different collection methods or labeling rules. Its results support a comparison among the reported configurations in the stated setting. Transfer to other platforms, communities, or definitions of hateful conduct remains an empirical question, since those changes could affect both the language of the inputs and the categories assigned to them.
What came after
A later citing study, Hate Speech Detection and Classification in Amharic Text with Deep Learning, addresses detection and classification in Amharic using deep learning. Its stated subject carries the broad problem of automated hate speech classification into another language. The connection that can be established is a citation and a common interest in applying learned classifiers to language-specific hate speech tasks.
The citation does not establish which aspect of the Vietnamese study the later authors used. The Amharic study’s title identifies its language, task, and general approach. It leaves open whether the authors adopted a bidirectional LSTM, used similar embeddings, defined the labels in the same way, or borrowed the evaluation design. The documented follow-on is therefore the study of a related classification problem in Amharic, with the precise methodological connection undetermined.
Cite
Cite as Hang Thi-Thuy, Huy Duc Huynh, Kiet Van Nguyen, Ngan Luu-Thuy Nguyen and Anh Gia-Tuan Nguyen. 2019. Hate Speech Detection on Vietnamese Social Media Text using the Bidirectional-LSTM Model. arXiv (Cornell University).
@misc{thithuy2019hate,
title = {{Hate Speech Detection on Vietnamese Social Media Text using the Bidirectional-LSTM Model}},
author = {Hang Thi-Thuy, Huy Duc Huynh, Kiet {Van Nguyen}, Ngan Luu-Thuy Nguyen and Anh Gia-Tuan Nguyen},
year = {2019},
doi = {10.48550/arxiv.1911.03648},
eprint = {1911.03648},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1911.03648}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/thuy-2019-hate-speech-detection-vietnamese-social/
References
- An Introduction to Conditional Random Fields for Relational Learning. OpenAlex ↗ · Scholar ↗
- P. Blunsom, “Hidden markov models,” Lect. notes, August, vol. 15, no. 18–19, p. 48, 2004. OpenAlex ↗ · Scholar ↗
- K. Nigam, J. Lafferty, and A. McCallum, “Using maximum entropy for text classification,” in IJCAI-99 workshop on machine learning for information filtering, 1999, vol. 1, no. 1, pp. 61–67. OpenAlex ↗ · Scholar ↗
- Lei Gao and Ruihong Huang. 2017. Detecting online hate speech using context aware models. In Proceedings of the International Conference Recent Advances in Natural Language Processing, RANLP 2017, pages 260–266, Varna, Bulgaria. INCOMA Ltd. OpenAlex ↗ · Scholar ↗
- Thomas Davidson, Dana Warmsley, Michael Macy, and Ingmar Weber. 2017. Automated Hate Speech Detection and the Problem of Offensive Language. In Proceedings of the Eleventh International AAAI Conference on Web and Social Media (ICWSM 2017), pages 512–515, Montreal. our card
- J. Qian, M. ElSherief, E. M. Belding, and W. Y. Wang, “Leveraging intra-user and inter-user representation learning for automated hate speech detection,” arXiv Prepr. arXiv1804.03124, 2018. OpenAlex ↗ · Scholar ↗
- A. Baruah, F. Barbhuiya, and K. Dey, “ABARUAH at SemEval-2019 Task 5: Bi-directional LSTM for Hate Speech Detection,” in Proceedings of the 13th International Workshop on Semantic Evaluation, 2019, pp. 371–376. our card
- Kevin Hu, Animesh Koratana, “CS 224n Winter 2019: Toxic Speech Detection,” 2019. [Online]. Available: http://web.stanford.edu/class/cs224n/posters/15744362.pdf. OpenAlex ↗ · Scholar ↗
- S. Malmasi and M. Zampieri, “Detecting hate speech in social media,” arXiv Prepr. arXiv1712.06427, 2017. OpenAlex ↗ · Scholar ↗
- Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory.Neural computation, 9(8):1735–1780, 1997. OpenAlex ↗ · Scholar ↗
- Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360, 2016. our card
- Kunal Bhashkar, "Spelling Correction Using Deep Learning: How Bi-Directional LSTM with Attention Flow works in Spelling Correction,", URL: https://medium.com/@BhashkarKunal/spelling-correction-using-deep-learning-how-bi-directional-lstm-with-attention-flow-works-in-366fabcc7a2f. OpenAlex ↗ · Scholar ↗
- Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a library for support vector machines, 2001. Paper available at https://www.csie.ntu.edu.tw/ cjlin/papers/libsvm.pdf. OpenAlex ↗ · Scholar ↗
- https://www.geeksforgeeks.org/understanding-logistic-regression/ OpenAlex ↗ · Scholar ↗
- NGUYEN Hong Thinh, “RNN on Machine Reading Comprehension - Bi-Directional Attention Flow model,” URL: https://pdfs.semanticscholar.org/8b9d/677ec3845b2a9b7cb200cdc73dfc. OpenAlex ↗ · Scholar ↗
- E. Grave, P. Bojanowski, P. Gupta, A. Joulin, and T. Mikolov, “Learning word vectors for 157 languages,” arXiv Prepr. arXiv1802.06893, 2018. our card
- Xuan-Son Vu, "Pre-trained Word2Vec models for Vietnamese,", 2016, url: https://github.com/sonvx/word2vecVN OpenAlex ↗ · Scholar ↗