Graph Neural Networks and Neo4J

Hi folks, I've recently started research about Graph Neural Networks (GNN) applied on Knowledge Graphs. Is there already any initiative (as Graph Data Science Library) that facilitate the usage of GNN in Neo4j? Currently, I'm extracting data from Neo4j using Python and running GNN models with DGL.

Thanks in advance!

Ok, it seems there is no initiative like that. So, is there anyone needing it too? If so, are you interested in work together to create such tool/library in a collaborative way?

Thanks in advance!

Yeah, there is a course about data science. This course has a chapter about predictions so you can see some ML examples with graphs.

Thanks

https://neo4j.com/graphacademy/online-training/data-science

Hi @jggomez, thanks for the reply. It seems the course you've linked is about classical ML methods with Graph Data Science Library. Actually, I'm interested in something specific for Graph Neural Networks (GNN). I mean, a library that I can use inside Neo4j to be able to create GNN models and also train and run them inside Neo4j. I need something similar to GDS but for GNNs.

1 Like

I don't know... but you can extract the information and apply GNN.

Thanks

Hi @otaviocx I think they released some algorithms

Hi @otaviocx check out our most recent 1.4 release, which features GraphSAGE andNode2Vec within Neo4j: https://neo4j.com/docs/graph-data-science/1.4-preview/

You may also want to check out the presentation from NODES on Graph Native Learning with GraphSAGE and the model catalog: https://neo4j.com/video/nodes-2020/?href=nodes-2020-home

1 Like

Even i have started by research in the same. trying to implement GNN with DGL extracting from neo4j. I have no ideas how to do it. can you please help me with resource or codes how to extract data from neo4j to implement GNN

@dhivyamohan05 check out this blog post: Neo4j & DGL — a seamless integration | by Kristof Neys | Towards Data Science

thank u @alicia_frame1

Hi. So can I say that, I can compute the node embeddings using the Node2Vec or GraphSAGE function provided by gds, and use the node embeddings to fit into different machine learning models. Not necessary to use the DGL, right?

Thanks

@cwingho That's correct: you can use Node2Vec, GraphSAGE, or FastRP to generate graph embeddings in Neo4j, without having to use DGL.

The advantage with using a Neo4j procedure, instead of DGL, is that you don't have to do the ETL - exporting all the data to your python environment, reshaping it for DGL, and then sorting out where to save the results. That means its typically much simpler, faster, and less error prone.

Once you've got your embeddings, you can either export them to you ML environment or use the built in supervised ML in neo4j: https://neo4j.com/docs/graph-data-science/current/algorithms/ml-models/

hello sir,I also start the rearch about the application of GNN on neo4j,but I do not know how to extract data from Neo4j and use Python to run GNN models.Could you give me some help?