17.3 Using the Supervised EdgeWise Algorithm (Edge Embeddings and Classification)
SupervisedEdgeWise
is an inductive edge
representation learning algorithm which is able to leverage vertex and edge feature
information. It can be applied to a wide variety of tasks, including edge classification and
link prediction.
Supervised EdgeWise is based on top of the GraphWise
model,
leveraging the source vertex embedding and the destination vertex embedding generated by
the GraphWise
model to generate inductive edge embeddings.
Model Structure
A SupervisedEdgeWise
model consists of graph
convolutional layers followed by several prediction layers.
First, the source and destination vertices of the target edge are processed through the convolutional layers. The forward pass through a convolutional layer for a vertex proceeds as follows:
- A set of neighbors of the vertex is sampled.
- The previous layer representations of the neighbors are mean-aggregated, and the aggregated features are concatenated with the previous layer representation of the vertex.
- This concatenated vector is multiplied with weights, and a bias vector is added.
- The result is normalized such that the layer output has unit norm.
The edge embedding layer concatenates the source vertex embedding, the edge features and the destination vertex embedding, and then forwards it through a linear layer to get the edge embedding.
The prediction layers are standard neural network layers.
The following describes a few use cases where SupervisedEdgeWise
algorithm can be applied:
- Friends Recommendation: To predict future friendships or connections between users based on current social graph data.
- Customer Retention: To predict which customers are likely to stop using a service by analyzing interaction patterns within the customer support network or usage logs.
- Predictive Maintenance in IoT Networks: To forecast potential failures in IoT (Internet of Things) networks by classifying the edges (connections) between sensors and devices based on historical data. This helps in proactive maintenance scheduling.
- Loading a Graph
- Building a Minimal Supervised EdgeWise Model
- Advanced Hyperparameter Customization
- Applying EdgeWise for Partitioned Graphs
- Supported Property Types for Supervised EdgeWise Model
- Classification Versus Regression on Supervised EdgeWise Models
- Setting a Custom Loss Function and Batch Generator (for Anomaly Detection)
- Setting the Edge Embedding Production Method
- Training a Supervised EdgeWise Model
- Getting the Loss Value for a Supervised EdgeWise Model
- Getting the Training Log for a Supervised EdgeWise Model
- Inferring Edge Labels for a Supervised EdgeWise Model
- Evaluating Model Performance
- Inferring Embeddings for a Supervised EdgeWise Model
- Storing a Supervised EdgeWise Model
- Loading a Pre-Trained Supervised EdgeWise Model
- Destroying a Supervised EdgeWise Model
- Example: Predicting Ratings on the Movielens Dataset
Parent topic: Using the Machine Learning Library (PgxML) for Graphs