Knowledge graph completion infers missing links and their relationship types in a graph containing multiple node and relationship types. It is a multiclass form of link prediction: link prediction forecasts future links, while completion fills missing ones. Unlike homogeneous-graph features such as common-neighbor counts, completion distinguishes entities and relationship types. section 11.0 section 11.2
A knowledge graph embedding model encodes nodes and relationships in an embedding space. It learns representations in which the head and relationship of an existing triple align with its tail, then scores possible missing triples. section 11.4
A practical completion workflow follows these steps:
- Start with a rich, heterogeneous graph containing entities and typed relationships. section 11.2
- Load relationship data, such as a CSV file, into a pandas dataframe when needed. section 11.2.1
- Train a knowledge graph embedding model to represent nodes and relationships. section 11.2
- Rank candidate links and their types, such as new TREATS relationships for a known drug. section 11.2.1
- Validate promising predictions with literature or domain experts before clinical evaluation. section 11.2.5 section 11.4
Drug repurposing with Hetionet
Use the Hetionet biomedical graph to predict new TREATS relationships from acetylsalicylic acid to diseases. Its full dataset contains 47,031 nodes across 11 types and 2,250,197 relationships across 24 types; the workflow uses a smaller subset. PyKEEN supplies embedding models and prediction methods, while supporting paths between aspirin and a candidate disease help experts assess the result. Knowledge graph completion prioritizes candidates; it does not replace clinical trials. section 11.2 section 11.2.1 section 11.2.5 section 11.4
Use the drug-repurposing workflow diagram to connect graph data, embedding-model training, candidate prediction, and evaluation. section 11.2
