GithubHelp home page GithubHelp logo

ggn's Introduction

A general deep learning framework for network reconstruction and dynamics learning

This repository will contain the official PyTorch implementation of:

A general deep learning framework for network reconstruction and dynamics learning
Zhang Zhang, Yi Zhao, Jing Liu, Shuo Wang,Ruyi Tao, Ruyue Xin and Jiang Zhang*(*: Corresponding author)
Download PDF


Abstract:

Many complex processes can be viewed as dynamical systems on networks. However, in real cases, only the performances of the system are known, the network structure and the dynamical rules are not observed. Therefore, recovering latent network structure and dynamics from observed time series data are important tasks because it may help us to open the black box, and even to build up the model of a complex system automatically. Although this problem hosts a wealth of potential applications in biology, earth science, and epidemics etc., conventional methods have limitations. In this work, we introduce a new framework, Gumbel Graph Network (GGN), which is a model-free, data-driven deep learning framework to accomplish the reconstruction of both network connections and the dynamics on it. Our model consists of two jointly trained parts: a network generator that generating a discrete network with the Gumbel Softmax technique; and a dynamics learner that utilizing the generated network and one-step trajectory value to predict the states in future steps. We exhibit the universality of our framework on different kinds of time-series data: with the same structure, our model can be trained to accurately recover the network structure and predict future states on continuous, discrete, and binary dynamics, and outperforms competing network reconstruction methods.

Requirements

  • Python 3.6
  • Pytorch 0.4

Data Generation

To generate experimental data, you need to switch to the / data folder and run the corresponding file.

cd data
python data_generation_bn.py
python data_generation_cml.py

Run Experiment

You can replicate the experiment for Boolean Network by simply running the file train_bn.py

python train_bn.py

To replicate the experiment for Coupled Map Lattice and Kuramoto model, please run the train_cml_kuramoto.py

python train_cml_kuramoto.py --simulation-type cml --dims 1 --skip 0

or

python train_cml_kuramoto.py --simulation-type kuramoto --dims 2 --skip 1

Cite

If you use this code in your own work, please cite our paper:

Zhang, Z., Zhao, Y., Liu, J. et al. A general deep learning framework for network reconstruction and dynamics learning. Appl Netw Sci 4, 110 (2019) doi:10.1007/s41109-019-0194-4

ggn's People

Contributors

3riccc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ggn's Issues

Two questions

Many thanks for great paper and share!
I have two questions below:

  1. Direction of adjacency matrix
    Given a matrix Aij, is the direction between i and j from j(col index) to i(row index) or from i(row index) to j(col index)?

  2. I'd like to apply your method to a system where edges have three different types (instead of typical case, where there are two types, 0 and 1).
    More specifically, the edges of my system has either 0(No connection), +1(excitatory effect), or -1(inhibitory effect).
    For applying to my system, would there be an easy way to modify your code?
    I realized that I should modify the function "sample" in the class "Gumbel_Generator", but failed to do it...

Thanks!

Trying to reproduce your results

Hello, I am trying to reproduce your results for the Boolean Network from the paper. However, I am currently unable to get the same results as you. I have a couple of questions:

  1. In your paper your mention that the training parameteres S_n and S_d for this experiment are 20 and 10, respectively. However, the default configuration in the code is S_n=10 and S_d=20 (so the numbers are swapped). Which are the correct values that you used for this experiment?
  2. For how many epochs did you train your network?
  3. Is it intended that the BN dataset generator produces datasets of different size in repeated runs?

Thanks in advance.

Where can I find the Kuramoto-model dataset?

train_fp = './data/kuramoto/ERtrain-5000sample-1.1kc10node-100timestep-2vec.npy'
val_fp = './data/kuramoto/ERval-1000sample-1.1kc10node-100timestep-2vec.npy'
test_fp = './data/kuramoto/ERtest-1000sample-1.1kc10node-100timestep-2vec.npy'
adj_fp = './data/kuramoto/ERadj-10sample-1.1kc10node-100timestep-2vec.npy'

Those file paths doesn't exist in the repo. Where can I get them?

About Gumbel_Generator in code and paper

image

in your code, aij and (1-aij) use gen_matrix = torch.randn (num_nodes, num_nodes, 2), is mean gen_matrix[:,:,0]+gen_matrix[:,:,1]=1 ? I'm confused about it. Please help me. Thanks!

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.