Thanks to visit codestin.com
Credit goes to github.com

Skip to content

alamgirqazi/DeReC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

When retrieval outperforms generation: Dense evidence retrieval for scalable fake news detection

Alamgir Munir Qazi1   John P. McCrae2   Jamal Abdul Nasir1

1School of Computer Science, University of Galway, Ireland
2Research Ireland Insight Centre and ADAPT Centre, University of Galway, Ireland

The proliferation of misinformation necessitates robust yet computationally efficient fact verification systems. While current state-of-the-art approaches leverage Large Language Models (LLMs) for generating explanatory rationales, these methods face significant computational barriers and hallucination risks in real-world deployments. We present DeReC (Dense Retrieval Classification), a lightweight framework that demonstrates how general-purpose text embeddings can effectively replace autoregressive LLM-based approaches in fact verification tasks. By combining dense retrieval with specialized classification, our system achieves better accuracy while being significantly more efficient. DeReC outperforms explanation-generating LLMs in efficiency, reducing runtime by 95% on RAWFC (23 minutes 36 seconds vs. 454 minutes 12 seconds) and by 92% on LIAR-RAW (134 minutes 14 seconds vs. 1692 minutes 23 seconds), showcasing its effectiveness across varying dataset sizes. On the RAWFC dataset, DeReC achieves an F1 score of 65.58%, surpassing state of the art method L-Defense (61.20%). Our results demonstrate that carefully engineered retrieval-based systems can match or exceed LLM performance in specialized tasks while being significantly more practical for real-world deployment.

Code

Prerequisites

Dataset

Create a folder named "dataset" and place it in root directory.

Download the datasets from https://github.com/Nicozwy/CofCED and place them in the directory

Setup

Using UV (Preferred)

uv venv venv --python 3.10

source venv/bin/activate

uv pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --extra-index-url https://download.pytorch.org/whl/cu118

uv pip install faiss-gpu-cu12

uv pip install -r requirements.txt

Using Conda

conda create --prefix venv python=3.10

conda activate venv/ 

conda install pytorch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 pytorch-cuda=11.8 -c pytorch -c nvidia

conda install faiss-gpu -c conda-forge

pip install -r requirements.txt

How to run

python main.py

About

When retrieval outperforms generation: Dense evidence retrieval for scalable fake news detection - LDK 2025

Topics

Resources

Stars

Watchers

Forks

Languages