2026
Fake News Detection
NLP-based fake news detection system with full pipeline: TF-IDF baseline, BERT/RoBERTa/DeBERTa fine-tuning, cross-dataset evaluation, and SHAP/LIME interpretability analysis. Trained on the LIAR dataset (12,800 political statements).

fig. 01 · In-domain on LIAR, then out of distribution: transformer F1 collapses next to the baselines
This NLP specialization project offers a complete fake news detection system. The pipeline covers exploratory analysis, preprocessing, baseline models (Naive Bayes, Logistic Regression, XGBoost), transformer model fine-tuning (BERT, RoBERTa, DeBERTa), evaluation on an external dataset (out-of-distribution generalization), and interpretability analysis with SHAP and LIME. The LIAR dataset contains 12,800 political statements labeled by PolitiFact fact-checkers. The project also includes an ethical bias analysis.
Exploring the LIAR dataset

fig. 02 · Distribution of the six LIAR classes and of the binary version on the training set
The LIAR dataset holds 12,800 political statements labeled by PolitiFact fact-checkers on six truth levels. The pipeline starts with exploratory analysis and preprocessing, with a six-class task and a binary version.
Baselines versus transformers

fig. 03 · Weighted F1 on the test set, six-class and binary: baselines, RoBERTa and ensembles side by side
More than six models compared on the same test set: Naive Bayes, logistic regression and XGBoost baselines on TF-IDF, then fine-tuned BERT, RoBERTa and DeBERTa, plus ensembles. The pipeline is progressive: the TF-IDF baseline is the reference the transformers are measured against.
LIME interpretability

fig. 04 · LIME on binary RoBERTa: word contributions on a correct prediction and on an error
To make model decisions readable, every prediction can be explained with SHAP and LIME. Here LIME shows the words pushing RoBERTa toward FAKE or REAL, on a correctly classified statement and on an error.
Out-of-distribution generalization

fig. 05 · Out-of-distribution weighted F1 on FakeNewsNet and PHEME: LR, RoBERTa and ensemble
Models trained on LIAR are evaluated on external datasets never seen in training, to measure out-of-distribution robustness. The result is counter-intuitive: logistic regression holds up better than RoBERTa and the ensemble.
Bias and ethics

fig. 06 · RoBERTa bias audit: accuracy per topic and FAKE detection gap per speaker
A bias audit is built into the evaluation pipeline: accuracy per topic and the gap between predicted and actual FAKE rate per speaker, to spot where the model over- or under-detects.
fig. 07

SHAP summary of the binary LightGBM: the 25 most influential features
fig. 08

RoBERTa and credit history: four fusion variants, confusion matrices on the test set
Challenges
- Multi-class classification of political statements with contextual nuances
- Model generalization on unseen external datasets
- Model decision interpretability to ensure trust
- Detection and analysis of prediction biases
Solutions
- Progressive pipeline: TF-IDF baseline → BERT/RoBERTa/DeBERTa fine-tuning
- Cross-dataset evaluation to measure out-of-distribution robustness
- SHAP and LIME analysis for prediction explainability
- Ethical bias audit integrated in the evaluation pipeline
Results
- 5 notebooks covering the complete EDA → interpretability pipeline
- Comparison of 6+ models (baseline + transformers)
- SHAP/LIME interpretability analysis on predictions
- Generalization evaluation on external dataset
Technologies
Python · PyTorch · BERT · Transformers · SHAP · LIME · Scikit-learn · XGBoost