Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

[P] 700x faster Node2Vec embeddings by CSR graph representation

Blog post here

Code here

I recently rewrote node2vec, which took a severely long time to generate random walks on a graph, by representing the graph as a CSR sparse matrix, and operating directly on the sparse matrix’s data arrays.

The result is a speedup from 30 hours to 3 minutes for a small sized graph (nodes and edges in the hundreds of thousands).

This raises bigger questions about graph representation for graph analytics — representing graphs as sparse matrices prevents node insertion, but makes operations much more efficient (though admitedly harder to write). More importantly, we can hold fairly huge graphs in RAM because the data usage is so lean.

If we’re analyzing graphs, we don’t care so much about adding nodes, so I think the future of graph analytics is in CSR representation.

submitted by /u/VodkaHaze
[link] [comments]