Introduction
Biomedical language models often struggle with factual consistency and the rigorous, structured relationships inherent in medical knowledge. While Large Language Models (LLMs) excel at linguistic context, they are prone to "hallucinations" when dealing with specialized domains. Conversely, Knowledge Graphs (KGs) like the Unified Medical Language System (UMLS) provide factual structure but lack linguistic flexibility.
BALI (Biomedical Knowledge Graph and Language Model Alignment) addresses this gap by synchronizing the "internal logic" of medical knowledge graphs with the linguistic patterns of language models. By using shared entity anchors to align these two modalities during training, BALI produces models that significantly outperform standard baselines—like PubMedBERT—on complex reasoning tasks without requiring extra computational overhead at inference time.
Methods: Cross-Modal Alignment
The BALI framework introduces a joint pre-training approach using two specialized encoders working in tandem:
- Textual Encoder: A standard transformer (e.g., PubMedBERT) processing natural language sentences.
- Graph Encoder: A Graph Attention Network (GAT) processing local subgraphs retrieved from the UMLS.
The core innovation is Cross-Modal Alignment. When a sentence mentions a medical entity (e.g., "Parkinson’s disease"), this mention acts as an anchor. The system pulls the textual representation from the LM and the structural representation from the GAT closer together in a shared mathematical space using a contrastive loss function (InfoNCE). Simultaneously, the model performs standard Masked Language Modeling (MLM) to maintain linguistic proficiency. Crucially, the graph encoder is discarded after training; the resulting LM carries the "distilled" knowledge within its weights, requiring no graph lookups during deployment.
Datasets and Evaluation
The researchers evaluated BALI across a diverse array of biomedical benchmarks to ensure robust performance:
- Pre-training: 1.67 million sentences from PubMed abstracts linked to 600,000 unique UMLS concepts.
- Question Answering (QA): PubMedQA, MedQA-USMLE, and BioASQ 2023.
- Entity Linking (EL): Five corpora including NCBI Disease and BC5CDR.
- Relation Extraction (RE): ChemProt, Drug-Drug Interaction (DDI), and Genetic Association Database (GAD).
Key Results
BALI consistently improved the performance of state-of-the-art biomedical models across all evaluated tasks, demonstrating the efficacy of structural alignment.
- Question Answering: PubMedBERT + BALI achieved accuracy gains of 2.1% on PubMedQA, 1.7% on MedQA, and a substantial 6.2% on BioASQ.
- Entity Linking: The model showed massive gains in zero-shot settings, with PubMedBERT and BioLinkBERT improving Accuracy@1 by 13.1% and 24.2%, respectively.
- Relation Extraction: BALI-enhanced models outperformed even GPT-3.5 on specialized tasks like ChemProt, demonstrating a superior ability to identify complex chemical-protein interactions.
Key Insights and Discussion
- Inference Efficiency: Unlike retrieval-augmented models that query databases at runtime, BALI-trained models are "self-contained." This makes them highly practical for real-world deployment where speed and privacy are paramount.
- GNNs vs. Linearization: For smaller models, a dedicated Graph Neural Network (GNN) is superior at capturing structure. However, for larger models (e.g., BioLinkBERT-Large), "flattening" the graph into text was surprisingly effective, suggesting larger models have more capacity to internalize graph structures directly.
- Data Quality: Significant gains were achieved with only 1.7 million sentences. This suggests that aligned, high-quality data is more potent for domain-specific reasoning than simply increasing the volume of raw text.
Limitations and Future Work
Current limitations include the relatively small pre-training scale and the focus on encoder-only architectures. Future work will explore scaling to the full PubMed database and applying this alignment strategy to decoder-only (GPT-style) or encoder-decoder (T5-style) models. Additionally, the authors suggest exploring more stable optimization strategies for complex contrastive losses to further refine multi-modal training.
Summary updated