GraPE is a fast graph processing and embedding library, composed of two main modules: Ensmallen and Embiggen, that are able to efficiently scale with big graphs using parallel computation and efficient data structures.
Ensmallen efficiently loads big graphs and executes graph processing operations including large-scale first and second-order random walks, improving upon the performance of current state-of-the-art graph processing libraries by one to four orders of magnitude.
Embiggen leverages the large amount of sampled random walks generated by Ensmallen to effectively compute node and edge embeddings that can be used for unsupervised exploratory analysis of graphs or to train the flexible neural models provided by Embiggen itself for solving edge and node label prediction problems in big graphs.
As usual, just download it using pip:
pip install grape
You can find tutorials covering various aspects of the GraPE library here. All tutorials are as self-contained as possible and can be immediately executed on COLAB.
If you want to get started real quick, after having installed GraPE from Pypi as described above, you can try running the following SkipGram on Cora example:
from ensmallen.datasets.linqs import Cora
from ensmallen.datasets.linqs.parse_linqs import get_words_data
from embiggen.pipelines import compute_node_embedding
from embiggen.visualizations import GraphVisualization
import matplotlib.pyplot as plt
# Dowload, load up the graph and its node features
graph, node_features = get_words_data(Cora())
# Compute a SkipGram node embedding, using a second-order random walk sampling
node_embedding, training_history = compute_node_embedding(
graph,
node_embedding_method_name="SkipGram",
# Let's increase the probability of explore the local neighbourhood
return_weight=2.0,
explore_weight=0.1
)
# Visualize the obtained node embeddings
visualizer = GraphVisualization(graph, node_embedding_method_name="SkipGram")
visualizer.fit_transform_nodes(node_embedding)
visualizer.plot_node_types()
plt.show()
You can see a tutorial detailing the above script here, and you can run it on COLAB from here.
Currently the documentation website of the library is being developed.
Please cite the following paper if it was useful for your research:
TODO: add bibtex reference here to copy