Fake News Detection
TruthLens detects fake news with 99.29% accuracy by analysing linguistic patterns in news articles using a Linear SVM trained on 44,898 real and fake articles, delivering results in ~0.1 seconds.

Tech stack
Impact
Problem Statement
Misinformation spreads faster than corrections. The goal was a real-time NLP classifier that could distinguish fake from real news with high precision - usable by anyone without ML knowledge via a simple paste-and-check interface.
Dataset
44,898 articles from the ISOT Fake News Dataset: 23,481 real Reuters articles and 21,417 fake articles from PolitiFact/unreliable sources. Text was lowercased, punctuation stripped, stop-words removed, and lemmatised before vectorisation.
Architecture
TF-IDF vectoriser (max 10K features, 1–2 n-grams) feeding a Linear SVM classifier. Streamlit front end accepts raw article text, runs the pipeline in memory, and returns a REAL/FAKE verdict with probability score.
Model Selection
Linear SVM was benchmarked against Multinomial Naïve Bayes and Logistic Regression. SVM achieved the best accuracy (99.29%) and F1 (0.99) on the held-out test set and is fastest at inference - ideal for Streamlit deployment.
Training Process
Trained on an 80/20 stratified split. Hyperparameter tuning explored regularisation parameter C (0.1–10) with cross-validation. Final model and vectoriser saved with joblib for instant loading on Streamlit cold start.
Evaluation Metrics
Results
Live at fake-news-detection-nlp-01.streamlit.app - paste any news article and get an instant real/fake verdict backed by SVM confidence scores.
Key Learnings
- 1Linear SVM is remarkably effective for high-dimensional TF-IDF spaces.
- 2n-gram features (bigrams) significantly improve fake-news pattern detection.
- 3Deployment via Streamlit makes ML demos instantly accessible without a backend.
Want to dig deeper?
Explore the code, or get in touch if you'd like to talk through the approach.