https://github.com/d-vesely/fang

FANG: Leveraging Social Context for Fake News Detection Using Graph Representation

https://github.com/d-vesely/fang

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: acm.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

FANG: Leveraging Social Context for Fake News Detection Using Graph Representation

Basic Info
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of nguyenvanhoang7398/FANG
Created over 5 years ago · Last pushed over 5 years ago
Metadata Files
Readme

README.md

Reproducibility Study

This repository is a fork of https://github.com/nguyenvanhoang7398/FANG. It adds two notebooks that contain additional code for data analysis and plotting, see ./plots_and_analysis.

The rest of this README is identical to the original.

Factual News Graph (FANG)

This is the implementation of FANG - a graph representation learning framework for fake news detection.

For more details, please refer to our paper. Van-Hoang Nguyen, Kazunari Sugiyama, Preslav Nakov, Min-Yen Kan, FANG: Leveraging Social Context for Fake News Detection Using Graph Representation (CIKM 2020)

Installation

bash conda env create -f environment. yml

Requirements

Packages

  • conda 4.8.2
  • python 3.7.7
  • torch 1.5.1
  • tensorboard 1.15.0 ### Hardware
  • GPU: Titan RTX 24220MiB total memory
  • CPU: 16GiB total memory

Data

We provided the processed data used in our experiments in data/news_graph

| Description | File name | Format | | ----- | ----- | ----- | | Social entities | entities.txt | | | Social entity's features | entityfeatures.tsv | entityid [tab] feature1value [tab] feature2value... | | User-news support interactions with negative sentiment | supportnegative.tsv | userid [tab] newsid [tab] secondssincepublication | | User-news support interactions with neutral sentiment | supportneutral.tsv | userid [tab] newsid [tab] secondssincepublication | | User-news deny interactions | deny.tsv | userid [tab] newsid [tab] secondssincepublication | | User-news report interactions | report.tsv | userid [tab] newsid [tab] secondssincepublication | | News information | newsinfo.tsv | newsid [tab] labels [tab] title | | Indicator whether certain pair of entities should be closed or far, only used for evaluation, not for as labels | repentities.tsv | entity1id [tab] entity2id [tab] closed/far [tab] stance | | Source-source citation interactions | sourcecitation.tsv | source1id [tab] source2id | | Source-news publication interactions | sourcepublication.tsv | sourceid [tab] newsid | | User-user friendship interactions | userrelationships.tsv | user1id [tab] user2id | | Train-val-test splits (representative of a fold) | traintest{training percentage}.json | {"train": trainentities, "val": validateentities, "test": test_entities} |

Unprocessed data, including news and users who engage them can be found in data/fang_fake.csv and data/fang_real.csv.

Run Graph Learning Frameworks

``` usage: run_graph.py [-h] [-t TASK] [-m MODEL] [-p PATH] [--percent PERCENT] [--temporal] [--use-stance] [--use-proximity] [--epochs EPOCHS] [--attention] [--pretraineddir PRETRAINEDDIR] [--pretrainedstep PRETRAINEDSTEP]

Graph Learning

optional arguments: -h, --help show this help message and exit -t TASK, --task TASK task name -m MODEL, --model MODEL model name -p PATH, --path PATH path to dataset --percent PERCENT --temporal whether to use temporality --use-stance whether to use stance --use-proximity whether to use proximity --epochs EPOCHS number of epochs --attention whether to use attention --pretraineddir PRETRAINEDDIR path to pre-trained model directory --pretrainedstep PRETRAINEDSTEP pre-trained model step ```

Training FANG for 30 epochs at 90% data with temporality, stance loss and proximity loss. python run_graph.py -t fang -m graph_sage -p data/news_graph --percent 90 --epochs=30 --attention --use-stance --use-proximity --temporal

Training GCN baseline for 1000 epochs at 90% data. python run_graph.py -t news_graph -m gcn -p data/news_graph --percent 90 --epochs=1000

Other resources

  • Relation filtering, Stance detection, Sentiment Classification models can be found here
  • Social media retriever used to crawl unprocessed data, implemented by Kai Shu et al. can be found here
  • The implementation of GraphSage from which this code was adapted can be found here

Cite

Please cite our paper as below if you use this code in your work:

@inproceedings{10.1145/3340531.3412046, author = {Nguyen, Van-Hoang and Sugiyama, Kazunari and Nakov, Preslav and Kan, Min-Yen}, title = {FANG: Leveraging Social Context for Fake News Detection Using Graph Representation}, year = {2020}, isbn = {9781450368599}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3340531.3412046}, doi = {10.1145/3340531.3412046}, abstract = {We propose Factual News Graph (FANG), a novel graphical social context representation and learning framework for fake news detection. Unlike previous contextual models that have targeted performance, our focus is on representation learning. Compared to transductive models, FANG is scalable in training as it does not have to maintain all nodes, and it is efficient at inference time, without the need to re-process the entire graph. Our experimental results show that FANG is better at capturing the social context into a high fidelity representation, compared to recent graphical and non-graphical models. In particular, FANG yields significant improvements for the task of fake news detection, and it is robust in the case of limited training data. We further demonstrate that the representations learned by FANG generalize to related tasks, such as predicting the factuality of reporting of a news medium.}, booktitle = {Proceedings of the 29th ACM International Conference on Information & Knowledge Management}, pages = {1165–1174}, numpages = {10}, keywords = {representation learning, fake news, social networks, graph neural networks, disinformation}, location = {Virtual Event, Ireland}, series = {CIKM '20} }

Owner

  • Name: Dominik Veselý
  • Login: d-vesely
  • Kind: user
  • Location: Vienna

Studying Data Science (Master's Degree) at TU Wien (Vienna University of Technology)

GitHub Events

Total
Last Year