here's a full project story writeup for a fake news detector, formatted for a devpost submission. fits cleanly into the AI & ML track.
VerifAI — Real-Time Fake News Detection Engine The Problem misinformation spreads six times faster than factual news on social media. by the time a fact-check is published, the false claim has already reached millions. the damage isn't just reputational — it affects elections, public health, and financial markets. existing fact-checking tools are either too slow (manual verification takes hours), too narrow (only cover specific domains), or too opaque (black-box models with no explanation). we asked ourselves: what if you could paste any news article or headline and get a credibility verdict in under two seconds — with reasons? What VerifAI Does VerifAI is a web-based fake news detection system that analyzes news articles and headlines for credibility using a multi-signal approach. it combines:
NLP-based content analysis — detects sensationalist language, emotional manipulation, and clickbait patterns source credibility scoring — cross-references the publishing domain against a curated reliability database claim cross-verification — uses live web search to find corroborating or contradicting sources stance detection — identifies whether the article's tone aligns or conflicts with the consensus on the topic
the output isn't just "fake" or "real." VerifAI returns a credibility score (0–100) with a breakdown of exactly which signals flagged the content and why. transparency is the core design principle. How We Built It Backend — Python / FastAPI the core pipeline runs as a FastAPI service. when a user submits a URL or raw text, it goes through four sequential modules:
TextPreprocessor — cleans and tokenizes the content, strips HTML artifacts FeatureExtractor — computes 14 hand-engineered features: all-caps ratio, exclamation density, named entity count, hedge word frequency, passive voice ratio, and more ModelInference — runs the cleaned features + text embedding through a fine-tuned DistilBERT classifier trained on the LIAR dataset (12.8K labeled statements) and FakeNewsNet corpus VerificationLayer — fires a live search query using the SerpAPI wrapper, pulls the top 5 results, and runs a lightweight stance detection model to check if external sources agree or disagree with the claim
ML Model we fine-tuned distilbert-base-uncased for sequence classification on a merged dataset of ~22K samples across 6 veracity labels (pants-fire, false, barely-true, half-true, mostly-true, true). we then collapsed these into three output classes — Likely False / Uncertain / Likely True — to reduce noise from borderline cases. final validation F1: 0.81. for the feature-based signals, we trained a gradient boosted classifier (XGBoost) separately and ensembled it with the transformer output using a weighted average (0.65 BERT / 0.35 XGB). the ensemble consistently outperformed either model alone on out-of-distribution samples. Frontend — React + Tailwind clean single-page interface. users paste a URL or raw text, hit analyze, and get a result card showing:
overall credibility score with a color-coded meter a breakdown panel for each signal (language, source, cross-verification, stance) links to the corroborating/contradicting sources found during verification
Deployment FastAPI backend on Render, React frontend on Vercel, model hosted via a lightweight ONNX export to keep inference latency under 1.5 seconds end-to-end. Challenges We Ran Into the hardest part was handling satire. the onion, babylon bee, and similar sites are technically "false" but in a completely different category. our early models kept flagging satire as misinformation with high confidence. we solved this by adding a satire domain whitelist and a dedicated satire-detection head trained on the Satirical Fake News Detection dataset — it now correctly classifies satire as a separate category rather than "fake." cross-verification was also tricky. live search results are noisy, and not every claim has clear corroborating coverage. we added a coverage confidence score — if fewer than 2 relevant external sources are found, the cross-verification signal is marked "insufficient data" rather than being used to pull the score in either direction. What We Learned fine-tuning transformers for veracity classification is genuinely hard — not because of the model, but because the labels in existing datasets are inconsistently applied. political bias bleeds into what gets labeled "mostly false." we had to do a round of label auditing and drop ~8% of training samples that were clear edge cases. we also learned that explainability matters more than accuracy for user trust. in user testing, people were more confident in a 74% credibility score with a clear breakdown than a 91% score with no explanation. What's Next
browser extension that overlays the credibility score directly on news articles as you browse support for regional language news (starting with Hindi and Tamil) API tier for newsrooms and fact-checking organizations to integrate into their workflow active learning loop where verified fact-checks from professional organizations get folded back into retraining
Tech Stack Python · FastAPI · HuggingFace Transformers · DistilBERT · XGBoost · ONNX · SerpAPI · React · Tailwind CSS · Render · Vercel · LIAR Dataset · FakeNewsNet
Log in or sign up for Devpost to join the conversation.