Skip to content

A research project that aims to detect fake news from various sources using a variety of large language models.

Notifications You must be signed in to change notification settings

caxky/FakeNewsDetection

Repository files navigation

Fake-News-Detection

Domain-Specific Fake News Detection

Installation Instructions

  1. Install latest version of CUDA if running on GPU (RECOMMENDED): https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html

  2. Install latest version of Python: https://www.python.org/downloads/

  3. Install latest version of Python pip
    curl https://bootst/rap.pypa.io/get-pip.py -o get-pip.py
    python get-pip.py

  4. Install jupyter notebook
    pip install jupyter

  5. Clone repo locally
    git clone https://github.com/howardt12345/Fake-News-Detection.git

Installing Torch with Cuda

  1. Navigate to https://pytorch.org/get-started/locally/

  2. Choose the OS, package, language(Python) and CUDA Version Appropriate to your machine

  3. Copy the command and run in the chosen platform terminal

  4. To check CUDA version run nvcc --version

  5. To check if CUDA is installed and working open Python interpreter, import torch and run torch.cuda.is_available()

To Run Data Pre-Processing

  1. Navigate to Fake-News-Detection/preprocessing/<insert category/dataset _ Preprocessing>.ipynb

  2. Run all cells

  3. View output in the notebook and feather file in the /data/ folder in base directory

To Run Classification

  1. Navigate to base directory

  2. Run Python /classification/bert.py

  3. View output in the /classification/logs/ directory

To Run Detection

This will train and test models

  1. Navigate to Fake-News-Detection/detection/run_detection.ipynb
  2. Change parameters according to anticipated results
  3. Run run_detection.ipynb and wait for completion
  4. View log in category folder to see results, if I run politics models, I navigate to Fake-News-Detection/results/politics and find the log file training_log_DATE_TIME.log

To analyze results
Note: there must be a valid log file to read from

  1. Navigate to Fake-News-Detection/detection/result_analysis.ipynb
  2. Run the notebook and view cell outputs

Proposed Architecture

The fake news detection will have the following stages:

  1. Categorization stage: Categorize the input and pass the input to the model trained for the specific domain
  2. Detection stage: With models trained to detect fake news within a specific domain, detect whether the input is fake news or not

Potential Datasets

About

A research project that aims to detect fake news from various sources using a variety of large language models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages