--- language: en tags: - fake-news - text-classification - distilbert - pytorch license: mit datasets: - clmentbisaillon/fake-and-real-news-dataset metrics: - f1 - accuracy - roc_auc --- # FakeGuard — Fake News Detector Fine-tuned DistilBERT for binary fake news classification. **CMPE 258 — Deep Learning · San José State University · Spring 2026** ## Model Details | Property | Value | |----------|-------| | Base model | distilbert-base-uncased | | Task | Binary text classification (Fake/Real) | | Training samples | 2,749 (balanced subsample of 44K articles) | | Epochs | 2 | | Max sequence length | 256 | | Dropout | 0.3 | | Optimizer | AdamW (lr=3e-5, wd=0.01) | | LR schedule | Cosine annealing | ## Performance | Metric | Value | |--------|-------| | Test Accuracy | **0.9933** | | Test Macro F1 | **0.9933** | | Test ROC AUC | **0.9988** | | Cohen's Kappa | **0.9867** | ## Dataset Kaggle "Fake and Real News Dataset" (Emine Yetm / clmentbisaillon). **Critical fix applied:** Removed `(Reuters)` dateline prefix from real articles before training to prevent data leakage. ## Live Demo Try it at: https://huggingface.co/spaces/gpreetam236/DL_Final ## Architecture ``` DistilBERT Encoder (6 layers, 768-d) → [CLS] token → Dropout(0.3) → Linear(768→256) → LayerNorm → GELU → Dropout(0.3) → Linear(256→2) → Logits ``` ## W&B Experiment Dashboard https://wandb.ai/gowripreetham23-san-jose-state-university/fakeguard