# KGE-UNIT **Repository Path**: Tomhappy/KGE-UNIT ## Basic Information - **Project Name**: KGE-UNIT - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-15 - **Last Updated**: 2024-04-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # KGE-UNIT: Towards the unification of molecular interactions prediction based on knowledge graph and multi-task learning on drug discovery The prediction of molecular interactions is vital for drug discovery. Existing methods often focus on individual prediction tasks and overlook the relationships between them. Additionally, certain tasks encounter limitations due to insufficient data availability, resulting in limited performance. To overcome these limitations, we propose KGE-UNIT, a unified framework that combines knowledge graph embedding (KGE) and multi-task learning, for simultaneous prediction of drug-target interactions (DTIs) and drug-drug interactions (DDIs) and enhancing the performance of each task, even when data availability is limited. Via KGE, we extract heterogeneous features from the drug knowledge graph to enhance the structural features of drug and protein nodes, thereby improving the quality of features. Additionally, employing multi-task learning, we introduce an innovative predictor that comprises the task-aware CNN-based encoder and the task-aware attention decoder which can fuse better multimodal features, capture the contextual interactions of molecular tasks and enhance task awareness, leading to improved performance. ![image](KGE-UNIT.png) ## Getting Started ### Installation Setup conda environment: ``` # Create Environment conda create -n kge-unit python=3.8 -y conda activate kge-unit # Install requirements pip install pykeen ``` or: pip install -r requirements.txt or: https://hub.docker.com/repository/docker/ccsimple/kge-unit/general ## Prepare Datasets ``` ${DATA_ROOT} ├── luo │ ├── data_folds │ │ ├──warm_start_1_1 │ │ ├──warm_start_1_1_ddi │ │ ├──cold_start_1_1 │ │ ├──cold_start_1_1_ddi │ │ ├──KGE_COLD_PATH │ │ ├──KGE_PATH │ │ ├──kg.csv │ │ ├──kg_all.txt │ │ ├──kg_cold.csv │ │ ├──... ... ├── BioKG │ ├── data_folds │ │ ├──warm_start_1_1 │ │ ├──warm_start_1_1_ddi │ │ ├──kg.csv ``` dowloads: https://drive.google.com/file/d/1eWw5PKOi-q7ovPWEAbmVSLnNhIQa6Cwn/view?usp=drive_link https://doi.org/10.5281/zenodo.8435763 ## Training To train KGE-UNIT for cross-validation: ``` python train.py --epochs 40 --save --batch-size 32 --scenario warm ``` --save: save the best model --epochs: the total epoches of training --batch-size: the batch size of the training, the default value is 32 --scenario: the warm or cold scenario for the drugs, value: warm/cold ## Testing To test KGE-UNIT by the existing model: ``` python test.py --scenario warm --kge KGE-PATH --kgeunit 'KGE-UNIT-PATH' ``` The pretrained model can be downloaded: https://doi.org/10.5281/zenodo.8435763 ## Comparison ``` python comparison/kge_auroc.py --kge rotate --save ``` --save: save the model --kge: choose the kge model other codes: ``` python comparison/deepdti_luo.py python comparison/deepdti_biokg.py python comparison/ml_luo_ddi.py python comparison/ml_luo_dti.py python comparison/svm_biokg_ddi.py python comparison/svm_biokg_dti.py ``` KGE_NFM:https://github.com/hlf20010508/KGE_NFM KGNN: https://github.com/xzenglab/KGNN ## Notebooks Fig.1. The structure of KGE-UNIT, created by Visio. Fig.2. The structure of the joint multi-task predictor in KGE-UNIT, also created by Visio. Fig.3. Influence of KGE methods on KGE-UNIT on DTIs and DDIs Prediction, generated by Excel. Fig.4. Results of ablation study, created by Excel. Fig.5. The learned representations of each module from KGE-UNIT on the Luo’s test set, added in the notebooks to be reproduced at https://github.com/zcc1203/KGE-UNIT/tree/main/notebooks. Fig.6 The structure of joint multi-task predictor for DTI, DDI and PPI prediction tasks, created by Visio.