Aligning Biomedical Texts and Knowledge Graphs: A Systematic Comparison of Lightweight Alignment Strategies
Organizations: University of Mannheim, Germany · Data and Web Science Group, University of Mannheim, Germany
Abstract
Biomedical knowledge exists in two complementary but distinct forms: unstructured scientific literature and structured knowledge graphs (KGs). Aligning them is essential for knowledge grounding, evidence retrieval, and KG completion, yet existing methods do not explicitly align free-text evidence with KG triples. We present a unified framework for systematically studying design choices for aligning biomedical text and KGs. With a text encoder and a KG embedding model both frozen, we learn only a lightweight projection between their spaces via a contrastive objective. This enables a fair comparison across six design dimensions: text encoder, KG embedding model, projection head, triple composition, training direction, and hard-negatives sampling. We construct CTD-Align, a corpus of over 22K one-to-one tripledocument pairs linking chemical-gene interactions from the Comparative Toxicogenomics Database to supporting PubMed passages. We evaluate alignment on it in two retrieval settings: document-to-triple and triple-to-document. We find that the triple composition and the training direction (i.e., shared retrieval space) have the greatest impact, whereas the text encoder and hard-negatives sampling matter little. Overall, simple choices win: projecting text into the KG space with a linear head over concatenated subject, predicate, and object embeddings performs best. These findings establish lightweight contrastive alignment as an effective, practical foundation for bridging biomedical text and KGs.
Figures & tables
| # Relations | # Edges | # Nodes | |||||
| Chemicals | Genes | Diseases | Pathways | Total | |||
| Core | 11 | 22,293 | 4,179 | 3,431 | - | - | 7,610 |
| Enriched | 14 | 1,048,611 | 13,773 | 50,709 | 7,292 | 2,363 | 74,137 |
| Hyperparameter | RotatE | TuckER | RDF2Vec |
| Entity dim. | / 500 | / 200 | / 200 |
| Relation dim. | entity dim | / 65 | entity dim |
| Learning rate | / | / | — |
| Margin | / 9 | — | — |
| Adv. sampling temp. | / 0.91 | — | — |
| Negative samples | / 467 | — | / 10 |
| D2T (document triple) | T2D (triple document) | ||||||||
| Model | Config | MRR | Hits@1 | Hits@10 | Rank | MRR | Hits@1 | Hits@10 | Rank |
| Verbalized | BioBERT / – | 8.41 0.3 | 5.47 0.3 | 13.69 0.4 | 927 45 | 7.41 0.1 | 4.48 0.1 | 12.98 0.2 | 845 51 |
| Verbalized | PubMedBERT / – | 4.43 0.3 | 2.81 0.2 | 7.45 0.4 | 4826 96 | 2.83 0.2 | 1.68 0.2 | 4.87 0.3 | 5066 136 |
| Aligned (text KG) | PubMedBERT / RDF2Vec | 15.99 0.6 | 8.74 0.6 | 30.17 0.7 | 38 2 | 12.13 0.3 | 5.92 0.2 | 24.30 0.8 | 55 2 |
| Aligned (KG text) | BioBERT / RotatE | 3.75 0.3 | 1.34 0.3 | 7.84 0.6 | 349 18 | 5.89 0.2 | 2.21 0.3 | 12.41 0.3 | 147 7 |
| Aligned (bidirectional) | PubMedBERT / RotatE | 15.15 0.6 | 8.51 0.6 | 28.27 0.6 | 48 3 | 5.74 0.3 | 2.29 0.3 | 11.97 0.5 | 159 5 |
Biomedical KGs
Biomedical knowledge graphs organize evidence about genes, diseases, drugs, pathways, and patients for computational discovery and clinical reasoning.
See all 71 papers