\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{booktabs}

\geometry{margin=1in}

\title{\textbf{TruthLens: A 5-Signal Weighted Architecture \\for Explainable Fake News Detection}}
\author{Your Name \\ \textit{Your Institution/University} \\ \texttt{email@domain.com}}
\date{\today}

\begin{document}

\maketitle

\begin{abstract}
The proliferation of misinformation and fake news necessitates robust automated detection systems. Traditional machine learning approaches often lack explainability, relying solely on black-box probabilistic outputs without verifying journalistic integrity. In this paper, we present TruthLens, an end-to-end framework integrating deep language models (DistilBERT, RoBERTa), sequence models (LSTM), and statistical baselines (Logistic Regression) into a unique 5-signal weighted scoring architecture. The framework assesses source credibility, claim verification via Named Entity Recognition (NER), linguistic quality, temporal freshness, and ensemble model consensus. Furthermore, the system incorporates adversarial overrides and live Retrieval-Augmented Generation (RAG) corroboration to guard against typosquatting, triple anonymity, and hallucinated statistics. Our methodology transitions away from a simple binary classifier to an explainable, multi-faceted verification engine, significantly improving both robustness and user trust in algorithmic verdicts. 
\end{abstract}

\section{Introduction}
As digital media consumption accelerates, the threat of fabricated content, deliberately crafted to mislead, has escalated dramatically. The challenge of automated fake news detection lies not only in accurately classifying claims as ``True'' or ``False'', but in providing actionable contexts and explanations to content moderators and end-users. Current state-of-the-art transformer models achieve high accuracy on standard datasets; however, their black-box nature provides little insight into \textit{why} a verdict was reached. Furthermore, they are highly susceptible to temporal drift—where a genuinely true article becomes factually outdated—and adversarial manipulation, such as credible-sounding linguistic structures applied to unverified sources. 

To address these shortcomings, we developed TruthLens. TruthLens diverges from standard classification pipelines by acting as a programmatic misinformation analyst. It does not blindly trust model consensus; instead, it synthesizes AI probabilities with deterministic heuristics based on journalistic standards.

\section{Problem Definition}
Given an article comprising an optional headline ($H$), a body text ($T$), a source domain ($D$), and a publication date ($P$), the objective is to map the document to one of four explainable verdicts: \texttt{TRUE}, \texttt{UNCERTAIN}, \texttt{LIKELY FALSE}, or \texttt{FALSE}. 

A secondary objective is to dynamically generate a confidence score ($C \in \{LOW, MEDIUM, HIGH\}$) and qualitative justifications (e.g., deductions applied, adversarial flags triggered). The system must account for edge cases such as missing publication dates, anonymous or typo-squatted domains, sensationalist headlines safely contradicting the body, and the verification of quoted entities.

\section{Methodology}
The TruthLens pipeline is partitioned into four distinct operational stages, culminating in a real-time 5-signal evaluation engine.

\subsection{Stage 1: Data Ingestion}
In the first stage, raw datasets are fetched, homogenized, and aggregated. Disparate datasets originally formatted for binary or multi-class detection are ingested to form a consolidated corpus. During this stage, critical metadata (such as publication timestamps and source URLs) is preserved if available, or flagged for contextual imputation later.

\subsection{Stage 2: Preprocessing \& Feature Extraction}
Text entries undergo rigorous cleaning to standardize capitalization, extract URLs, expand contractions, and remove non-alphanumeric noise without losing semantic meaning. We construct vocabulary indices and tokenization mappings necessary for deep learning backbones. Cleaned datasets are persisted to disk to accelerate experimental reiteration. 

\subsection{Stage 3: Ensemble Training}
We utilize a heterogeneous ensemble of four models, each capturing distinct features of the input:
\begin{itemize}
    \item \textbf{Logistic Regression:} A statistical baseline utilizing TF-IDF vectors to capture simple lexical patterns heavily correlated with misinformation.
    \item \textbf{LSTM:} A recurrent neural network designed to capture sequential linguistic dependencies.
    \item \textbf{DistilBERT \& RoBERTa:} High-capacity, attention-based deep contextual language models fine-tuned to detect semantic nuances and internal contradictions.
\end{itemize}

\subsection{Stage 4: 5-Signal Inference Framework}
The core innovation of TruthLens is the Stage 4 inference engine, which combines model predictions with four deterministic pillars:
\begin{enumerate}
    \item \textbf{Source Credibility (30\%):} Evaluates the article domain against a known credible database, checks for explicit author attribution (bylines), and penalizes subtle spelling manipulations (typosquatting).
    \item \textbf{Claim Verification (30\%):} Utilizes spaCy for Named Entity Recognition (NER), tracking the ratio of attributed quotes. The meta-classifier probability is blended dynamically with these entity-level checks. 
    \item \textbf{Linguistic Quality (20\%):} Applies rule-based deductions for sensationalism (e.g., excessive capitalized words, superlatives), passive voice overuse, and deploys DistilBERT to compute a cosine similarity check identifying headline-body contradictions.
    \item \textbf{Temporal Freshness (10\%):} Operates via a dual-case system. Case A uses explicit publication dates with a non-linear decay function. Case B parses contextual temporal cues (e.g., ``yesterday'', current year) when explicit dates are absent. 
    \item \textbf{Model Vote Consensus (10\%):} Represents the pure ensemble vote ratio.
\end{enumerate}

Finally, adversarial overrides cap maximum scores at 25\% if critical journalistic standards are violated (e.g., ``Triple Anonymity''), ensuring weak models do not inadvertently legitimize fabricated articles. When freshness enters an ambiguous threshold, a Retrieval-Augmented Generation (RAG) module queries live web APIs to corroborate claims with recent index updates.

\section{Data Description}
The model is trained on a homogenized amalgamation of well-established fake news benchmarks, primarily the ISOT Fake News Dataset and the LIAR Dataset.

\subsection{Data Divisions \& Preprocessing}
The aggregated data is structured into a typical split architecture to ensure maximum generalizability:
\begin{itemize}
    \item \textbf{Training Set (70\%):} Utilized for fitting the TF-IDF vectorizer, tuning the LSTM layer weights, and fine-tuning the Transformer heads.
    \item \textbf{Validation Set (15\%):} Employed to monitor epoch loss, apply early stopping during deep model training, and tune the interpolation thresholds for the 5-signal weights. 
    \item \textbf{Holdout / Test Set (15\%):} Kept strictly isolated. Evaluation operates under the constraint of mapping the legacy truth classes to the newly defined 4-tier verdict system (\texttt{TRUE}/\texttt{UNCERTAIN} mapped to 1; \texttt{LIKELY FALSE}/\texttt{FALSE} mapped to 0).
\end{itemize}

\section{Results}
Integration of the 5-signal weighting framework demonstrated a marked improvement in explainability. While the baseline ensemble alone yielded high raw accuracy on synthetic datasets, it failed to identify maliciously injected adversarial examples (e.g., valid text attributed to ``c-n-n.com''). The complete infrastructure successfully caps adversarial scores, raising overall real-world robustness. On the isolated hold-out set, the system dynamically flags low-confidence articles, ensuring that unverifiable claims are strictly prevented from passing a theoretical ``publishing'' boundary. Live RAG integration further eliminated false-positives previously caused by temporal drift in the training data.

\section{Discussion}
TruthLens introduces a pivotal shift from pure binary classification to diagnostic evaluation in fake news detection. By hardcoding journalism heuristics (source validation, NER quoting, temporality) atop deep learning embeddings, the model successfully simulates a human analyst's workflow. 

A notable outcome of our framework is the treatment of Confidence. By decoupling probability from confidence (e.g., lowering confidence for texts under 50 words or lacking entities), the user interfaces can visually decouple ``truthfulness'' from ``reliability''. 
Future work includes expanding the Live RAG validation checks with multi-hop reasoning LLMs, and expanding the author-attribution regex engine to cover a broader range of international linguistic formats.

\end{document}
