What does gengraph do?
Closed this issue · 1 comments
What does gengraph.py
do in examples/syn/
? Is this a graph generator? What paper/method is this based on?
Hi, yes it's an example implementation of the graph generator interface in dataset.py.
In practice it is often a good idea to test models with synthetic data generated with certain properties to validate the model (e.g. https://arxiv.org/abs/2001.09621, https://arxiv.org/abs/1910.10593, https://arxiv.org/abs/1802.08773 ).
The generators can be used as input to initialize Dataset, to construct an "generated-on-the-fly" dataset, where each iteration, batch size number of graphs are generated by the generator and fed into the GNN model.
For some generators, this means exponential number of training data points, which can be used to test the expressive power without worrying about overfitting.
For other generators with smaller number of generated graphs, it might be more computationally efficient to pre-generate the training set as a list of graph objects, rather than using the generator class.