Skip to content

Official code for "Learning to Detect Incongruence in News Headline and Body Text via a Graph Neural Network"

Notifications You must be signed in to change notification settings

minwhoo/detecting-incongruity-gnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning to Detect Incongruence in News Headline and Body Text via a Graph Neural Network

Official PyTorch implementation of Graph Hierarchical Dual Encoder model from the following paper:

Learning to Detect Incongruence in News Headline and Body Text via a Graph Neural Network, IEEE Access, 2021, paper

Requirements

  • Python 3.7
  • PyTorch 1.2.0
  • PyTorch Geometric 1.3.2
  • GloVe word embeddings

Installation

pip install numpy==1.17.2
pip install scikit-learn==0.21.3
pip install torch==1.2.0
pip install --verbose --no-cache-dir torch-scatter==1.3.2
pip install --verbose --no-cache-dir torch-sparse==0.4.3
pip install --verbose --no-cache-dir torch-cluster==1.4.5
pip install torch-geometric==1.3.2

Download Dataset

We are providing the dataset download link to researchers for non-commercial research purposes only. Please request through the google form link.

Preprocess

python preprocessing.py --dataset-path paragraph_swap_news_{random,similar} \
                        --glove-path $GLOVE_DATA_DIR/glove.840B.300d.txt

Train

python train.py --processed-data-path paragraph_swap_news_{random,similar}/processed \
                --lr 0.001 \
                --batch-size 120 \
                --min-iterations 50000 \
                --train \
                --eval \
                --para-level-supervision True \
                --edge-supervision True \
                --save-checkpoint

About

Official code for "Learning to Detect Incongruence in News Headline and Body Text via a Graph Neural Network"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages