Giter Site home page Giter Site logo

farrystar / rumor_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from serenaklm/rumor_detection

0.0 0.0 0.0 77 KB

Source code for "Interpretable Rumor Detection in Microblogs by Attending to User Interactions" -- AAAI 2020

Home Page: https://arxiv.org/abs/2001.10667

License: MIT License

Python 67.83% Jupyter Notebook 32.17%

rumor_detection's Introduction

Description:

This is the source code for Interpretable Rumor Detection in Microblogs by Attending to User Interactions by Ling Min Serena Khoo, Hai Leong Chieu, Zhong Qian, Jing Jiang. Published in Thirty-Fourth AAAI Conference on Artificial Intelligence 2020.
Archive: https://arxiv.org/abs/2001.10667

Data

The processed data for running the codes could be found in https://www.dropbox.com/sh/w3bh1crt6estijo/AAD9p5m5DceM0z63JOzFV7fxa?dl=0

Dependencies

This set of code was developed in python3 and pytorch. The packages and their respective versions are state in requirements.txt
To install the dependencies, run pip install -r requirements.txt

Training of model

The code for training the model is found in : ./codes
	- The python script that would be used to train the models would be ./train.py
	- Change the config file (./config.py) to change the parameters before training
	- The config file would allow you to change the path of the train, test and val data.
	- The config file would allow you to change the GPUs that would be used for training.
	- Parameters include:
	a. include_key_structure: Boolean, indicating if we should perform structure-aware attention
	b. include_val_structure: Boolean, indicating if we should propagate structure information in the MHA layers
	c. word_module_version: Either 0,1,2,3 or 4, {0: max_pooling, 1: average_pooling, 2: max_pooling_w_attention, 3: average_pooling_w_attention, 4: attention}. The version used in PLAN and STAPLAN is 2, HiT-STAPLAN is 4. 
	d. post_module_version: Either 0,1,2 or 3, {0: average_pooling, 1: condense_into_fix_vector, 2: first_vector, 3: attention}. The version used in all 3 models in the paper is 3. 
	e. vary_LR: Boolean, indicating if we should use increases the LR initially then decreases after a certain point
	f. ff_word: Boolean, indicating if we should finetune the token embedding
	g. ff_post: Boolean, indicating if we should finetune the post embedding
	- To run the training code, run the command "python train.py"

Testing model

The code for testing the model is found in : ./codes
- The ipython notebook that would be used to test the models would be ./testing_script.ipynb
- Change the config file (./config.py) to change the parameters before testing
- The config file would allow you to change the following:
    - The model to select 
        - Models to be selected could be found in ./logs after training
- The path of the testing data
- The path of the output from testing

Contact:

Please contact Serena ([email protected]) for any enquiries. Thank you!

Acknowledgments

* Chieu Hai Leong (DSO National Laboratories) and Jiang Jing, Qian Zhong and Tran Anh (SMU) for the guidance and mentorship
* My colleagues from DSO National Laboratories for their advices and discussions

rumor_detection's People

Contributors

serenaklm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.