1 of 1

Hateful Comment Detection (HCD) and Hate Target-Type Prediction (HTP) for Video Comments

Shrey Gupta1, Pratyush Priyadarshi1 and Manish Gupta1,2

shrey2809@gmail.com, ppratap2001@gmail.com, manish.gupta@iiit.ac.in

1IIIT-Hyderabad, 2Microsoft

Why care about hate speech for video comments?

  • Video-sharing platforms have promoted quick and easy-to-understand mass content distribution.
  • Some comments are toxic aiming to spread hate towards a particular community, location, organization or even an individual.
  • Comments may look naïve but are hateful in the context of the video.

  • Correct Detection requires context that protesting (from title) violently (from description) is being mentioned as the finest moment in a sarcastic manner.
  • To link to “white people”, it requires knowledge that Australia has white people which may be obtained either from external information or comments.
  • Comment toxicity as per Perspective API: 25.68%.

Problems: HCD and HTP

Hateful Comment Detection (HCD) Results

  • Only comment provides a poor accuracy of 0.608
  • Each type of context (title or description KP or transcript KP) to the comment adds value.
  • Combination of title and description key-phrases does not help.
  • Comment + Description KP + Transcript KP is best.
    • Descriptions and transcripts contain complementary information
    • Comment (all tokens required), description key-phrases (80), transcript key-phrases (remaining tokens).

Why is detecting toxic comments challenging?

  • Hate via comments is understudied.
  • Comments can be very short.
  • They are not self-contained and often very contextual.
  • They often convey hate in subtle and convoluted ways.
  • They need long logical chains of reasoning even for humans for proper understanding.
  • There is no benchmark dataset.

Related Work

  • Types of hate
    • Sexism; racism; cyberbullying; victim blaming; antisemitism; sexual harassment; general online harassment; cyber hate for a range of protected characteristics including race, behavior, physical, sexual orientation, class, gender, ethnicity, disability, religion.
  • Methods for hate detection
    • Typical text-based features like n-grams, linguistic features, distributional embeddings, etc.
    • CNNs, RNNs, LSTMs and Transformer-based networks
  • Hate detection using context
    • Extra context like user and network information; images; videos
    • Methods
      • Unimodal methods with multimodal fusion
      • Multimodal bi-transformers like ViLBERT and Visual BERT

Main methods for HCD and HTP

  • Fine-tune BERT-large-cased encoder with 24 Transformer layers.
  • 40 epochs using the Adam optimizer.
  • Only the last layer of the BERT model is fine-tuned keeping the other layers frozen.
  • Comment and Contextual Features
    • Comment:
      • Remove links and mentions
      • Replace emojis by the corresponding keyword expressions/sentiments using the demoji library
    • Video title
    • Description Key-Phrases
      • Remove links; extract key-phrases of length 1-3 words from descriptions using KeyBERT
    • Transcript Key-Phrases
  • Features are concatenated using [SEP]
  • CLIP-ViT to obtain relevant frames and their embeddings
  • Rank frames by cosine similarity(comment embedding, frame embedding)
  • Take average of top-5 to get the final vision embedding of size 512

  • In most failure cases, we observe that understanding hate required some external knowledge or other comments related to the video to complete the logical reasoning chain.
  • Attention visualization: each part of the context is important.
  • Top images retrieved by CLIP for the comment “Seems like a rumble in the jungle, with a hippo and a gorilla”, where the comment calls Steve Harvey a gorilla and Graham Elliot a hippopotamus.
  • Model also retrieves another frame which doesn’t have Steve Harvey and Graham Elliot in the frame, which can also be referred to by the comment.

HateComments Dataset

  • Data Collection and Pre-processing
    • Videos and english comments from Youtube and BitChute
    • Videos less than 10 minutes in length to manage transcription costs and ensure good-quality transcription.
    • Youtube Data API to collect metadata including title and description.
    • Extract audio part of the videos using ffmpeg and use the Microsoft Azure Speech-To-text Transcription service to gather transcripts.
  • Annotations
    • Assign hate/non-hate labels to original comments.
    • Annotators were also encouraged to manually generate hateful comments.
      • Either paraphrased original comments or comments inspired by the natural course of discussion in the comment section of the video.
  • Context-dependence of hate in comments
    • Ensure that on Google’s Perspective API the comment text scores <60% wrt toxicity, obscenity, insulting and threatening.

Qualitative analysis

HateComments Dataset Stats

Conclusion

  • 1048 hate and 1023 non-hate comments extracted from 401 videos with 5.16 comments per video.
  • 62 videos from BitChute; remaining from Youtube.
  • 8 different categories: News & Politics (130), Cuisine (46), Sports (42), Health (29), Entertainment (77), Fitness (17), Religion (27), Fashion & Beauty (33).
  • Target type distribution: Location (84), Organization (82), Community (403), Individual (533).
  • Augment train set using the back translation trick and Parrot API.
  • Novel tasks: hate comment detection and hate target type prediction for hateful comments.
  • Novel dataset: HateComments
  • Baseline results with qualitative analysis
  • Visual inputs help.
  • Video description is important
  • Code and data publicly available
    • https://sites.google.com/view/manishg/
  • HCD (Hate Comment Detection)
    • Extreme words against an individual, community, location or organization.
    • Spreading misinformation or fueling a controversial discussion or instigating a target with the purpose of maligning them.
    • Any unproven claim against a target, with the intent of maligning.
  • HTP (Hate Target Type Prediction)
    • Community, Location, Individual, and Organization.
    • A single comment can be hateful to multiple target types.
    • “Let’s see if ants and roaches will eat it. I doubt it.”
      • Hate towards: “Organisation (Beyond Burger), Community (Vegans)”

Without Visual Input

With Visual Input

  • Almost all results improve when we augment visual input.
  • Comment + description KP is best
    • When we pass visual input, the transcript also becomes redundant.

Hate Target Type Prediction (HTP) Results

  • Model can predict the individual and location classes better than the community and organization types.
  • Model achieves an ROC AUC score of 0.61.

Manish Gupta: manish.gupta@iiit.ac.in