> ## Documentation Index
> Fetch the complete documentation index at: https://kumo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Selecting Link Prediction Model Architectures on Kumo

> Guide to Model Architecture Selection for Link Prediction

## Overview of Dimensions

There are four orthogonal dimensions that influence model architecture selection in Kumo:

1. **Temporal vs. Static Graph**
2. **Use of ID-GNN Features**
3. **RHS Model Type**: GNN or Shallow
4. **Scoring Mechanism**: Softmax or Contrastive

Not all combinations are supported. Kumo offers internally defined modules to handle key scenarios.

***

## Architecture Matrix

| RHS Model Type | Scoring  | Temporal (Add ID-GNN)         | Temporal (No ID-GNN)            | Static (Add ID-GNN) | Static (No ID-GNN)             |
| -------------- | -------- | ----------------------------- | ------------------------------- | ------------------- | ------------------------------ |
| **GNN**        | Softmax  | N/A                           | N/A                             | N/A                 | N/A                            |
| **GNN**        | Contrast | N/A                           | N/A                             | N/A                 | `Two-tower` module (embedding) |
| **Shallow**    | Softmax  | `ContextGNN` module (ranking) | `RHSShallow` module (embedding) | N/A                 | `RHSShallow` module (ranking)  |
| **Shallow**    | Contrast | N/A                           | N/A                             | N/A                 | N/A                            |

***

## Supported Modules

* **ContextGNN**: Used for temporal models with shallow RHS and softmax scoring. Optimized for ranking tasks. Read more about ContextGNN [here](https://arxiv.org/abs/2411.19513).
* **RHSShallow**: Applicable to static, shallow RHS models with or without ID-GNN. Can be used for both ranking and embedding.
* **Two-tower**: Used for contrastive learning with static graphs and GNN on the RHS. Learns embeddings independently for LHS and RHS nodes.

***

## Notes

* The `feature`, `lookup`, and `fusion` modes are specific to `RHSShallow` architectures and are passed to the [`target_embedding_mode`](https://kumo.ai/docs/reference/target_embedding_mode/) model parameter.
* The term **two-tower** is used internally to denote that the GNN architecture exists for both the LHS and RHS entities. This may differ from broader industry definitions.
* GNN-based RHS architectures are currently not supported in Kumo for temporal LP.
* ContextGNN is not suitable for generating inductive embedding representations.
* LHS refers to the entity declared by your predictive query. This is the `table.entity` that follows after the `FOR EACH` statement.
* RHS refers to the target declared by your predictive query. This is the `table.target` that follows after the `PREDICT` statement.

***

## Recommendations

* **`Use ContextGNN`** if you require temporal modeling and ranking behavior with a shallow RHS.
* **`Use RHSShallow`** if you're working with static graphs and want lightweight embedding or ranking models.
* **`Use Two-tower`** if your goal is contrastive embedding with a static graph and GNN on RHS.

***

This architecture guide helps ensure optimal model selection when setting up LP models on the Kumo platform. Future updates may unify terminology and expand support.
