Enhancing Clinical BERT Embedding using a Biomedical Knowledge Base

Boran Hao, Henghui Zhu, Ioannis Ch. Paschalidis

Abstract

Clinical language models often struggle with specialized terminology and rare medical concepts due to the "low-resource" nature of medical text. This research introduces a method to enhance models like BERT and ALBERT by injecting structured medical knowledge from the Unified Medical Language System (UMLS) during pre-training. By incorporating a triplet classification task alongside standard language modeling, the resulting models—Clinical KB-BERT and Clinical KB-ALBERT—achieve state-of-the-art results on clinical reasoning and entity recognition benchmarks. The findings suggest that structured knowledge acts as a powerful regularizer, helping models learn meaningful representations even for concepts that appear infrequently in raw text.

Introduction

General-purpose language models, while powerful, face significant hurdles in the clinical domain. Medical documentation is highly specialized, often restricted due to privacy concerns, and contains complex concepts that may appear infrequently in training corpora. For instance, a rare drug or a specific sub-type of a disease might only appear a handful of times in millions of notes. Consequently, standard models like BERT may fail to learn meaningful representations for these entities, as they rely heavily on co-occurrence statistics in raw text.

To bridge this gap, researchers from Boston University and AWS AI propose leveraging existing "Knowledge Bases" (KBs) such as the Unified Medical Language System (UMLS). These KBs contain millions of structured facts—represented as triplets—that encapsulate decades of expert medical knowledge. This paper explores a joint training approach designed to fuse this structured, "encyclopedic" knowledge with the unstructured, "contextual" knowledge found in clinical notes, effectively "supercharging" the model's understanding of the medical domain.

Methods: Knowledge Base Integration

The core innovation of this work is a joint training objective that combines standard Masked Language Modeling (MLM) with a novel Triplet Classification task. This dual approach ensures the model learns both the linguistic context of medical terms and their formal relational definitions.

Triplet Classification Task

In the triplet classification task, the model is presented with an input sequence in the format [CLS] concept1 [relation] concept2 [SEP]. The model's objective is to predict a binary label indicating whether the given relationship exists within the UMLS knowledge base. This forces the transformer architecture to attend to the specific semantics of the relationship rather than just the individual concepts.

Example of structured medical relationships in the UMLS knowledge base used for triplet classification.

Smart Negative Sampling

A critical component of the training process is the selection of negative samples. The authors observed that random negative sampling (pairing unrelated concepts) is often too simple for modern transformers to solve, leading to poor generalization. To address this, they implemented a "hard" negative sampling strategy. When generating fake triplets, the system selects concepts of the same semantic type as the original. For example, if the true fact is "Aspirin treats Fever," a negative sample might be "Aspirin treats [Different Symptom]" rather than a completely unrelated entity. This nuanced approach forces the model to distinguish between specific clinical links.

Joint Pre-training and Loss Function

The final training loss is calculated as a weighted sum of the text-based MLM loss and the knowledge-based triplet loss. By optimizing for both simultaneously, the model develops a vector space that respects established biological and clinical realities while maintaining its ability to process natural language.

Experimental Setup

Datasets

  • Pre-training Text: The models were pre-trained on MIMIC-III, a massive dataset containing nearly 2 million de-identified Intensive Care Unit (ICU) reports.
  • Knowledge Base: The UMLS (ver. 2019AA) served as the source of structured knowledge, providing a multi-relational graph of 27.7 million relations across 127 semantic types.

Evaluation Benchmarks

The models were evaluated on several key clinical NLP tasks:

  • MedNLI: A Natural Language Inference task where the model must determine if one medical statement entails, contradicts, or is neutral toward another.
  • i2b2 2010 & 2012: Standard benchmarks for Clinical Named Entity Recognition (NER), focusing on the identification of treatments, tests, and medical problems within clinical text.

Results and Discussion

The proposed Clinical KB-BERT and Clinical KB-ALBERT models consistently outperformed previous state-of-the-art (SOTA) clinical models across all tested benchmarks.

  • Clinical Reasoning: On the MedNLI task, the KB-enhanced model achieved 84.4% accuracy. This represents a significant jump over the previous BioBERT (80.8%) and the Bio+Discharge Summary BERT (82.7%), which was trained only on text.
  • Entity Recognition: F1-scores on i2b2 NER tasks improved by up to 1.0%, indicating a more precise understanding of entity boundaries and types.
  • Ablation Studies: The authors' ablation analysis revealed that while in-domain text (MIMIC-III) provides the largest initial performance boost, the addition of the UMLS knowledge base consistently contributed an additional 1.4% to 2.6% improvement. This confirms that structured knowledge provides information that is not easily extracted from raw text alone.

Key Insights

The integration of a KB acts as a powerful regularizer. By anchoring the model's embeddings to a structured graph, the training process ensures that the "distance" between concepts in the vector space aligns with clinical reality. Furthermore, the success of the method across both BERT and ALBERT architectures suggests that joint training with a KB is a robust, architecture-agnostic strategy for domain adaptation.

Limitations and Future Work

While the results are promising, the study notes certain limitations. Due to GPU memory constraints, the ALBERT-based models were limited to a maximum sequence length of 128 tokens. This constraint may hinder performance on tasks requiring long-range dependencies in extensive clinical documents.

Future research directions include evaluating these models on a wider variety of downstream tasks, such as temporal relation extraction or automated phenotyping. Additionally, the authors found that standard post-processing techniques like "span correction" actually degraded NER performance, suggesting that the model's raw predictions were already highly tuned to the underlying clinical structures and did not benefit from heuristic adjustments.

Summary updated

BibTeX
@inproceedings{hao2020enhancing,
  author = {Boran Hao and Henghui Zhu and Ioannis Ch. Paschalidis},
  title = {{Enhancing Clinical BERT Embedding using a Biomedical Knowledge Base}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.57},
}
Figure