Abstract
Knowledge probing is essential for understanding how pre-trained language models (PLMs) transfer knowledge. While general-domain probing has advanced, specialized fields like biomedicine remain under-explored. We introduce MedLAMA, a biomedical knowledge probing benchmark based on the UMLS Metathesaurus. Our evaluation shows that standard PLMs perform poorly on this task, achieving at most 3% acc@10. We propose Contrastive-Probe, a self-supervised approach that "rewires" PLMs without labeled probing data. Contrastive-Probe significantly improves performance, reaching 28% acc@10. Human expert evaluation suggests that PLMs may possess even more knowledge than current benchmarks can measure, as many correct model predictions are missing from the gold-standard UMLS.
Introduction: The Challenges of Biomedical Probing
Large language models (LLMs) like BERT capture vast amounts of knowledge during pre-training, but their effectiveness in specialized domains like biomedicine is limited by two primary factors:
- The Multi-token Challenge: Most medical entities (e.g., "Acute Myeloid Leukemia") consist of multiple words. Standard generative probing, which predicts one token at a time, struggles with these complex terms.
- Vocabulary Bias: Models often favor high-frequency words from their training data, which may not align with factual biomedical knowledge.
Existing benchmarks like LAMA focus on general knowledge and single-token answers, failing to capture the complexity of the biomedical domain.
MedLAMA: A Specialized Benchmark
To address these gaps, we developed MedLAMA, a benchmark derived from the Unified Medical Language System (UMLS). It comprises 19,000 queries across 19 distinct relations, such as may_prevent and disease_mapped_to_gene. MedLAMA highlights the difficulty of biomedical probing by including a "hard" subset where answers cannot be easily inferred from lexical overlaps.
Methodology: The Rewire-then-Probe Recipe
We introduce a two-stage approach called Rewire-then-Probe:
1. Rewiring via Contrastive Learning
Instead of traditional fine-tuning, we "rewire" the PLM using a small set of unlabeled biomedical sentences (e.g., 10,000 sentences from PubMed). We employ a self-supervised contrastive objective (InfoNCE) to align the model's internal representations, encouraging similar embeddings for different parts of the same sentence. This process takes less than a minute on a single GPU and prepares the model's embedding space for the biomedical domain without exposing it to test questions.
2. Retrieval-based Probing
We move away from text generation and treat probing as a retrieval task. A query is converted into an embedding, and we perform a nearest-neighbor search among all possible biomedical entities in the embedding space. This approach effectively bypasses the multi-token generation bottleneck.
Key Results and Insights
The transition from generative to contrastive probing yields a substantial performance boost. Standard "Mask Predict" methods on PubMedBERT achieved nearly 0% acc@10. In contrast, Contrastive-Probe reached 24.31% accuracy on the same model, and over 30% when applied to models already specialized for medical text, such as SapBERT.
Our findings suggest:
- Generation is a Bottleneck: Retrieval-based methods are crucial for extracting multi-token knowledge.
- Efficient Adaptation: Minimal domain-specific "rewiring" significantly enhances the model's ability to surface factual knowledge.
- Layered Knowledge: Knowledge is not uniformly distributed; middle layers of the Transformer architecture are often more "knowledgeable" for certain relations than the final layers.
- Benchmark Limitations: Human experts identified many correct answers provided by the models that were absent from the UMLS gold standard, indicating that current benchmarks may underestimate PLM knowledge.
Conclusion
MedLAMA and Contrastive-Probe offer a new framework for evaluating and improving knowledge extraction in specialized domains. While a performance gap remains, these tools provide a foundation for developing more sophisticated probing techniques. Future research will explore combining prompt optimization with representation-space rewiring to further unlock the knowledge stored within PLMs.
Summary updated