Abstract
Objective: To investigate the demonstration in Large Language Models (LLMs) for clinical relation extraction. We focus on examining two types of adaptive demonstration: instruction adaptive prompting, and example adaptive prompting to understand their impacts and effectiveness.
Materials and Methods: The study unfolds in two stages. Initially, we explored a range of demonstration components vital to LLMs’ clinical data extraction, such as task descriptions and examples, and tested their combinations. Subsequently, we introduced the Instruction-Example Adaptive Prompting (LEAP) Framework, a system that integrates two types of adaptive prompts: one preceding instruction and another before examples. This framework is designed to systematically explore both adaptive task description and adaptive examples within the demonstration. We evaluated LEAP framework’s performance on the DDI and BC5CDR chemical interaction datasets, applying it across LLMs such as Llama2-7b, Llama2-13b, and MedLLaMA_13B.
Results: The study revealed that Instruction + Options + Examples and its expanded form substantially raised F1-scores over the standard Instruction + Options mode. LEAP framework excelled, especially with example adaptive prompting that outdid traditional instruction tuning across models. Notably, the MedLLAMA-13b model scored an impressive 95.13 F1 on the BC5CDR dataset with this method. Significant improvements were also seen in the DDI 2013 dataset, confirming the method’s robustness in sophisticated data extraction.
Conclusion: The LEAP framework presents a promising avenue for refining LLM training strategies, steering away from extensive finetuning towards more contextually rich and dynamic prompting methodologies.
Introduction
Extracting relationships between clinical entities—such as identifying drug-drug interactions or chemical-disease relations—is a fundamental task in healthcare informatics. While Large Language Models (LLMs) have shown immense potential, they suffer from "prompt brittleness," where minor changes in wording lead to significant performance fluctuations. Current solutions typically involve labor-intensive manual prompt engineering or computationally expensive full fine-tuning. The LEAP framework addresses this by introducing "soft prompts"—learnable mathematical vectors—that make prompts adaptive to specific clinical contexts without requiring full model retraining.
Methods: The LEAP Framework
The researchers developed a two-stage approach to optimize clinical relation extraction. The first stage, termed the "Diversity Operation," involves identifying the optimal combination of natural language components (Task, Options, Examples, etc.) from an instruction component pool.
Following the selection of the best component combination, the framework implements Instruction-Example Adaptive Prompting (LEAP). This utilizes "soft prompt tuning," where continuous vectors are learned during a lightweight training phase while the underlying LLM parameters remain frozen. The framework tests two specific interventions:
- Instruction Adaptive Tuning (IAT): Learnable soft vectors are placed before the task description to prime the model for the general domain.
- Example Adaptive Tuning (EAT): Learnable soft vectors are placed between the task description and the few-shot examples. This serves as a "contextual bridge," helping the model generalize from provided examples to the specific instance being processed.
Datasets and Evaluation
The framework was evaluated on two gold-standard benchmarks:
- DDI Extraction 2013 (DDI 2013): Focused on drug-drug interactions across DrugBank and MedLine abstracts.
- BC5CDR: A dataset curated for chemical-disease relation extraction.
These datasets require models to distinguish between multiple specific interaction types (e.g., 'mechanism' vs. 'effect'), making them significantly more complex than binary classification tasks.
Key Results and Insights
The LEAP framework demonstrated a significant performance jump over traditional methods across multiple models, including Llama2-7b, Llama2-13b, and MedLLaMA_13B.
- Superiority of EAT: The Example Adaptive Tuning (EAT) method consistently outperformed IAT. This suggests that the model benefits most from an adaptive bridge that helps translate general instructions into the specific logic found in the examples.
- State-of-the-Art Performance: MedLLaMA_13B (pre-trained on medical corpora) using the EAT method achieved an F1 score of 95.13 on the BC5CDR dataset, significantly outperforming traditionally fine-tuned models like BioBERT (79.42) and zero-shot GPT-4 (76.00).
- Component Synergy: The initial phase revealed that adding concrete examples (Instruction + Options + Examples) improved performance more significantly than providing detailed text descriptions of relationship labels alone.
- Efficiency: By training only a small set of soft tokens, the LEAP framework achieves high-tier results with much lower computational overhead than full parameter fine-tuning.
Conclusion
The LEAP framework demonstrates that the placement and adaptivity of prompts are critical for complex clinical NLP tasks. By moving away from static, "hard" prompts toward learnable, contextually aware "soft" prompts, researchers can achieve state-of-the-art results while maintaining computational efficiency. Future work will explore the impact of soft token length and the potential for transferring learned soft prompts across different medical datasets.
Summary updated