jiaxuanyou / graph-generation Goto Github PK
View Code? Open in Web Editor NEWGraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models
License: MIT License
GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models
License: MIT License
Many thanks for releasing the code. I have some questions regarding the GraphVAE.
It seems that the encoder is not using the graph neural network, the GCN layers are commented at lines 113-118 of baselines/graphvae/model.py. Am I right?
The binary assignment matrix has not been used after matching graphs, since self.permute_adj is also commented. if that's the case, the model is a simple Variational Graph Auto-Encoders implemented by kipf.
I uncommented these parts and still did not get the reported result in the GrapgRNN paper. I am not sure what could be the problem. I was wondering if this implementation of the GrapgVAE model used in the paper.
Many thanks for your help and answer.
The compute_mmd
function in mmd.py should compute square root of disc(s1, s1) + disc(s2, s2) - 2*disc(s1, s2)
right? Referring equation 10 of the GraphRNN paper.
Hi Author,
In tain.py line 461, why do we need to reverse y_reshape?
When run
def load_graph_list(fname,is_real=True):
with open(fname, "rb") as f:
graph_list = pickle.load(f) # len=100
for i in range(len(graph_list)):
edges_with_selfloops = graph_list[i].selfloop_edges()
if len(edges_with_selfloops)>0:
graph_list[i].remove_edges_from(edges_with_selfloops)
if is_real:
graph_list[i] = max(nx.connected_component_subgraphs(graph_list[i]), key=len)
graph_list[i] = nx.convert_node_labels_to_integers(graph_list[i])
else:
graph_list[i] = pick_connected_component_new(graph_list[i])
return graph_list
The error occurs:
AttributeError: 'Graph' object has no attribute 'adj'
Hello, why the number of gragh nodes is not compatible with x, tx, allx, I need the y value of all nodes in the graph, thank you
Hello,
How can I use graphRNN code to generate graphs with costume node attributes?
I know how to convert these torch tensors to CPU, I am curious though why the user does not have the choice to run CUDA.
Also, I have a custom graph with some covariates, how can I train on these to compare to ERGM? Particularly, what would you recommend for using covariates for graphRNN generation?
I'm just having trouble locating where to input a single graph for this pipeline, as the paper said that single or multiple graphs can be used.
What's the best way to visualize the quality of the generated graphs at each epoch? I expected /figures or /figures_prediction to have these images but didn't get anything after training finished.
Hi, thanks for open source the code! The framework can learn and generate undirected graph with high quality. But when I train the model (modified based on the suggestion given in the appendix of the paper) with directed graph, I find it cannot generate similar amount of reciprocal edges compare to the training graph I have.
Specifically, The modification I have done is double the length of edge sequence of node i as (A_1i, A_i1, A_2i, A_i2 ...), where A is the adj matrix. I do know this leads to a sparser sequence.
The graph I'm training has around 200 nodes, 659 one sided directed edges and 58 reciprocal edges, while the generated graph in average has less than 520 directed edges and 15 to 20 reciprocal edges. So the model is generating sparser graph.
I wonder if anyone has experience using this framework with directed graph, and give any advise on dealing with my issue?
Thanks in advance.
Hello, thank you for this excellent codebase. I find that this repo is straightforward for use in structure generation, however is there some functionality of node-label (node class) generation already supported in the codebase even though it wasn't the focus of the paper? Thanks.
Do you experiment with the results of graph matching? In my experiment the effect is very general.
Hello,
When I execute main.py. I had the following error.
Traceback (most recent call last):
File "main.py", line 1, in
from train import *
File "/home/Documents/DeepLearning/graph-generation/train.py", line 24, in
from utils import *
File "/home/Documents/DeepLearning/graph-generation/utils.py", line 17, in
import data
File "/home/Documents/DeepLearning/graph-generation/data.py", line 17, in
from model import *
File "/home/Documents/DeepLearning/graph-generation/model.py", line 989
prob = x_prev @ x_last.permute(0,2,1)
^
SyntaxError: invalid syntax
Hi, I tried to run the code, but it seems like something wrong with tensorflow version and python. I used python 3.6 and tensorflow 1.2.0. Could you please reply in case you can see my question.
If I run the code on mac, and my mac don't have GPU. Do I have to install CUDA?
I get an error for 'AssertionError: Torch not compiled with CUDA enabled'.
I was wondering if you just set the output to make possible edges for the current graph? My guess that is the case based on:
Line 124 in 3444b8a
can anyone confirm?
Firstly, thanks a lot for your perfect work, especially the comprehensive baselines. However, as you mentioned in appendix A.6, GraphRNN can be used as a node and edge feature generation. I wonder if you have finished this part in this repository?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.