konsotirop / Invert_Embeddings

7 stars 3 forks source link

Code for the paper:

"DeepWalkings Backwards: From Embeddings Back to Graphs"

https://arxiv.org/abs/2102.08532

  1. We include a DEMO file in the form of Jupyter Notebook (Demo.ipynb) that goes through the main parts of our paper.

  2. A detailed description of the code and files used follows:

File __"invert_embeddings.py"__ implements the optimization based procedure, that given as input a low-dimensional embedding of a network G, tries to learn a new network G' that has the same embedding as G.

Parameters:

File __"network_stats.py"__ takes as input the reconstructed networks from the above script and prints and plots various graph properties for both the original and the reconstructed networks.

Line 544 iterates over different ranks. Results should be first produced by running the above script (invert_embeddings.py).
As for now, it only 'iterates' over rank 128, otherwise please change accordingly.  

Parameters:

  1. Usage example:
    python invert_embeddings.py -f PPI.mat -r 128
    python network_stats.py -f PPI.mat