Our project is all about fighting fake news by building a system that can automatically tell if a news article is real or fake. In today's world of social media and online news, it's becoming harder to know what to believe.
To address this problem, we have built a machine learning model that uses natural language processing techniques to analyse the content of news articles and determine their credibility. We trained our model on a large dataset of labeled news articles, which we carefully curated to include examples of both real and fake news.
Our model uses a variety of features, such as the text and title, the length of the article, and the overall tone and sentiment, to make its classification decision. We also experimented with different machine learning algorithms and techniques, such as PyTorch and Keras, to improve the accuracy and robustness of our system.
We're hoping that our fake news classification system will be really useful for anyone who wants to stay on top of what's happening in the world without getting duped by fake news. It's gonna be a big help for journalists, fact-checkers, and anyone else who wants to know what's really going on out there.
"Is this news article real or fake?"
- Identify information leaks
- Text leaks
- Date leaks
- URL leaks
- Basic NLP data cleaning
- Contractions
- Punctuations
- Spaces
- Lowercase
- Duplicates
- NLTK and WordCloud analysis
- Distribution of news article length (log transformation)
- Sentiment analysis using TextBlob
- Subject analysis
- Logistic Regression (Sentiment Score and Bag of Words)
- Binary Tree Classification
- Random Forest with Cross Validation
- XGBoost using TF-IDF to vectorise text (model included) with Cross Validation
- Pytorch using Bert Based Uncased Model (model not included in github due to large file size)
- Keras ANN using Tokenizer for preprocessing text (model included)
We tested our models (keras and xgboost) on a completely new dataset to test its perfomance against real world news.
We concluded that deep learning models are the best for this problem since they excel at handling large amounts of data and can find nuanced patterns and complex features that are not immediately visible. Additionally, the ability to automatically extract hierarchical representations make these models excel at NLP applications.
- Text outperformed title in most cases.
- NLP features like sentiment analysis help refine our models.
- Deep learning models require a lot of computational power for large datasets.
- Overfitting is a common issue and there is a tradeoff between "too much capacity" (overfitting) VS "too little capacity" (not converging).
-
Reduce overfitting by starting with a few layers and parameters and increase it until we see diminishing return with regard to validation loss.
-
Aim to include models that can detect sarcasm and irony based on context. Improved models can better capture and analyse context which can greatly improve the accuracy of our news classifier.
-
Build a working website with HTML, CSS and JS that can incorporate our model to detect fake news based on the article. This offers functionality and usability of the deep learning model we trained.
Name | Github Account |
---|---|
Timothy Lee | @timooo-thy |
Jain Amitbikram | @spinelessknave8 |
Vivian Kho | @svftbuns |
- https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset
- https://huggingface.co/bert-base-uncased
- https://keras.io/api/keras_nlp/tokenizers/tokenizer/
- https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html
- https://towardsdatascience.com/a-simple-explanation-of-the-bag-of-words-model-b88fc4f4971
- https://monkeylearn.com/sentiment-analysis/
- https://www.kaggle.com/datasets/saurabhshahane/fake-news-classification
- https://unsplash.com/@obionyeador?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText