TL;DR
This paper proposes a novel method to improve the extraction of factual knowledge from large language models (LLMs) for the biomedical domain by incorporating Electronic Health Record (EHR) notes as context. By "soft-constraining" LLMs with relevant EHR snippets, they demonstrate a significant improvement in knowledge extraction accuracy and introduce a new metric to evaluate an LLM's ability to distinguish correct from noisy information.
What Problem Does This Paper Address?
Large Language Models (LLMs) have shown promise in various natural language processing tasks, including those in the biomedical domain. A key area of research is using LLMs as knowledge bases (KBs) by probing them for factual information. However, existing methods, like the LAMA benchmark, rely on manually crafted prompts and provide only a lower bound on the LLM's knowledge. This is particularly problematic in the biomedical domain, where relationships can be complex (N-to-one, N-to-M) and factual information is often embedded within noisy text. The authors aim to bridge this gap by developing a more robust method for extracting biomedical knowledge from LLMs, making them more reliable KBs that can better reflect real-world clinical scenarios where physicians infer diagnoses from patient symptoms described in EHRs.
Methods
The core innovation is the Dynamic-Context-BioLAMA approach. Instead of relying solely on pre-defined prompts, the authors augment these prompts with relevant snippets from EHR notes. This is achieved through a two-step EHR note retrieval process: first, identifying notes where a specific disease is the primary diagnosis (in the "Assessment" section), and second, filtering these notes to include those where a target symptom is mentioned (in the "Subjective" section). This retrieved EHR context is then dynamically added to the prompt, segment by segment, to observe its effect on the LLM's knowledge extraction. The LLM is tasked with filling in a "[MASK]" token, and the EHR context acts as a "soft constraint," encouraging the LLM to focus on symptoms present in the provided text. This mechanism leverages the "local attention" property of Transformer models, making them more sensitive to the immediate context.
Datasets
- UMMS SOAP DATABASE: A collection of EHR notes from UMass Memorial Hospital, used for retrieving contextual information. These notes are structured into Subjective, Objective, Assessment, and Plan sections.
- BIOS (Biomedical Informatics Ontology System): Used as the ground truth knowledge base for evaluating the extracted facts. It contains information on diseases, symptoms, medications, etc.
- BioLAMA: A biomedical factual probing benchmark, used as a baseline for evaluation.
Key Insights and Ideas
- EHR Context as a Knowledge Enhancer: Adding relevant EHR snippets to prompts significantly improves the accuracy of factual knowledge extraction from LLMs, effectively raising the "low bound" of their knowledge.
- Distinguishing Signal from Noise: The proposed method allows LLMs to differentiate between correct symptoms and incorrect or unrelated symptoms present in EHR notes. This ability to discern is itself a valuable metric for assessing the LLM's internal knowledge.
- Local Attention is Key: The effectiveness of the method relies on the Transformer's local attention mechanism, which makes the model more responsive to the provided EHR context.
- "Soft Constraint" vs. "Copying": While context helps, the authors explore whether LLMs are truly "knowing" or just "copying" from the context. The "segment1" (only target symptom) vs. "avg all segments" (all symptoms) comparison helps shed light on this, suggesting that while context improves accuracy, models might over-rely on it if not carefully evaluated.
- Domain-Specific Vocabulary Matters: Fine-tuning LLMs on domain-specific datasets and using domain-specific vocabularies demonstrably improves performance on this task.
Key Results
- Accuracy Improvement: Across various models (BERT, BioBERT, and several Bio-LMs), incorporating EHR context ("segment1" and "avg all segments") consistently outperformed the "no context" baseline, with Acc@1 scores often improving by several percentage points. For instance, BioBERT's Acc@1 rose from 0.1 to 0.228 with "segment1" and 0.124 with "avg all segments."
- Ranking Analysis: The "Rank Change" experiments revealed that when a correct symptom is added to the context, models tend to rank target symptoms and existing correct symptoms higher, while pushing incorrect symptoms down. Conversely, when an incorrect symptom is added, models still tend to rank the newly added symptom higher, likely due to the local attention mechanism, regardless of its correctness.
- Model Performance: BioBERT and certain RoBERTa-based models (specifically those fine-tuned on domain-specific data or with domain-specific vocabularies) generally showed superior performance in both accuracy and rank-based evaluations.
Limitations and Future Work
- Local Context Influence: The paper acknowledges that local context can sometimes lead to incorrect inferences, as seen in Case 3 where the model was influenced by a "not" preceding a symptom. Future work should explore how to mitigate such negative influences of local context.
- "Copying" vs. "Knowing": While the method improves extraction, further research is needed to definitively distinguish between LLMs truly recalling knowledge and simply "copying" from the provided context.
- Generalizability: The study focused on disease-symptom relationships. Extending this approach to other biomedical relationships and domains would be valuable.
- Prompt Optimization: While the paper introduces context-aware prompting, further exploration into optimizing prompt design and context selection could yield even better results.
Summary updated