Machine learning

Machine learning

Memgraph has been a popular choice in the AI world for a while now, especially for the use cases around machine learning (ML). The MAGE library aims to provide the most commonly used graph algorithms, and that includes graph ML algorithms as well.

Node embeddings

Supervised machine learning is a subset of ML where algorithms try to learn from data. Modeling the interactions between entities as graphs has enabled researchers to understand the various networks systematically. For the computer to understand these networks, embedding a large graph in low dimensional space is necessary, creating node embeddings. It has been demonstrated that graph embedding is superior to alternatives in many supervised learning tasks, such as node classification and link prediction, which are usually used for friendship or content recommendations and advertisement.

Algorithms

Here are the MAGE algorithms which create node embeddings:

  • node2vec: An algorithm for calculating node embeddings on a static graph.
  • node2vec_online: An algorithm for calculating node embeddings on a dynamic graph.

Resources

In case you'd like to learn more about the topic and see practical examples, check out the following resources:

Graph neural networks

Using the node2vec algorithm to determine node embeddings works well, but graph neural networks (GNNs) are more precise. GNNs aim to get the node representations automatically and efficiently by iteratively aggregating the representations of node neighbors and combining them with their representation from the previous iteration. GNNs can inductively learn about your dataset, which means that after training is complete, you can apply their knowledge to a similar use case, meaning you don't have to retrain the whole algorithm.

gnn

Algorithms

Here are the MAGE algorithms that are using GNNs:

Resources

In case you'd like to learn more about the topic and see practical examples, check out the following resources:

Temporal graph networks

Temporal graph networks (TGNs) are GNNs which work on temporal graph networks, meaning they deal with continuous-time dynamic graphs.

tgn

Algorithms

Here is the MAGE algorithm that uses TGNs:

Resources

In case you'd like to learn more about the topic, check out the following resource:

Want to learn more?

To learn more, check out Enhancing AI with graph databases and LLMs bootcamp (opens in a new tab) and on-demand resources (opens in a new tab). Stay up to date with Memgraph events (opens in a new tab) and watch videos from the AI, LLMs and GraphRAG YouTube playlist (opens in a new tab).