GithubHelp home page GithubHelp logo

xovee / casflow Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 9.0 127 KB

TKDE 2021. CasFlow: Exploring Hierarchical Structures and Propagation Uncertainty for Cascade Prediction.

Home Page: https://www.xoveexu.com

License: MIT License

Python 100.00%
information-diffusion popularity-prediction information-cascades graph weibo twitter aps

casflow's Introduction

CasFlow

This repo provides a reference implementation of CasFlow as described in the paper:

CasFlow: Exploring Hierarchical Structures and Propagation Uncertainty for Cascade Prediction
Xovee Xu, Fan Zhou, Kunpeng Zhang, Siyuan Liu, and Goce Trajcevski
IEEE Transactions on Knowledge and Data Engineering (TKDE), 2021

Basic Usage

Requirements

The code was tested with python 3.9.7, tensorflow 2.9.1, cudatoolkit 11.2, and cudnn 8.1.0. Install the dependencies via Anaconda:

# create virtual environment
conda create --name casflow python=3.9 

# activate environment
conda activate casflow

# install tensorflow and other requirements
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
pip install -r requirements.txt

A note from 2024: fu*k tensorflow

If you fail to initialize the GPU

It could be your environment incorrectly loads the system-wide installation of CUDA instead of the version CUDA 11.2. You can follow this to use the 11.2 version temporarily:

unset CUDA_HOME
unset LD_LIBRARY_PATH

export PATH=$CONDA_PREFIX/lib:$PATH
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH

Then you can try using the GPU:

import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))

Run the code

cd ./casflow

# generate information cascades
python gene_cas.py --input=./dataset/sample/

# generate cascade graph and global graph embeddings 
python gene_emb.py --input=./dataset/sample/

# run CasFlow model
python casflow.py --input=./dataset/sample/

More running options are described in the codes, e.g.,

  • Using the Weibo dataset: --input=./dataset/weibo/
  • Change observation time: --observation_time=3600

Datasets

See some sample cascades in ./dataset/sample/.

Datasets download link: Google Drive or Baidu Drive (password: 1msd).

The datasets we used in the paper are come from:

Cite

If you find CasFlow useful for your research, please consider citing us ๐Ÿ˜˜:

@article{xu2021casflow,  
  author = {Xovee Xu and Fan Zhou and Kunpeng Zhang and Siyuan Liu and Goce Trajcevski},  
  title = {Cas{F}low: Exploring Hierarchical Structures and Propagation Uncertainty for Cascade Prediction},
  journal = {IEEE Transactions on Knowledge and Data Engineering (TKDE)},
  year = {2021}, 
  volume = {35}, 
  number = {4}, 
  pages={3484-3499}, 
  doi = {10.1109/TKDE.2021.3126475}, 
}

This paper is an extension of VaCas:

@inproceedings{zhou2020variational,
  author = {Fan Zhou and Xovee Xu and Kunpeng Zhang and Goce Trajcevski and Ting Zhong},
  title = {Variational Information Diffusion for Probabilistic Cascades Prediction}, 
  booktitle = {IEEE International Conference on Computer Communications (INFOCOM)},
  year = {2020},
  pages = {1618--1627},
  doi = {10.1109/INFOCOM41043.2020.9155359},
}

We also have a survey paper you might be interested:

@article{zhou2021survey,
  author = {Fan Zhou and Xovee Xu and Goce Trajcevski and Kunpeng Zhang}, 
  title = {A Survey of Information Cascade Analysis: Models, Predictions, and Recent Advances}, 
  journal = {ACM Computing Surveys}, 
  volume = {54},
  number = {2},
  year = {2021},
  articleno = {27},
  numpages = {36},
  doi = {10.1145/3433000},
}

Contact

For any questions please open an issue or drop an email to: xovee at live.com

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.