# How to find similarity between two graphs in Neo4j?

**URL:** https://community.neo4j.com/t/how-to-find-similarity-between-two-graphs-in-neo4j/12387
**Category:** Graph Data Science / Graph Analytics
**Created:** [December 1, 2019, 3:06pm UTC](https://community.neo4j.com/t/how-to-find-similarity-between-two-graphs-in-neo4j/12387 "2019-12-01T15:06:26Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![marvin-hansen](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/marvin-hansen/32/7559_2.png) [@marvin-hansen](https://community.neo4j.com/u/marvin-hansen)
#### Post date: [December 5, 2019, 10:01am UTC](https://community.neo4j.com/t/how-to-find-similarity-between-two-graphs-in-neo4j/12387/10 "2019-12-05T10:01:18Z")

</div>

Use geometric deep learning to correctly classify sub-graph patterns.

> **[Deep Graph Library](https://www.dgl.ai/pages/about.html)**
>
> Library for deep learning on graphs

[https://docs.dgl.ai/tutorials/basics/4\_batch.html](https://docs.dgl.ai/tutorials/basics/4_batch.html)

Once classified, you just search for any sort of subgraph pattern and you are effectively done.

Beyond that, you can perform link/relation prediction with DGL to figure out which molecule is most likely to change state e.g. changing one H node to C node int order to bind to another molecule depending on its context.

[https://docs.dgl.ai/tutorials/basics/1\_first.html](https://docs.dgl.ai/tutorials/basics/1_first.html)

In case you are short on structures to classify, you can just generate molecules structures similar but slightly different to your target structure by using GAN's.

> **[Deep learning for molecular design—a review of the state of the art](https://pubs.rsc.org/en/content/articlelanding/2019/me/c9me00039a#!divAbstract)**
>
> In the space of only a few years, deep generative modeling has revolutionized how we think of artificial creativity, yielding autonomous systems which produce original images, music, and text. Inspired by these successes, researchers are now applying...

> **[paper18.pdf](https://ceur-ws.org/Vol-2350/paper18.pdf)**
>
> 1251.09 KB

> **[Creating Molecules from Scratch I: Drug Discovery with Generative Adversarial...](https://medium.com/neuromation-blog/creating-molecules-from-scratch-i-drug-discovery-with-generative-adversarial-networks-9d42cc496fc6)**
>
> We’ve got great news: the very first paper with official Neuromation affiliation has appeared! This work, “3D Molecular Representations…

---

_[View the full topic](https://community.neo4j.com/t/how-to-find-similarity-between-two-graphs-in-neo4j/12387)._
