Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
TxGNN: Zero-shot prediction of therapeutic use with geometric deep learning and clinician centered design
| Date | Stars |
|---|---|
| 2026-07-31 | 280 |
| 2026-08-04 | 282 |
| 2026-08-06 | 283 |
Today
+1 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# TxGNN: Zero-shot prediction of therapeutic use with geometric deep learning and human centered design
This repository hosts the official implementation of TxGNN, a model for identifying therapeutic opportunities for diseases with limited treatment options and minimal molecular understanding that leverages recent advances in geometric deep learning and human-centered.
TxGNN is a graph neural network pre-trained on a comprehensive knowledge graph of 17,080 clinically-recognized diseases and 7,957 therapeutic candidates. The model can process various therapeutic tasks, such as indication and contraindication prediction, in a unified formulation. Once trained, we show that TxGNN can perform zero-shot inference on new diseases without additional parameters or fine-tuning on ground truth labels.
### MedRxiv preprint is at [https://www.medrxiv.org/content/10.1101/2023.03.19.23287458v2](https://www.medrxiv.org/content/10.1101/2023.03.19.23287458v2)
### TxGNN Explorer of model predictions and explanations is at [http://txgnn.org](http://txgnn.org/)

### Installation
```bash
conda create --name txgnn_env python=3.8
conda activate txgnn_env
# Install PyTorch via https://pytorch.org/ with your CUDA versions
conda install -c dglteam dgl-cuda{$CUDA_VERSION}==0.5.2 # checkout https://www.dgl.ai/pages/start.html for more info, as long as it is DGL 0.5.2
pip install TxGNN
```
Note that if you want to use disease-area split, you should also install PyG following [this instruction](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html) since some legacy data processing code uses PyG utility functions.
### Core API Interface
Using the API, you can (1) reproduce the results in our paper and (2) train TxGNN on your own drug repurposing dataset using a few lines of code, and also generate graph explanations.
```python
from txgnn import TxData, TxGNN, TxEval
# Download/load knowledge graph dataset
TxData = TxData(data_folder_path = './data')
TxData.prepare_split(split = 'complex_disease', seed = 42)
TxGNN = TxGNN(data = TxData,
weight_bias_track = False,
proj_name = 'TxGNN', # wandb project name
exp_name = 'TxGNN', # wandb experiment name
device = 'cuda:0' # define your cuda device
)
# Initialize a new model
TxGNN.model_initialize(n_hid = 100, # number of hidden dimensions
n_inp = 100, # number of input dimensions
n_out = 100, # number of output dimensions
proto = True, # whether to use metric learning module
proto_num = 3, # number of similar diseases to retrieve for augmentation
attention = False, # use attention layer (if use graph XAI, we turn this to false)
sim_measure = 'all_nodes_profile', # disease signature, choose from ['all_nodes_profile', 'protein_profile', 'protein_random_walk']
agg_measure = 'rarity', # how to aggregate sim disease emb with target disease emb, choose from ['rarity', 'avg']
num_walks = 200, # for protein_random_walk sim_measure, define number of sampled walks
path_length = 2 # for protein_random_walk sim_measure, define path length
)
```
Instead of initializing a new model, you can also load a saved model:
```python
TxGNN.load_pretrained('./model_ckpt')
```
We provide an example pre-trained model weight at [here](https://drive.google.com/file/d/1fxTFkjo2jvmz9k6vesDbCeucQjGRojLj/view).
To do pre-training using link prediction for all edge types, you can type:
```python
TxGNN.pretrain(n_epoch = 2,
learning_rate = 1e-3,
batch_size = 1024,
train_print_per_n = 20)
```
Lastly, to do finetuning on drug-disease relation with metric learning, you can type:
```python
TxGNN.finetune(n_epoch = 500,
learning_rate Excerpt of 7,920 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:af68a026c283fa70, llm:Repository description and README: 'TxGNN: Zero-shot prediction of therapeutic use with geometric deep learning and human-centered design'; topics include geometric-deep-learning, graph-neural-networks, drug-discovery, knowledge-graph; implements a graph neural network pre-trained on a knowledge graph for therapeutic prediction.
matched fp:af68a026c283fa70, llm:Repository description and README: 'TxGNN: Zero-shot prediction of therapeutic use with geometric deep learning and human-centered design'; topics include geometric-deep-learning, graph-neural-networks, drug-discovery, knowledge-graph; implements a graph neural network pre-trained on a knowledge graph for therapeutic prediction.