This repository provides a reference implementation of DeepCas as described in the paper:
DeepCas: an End-to-end Predictor of Information Cascades
Cheng Li, Jiaqi Ma, Xiaoxiao Guo and Qiaozhu Mei
World wide web (WWW), 2017
The DeepCas algorithm learns the representation of cascade graphs in an end-to-end manner for cascade prediction.
The following packages are required to install:
luarocks install cephes
luarocks install optim
luarocks install cudnn
luarocks install dp
luarocks install dpnn
luarocks install tds
luarocks install rnn
To run DeepCas on a test data set, execute the following command:
cd DeepcasTorch
python gen_walks/gen_walks.py --dataset test-net
cd torch
th main/run.lua --dataset test-net
You can check out the other options available to use with DeepCas using:
python gen_walks/gen_walks.py --help
th main/run.lua --help
global_graph.txt lists each node's neighbors in the global network:
node_id \t\t (null|neighbor_id:weight \t neighbor_id:weight...)
"\t" means tab, and "null" is used when a node has no neighbors.
cascade_(train|val|test).txt list cascades, one cascade per line:
cascade_id \t starter_id... \t constant_field \t num_nodes \t source:target:weight... \t label...
"starter_id" are nodes who start the cascade, "num_nodes" counts the number of nodes in the cascade. Since we can predict cascade growth at different timepoints, there could be multiple labels.
Tensorflow 0.12.1
To run DeepCas tensorflow version on a test data set, execute the following command:
cd DeepCas
python gen_walks/gen_walks.py --dataset test-net
cd tensorflow
python preprocess.py
python run.py
If you find DeepCas useful for your research, please consider citing the following paper:
@inproceedings{DeepCas-www2017,
author = {Li, Cheng and Ma, Jiaqi and Guo, Xiaoxiao and Mei, Qiaozhu},
title = {DeepCas: an End-to-end Predictor of Information Cascades},
booktitle = {Proceedings of the 26th international conference on World wide web},
year = {2017}
}
Please send any questions you might have about the code and/or the algorithm to lichengz@umich.edu.