ToxVidLM: A Multimodal Framework for Toxicity Detection in Code-Mixed Videos (2024)

Abstract: In an era of rapidly evolving internet technology, the surge in multimodal content, including videos, has expanded the horizons of online communication. However, the detection of toxic content in this diverse landscape, particularly in low-resource code-mixed languages, remains a critical challenge. While substantial research has addressed toxic content detection in textual data, the realm of video content, especially in non-English languages, has been relatively underexplored. This paper addresses this research gap by introducing a benchmark dataset, the first of its kind, consisting of 931 videos with 4021 code-mixed Hindi-English utterances collected from YouTube. Each utterance within this dataset has been meticulously annotated for toxicity, severity, and sentiment labels. We have developed an advanced Multimodal Multitask framework built for Toxicity detection in Video Content by leveraging Language Models (LMs), crafted for the primary objective along with the additional tasks of conducting sentiment and severity analysis. ToxVidLM incorporates three key modules – the Encoder module, Cross-Modal Synchronization module, and Multitask module – crafting a generic multimodal LM customized for intricate video classification tasks. Our experiments reveal that incorporating multiple modalities from the videos substantially enhances the performance of toxic content detection by achieving an Accuracy and Weighted F1 score of 94.29% and 94.35%, respectively. Disclaimer: The article contains profanity, an inevitable situation for the nature of the work involved. These in no way reflect the opinion of the authors. ∗ Denotes an equal contribution to this work by the respective authors and are jointly the first authors. The code and dataset will be made available at https://github.com/justaguyalways/ToxVidLM_ACL_2024

text: Findings of the Association for Computational Linguistics ACL 2024, pages 11130–11142 August 11-16, 2024 ©2024 Association for Computational Linguistics
In an era of rapidly evolving internet technology, the surge in multimodal content, including videos, has expanded the horizons of online communication. However, the detection of toxic content in this diverse landscape, particularly in low-resource code-mixed languages, remains a critical challenge. While substantial research has addressed toxic content detection in textual data, the realm of video content, especially in non-English languages, has been relatively underexplored. This paper addresses this research gap by introducing a benchmark dataset, the first of its kind, consisting of 931 videos with 4021 code-mixed Hindi-English utterances collected from YouTube. Each utterance within this dataset has been meticulously annotated for toxicity, severity, and sentiment labels. We have developed an advanced Multimodal Multitask framework built for Toxicity detection in Video Content by leveraging Language Models (LMs), crafted for the primary objective along with the additional tasks of conducting sentiment and severity analysis. ToxVidLM incorporates three key modules – the Encoder module, Cross-Modal Synchronization module, and Multitask module – crafting a generic multimodal LM customized for intricate video classification tasks. Our experiments reveal that incorporating multiple modalities from the videos substantially enhances the performance of toxic content detection by achieving an Accuracy and Weighted F1 score of 94.29% and 94.35%, respectively.
Disclaimer: The article contains profanity, an inevitable situation for the nature of the work involved. These in no way reflect the opinion of the authors.
∗ Denotes an equal contribution to this work by the respective authors and are jointly the first authors.
The code and dataset will be made available at https://github.com/justaguyalways/ToxVidLM_ACL_2024

heading: 1 Introduction
text: In an age where social media platforms empower users to become content creators, the digital landscape has witnessed an unprecedented proliferation of information dissemination. By 2023, it is estimated that 82% of internet traffic will be video content (Wilson, 2022). As a result, platforms like YouTube and Dailymotion have become major sources of information. A remarkable statistic underscores the colossal impact of these platforms: on YouTube alone, users collectively view more than a billion hours of video content each day2. The viral nature of video content is a double-edged sword: it facilitates rapid news propagation yet simultaneously accelerates the dissemination of toxic speech. We adhere to the definition of toxic speech provided by Dixon et al. (2018), which characterizes it as "discourteous, disrespectful, or unreasonable language likely to compel someone to exit a discussion".
This expansive realm of videos on platforms like YouTube encompasses an array of topics, with the majority of content being innocuous. However, there exists a darker side – videos that blatantly contravene community guidelines and foster harmful narratives (O’Connor, 2021). The non-removal of toxic content from these platforms can have severe repercussions, including the formation of hostile online environments with echo chambers of hateful users, potential loss of revenue, fines, and legal entanglements3. While some platforms deploy human moderators to identify and remove harmful content, the sheer volume of daily user-generated content poses an overwhelming challenge. Facebook, for instance, engages approximately 15,000 moderators to review content flagged by both AI algorithms and users but still faces approximately
2https://blog.youtube/press/ 3https://www.wsj.com/articles/germany-to-social-
networks-delete-hate-speech-faster-or-face-fines1498757679
11130
300,000 content moderation mistakes every day4. Furthermore, the toll on human moderators is not limited to their professional obligations but extends to the risk of emotional and psychological trauma. This issue is further compounded by legal regulations that mandate the swift removal of hateful content. Non-compliance with these laws could result in substantial fines.
Current research in the domain of toxic speech detection primarily focuses on text-based models (Kennedy et al., 2020; Roy and Mali, 2022; Obaid et al., 2023; Maity et al., 2022b; Das et al., 2022; Maity et al., 2023), with limited exploration of image-based methodologies (Yang et al., 2019; Gomez et al., 2020; Kiela et al., 2020; Maity et al., 2022a) and very few works on video data (Wu and Bhandary, 2020; Rana and Jha, 2022; Das et al., 2023; Jha et al., 2024). Detecting harmful actions in videos requires the fusion of multi-frame video and speech processing signals, making direct adaptation of image-based hate detection methods inadequate. Existing toxic content detection methods predominantly rely on text-based modalities, with limited exploration of video content and a focus on monolingual languages like English. However, the surge in code-mixed language use, especially in multilingual countries like India, where people frequently blend Hindi and English in their communication (known as code-mixing (Myers-Scotton, 1997)), presents a unique challenge for machine learning tool development, as highlighted by (Vyas et al., 2014). While studies have addressed toxic content detection in code-mixed social media texts, a significant research gap remains in code-mixed videos.
Main Contributions: This paper strives to address these challenges by introducing a comprehensive approach for detecting toxic speech in video content, leveraging the multi-modal nature of video data and advanced deep learning techniques. Through the development of efficient models, it aims to contribute to the creation of safer online environments and facilitate compliance with evolving legal regulations concerning toxic content. Our contributions are twofold:
i) We introduce ToxCMM, an openly accessible dataset extracted from YouTube that is meticulously annotated for toxic speech, with utterances presented in code-mixed form. Each sentence within the videos is annotated with three crucial la-
4https://www.forbes.com/sites/johnkoetsier
bels, namely Toxic (Yes / No), Sentiment (Positive / Negative / Neutral), and Severity levels (Nonharmful / Partially Harmful / Very Harmful). This extensive dataset comprises 931 videos, encompassing a total of 4021 utterances. The release of the ToxCMM dataset is intended to foster further exploration in the realm of multi-modal toxic speech detection within low-resource code-mixed languages.
ii) We have innovated ToxVidLM, a multimodal multitask framework for detecting toxic videos and analyzing their sentiment and severity. ToxVidLM integrates three key modules: the Encoder module, the Cross-Modal Synchronization Module, and the Multitask module, to create a versatile Multimodal LM tailored for video classification tasks. Our framework incorporates a sophisticated gated modality fusion mechanism, empirically proven to outperform standard fusion techniques in ablation studies. We propose a method for synchronizing the text modality with other modalities, yielding promising results as demonstrated in our studies. Notably, our framework is adaptable to various publicly available pre-trained models, serving as modality encoders, making it applicable to diverse problem statements. Our most effective multitask model achieves notable weighted F1-Scores of 94.35%, 86.84%, and 83.42% for Toxicity detection, Severity levels, and Sentiment identification, respectively.

heading: 2 Related Works
text: The widespread availability of multi-modal data has led to the utilization of multi-modal deep learning techniques, enhancing the accuracy of diverse tasks such as visual question answering (Singh et al., 2019), summarization (Ghosh et al., 2024b,a) and the detection of fake news and rumors (Khattar et al., 2019). In recent times, multi-modal hate speech detection has gained traction, where text posts are augmented with additional contextual information such as user and network data (Founta et al., 2019) or images (Yang et al., 2019; Gomez et al., 2020; Kiela et al., 2020; Maity et al., 2022a) to bolster detection accuracy. These multi-modal approaches often involve the utilization of unimodal methods like CNNs, LSTMs, or BERT for text encoding and deep CNNs like ResNet or InceptionV3 for image encoding. Subsequently, multimodal fusion is performed through techniques like simple concatenation, gated summation, bilinear
transformation, or attention-based methods. Additionally, the application of multi-modal transformers such as ViLBERT and Visual BERT has been explored (Kiela et al., 2020).
While research on the detection of offensive or toxic videos is scarce, particularly in the context of languages such as Portuguese (Alcântara et al., 2020), Thai (Maity et al., 2024) and English (Wu and Bhandary, 2020; Rana and Jha, 2022; Das et al., 2023), it is worth noting that the existing work in this area predominantly revolves around monolingual languages. Maity et al. (2024) leverages textual data to propose a dual-channel network to classify hate and sentiment in low-resource settings. Notably, the two studies (Alcântara et al., 2020; Wu and Bhandary, 2020) exclusively considered textual features by extracting video transcripts for classification. In contrast, (Rana and Jha, 2022)’s research takes both textual and audio features for offensive video detection. However, this study confronts issues related to dataset accessibility, insufficiently detailed data curation and annotation processes, and a lack of precise dataset statistics. Das et al. (2023) developed a more comprehensive approach by integrating all three modalities (text, Image, and audio) for hate video detection in English.
To the best of our knowledge, our study pioneers the introduction of a multi-modal toxic video dataset in the context of low-resource code-mixed languages, further distinguished by the annotation of sentence-level labels. We are confident that our dataset, along with the benchmark models developed using it, will significantly assist content moderators in distinguishing genuine cases of hateful content while concurrently reducing false alarms.
3 Toxic Code-Mixed Multimodal (ToxCMM) Dataset Creation
Data Collection: We selected YouTube as our primary data source, given its popularity as a video hosting platform. Our focus was on code-mixed language conversations, primarily in Hindi and English. To collect relevant content, we utilized the YouTube API to scrape Indian web series and Hindi "roasted" videos. We subdivided the downloaded videos into smaller sub-videos to annotate them at the sentence level and maximize the inclusion of toxic content. Initially, we obtained 1023 videos, but after a thorough review, we retained 931 videos as the remaining ones were mostly in English, not
the intended Hindi-English code-mixed format. To generate transcripts for each video, we used the Whisper (Radford et al., 2023) transcribing model, configured with word timestamps from the OpenAI library. We then manually improved the transcript quality by removing unclear words and symbols resulting from speech disruptions or stammering. Extracting individual utterances from the videos involved cataloging their start and end times.

heading: 3.1 Data Annotation
text: To better clarify the annotation process, we split the annotation section into two subsections: (i) Annotation Training and (ii) Main Annotation. Annotation training: Three PhD scholars oversaw the annotation process, well-versed in toxic and offensive content, and the actual annotations were conducted by three undergraduate students proficient in both Hindi and English. Initially, we hired a group of masters students in linguistics who volunteered via our department email list and compensated them with gift vouchers and an honorarium. To train our annotators, we required gold standard samples with annotations for toxicity, severity, and sentiment labels. Our expert annotators randomly selected 150 samples (a small video of one sentence) and assigned suitable target classes. We considered two toxicity classes (Non-toxic/toxic), three sentiment classes (positive/neutral/negative), and the severity score on a three-point scale (0, 1, 2) for each video sample. Score 0 signifies that there is no indication of toxicity and 1 indicates that the post contains indications of toxicity. However, they are not severe, and a score of 2 indicates that the post contains strong evidence of toxicity (e.g., physical threats or excitement to commit suicide). Expert annotators engaged in discussions to resolve any differences and created 150 goldstandard samples with rationale and target annotations. These 150 annotated examples were divided into three sets, each containing 50 samples, to facilitate a three-phase training process. After each phase, expert annotators collaborated with novice annotators to correct any inaccuracies in the annotations, and the annotation guidelines were updated as needed. Following the conclusion of the third round of training, the top three annotators were selected to annotate the entire dataset containing 4021 samples.
Main annotation: We began with a small batch of 100 samples, gradually increasing it to 500 as an-
Table 1: Class-wise data statistics of our developed ToxCMM dataset
# Video #Utterances Toxicity Severity SentimentNon-Toxic Toxic 0 1 2 Positive Neutral Negative 931 4021 2324 1697 2324 834 863 469 1401 2151
(a) (b)
Utterance: Sir, yeh sabse chuthiya sawaal hai, sir Translation: Sir, this is the most foolish question.
Toxic:- Yes ; Severity :- 1 ; Sentiment :- Negative
Utterance: Suchi, pressure aaya hai, bad me phone karta hoon Translation: Really, I am in pressure now, call you later.
Toxic:- No ; Severity :- 0 ; Sentiment :- Negative
(c)
Utterance: apne aape mar jaayega madharchod Translation: Motherfucker will die on his own.
Toxic:- Yes ; Severity :- 2 ; Sentiment :- Negative
Figure 1: Some samples from annotated ToxCMM dataset; The yellow highlighted words are in English.
notators improved. To ensure consistency, we corrected errors from previous batches, and for final labels, majority voting was employed. In cases of disagreements among annotators, expert input was sought. Annotators were instructed to be unbiased in their assessments. The quality of annotations was assessed using Fleiss’ Kappa scores (Fleiss, 1971), resulting in IAA scores of 0.74 for toxicity classification, 0.67 for sentiment classification, and 0.64 for severity detection, confirming dataset quality and reliability. Figure 1 shows some samples from annotated ToxCMM dataset. Sample (b) shows a non-toxic video with negative sentiment. In contrast, both samples (a) and (c) are identified as toxic videos with negative sentiments. However, sample (a) is deemed less severe, while sample (c) is considered more severe due to its explicit use of profanity, aggressive language, and the wish for harm or death upon someone.

heading: 3.2 Dataset Statistics
text: The ToxCMM dataset comprises a total of 4021 utterances, with 1,697 categorized as toxic and the remaining 2,324 labelled as non-toxic. Class-wise statistics for the ToxCMM dataset are provided in Table 1. Each utterance in this dataset contains an average of 8.68 words, with an average duration of 8.89 seconds. On average, each utterance in the dataset contains about 68.20% Hindi words, which means that more than two-thirds of the words are in Hindi, while the remaining words are in English.

heading: 4 Methodology
text: Problem Formulation: We formulate our problem as follows: Given an utterance video clip denoted as V, our task is essentially a classification problem. We aim to determine whether the video contains toxic content, as well as assign sentiment and severity labels to it. Each video, V , is expressed as a sequence of frames, F = {f1, f2, . . . fn}, accompanied by its associated audio A that is sampled at 16kHz to construct a sequence of features A = {a1, a2, . . . al} and a transcript of the video, T = {w1, w2, . . . wm}, which consists of a sequence of words. Our goal is to construct a deep learning-based video classifier, denoted as C : C(T ;F ;A) → y, where y signifies the actual label of the video for a given task.
In this section, we describe our developed LMbased multimodal-multitask framework ToxVidLM (see Figure 2) for toxic video detection and its sentiment and severity analysis. To enhance comprehension of our proposed method, we partition it into three distinct components: namely, the Encoder module, Cross Modal Synchronization Module, and the Multitask module.

heading: 4.1 Encoder Module
text: Current transformed-based language models (LMs) exhibit substantial capability but are commonly constrained to processing textual data exclusively. In this section, we elucidate our approach to encoding information from diverse modalities.
Audio Encoder We conducted experiments using two state-of-the-art (SOTA) models, namely
Whisper (Radford et al., 2023) and MMS (Pratap et al., 2023), to encode the audio signals and derive meaningful representations from the audio data.
Video Encoder: To handle the spatial and temporal information in the videos, we consider two vision-based models, VideoMAE (Tong et al., 2022) and Timesformer (Bertasius et al., 2021).
Text Encoder: To generate text embeddings, we leverage the BERT (Vaswani et al., 2017) family, renowned for its high effectiveness in various NLP tasks. Given our focus on Hindi-English code-mixed text, we have conducted experiments with three various models in HingBERT (Nayak and Joshi, 2022) family, like HingMBERT, HingRoBERTa, HingGPT and IndicBERT (Kakwani et al., 2020). These models are pre-trained on Hindi-English code-mixed Roman text.
As per the results obtained, we utilize pre-trained models such as VideoMAE and Whisper to encode the input video (V ) and audio (A) inputs, respectively, as outlined below:
Zv = VideoMAE(V ) (1a)
Za = Whisper(A) (1b)
Also, Zv ∈ RSLv×dv and Za ∈ RSLa×da respectively. Here, SLv and SLa represent the sequence lengths of video and audio inputs, respectively.dv and da represent the embedding dimension of encoded audio and video, respectively. Please see
Appendix B for more details on audio, video and text encoders used in our study.

heading: 4.2 Cross Modal Synchronization Module
text: Modality encoders are typically trained independently, resulting in discrepancies among the generated representations. Consequently, it becomes imperative to synchronize these distinct representations within a unified space to enhance the overall coherence and effectiveness of multimodal processing. In this section, we present a detailed methodology for aligning these representations.
Modality Synchronization The synchronization strategy aims to effectively correlate features extracted from multiple modalities, such as audio and video, with a primary focus on textual features. This emphasis is due to the heightened significance of textual information in addressing our specific problem statement. Textual features are preferred over auditory and visual signals due to their comparatively lower susceptibility to noise. This empirical observation is consistently reflected in the obtained results, emphasizing the importance of robust textual representation.
The procedure for modality synchronization is delineated as follows:
(1) Abstract Feature Extraction: To mitigate computational expenses and limit the token count in the prefix, we utilize a 1-D convolutional layer
(Conv) to compress the length of multi-modal features to a condensed and consistent value. Following this, a linear layer (FC) is employed to modify the hidden size of the features, aligning it with the dimensions of the token embeddings in the LMs, as described below:
Cv = FC(Conv(Zv)) (2a)
Ca = FC(Conv(Za)) (2b)
where Cv ∈ RSL ′×dt and Ca ∈ RSL ′×dt are the abstract features with a fixed length of SL ′ . Here, dt represents the dimensionality of the embedding matrix Ellm ∈ RV×dt associated with the textual LMs (i.e., HingRoberta or HingGPT in our work) with vocabulary size V. (2) Multi-Head Cross Attention (MHCA) To establish a unified representation space guided by the text modality, we implemented Multi-Head CrossAttention (MHCA) on the abstract video and audio features obtained from the preceding layer. MHCA involves scaled dot-product attention applied to three inputs: Query (Q) from one modality, Key (K) and Value (V) from another. This attention mechanism computes attention weights by comparing the queries Q with the keys K, updating the query representations via a weighted sum of the values V, as described below:
MHCA(Q,K, V ) = Softmax ( QK T√
dk
) V
(3) where dk is the dimensionality of the key and query vectors. Using the attention mechanism in Equation 3, we propose to align the audio and visual representations with the textual embedding space as follows:
Csv = MHCA(Cv, Et, Et),
Csa = MHCA(Ca, Et, Et) (4)
In our research, we view the attenuated representations of visual (Csv) and audio (C s a) modalities derived from Equation 4 as the soft tokens utilized by the LM, acting as the input to the Multitask module.
(3) Gated Fusion To combine soft video and audio tokens, we employ a gated fusion strategy. Unlike concatenation or directly assigning weights to each vector, the gate fusion mechanism enables varying contributions to the prediction from different positions of vectors. The joint representation
resulting from the gate fusion is computed as follows:
α = σ(PvCsv + PaCsa + bg), Jva = α C s a + (1− α)Csv
(5)
Here, Pv and Pa represent weight matrices for the visual and acoustic modalities, while bg denotes scalar bias and σ is the sigmoid activation function.

heading: 4.3 Multitask Module
text: Typically, the LM model processes the input transcript T , generating a text token embedding Et with dimensions SLt × dt. Here, SLt is the maximum sequence length of the transcript, and dt is the embedding dimension. Here we have added the joint multimodal soft tokens (Jva) obtained from the Cross-Modal Synchronization Module, appended with the text tokens separated by the special token [SEP], thereby creating a multimodal input to the LM for a more comprehensive understanding of the input video. Subsequently, the sequence output from the LM undergoes averaging and is passed through three task-specific fully connected layers, followed by an output softmax layer, facilitating the concurrent solution of three tasks: toxicity, severity, and sentiment detection from a video.

heading: 4.4 Loss Function
text: The loss function used in all tasks is categorical cross-entropy. The final loss function (Lossf ) is a weighted sum of individual task-specific losses (Losss) for M tasks, where the contribution of each task’s loss to the overall loss is determined by the loss weight β as shown in Equation (6).
Lossf = M∑
k=1
βkLoss k s (6)
Where the parameters βi are learnt end-to-end, signifying task contribution from task i to the multitask loss, enabling differential importance for parameter updates across tasks.

heading: 5 Experimental Results and Analysis
text: Experimental Settings: All experiments were conducted on a machine equipped with an Intel Xeon Gold 5218 CPU featuring 64 cores and 128 threads, coupled with four Nvidia Tesla V100 GPUs with VRAM memory of 30 GB per GPU card. For the experiments’ preparation, the dataset
was partitioned into testing, validation, and training sets at ratios of 10%, 10%, and 80%, respectively. To ensure robustness, the models were trained ten times with different random splits, and the average performance was reported. Several network configurations were tested, with the best results achieved using the Adam optimizer (Kingma and Ba, 2014) with a Cosine Annealing Learning Rate scheduler (Loshchilov and Hutter, 2016), batch size of 2, a learning rate set to 1e−5, and training for 30 epochs. All models were implemented in the PyTorch framework5.
Baseline Setup We have implemented the baseline model as outlined in the study by Das et al. (2023) which introduced a multimodal dataset designed for Hate-speech classification. In their proposed architecture, each modality is processed separately through a transformer-based encoder, followed by modality-specific fully connected layers. Subsequently, a Fusion Layer concatenates the modality-specific representations, which are then forwarded to a fully connected classification layer. The output dimension of this final layer corresponds to the number of classes in the classification task. The entire model is trained using a single cross-entropy loss function. We have exclusively conducted single-task experiments for the three tasks (Toxicity detection, Severity detection, and Sentiment classification) in unimodal/bimodal/trimodal settings. A diagram illustrating baseline models is presented in Figure 3

heading: 5.1 Findings from Experiments
text: Table 2 shows the results of toxicity, severity and sentiment classification tasks with different baseline models. Results of the proposed ToxVidLM model are shown in Table 3. From all these
5https://pytorch.org/.
reported results, we can conclude the following:
(1) Our experimentation involved four text encoders (HingRoberta, HingGPT, IndicBERT, HingMBERT), two video models (VideoMAE, Timesformer), and two audio encoders (Whisper, MMS) to discern optimal performers for toxic video detection in Hindi-English code-mixed language. Analysis of the outcomes, presented in Table 2, reveals the superior performance of HingRoberta/HingGPT, VideoMAE, and Whisper as the best encoders for text, video, and audio modalities, respectively. These top-performing models are subsequently incorporated into our proposed framework.
(2) Across all three tasks, unimodal baselines demonstrate that the text modality consistently outperforms video and audio modalities. This underscores the paramount importance of text modality
in toxicity detection within videos. Notably, employing the HingRoberta model for the text modality yields the highest F1 score of 86.98% in toxicity detection, while VideoMAE and Whisper models achieve accuracy values of 68.67% and 76.18%, respectively, in video and audio modalities. Similar trends are observed in the other two tasks, namely severity and sentiment analysis. Hence we prioritize text modality as a base in our proposed model’s performance analysis.
(3) In the context of bimodal baselines, the text+audio configuration consistently demonstrates superior performance compared to the other two combinations across all tasks. Notably, the most effective baseline considering three modalities (RT+VM+WP) achieves the highest accuracy of 88.08%, 78.66%, and 75.82% for toxicity, severity, and sentiment tasks, respectively.
(4) In both single-task and multitask scenarios, our proposed model (ToxVidLM) consistently outperforms all baselines by a substantial margin. In the three-task settings, the (RT + VM + WP) variants exhibit enhancements in accuracy, surpassing the best baseline model by 6.21%, 8.46%, and 6.61% for toxicity, severity, and sentiment tasks, respectively. These notable improvements under-
score the effectiveness of our proposed model, attributed to the incorporation of an innovative modality synchronization module compared to baseline approaches.
(5) The multitask (MT) variants of our proposed model consistently surpass its single-task (ST) variant across all tasks within the same encoding setting. Notably, in a two-task scenario utilizing GPT2+VM encoders, the MT variant outperforms the ST counterpart, demonstrating improvements in F1-score of 2.57%, 2.54%, and 2.58% for toxicity, severity, and sentiment tasks, respectively. These results suggest that incorporating sentiment and severity knowledge enhances the performance of the toxicity detection task and contributes to overall model improvement. Conversely, no substantial improvements are observed when comparing multitask settings with two tasks versus three tasks.
Statistical Analysis: A statistical t-test was conducted on the values from ten runs of both the proposed models and baseline models, yielding p-values below 0.05, indicating the statistical significance of the results. The t-test was implemented using functions from the scipy library6. We have highlighted (gray color) the results in Table 2 and 3 which are statistically significant.

heading: 5.1.1 Ablation Study
text: We conducted an ablation study (see Table 4) on our proposed model, ToxVidLM, to elucidate the impact of gated fusion (GF) and multi-head cross attention (MHCA) in toxic video detection. The removal of GF from ToxVidLM results in a discernible decrease of 1.72%, 2.73%, and 3.13% in F1-score for toxicity, severity, and sentiment tasks, respectively. This decline underscores the crucial role of the gated fusion module in effectively fusing video and audio modalities, thereby enhancing overall performance. Upon removing
6https://docs.scipy.org/doc/scipy-1.6. 3/reference/generated/scipy.stats.ttest_ ind.html
the MHCA component from ToxVidLM, a substantial performance drop is observed across all tasks, affirming the significant impact of MHCA in our proposed model. This proves MHCA is instrumental in generating text-guided audio and video features. Notably, the simultaneous exclusion of both GF and MHCA components results in a substantial drop of 6.63% in the F1 score for the toxicity task, with similar performance reductions observed in other tasks. This considerable decline underscores the pivotal role of the cross-modal synchronization module, emphasizing its capacity to align representations from three distinct modalities within a unified space. Please see the qualitative analysis of our proposed framework in Appendix A.

heading: 6 Conclusion and Future Works
text: In an ever-evolving internet landscape, where videos have become the predominant form of content, the challenge of detecting toxic content, especially in low-resource code-mixed languages, is more critical than ever. We introduce ToxCMM, a pioneering benchmark dataset featuring codemixed videos for toxic content detection. Our proposed LM-based advanced multimodal framework (ToxVidLM) achieved remarkable results, emphasizing the significance of combining text, audio, and video modalities. It is worth noting that, among the individual modalities, transformer encodings of text prove to be particularly effective in detecting toxic videos. Beyond toxicity, the ToxCMM dataset includes two additional labels, sentiment, and severity, offering a comprehensive resource for further exploration in sentiment analysis within low-resource code-mixed videos. Our research emphasizes AI’s role in fostering a respectful online environment and promoting civility against toxic speech in video data.

heading: 7 Limitations
text: Our endeavour aimed to construct a multimodal framework and introduce a benchmark dataset, ToxCMM, tailored for detecting toxic video content within code-mixed language. However, it is crucial to acknowledge certain inherent limitations in our proposed approach and dataset, including:
1. In this study, we did not consider the context of the video clip; we treated a single utterance as the input post. Future investigations will incorporate the entire video clip as input, recognizing the pivotal role of context in deciphering the actual
meaning of the utterance. 2. Implicit or indirect toxic expressions were excluded from this study, primarily focusing on explicit markers. Future work will address the development of datasets and models capable of detecting implicit/indirect toxic posts.
3. The proposed ToxVidLM model fine-tunes two encoder modules, an LM, and additional modules, requiring a considerable amount of GPU memory for training. Due to computational limitations, we were unable to experiment even with parameterefficient fine-tuning methods (PEFT) like LoRA (Hu et al., 2021) or Quantized-LoRA (Dettmers et al., 2023) for models containing billions of parameters like OpenHathi-7B7, Airavata-7B (Gala et al., 2024), Llama 2-7B (Touvron et al., 2023), or Mistral-7B (Jiang et al., 2023). However, since our model is versatile, those with ample GPU resources can easily substitute larger models into the textual side, potentially achieving enhanced performance specifically for video classification tasks.

heading: A Qualitative Analysis
text: Figure 4 illustrates qualitative results comparing the insightfulness of various tasks between ground truth and model predictions.
(i) In the first sample (a), the textual modality ("Let us tell you our status now") lacks offensive words but constitutes a toxic utterance with negative sentiment and a severity score of 1 based on acoustic and visual expression. The user is threatening someone. Both the best baseline model and our proposed model with two modalities settings (ToxVidLM2M ) make incorrect predictions across all tasks. However, considering three modalities variants (ToxVidLM3M ) allows accurate prediction of all classes. This observation underscores our proposed model’s enhanced comprehension of diverse modalities, demonstrating that incorporating audio and visual cues with text provides a superior understanding of video data.
(ii) The second example’s true labels are nontoxic with negative sentiment and a severity score of 0. Regrettably, both baseline and proposed models mispredict toxicity and severity labels. Although the surface sentiment appears negative, and some negative words and angry facial expressions are present, understanding the actual implicit meaning requires knowledge of the video clip’s previous context. Since this study focuses on stand-alone utterance labels without considering previous context, all models make incorrect predictions. Integrating context represents a potential future direction for this work.
(iii) In the third example, both baseline and single-task variants of the proposed model (ToxVidLMST ) inaccurately predict all labels, while the multitask model (ToxVidLMMT ) correctly identifies all classes. This example is toxic due to offensive language and derogatory assumptions about someone’s grandfather. The terms "sidhi lagti hogi" and "khud hi chadh jate hai" are disrespectful, implying negative sentiment. Taskspecific layers in the multitask framework aid in correctly identifying true sentiment, leading to the accurate identification of toxicity and severity labels in the given post.

heading: B Encoder Description
text: Audio Encoders: We conducted experiments using two state-of-the-art (SOTA) models, namely Whisper Radford et al. (2023) and MMS(Pratap et al., 2023), to encode audio signals and extract meaningful representations from the audio data. In our investigation, Whisper consistently demonstrated superior performance across all experimental settings compared to MMS. The reasons behind Whisper’s superiority could be manifold. It might possess a more refined architecture tailored for audio processing, incorporating domain-specific optimizations or leveraging advanced techniques such as self-attention mechanisms or convolutional layers optimized for audio data. Additionally, the training procedure, hyperparameter settings, or data preprocessing techniques employed for Whisper could contribute to its superior performance over MMS.
(i) Massively Multilingual Speech (MMS) (Pratap et al., 2023): Developed by Facebook AI, MMS is a comprehensive multilingual pre-trained model for speech. It undergoes pretraining with Wav2Vec2’s selfsupervised training objective on an extensive dataset comprising approximately 500,000 hours of speech data across more than 1,400 languages.
(ii) Whisper: Radford et al. (2023) introduced Whisper, a novel multilingual speech recognition model. Whisper is trained on an extensive audio dataset, incorporating weak supervision for improved performance.
Video Encoders: We explored the efficacy of two transformer-based video models equipped with spatiotemporal context by uniformly sampling 16 frames from each video clip and feeding them into these encoders. Our experiments focused on
comparing the performance of VideoMAE Tong et al. (2022) and TimeSformer (Bertasius et al., 2021), with VideoMAE consistently outperforming TimeSformer across all settings.
Despite the advanced design and capabilities of TimeSformer, our experimental results indicate that VideoMAE consistently outperforms it across all evaluated settings. The reasons behind this superiority could stem from various factors such as the efficiency of VideoMAE’s learning approach, its ability to capture subtle temporal dependencies, or the effectiveness of its feature representation in downstream tasks. Additionally, factors like model architecture, training strategies, and hyperparameter settings may also influence the comparative performance of these models.
(i) VideoMAE: Tong et al. (2022) introduced a data-efficient learning approach for self-supervised video pre-training. It utilizes Masked Autoencoders to efficiently learn representations from video data, demonstrating effectiveness in enhancing model performance.
(ii) TimeSformer: (Bertasius et al., 2021) This model is a novel architecture designed for video understanding tasks. It extends the Transformer architecture to capture temporal relationships in videos by incorporating a spatiotemporal attention mechanism, demonstrating state-of-the-art performance in various video analysis applications.
Text Encoders: (Nayak and Joshi, 2022) introduces several transformer-based models pretrained on L3Cube-HingCorpus, the first largescale real Hindi-English code-mixed dataset in Roman script: HingBERT, HingMBERT, HingRoBERTa, and HingGPT. These models, evaluated on tasks like sentiment analysis, POS tagging,
NER, and language identification, demonstrate the effectiveness of real code-mixed data. They also present HingBERT-LID for language identification and HingFT for code-mixed word embeddings, making all resources publicly available for further research in Hinglish NLP. (i) HingBERT: HingBERT is a BERT-based model pre-trained on the Hinglish corpus using masked language modeling objectives. It is evaluated on downstream tasks such as code-mixed sentiment analysis, POS tagging, NER, and language identification (LID) from the GLUECoS benchmark.
(ii) HingMBERT: HingMBERT is a variant of the multi-lingual BERT model pre-trained on the Hinglish corpus. It is trained using both Roman and Devanagari scripts and is assessed on various downstream tasks including code-mixed sentiment analysis, POS tagging, NER, and LID.
(iii) HingRoBERTa: HingRoBERTa is a RoBERTa-based model trained on the Hinglish corpus. It has versions trained on Roman script and a combination of Roman + Devanagari scripts. The model is evaluated on downstream tasks such as code-mixed sentiment analysis, POS tagging, NER, and LID.
(iv) HingGPT: HingGPT is a generative transformer model based on the GPT-2 architecture. It is trained on the Hinglish corpus to generate full tweets in code-mixed Hinglish.
We initially utilized all four pre-trained models for the unimodal baselines and filtered the top 2 models namely HingGPT and HingRoBERTa for the rest of the experiments. According to the results obtained from our main framework, HingRoBERTa outperforms HingGPT in all the corresponding settings, proving it to be the best candidate for our framework among all the considered models.

heading: Future Work
text: Integrating context represents a potential future direction for this work. (iii) In the third example, both baseline and single-task variants of the proposed model (ToxVidLMST ) inaccurately predict all labels, while the multitask model (ToxVidLMMT ) correctly identifies all classes. This example is toxic due to offensive language and derogatory assumptions about someone’s grandfather. The terms "sidhi lagti hogi" and "khud hi chadh jate hai" are disrespectful, implying negative sentiment. Taskspecific layers in the multitask framework aid in correctly identifying true sentiment, leading to the accurate identification of toxicity and severity labels in the given post