Elamur Research

Merging Datasets for Hate Speech Classification in Italian

Paper · 2018 · Paula Fortuna, Ilaria Bonavita and Sérgio Nunes

Summary

If you want to detect hate speech in Italian Facebook comments, will annotated tweets help? The answer in this study depends on what other examples the classifier has seen. Fortuna and colleagues compare training on the platform they want to classify, training on a mixture of Facebook and Twitter, and training only on the other platform. Adding material from the other network improves the overall score on both test sets. Using that material as the sole source of training examples produces much weaker results. The study makes this comparison within HaSpeeDe, a shared task at EVALITA 2018 that asked teams to distinguish Italian messages labeled as hate speech from messages assigned to the other class. Text classification

The authors keep the basic classification procedure in place while changing the source of the examples. They remove URLs and the Twitter retweet marker, turn the remaining words into numerical sequences, and train a dense neural network that uses a learned vector representation of each word. Each social network contributes a separate collection of labeled messages, with development material for building the classifier and test material for the contest. The mixed training runs are still scored on Facebook or Twitter separately. That matters because the experiment asks whether examples from another source help with a particular target, even when the material being classified comes entirely from that target. Word embeddings

On the Facebook contest test set, the macro-averaged F-score is 0,6419 with Facebook training data alone and 0,6532 with mixed training data. Training only on Twitter yields 0,4378. On the Twitter test set, the corresponding macro-averaged F-scores are 0,7203 with Twitter training data alone, 0,7426 with mixed training data, and 0,443 with Facebook training data alone. The macro average gives equal influence to the hate-speech and other-message scores. The benefit of mixing also shows up during validation, although the two splits disagree about which platform is easier overall. And on the Twitter contest test set, mixing improves the hate-speech F-score while the score for the other class falls.

The mixed runs add messages and broaden their source at the same time. The authors therefore leave open whether the improvement comes from having more examples, from seeing a wider range of language, or from some combination of the two. A related EVALITA experiment on misogyny classification gave roughly similar performance after additional data were included, so the authors also had a case where merging brought no clear gain. Their HaSpeeDe results support a specific conclusion about these Italian datasets: Facebook and Twitter examples can supplement each other, while examples from the intended platform remain important for the performance observed here.

Deep dive: Merging Datasets for Hate Speech Classification in Italian

A study of Italian hate speech detection tests whether combining Facebook and Twitter data improves classification on each social network. · about 31 minutes to read

The problem and its context

The same decision on different platforms

The paper starts from a practical problem in automatic hate speech detection. A supervised classifier needs examples of the decisions it is supposed to make. Those examples come from people labeling messages collected somewhere, under some definition of the task. If the intended application concerns a different collection, the classifier has to use what it learned under one set of conditions to make decisions under another. HaSpeeDe makes that issue visible by asking for the same kind of decision in Italian across Facebook comments and tweets. Machine learning

The shared task gives each message a binary label. The positive class indicates that the message contains hate speech according to the dataset label. The other class covers messages coded otherwise. This is a decision about the text of a message, as represented in the task. It does not assign a category to the writer or identify the particular target of the speech. Keeping the unit of prediction clear is important because the paper assesses success against labels attached to individual messages. Its numbers describe how well the submitted decisions match those labels. Linguistic annotation

A common language and common output labels make the platform comparison possible. They also leave room for substantial differences. One collection consists of Facebook comments and the other of tweets. The corpora were assembled separately, and they come from different years. The fact that each can be read as a set of Italian messages paired with binary labels makes training on both straightforward at the file level. Whether the material in one collection provides useful evidence for decisions in the other is a question the authors address experimentally.

The paper places this question in the setting of shared evaluation campaigns. The authors connect the growing interest in automatic detection to the spread of abuse on social networks. They point to the aggression identification benchmark at TRAC as another initiative that organized a related classification problem for comparative evaluation. A shared task lets teams work against a common problem and test procedure within a limited time. HaSpeeDe gives the authors an additional opportunity because its task design already distinguishes ordinary within-platform classification from classification across platforms. Benchmarking Aggression Identification in Social Media

The task has separate settings for Facebook and Twitter. In a within-platform setting, the intended source of training examples and the source of test examples match. In the cross-platform setting, the classifier predicts labels for one network after seeing training examples only from the other. The authors add a question of their own to that setup. If the intended platform already provides training examples, does including the other network’s data improve the outcome? This makes the mixed runs important even though the cross-platform challenge itself is about relying on the other source alone.

These two questions have different practical premises. In the cross-platform setting, the target platform supplies the messages to be classified and contributes no labeled examples to training. In the mixed setting, the team already has labeled material from the target and can draw on an additional collection. Performance in one situation does not settle what will happen in the other. A body of examples can offer useful supplementary evidence even when it is a poor stand-alone account of the messages the classifier will encounter. The experiment is designed to make those uses separately observable.

What earlier studies supplied

The paper’s account of earlier research organizes the field around data, features, and classification methods. Surveys by Schmidt and Wiegand and by Fortuna and Nunes describe the frequent use of supervised classification in work on hate speech detection. The approach requires examples with labels and a way to represent text so that a learning algorithm can find patterns. An investigation can change the criteria used to label messages, the information extracted from them, the learning algorithm, or the material on which the resulting classifier is evaluated. The present paper focuses on the source of the labeled material. A Survey on Hate Speech Detection using Natural Language Processing and A Survey on Automatic Detection of Hate Speech in Text

The authors cite earlier collections with different classification schemes. Their discussion includes work by Davidson and colleagues on the distinction between hate speech and offensive language, as well as the Twitter research of Waseem and Hovy. Such collections are relevant precedents for constructing a classification task, but the paper identifies their language as a constraint for this particular experiment. The team needs labeled Italian material and uses the Italian Facebook and Twitter resources assembled for HaSpeeDe. The Twitter side draws partly on the corpus work of Sanguinetti and colleagues, whose title identifies hate speech against immigrants as its subject. Davidson and colleagues’ study of offensive language, Hateful Symbols or Hateful People?, and Sanguinetti and colleagues’ Italian Twitter corpus

Selecting features is a separate decision from finding data. Earlier systems described in the paper used sequences of adjacent words or characters, properties of the users who posted messages, expressions that frame a group as outsiders, and numerical representations of words. These choices give a classifier different kinds of evidence. A sequence of characters can preserve a recurring piece of spelling. A user characteristic brings in information beyond the message itself. A word embedding represents a word numerically so that the rest of the network can learn how to respond to it in a given input. The present system uses the message text, with word embeddings as its learned representation. N-gram

The literature also supplied a range of classification algorithms. The paper mentions support vector machines and random forests alongside neural approaches. In the neural studies it discusses, some systems processed sequences of words or characters, some incorporated user behavior, and others combined text patterns with information such as sentiment, metadata, punctuation or capitalization. The authors point to Gämbäck and Sikdar as an example of using a convolutional network with word representations. This background explains the choice of a neural approach, while the experiment itself keeps the architecture simple and compares training sources. Gämbäck and Sikdar’s study of convolutional hate-speech classifiers

The authors’ own immediate precedent was an experiment on aggression classification. In their account of that work, examples similar to the target were useful, and additional material from another platform had brought a slight benefit. That experience motivates the hypothesis that a combined collection could also improve hate speech classification in Italian. It does not establish the answer in advance. The labels concern a different task, and the new experiment has separate outcomes for Facebook and Twitter. By also running the other-platform-only condition, the authors can ask how much the benefit of extra data depends on retaining target-platform examples.

The method, step by step

From source collections to training conditions

The Facebook material comes from a collection of comments from 2016. The Twitter side comes from an Italian corpus developed in 2018. Each platform supplies 4,000 messages, randomly divided into a development set of 3,000 and a test set of 1,000. The development and test split is part of the task data. The team also sets aside development material for its own validation. Those are separate uses of held-out messages. Validation gives the authors a way to tune and assess their approach before the contest results, while the official test sets provide the final comparison for the submissions.

The input files follow a common format. Each line carries a message ID, the text, and a class label, separated by tabs. The label is 1 for hate speech and 0 otherwise. The ID identifies the record, and the pipeline takes the message text as the input from which to predict its label. The format is already aligned across the sources, so the merge does not require rewriting labels into a new classification system. The experiment uses the categories assigned to the messages in HaSpeeDe.

The researchers organize the runs around the platform whose messages are to be classified. To evaluate on Facebook, they can train on Facebook development material, use Facebook and Twitter development material together, or train on Twitter development material alone. The equivalent comparison for Twitter starts with Twitter-only training, adds Facebook in the mixed condition, and uses Facebook alone in the cross-platform condition. Each comparison is read against a fixed target. The training collection changes while the platform represented by the evaluation messages stays the same.

This arrangement is easy to misread from the submission names. In the cross-platform run called Cross-HaSpeeDe-FB, Facebook supplies the training examples and Twitter supplies the test examples. In Cross-HaSpeeDe-TW, Twitter supplies training and Facebook supplies testing. In the regular HaSpeeDe runs, the platform in the name also identifies the platform being tested. The paper groups its results by test platform, which brings the relevant training choices together even when the cross-platform run name points to the other network.

The workflow can be read from the outside in. The choice of sources determines which examples are available to the classifier. The text processing determines what information from an individual message can reach the network. The fitting and validation procedure determines when training should stop and which fitted classifier the authors use for prediction.

Training and evaluating the hate speech classifier

The steps in order.

Training and evaluating the hate speech classifierStep 1: Choose training sources for the target platform1. Choose training sources for the target platformStep 2: Remove URLs and Twitter retweet markers2. Remove URLs and Twitter retweet markersStep 3: Convert words to fixed-length numerical sequences3. Convert words to fixed-length numerical sequencesStep 4: Learn word embeddings and fit the dense network4. Learn word embeddings and fit the dense networkStep 5: Compare cross-validation curves and select an epoch count5. Compare cross-validation curves and select an epoch countStep 6: Save the classifier and predict validation labels6. Save the classifier and predict validation labelsStep 7: Evaluate submitted runs on the target test set7. Evaluate submitted runs on the target test set

Turning a message into numerical input

The first changes to the text are small and explicit. The authors remove links and, for tweets, remove the retweet marker RT. The resulting input therefore omits the URLs that appeared in the original text and the specified retweet marker. The paper does not describe bringing in the content of a linked page. Its account of feature extraction proceeds from the words remaining in the message.

The authors then use tokenization, the step that breaks text into units the classifier can process. Their unit at this stage is the word. They retain the top 10,000 words in the dataset for the vocabulary. For the tweets, the description specifies a limit of the first 100 words, and the embedding layer is configured with an input length of 100 for the messages. Together, the vocabulary limit and input length bound the text the network receives. The vocabulary determines the set of words with a place in the representation. The length setting determines how many positions a message can occupy in the input.

The implementation uses the R interface to Keras. The authors describe creating and fitting a tokenizer, converting texts to sequences, and padding the resulting sequences. Fitting the tokenizer establishes the mapping from words to numerical identifiers. Sequence conversion applies that mapping to a message so that the positions of the retained words are expressed as numbers. Padding gives shorter inputs the common length the network expects. The paper names the operations it uses but leaves details such as the side on which padding is added unspecified in its description. The authors make the implementation available in a public repository.

A numerical identifier is a way to look up a word. Its numerical magnitude alone carries no interpretation in this procedure. The embedding layer maps the identifier to a vector whose components can be adjusted during training. The classifier then works with the vectors occupying the message positions. The paper specifies 10,000 for the input vocabulary space and 100 for input length. Those values describe different axes of the input. The first concerns how many word identifiers are available, while the second concerns how many positions the sequence contains. The description does not give a separate numerical size for the vector assigned to each word.

The distinction matters for the merging experiment. A change in the training collection changes the messages and labels available to the learning procedure. It can also change which words occur frequently enough to be represented, depending on the data used to fit the tokenizer. The paper does not provide a comparison of vocabularies between runs or a separate account of which words become available after the merge. Its data manipulation can consequently be described precisely at the source level, while the resulting changes in lexical coverage remain unmeasured.

From word vectors to a binary decision

The network begins with the embedding layer. This turns the sequence of word identifiers into a sequence of word vectors. The authors add dropout with a setting of 0.25 after this stage. Dropout temporarily suppresses part of the layer’s output during training, reducing the network’s opportunity to depend on the same set of activations every time. It is present across the training conditions, so results from the source comparison do not measure what happens when dropout is added or removed.

The next operation flattens the embedded sequence. Flattening lays the vector components out in a single ordered row so they can feed a dense layer. A dense layer learns combinations of its inputs, with each unit able to receive information from across the flattened representation. The paper specifies 256 units in this layer and uses the rectified linear activation, abbreviated ReLU. That activation passes positive inputs through and sets negative inputs to zero. The authors follow the dense layer with another dropout step at 0.25.

A final dense layer has a single output neuron with a sigmoid activation. A sigmoid turns its input into a score between zero and one. This design gives the network one score for the binary decision. The class label used during fitting determines which way the score should move for a given example. The paper describes using Keras to generate predictions for validation and gives the resulting classification scores. It does not specify in its methodological account how the continuous predictions are converted into class assignments for reporting.

The architecture processes the ordered input without an additional recurrent or convolutional stage. The flattening operation supplies the dense layer with the embedded values arranged by position. Its role is thus different from reducing a message to a list of words with all position information removed. At the same time, the paper offers no analysis of how strongly the resulting classifier depends on a word’s position or which combinations of words the network uses to reach a decision.

The authors fit the network with binary cross-entropy as the loss. The loss is the quantity the fitting procedure tries to reduce. Binary cross-entropy penalizes predictions that give little support to the observed label, with especially large penalties for confident predictions in the wrong direction. The optimizer is RMSprop, which uses the training gradients to update the network’s parameters. The paper gives the names of the loss and optimizer and describes how the evaluation measure guides the analysis. It does not present symbolic equations for these operations.

The team supplies a custom F1 metric as well. The metric tracks a balance between finding messages assigned to a class and making predictions for that class accurately. The training loss and the reporting metric therefore answer different questions. The loss evaluates the scores supplied during fitting against the labels. F1 summarizes the success of class predictions in a way that accounts for both missed cases and incorrect assignments. The authors use the metric to follow how the classifier develops across epochs and to connect validation with the contest’s F-score evaluation.

Fitting, choosing a stopping point, and validating

An epoch is a pass through the examples used for fitting. Continuing for more epochs gives the network more chances to adjust its weights. The authors are interested in the point at which those updates stop helping with held-out messages. They use a batch size of 128, which determines how many examples are processed together for a training update, and begin the epoch tuning with 10 epochs. The training also receives class weights, which the authors describe as corresponding to class frequencies in the training data. That description gives the basis for the weights but does not lay out their values or a formula converting frequencies into weights.

The paper describes setting aside 30% of the data for validation and using 10-fold cross-validation for classifier fitting and epoch selection. In cross-validation, the data used for the comparison are divided into folds, with fits performed on training folds and assessed on the fold held out for that fit. The held-out role rotates. The authors average the F1 and loss values over the 10 folds at each epoch. The resulting curves summarize how training and held-out performance develop across the fitting procedure, allowing the authors to examine the behavior over epochs rather than relying on a single fit.

The stated stopping rule is to choose the latest epoch before signs of overfitting appear. In the paper’s description, overfitting is the situation in which continued training helps on examples used to fit the system while the corresponding improvement fails to appear on held-out examples. The curves make that distinction observable through the course of fitting. They do not force every training source to use the same number of epochs. The team chooses an epoch count for each run, so the comparison reflects how the common procedure performs when tuned separately for its available data.

After choosing the stopping point, the authors save the final fitted classifier and use Keras to predict on the validation data. The validation F1 values in the results table are therefore distinct from the fold-averaged curves used for tuning. The paper also associates each validation F1 with a p-value from a permutation test. A permutation test compares the observed statistic with values obtained after rearranging data under a specified null procedure. The paper reports the p-values but gives little detail about what was permuted or how the null comparison was constructed. The official contest test results are reported separately.

Experiments and results

How to read the comparisons

The experiment has a matched baseline for each platform. The Facebook classifier trained only on Facebook gives the reference point for evaluating the addition of Twitter material. The Twitter classifier trained only on Twitter serves the same purpose for the addition of Facebook material. The other-platform-only runs supply a second reference point. They show how the approach performs when the extra source is asked to supply all of the training evidence for the target. These are comparisons among training regimes within the authors’ approach. The contest placements provide a wider setting for the submissions, while the paper’s own controlled comparison concerns the source of the training examples.

For each test class, the contest reports precision, recall and F-score. Precision asks how frequently the classifier is right among the messages it assigns to that class. Recall asks how many of the messages with that class label it finds. The class F-score combines those two aspects so that a system with strong precision and weak recall, or the reverse, receives a lower score than it would if both were strong. The contest’s macro-averaged F-score takes the mean of the class scores, giving hate speech and the other class equal weight in the reported aggregate.

The difference between precision and recall helps explain why some low-performing runs can still have an apparently strong number in one column. A classifier that selects only a restricted set of messages for a class could make relatively few mistakes among its selections while missing many actual members of the class. A classifier that assigns a class more widely could capture many of its actual instances and also include many incorrect ones. The class scores and macro average show different consequences of these patterns. The aggregate makes the training conditions easy to compare, while the class-level figures show where the gains and losses occur.

The development evaluation is reported as validation F1. The contest table explicitly reports class-level results and a macro-averaged F-score. The paper aligns its custom F1 with the contest’s evaluation in its description of training, but presents the two sets of results under their own labels. Reading each within its own split makes the clearest comparison. The split that guides development is evidence about repeatability under the authors’ evaluation procedure, and the official contest test supplies separate evidence about the submitted runs.

Validation before the contest test

On Facebook validation data, training only on Facebook produces F1 of 0.723, with 7 epochs selected. Adding Twitter material produces validation F1 of 0.738, with 3 epochs selected. Training only on Twitter gives Facebook validation F1 of 0.284 at 4 epochs. In this comparison the mixed collection yields the highest validation F1, while the classifier trained only on Twitter does substantially worse than either classifier exposed to Facebook training examples.

On Twitter validation data, training only on Twitter gives F1 of 0.630, with 6 epochs selected. The mixed training condition reaches Twitter validation F1 of 0.679 with 4 epochs. Training only on Facebook gives Twitter validation F1 of 0.434 with 6 epochs. The ordering of the training conditions is the same as on Facebook validation. The mix leads, the target-only baseline follows, and the other-platform-only run is last.

The permutation-test p-value is 0.001 for each of the Facebook validation runs. It is also 0.001 for the Twitter-only and mixed runs evaluated on Twitter validation data. For the Facebook-trained run evaluated on Twitter validation data, it is 1. These values accompany the individual F1 results. The paper does not report a p-value for the difference between the mixed and target-only runs. The individual p-values consequently cannot be used to decide whether that improvement passes a direct statistical comparison.

The authors characterize Facebook as easier during validation, and that judgment is visible in the target-only and mixed conditions. Facebook has the higher F1 in each of those comparisons. The ordering goes the other way for the two runs that train exclusively on the opposite network. The claim about relative difficulty is therefore a description of the general validation pattern, with training source still important to which direction of transfer does better.

Facebook on the contest test

The Facebook contest results reproduce the validation ordering for the choice of training source. The mixed run, which retains Facebook examples and adds Twitter, gives the best macro-averaged F-score among the team’s Facebook test runs. The gap between the mixed and Facebook-only settings is modest compared with the drop when training relies completely on Twitter.

Macro-averaged F-score by training source on the Facebook contest test

Adding Twitter examples improves the Facebook result, while Twitter-only training trails both runs that include Facebook.

Macro-averaged F-score by training source on the Facebook contest testFacebook training: 0,6419Facebook training0,6419Facebook and Twitter training (this paper): 0,6532Facebook and Twitter training (thispaper)0,6532Twitter training: 0,4378Twitter training0,4378
The numbers
System or settingMacro-averaged F-score
Facebook training0,6419
Facebook and Twitter training (this paper)0,6532
Twitter training0,4378

In the Facebook test’s hate-speech class, the F-score moves from 0,571 with Facebook-only training to 0,5769 with mixed training. In the other class it moves from 0,7128 to 0,7295. Both class-level scores contribute to the gain in the macro average. The changes in precision and recall differ between the classes, giving a more specific account of what the combined result means.

For hate speech on the Facebook test, precision is 0,478 with Facebook training alone and 0,4923 with mixed training. Recall is 0,7089 with Facebook alone and 0,6965 with mixed training. The gain in class F-score accompanies an increase in precision and a decrease in recall. Among messages predicted as hateful, a larger proportion matches that label after mixing. Among the messages actually labeled hateful, a smaller proportion is recovered. The improvement in the class score summarizes the balance of these changes.

For the other class on the same test, precision is 0,8195 in both the Facebook-only and mixed runs. Recall moves from 0,6307 to 0,6573. Here the improvement in F-score comes with a higher recovery rate and equal precision. This difference between the class-level patterns shows why a claim about improved macro performance needs a metric attached. The mixed run improves the class F-scores across the Facebook test, yet its hate-speech recall is lower.

The Twitter-trained classifier on the Facebook test makes a particularly uneven showing. For hate speech, it records precision of 0,3606 and recall of 0,9133, with F-score of 0,517. It recovers a large share of the messages labeled hateful, but many of the messages it marks as hateful belong to the other class. For that other class, it has precision of 0,8461 and recall of 0,2274, with F-score of 0,3585. The high recall for one side of the binary decision accompanies low recovery for the other. The macro average reflects the overall cost of that imbalance.

The paper reports contest positions of 13 for the Facebook-only run and 12 for the mixed run on Facebook. The Twitter-trained submission tested on Facebook has position 11 in its cross-platform contest setting. Those positions come from the respective task comparisons. The macro scores are the informative basis for comparing the paper’s training choices against the same evaluation target, since a position in the cross-platform task is relative to submissions facing that task’s training restriction.

Twitter on the contest test

The Twitter contest results also favor the mixed collection at the macro level. Twitter-only training provides the stronger of the two single-source options. Facebook-only training produces a substantially lower aggregate score than either approach that sees Twitter examples.

Macro-averaged F-score by training source on the Twitter contest test

The mixed collection leads on Twitter, with Facebook-only training producing the lowest score.

Macro-averaged F-score by training source on the Twitter contest testTwitter training: 0,7203Twitter training0,7203Facebook and Twitter training (this paper): 0,7426Facebook and Twitter training (thispaper)0,7426Facebook training: 0,443Facebook training0,443
The numbers
System or settingMacro-averaged F-score
Twitter training0,7203
Facebook and Twitter training (this paper)0,7426
Facebook training0,443

On the Twitter test, the hate-speech F-score is 0,8428 with Twitter-only training and 0,8149 with the mixture. The other class goes from F-score of 0,5978 to 0,6703. Thus the aggregate improvement on Twitter accompanies a decrease in the score for hate speech and an increase in the score for the other class. A reader concerned primarily with performance on hate speech would draw a different conclusion from the class F-score than from the aggregate ranking of the two runs. The contest’s macro measure rewards the improvement in balance across the classes.

For Twitter hate speech, mixing changes precision from 0,7952 to 0,8628 and recall from 0,8964 to 0,7721. The classifier trained on the mixture is more precise in its hate-speech predictions and recovers fewer of the messages labeled hateful. For the other class, precision moves from 0,7058 to 0,6101 and recall from 0,5185 to 0,7438. On that side of the decision, the increased recovery rate accompanies a fall in precision. The class scores summarize these opposing movements, which would be hidden in a report of the macro averages alone.

When training uses Facebook exclusively, the Twitter test’s hate-speech precision is 0,6579 and recall is 0,3727, with F-score of 0,4759. For the other class, precision is 0,3128 and recall is 0,5956, with F-score of 0,4102. The weak transfer result therefore has a different class profile from the run that transfers from Twitter to Facebook. In particular, the conspicuously high hate-speech recall seen when transferring into Facebook does not recur when transferring into Twitter. Both directions yield weak macro averages, but the class figures show different mistakes.

On Twitter the reported contest positions are 11 for the Twitter-only run and 10 for the mixed run. The Facebook-trained run tested on Twitter has position 12 in the cross-platform setting. The overall Facebook and Twitter comparison also changes between validation and the contest. For the target-only and mixed runs, Twitter has the higher macro F-score on the contest tests, even though Facebook had the higher validation F1 in those conditions. The authors describe Facebook as generally more difficult in the contest. The persistence of the training-source ordering across the splits is stronger evidence for their main finding than the relative difficulty of the platforms.

What the ablations show

Training source is the main comparison

The paper has no ablation of individual network components. Its main controlled comparison changes the source of training examples, and its additional analyses examine epoch curves, class-level outcomes, and the result of a related misogyny classification experiment. These address different parts of the argument. The source comparison establishes what happened after changing the training collection. The other analyses help describe how the fits and predictions differ, while leaving open the mechanism behind the aggregate change.

The most informative pairing begins with the target-only and mixed conditions. For Facebook, both choices provide Facebook examples, and the mixed choice supplies Twitter examples too. For Twitter, both choices provide Twitter examples, and the mixed choice adds Facebook. Each pairing holds the evaluation platform fixed. Because the mixed setting leads in both pairings on validation and on the contest macro measure, the finding does not rest on a single direction of augmentation or a single evaluation split.

Comparing the mixed condition with the other-platform-only condition answers a different question. In both conditions, training has material from the other network. In the mixed condition, it also has material from the target. Performance is much stronger when the target’s material is available. This supports the authors’ conclusion that the source intended for classification is important to these results. The comparison cannot tell how much target data is needed to obtain that benefit because the paper does not vary the amount included in a series of increments.

The other-platform-only runs also help interpret the successful mix. A reader seeing only the mixed and target-only results could infer that the classification rules learned from the two corpora are readily interchangeable. The transfer runs give a direct check of that inference. The weak scores show that a classifier fitted exclusively to either corpus has difficulty with the other. The gain from including an additional source can therefore coexist with a substantial dependence on material from the source being classified.

Every source condition uses the authors’ basic representation and network design, with tuning performed for that run. This makes the comparison meaningful as an assessment of complete training strategies. It does not hold every learned quantity constant. A new training collection changes the text and labels available for fitting, and the selected epoch can change with it. The paper is comparing what the specified pipeline achieves under those conditions. It does not isolate the outcome of changing source while holding training size, word coverage, class balance and training duration fixed.

What changes during fitting

The paper’s training figure follows F1 and loss over the first 10 epochs for the submitted runs. It plots averages over the 10 folds and gives separate curves for training folds and the held-out fold. The purpose of showing both is to let the reader judge when further fitting stops helping the held-out data. A training curve can still look favorable after the validation curve has flattened or turned in the other direction. The epoch choice uses the difference between those trajectories.

For Facebook, the selected epoch count is 7 with Facebook-only training and 3 with mixed training. For Twitter, the corresponding choice is 6 with Twitter-only training and 4 with the mixture. In both cases the authors settle on an earlier epoch count when fitting on the combined sources. The observation concerns the selected stopping points under the reported procedure. Since the amount of training material also changes, an epoch is a pass over a different collection in the mixed condition. Comparing epoch counts alone cannot show that the network requires fewer parameter updates or that the mix prevents overfitting.

The paper offers reduced overfitting as a possible reason why a mixture helps. The curves are relevant because they show how the authors looked for overfitting during tuning. They do not establish that reduced overfitting caused the contest gains. Each system already has a stopping point chosen to avoid continued fitting after held-out performance ceases to benefit. A better score after that selection could reflect the content of the additional examples, the increased number of examples, or an interaction between the training data and the stopping choice. The figure describes the fitting behavior without separating those explanations.

What the class results add

The contest class scores make it possible to distinguish a gain that extends across the class F-scores from a gain driven by the balance between classes. The Facebook test displays the former. Both F-scores rise after adding Twitter, although hate-speech recall falls as hate-speech precision rises. The Twitter test displays the latter. The improvement in the non-hate-speech F-score accompanies a fall in the hate-speech F-score. The common conclusion from both target platforms is an improvement in the contest aggregate. A common improvement in every aspect of identifying hateful messages would be a stronger claim than the class results support.

The cross-platform class breakdown adds information about the failure to transfer. In the transfer from Twitter to Facebook, the classifier finds many of the messages labeled as hate speech, while its hate-speech precision and recall of the other class are weak. In the reverse direction, recovery of hate speech is weak in spite of a higher precision for that class than for the other class. These results locate some of the damage by type of classification error. They do not reveal which particular expressions or annotation decisions produced the errors because the paper does not tie them to an analysis of individual messages.

The comparison with misogyny classification

The authors also tried the same general merging approach in the EVALITA 2018 AMI task. In that experiment, adding misogyny data or hate speech data left misogyny classification at roughly similar performance. The paper gives no score for that comparison. It is relevant as a second application of the idea, with an outcome different from the HaSpeeDe result. The observation narrows the practical conclusion. A merge improved the aggregate for the Facebook and Twitter hate-speech tests, while a comparable approach did not clearly improve the related task described in the conclusion.

The authors identify training set size and the number of distinct words as variables that may matter to the difference. The AMI comparison does not hold either of them fixed. Its value is to show that the same broad procedure can have different outcomes across classification problems. It leaves the cause of the difference open, just as the primary HaSpeeDe comparisons leave open why the mixture improved the scores in that setting.

Limitations

Limits identified by the authors

The authors explicitly leave the reason for the HaSpeeDe gain unresolved. Joining the corpora increases the number of training instances and adds material from a different social network. The former could help by giving the learner more labeled evidence. The latter could help by broadening the evidence and reducing dependence on patterns specific to one corpus. The reported experiment changes both together. Its result is a comparison of the particular collections the authors use, with no separate estimate of the contribution of training size or source diversity.

Their account of the AMI experiment adds a limit to the expected generality of the method. They report a small improvement from pooling data for HaSpeeDe and similar performance after adding material for misogyny classification. They leave the difference unexplained and mention the number of training messages and the number of distinct words as possibilities. The findings support treating the usefulness of a merge as a property to measure for a task. The paper does not provide a rule for predicting it from the type of abuse or the platform name.

The conclusion that target-platform examples were needed for good performance is grounded in the runs the authors actually conducted. Their evidence shows weak results for this procedure when trained exclusively on the opposite platform. The authors also describe merged training as potentially helpful for generalization. The improvement they measure is on Facebook and Twitter test sets whose platforms were represented in the mixture. From the study itself, generalization means improved performance on held-out messages from those evaluation sources.

Limits of the comparison

The source labels Facebook and Twitter stand for complete corpora. The collections differ in platform, come from different years, and were assembled through different corpus efforts. Those properties travel together in the transfer experiment. Consequently, the observed performance drop cannot be assigned uniquely to properties of Facebook or Twitter as services. It may reflect differences in the language of the messages, the topics and people represented, the way the messages were selected, or how the labeling decisions were made. These are plausible explanations allowed by the setup, rather than factors the authors measure separately.

A common file format is enough to combine the datasets technically. A common binary label is enough to fit and score the same classification procedure on them. Those forms of alignment cannot tell the reader whether all borderline cases would receive the same label across the source collections. The authors do not present a joint annotation study or a comparison that classifies the same messages under the respective corpus procedures. Their results measure agreement with the labels supplied for each test set. They therefore leave open how much of the transfer difficulty comes from the underlying texts and how much could come from the assignment of labels.

The paper also does not report an equal-size comparison between single-source and mixed training. A larger single-source collection evaluated under the same procedure could help distinguish a general gain from extra labeled messages from a gain specific to combining sources. A smaller mixed collection matched to the size of the single-source baseline would address a related question. Neither comparison is reported, so the size of the observed improvement cannot be treated as an estimate of the independent effect of diversity. This distinction also applies to lexical coverage. Seeing different words could matter, but the paper does not show how vocabulary overlap or coverage changed and whether that change tracks the test results.

The two different splits provide a check on the stability of the comparison, with a revealing limit. The overall ordering of training regimes recurs, but the general judgment about platform difficulty reverses from validation to the contest tests. That reversal cautions against characterizing one of the two social networks as inherently easier for this task. The messages used for evaluation and the conditions of the run matter to the comparison. The study does not report repeated contest splits that could show how stable the apparent difficulty of each platform would be under alternative samples.

There is also a statistical distinction between the validation results and the strength of the claim made about their differences. The paper reports permutation-test p-values for individual validation F1 scores. It gives neither a direct test of the gain between the matched runs nor an uncertainty interval around that gain. The alignment between validation and contest results makes the pattern more informative than a gain seen only once. It still leaves uncertainty about how large a benefit another split of comparable material would show.

Limits of the classification evidence

The metric assigns equal weight to the class F-scores, which makes the macro average responsive to performance on both classes. What it rewards can differ from what a reader cares about in a practical application. The Twitter mixed run is the clearest case. Its overall score improves even though its hate-speech F-score and hate-speech recall decline. The reported precision and recall are enough to identify that tradeoff. The study does not examine whether another decision threshold would retain the aggregate advantage while changing the balance of missed hate speech and incorrect hate-speech predictions.

The binary setup provides no breakdown by targeted group, kind of hate speech or context of use. Scores for hate speech as a class cannot show whether the benefit extends evenly across such distinctions. The paper supplies no set of errors for close reading, so the reader also cannot determine whether the hardest messages involve indirect language, specialized vocabulary or ambiguous labeling from the reported experiments. These are boundaries of the measurement. The study measures performance on the specified task and gives class-level scores, which are the level at which its main findings should be read.

The method is described in enough detail to understand the architecture and the central source comparison. Some procedural details require the implementation or further clarification to reproduce exactly. The account does not fully specify the relationship between the 30% validation holdout and the 10-fold tuning procedure for every run, the weighting calculation, the prediction threshold, or the permutation protocol. These omissions are especially relevant to close comparisons of training and validation behavior. The contest tables give the observed outcomes for the submitted runs, while those finer choices remain underspecified in the paper’s methodological description.

Finally, the effective reach of the study is the combination of its data, labels and training procedure. The experiment uses Italian messages from the Facebook and Twitter collections selected for HaSpeeDe. It provides evidence that the two collections can help each other when the target material is present under the reported setup. Transfer to other languages, further platforms or later collections would require their own evidence. The poor scores in the deliberately mismatched conditions are a concrete reason to keep the intended evaluation population visible when interpreting the gains.

What came after

In their overview of the hate speech detection task at EVALITA 2018, Bosco and colleagues cite the study and describe the shared evaluation in which the research took place. Its connection is to the benchmark that made the training-source comparison possible. The task distinguishes testing on the same platform from testing on the opposite platform, which gives a setting in which the cost of relying completely on the other source can be measured. Fortuna and colleagues use that distinction and add their mixed training runs, asking whether the other corpus can help when target-platform examples are already available. EVALITA 2018 hate speech task overview

The overview is a companion account from the same evaluation campaign. The citation connects the merging experiment to the broader task, and the study itself cites the overview when introducing HaSpeeDe. The documented relationship is therefore about the shared evaluation and the team’s contribution to it. The citation does not establish a further experiment that adopts the merge or a replication of the improvement. The task overview supplies the campaign context for interpreting the within-platform and cross-platform runs, while the evidence for adding the other corpus comes from the mixed runs and their class-level and aggregate results.

Cite

Cite as Paula Fortuna, Ilaria Bonavita and Sérgio Nunes. 2018. Merging Datasets for Hate Speech Classification in Italian. Proceedings of the Sixth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian. Final Workshop (EVALITA 2018).

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{fortuna2018merging,
  title = {{Merging Datasets for Hate Speech Classification in Italian}},
  author = {Paula Fortuna, Ilaria Bonavita and Sérgio Nunes},
  booktitle = {Proceedings of the Sixth Evaluation Campaign of Natural Language Processing and Speech Tools for Italian. Final Workshop (EVALITA 2018)},
  year = {2018},
  url = {https://aclanthology.org/2018.evalita-1.38/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/fortuna-2018-merging-datasets-hate-speech-classification/