This repository contains all the necessary code for "Scalable Implicit Graphon Learning."
SIGL is a scalable method that combines implicit neural representations (INRs) and graph neural networks (GNNs) to estimate a graphon from observed graphs.

First, you will need to install the requiered packages using pip as follows.
pip install -r requirements.txtTo regenerate the results shown in Figure 2(a) for a specific graphon i, use the following command:
python Main.py --n_graphon iFor the results shown in Figure 2(b) and Figure 2(c), adjust the --offset by your desired value M as follows:
python Main.py --n_graphon i --offset MThe plots for Figure 3 are saved in a folder named according to the --name argument, located in the Plots directory.
As an example Graphon_1 is included.
You can use p-Main.py to reproduce the results for the parametric case explained in Appendix B.
To learn the graphon from a given set of graphs, save a list of adjacency matrices as a .pkl file and specify its directory using the --Adjs_dir parameter in the input. Since the true graphon is not available in this case, we cannot directly evaluate the reconstruction. However, the estimated graphon, along with the latent variables of the nodes and the sorted graph, will be plotted and saved as output.jpg.