Giter VIP home page Giter VIP logo

richouzo / hate-speech-detection-survey Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 3.0 124.43 MB

Trained Neural Networks (LSTM, HybridCNN/LSTM, PyramidCNN, Transformers, etc.) & comparison for the task of Hate Speech Detection on the OLID Dataset (Tweets).

License: Creative Commons Zero v1.0 Universal

Jupyter Notebook 86.04% Python 13.96%
nlp machine-learning deep-learning natural-language-processing twitter hatespeech offensive-language social-media hate-speech hate-speech-detection

hate-speech-detection-survey's Introduction

🤬 A Comparative Study on NLP algorithms for Hate Speech Detection

Context: Final Project for CS7643/CS7650 courses at Georgia Tech, Fall 2021

Abstract: Hate Speech remains one of the most pressing issues that come with the rise of social media. While social media has been a blessing in allowing users to connect with same minded people, it can be a breeding ground for hateful ideas and extremism, and when allowed to fester, can lead to physical violence, as shown in many recent events. In our study, we aim to compare different novel algorithms, not traditionally used for hate speech detection but rather used for other natural language tasks, to see if any of them are more effective are recognizing hate speech. By comparing the LSTM, BiLSTM, HybridLSTMCNN, HybridCNNLSTM, PyramidCNN, TinyBert and DistillBert algorithms and comparing their accuracy scores and model sizes, we will see if any of these novel algorithms offer some benefits to the traditional model of hate speech recognition.

Authors:

  • Aymane Abdali (CS7643/CS7650)
  • Maya Boumerdassi (CS7643)
  • Mohamed Amine Dassouli (CS7643/CS7650)
  • Jonathan Hou (CS7643)
  • Richard Huang (CS7643/CS7650)

Installation phase

Please refer to install.md.

Dataset: Offensive Language Identification Dataset - OLID

Dataset Paper | Dataset Link1 | Dataset Link2

For this study, we use the sub-task A of the OLID Dataset. This dataset contains English tweets annotated using a three-level annotation hierarchy and was used in the OffensEval challenge in 2019.

Preprocessing functions can be found in preprocess_utils.py.

Training phase

Please refer to training.md.

Trained models

All of our best trained models can be found here.

Word importance with Captum

This is the qualitative part of our study. We use Captum to interpret our trained models. Here are some examples from our best trained model DistillBert_2021-12-08_16-39-08_trained_testAcc=0.7960.pth on the test set:

True Positive

DistillBert_TP

False Positive

DistillBert_FP

Please refer to interpret.md for more details.

hate-speech-detection-survey's People

Contributors

aminedassouli avatar aymane399 avatar jonathanz-hou avatar mboumerdassi avatar richouzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.