Hostname: page-component-77f85d65b8-grvzd Total loading time: 0 Render date: 2026-03-28T08:47:55.446Z Has data issue: false hasContentIssue false

A transformer-based multi-task framework for joint detection of aggression and hate on social media data

Published online by Cambridge University Press:  11 April 2023

Soumitra Ghosh
Affiliation:
Department of Computer Science and Engineering, IIT Patna, India
Amit Priyankar
Affiliation:
Department of Computer Science and Engineering, IIT Patna, India
Asif Ekbal*
Affiliation:
Department of Computer Science and Engineering, IIT Patna, India
Pushpak Bhattacharyya
Affiliation:
Department of Computer Science and Engineering, IIT Bombay, India
*
*Corresponding author. E-mail: asif@iitp.ac.in
Rights & Permissions [Opens in a new window]

Abstract

Moderators often face a double challenge regarding reducing offensive and harmful content in social media. Despite the need to prevent the free circulation of such content, strict censorship on social media cannot be implemented due to a tricky dilemma – preserving free speech on the Internet while limiting them and how not to overreact. Existing systems do not essentially exploit the correlatedness of hate-offensive content and aggressive posts; instead, they attend to the tasks individually. As a result, the need for cost-effective, sophisticated multi-task systems to effectively detect aggressive and offensive content on social media is highly critical in recent times. This work presents a novel multifaceted transformer-based framework to identify aggressive and hate posts on social media. Through an end-to-end transformer-based multi-task network, our proposed approach addresses the following array of tasks: (a) aggression identification, (b) misogynistic aggression identification, (c) identifying hate-offensive and non-hate-offensive content, (d) identifying hate, profane, and offensive posts, (e) type of offense. We further investigate the role of emotion in improving the system’s overall performance by learning the task of emotion detection jointly with the other tasks. We evaluate our approach on two popular benchmark datasets of aggression and hate speech, covering four languages, and compare the system performance with various state-of-the-art methods. Results indicate that our multi-task system performs significantly well for all the tasks across multiple languages, outperforming several benchmark methods. Moreover, the secondary task of emotion detection substantially improves the system performance for all the tasks, indicating strong correlatedness among the tasks of aggression, hate, and emotion, thus opening avenues for future research.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2023. Published by Cambridge University Press
Figure 0

Figure 1. Overall architecture of the proposed transformer-based multi-task framework Detection (MTFHAD).

Figure 1

Table 1. Examples of HOF and NOT instances from HASOC 2019 dataset.

Figure 2

Table 2. Data distribution over train and test sets of HASOC 2019 for the 3 subtasks. ‘-’ indicates no data as Subtask-C was not present for German language.

Figure 3

Table 3. Data distribution over train and test sets of TRAC-2 2020 for the 2 subtasks.

Figure 4

Table 4. Data distribution over various emotion classes for the considered emotion datasets. ‘-’ indicates the absence of a particular class in a dataset.

Figure 5

Table 5. Sample emotion predictions on instances from different languages of the TRAC and HASOC datasets. The annotated labels for a particular instance from each dataset is shown in the square brackets. The text inside parentheses is the gloss for a particular non-English instance.

Figure 6

Table 6. Details of various hyper-parameters related to our experiments.

Figure 7

Table 7. Results on TRAC-Hindi and HASOC-Hindi datasets. Values in bold indicate the maximum score for a perticular task. * indicates a model variant with no emotion task. ‘-’ indicates no output for a particular task as it was not considered by the baseline system. Standard deviation values are shown inside parentheses.

Figure 8

Table 8. Results on TRAC-English and HASOC-English datasets. Values in bold indicate the maximum score for a particular task. * indicates a model variant with no emotion task. ‘-’ indicates no output for a particular task as it was not considered by the baseline system. Standard deviation values are shown inside parentheses.

Figure 9

Table 9. Results on TRAC-Bengali and HASOC-German datasets. Values in bold indicate the maximum score for a particular task. Here, * indicates a model variant with no emotion task. ‘-’ in the Baselines indicates no output for a particular task as it was not considered by the baseline system. ‘-’ in the MTFHAD rows indicates no result as Subtask-C was not present for German language. Standard deviation values are shown inside parentheses.

Figure 10

Table 10. Results considering the dataset pairs of the following language combination: TRAC-English and HASOC-German, TRAC-Bengali and HASOC-Hindi. ‘-’ indicates no result as Subtask-C was not present for German language.