Applying Machine Learning to Fake Websites, Fake News, and Toxic Social Media Comments
Disclaimer: The content and data used for the article contains text that may be considered profane, vulgar, or offensive. The content and data do not purport to reflect the opinions or views of the author or the company.
The 80s and 90s were rife with the high pitched scream of dial up internet and exasperated sighs of frustrated users awaiting hours long downloads of websites and dropped connections during email deliveries.
Fast forward 30 years. With the advent of high speed internet, came the explosion of Web 2.0 and Social Media. The rise of Google, Facebook, Twitter, Instagram and LinkedIn has changed the way we consume information, interact and communicate. The evolution of the Internet also inevitably gave rise to Phishing Websites, Fake news and Internet Trolling, bringing along malicious acts of theft, spreading misinformation and bullying/harassment. This article is related to some machine learning exploratory work carried out for these three topics.
The article contains the Context, Objective, Data Description and Model Results, following :
Below is an summary of the machine learning model performance for each use case:
A data set containing real and fake websites, available at PhishStorm.
The objective was to build a machine learning model to detect real/fake websites.
A pretty straight forward data set that contained urls labeled "Real" or "Fake".
Training data: 47956, Test data: 47954
The data used for the experiment can be found here.
The results can be found here.
The model was 97.8% accurate overall.
Data containing short political statements in various contexts from PolitiFact.com.
The objective was to build a machine learning model to detect fake political statements.
The original data set contained political statements made in various contexts. The statements had the following associated categories/labels. The original categories were converted into True or False statement labels:
Below is a data breakdown:
The original data set also had subject, speaker, speaker's job title, party affiliation, and venue columns.
Narratives were derived combining the statement and the above additional columns to train and test the model . Below is an example:
Narrative: Peter Kinder, a Lieutenant Governor of the Republican party, spoke about diversity, economy, and jobs at a gubernatorial debate in Missouri. Youth unemployment in minority communities is about 40 to 45 percent.
The data can be found here.
Overall, the model was 65% accurate when evaluated on the test data. Below is a breakdown for the accuracy of true and fake statements. The results can be found here:
Data set originating from Kaggle containing social media comments, classified by toxic comment category types and toxic comments target by demographic type.
The objective was to build machine learning models to toxic comments target by category and demographic type.
Toxic Category Types
A dataset containing social comments labeled by toxic category type. The toxic category types are toxic, severe toxicity, obscene, identity attack, insult and threat. The social comments can be made up of a combination of any of the categories (i.e. a social comment could be toxic, obscene and an insult). For example:
The data can be found here. Below is the training data (121,875 records) and test data (121,873 records) breakdown:
Results can be found here. Overall, the model was 79.5% accurate when evaluated on the test data. Below is a breakdown of the accuracy by category:
Toxic Comments By Target Demographic Type
A dataset containing social comments labeled by target demographic type. The target demographic types are black, christian, female, homosexual, male and muslim. The social comments can be made up of a combination of any of the types (i.e. a social comment could be classified as toxic, male and female). For example:
The data can be found here. Below is the training data (25,647 records) and test data (25,650 records) breakdown:
Results can be found here. The model was 93% accurate overall. Below is a breakdown of the accuracy by category:
It has been demonstrated that machine learning can play a part in monitoring the negative elements of social media. It has the potential to prevent the significant impacts like influence on a country's elections, or cyber bullying.
The NoamAi platform is a fully automated NLP system, embodying the principles of DevOps and CI/CD (MLOps) in machine learning (ML) and AI. It simplifies and automates the end to end ML model build process (data preparation -> model training -> model deployment) by ways of standardisation, consistency, speed and scale. All users need to do is to provide the data and define the problem.
The platform has the ability to build models for the following use cases:
Classification - Classify sentences or text narratives (i.e. sentiment analysis)
Comprehension - Answer questions based on paragraphs of text
Summarisation - Summarising of text
Named entity recognition - Text information extraction into predefined categories such as person names, organizations, locations, medical codes, time expressions, quantities, monetary values, percentages