Team Ai
Apppublic

ismaeelafaqi/AffectDetectFakeNews

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

A RAG based approach to detect fake news based on its affective signal. The approach prioritises transparency by adding an explicit rationale to guide inference.

Dataset: FakeNewsAMT + Celebrity (PérezRosas et al. 2018). The dataset serves as the basis for the RAG mechanism.

Pipeline: - 1) Obtain affective embeddings of the dataset using emotion-english-distilroberta-base. 2) Cluster the embeddings based on cosine similarity 3) Generate rationales for random samples of each cluster using Llama-3.1-8B-Instruct 4) Create FAISS index on affective embeddings. 5) During inference, retrieve the top-1 similar sample from FAISS. Use its rationale alongside the target instance for prediction. Inference model: OpenAI gpt-4o-mini.

Sample Inference Prompt:

Based on rationale below, decide if target text is 0=fake or 1=legit.

Rationale: Affective features such as sensationalized headlines, emotive language, and a focus on entertainment value may correlate with lower perceived reliability of the content. However, these features are not perfect indicators of reliability or lack thereof.

Target Text: World War III erupts in the Middle East...

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference ---------

Reference - Pérez-Rosas, V., Kleinberg, B., Lefevre, A. & Mihalcea, R. (2018), Automatic detection of fake news, in E. M. Bender, L. Derczynski & P. Isabelle, eds, ‘Proceedings of the 27th International Conference on Computational Linguistics’, Association for Computational Linguistics, Santa Fe, New Mexico, USA, pp. 3391–3401. URL: https://aclanthology.org/C18-1287/