Skip to content
No description, website, or topics provided.
Lua Python
Branch: master
Clone or download
Latest commit 2ee5015 Feb 2, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
data/test-net first commit Jan 31, 2017
gen_walks first commit Jan 31, 2017
tensorflow add tensorflow Feb 1, 2017
torch first commit Jan 31, 2017 modified readme Feb 1, 2017


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.

Torch implementation


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

Basic Usage


To run DeepCas on a test data set, execute the following command:

cd DeepcasTorch
python gen_walks/ --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/ --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 Implementation


Tensorflow 0.12.1

Basic Usage

To run DeepCas tensorflow version on a test data set, execute the following command:

cd DeepCas
python gen_walks/ --dataset test-net
cd tensorflow


If you find DeepCas useful for your research, please consider citing the following paper:

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

You can’t perform that action at this time.