Alleva Eugenia, Landi Isotta, Shaw Leslee J, Böttinger Erwin, Ensari Ipek, Fuchs Thomas J
Windreich Department of Artificial Intelligence and Human Health at Mount Sinai, Icahn School of Medicine at Mount Sinai, New York, USA.
Hasso Plattner Institute for Digital Health at Mount Sinai, Icahn School of Medicine at Mount Sinai, New York, USA.
BMC Med Inform Decis Mak. 2025 Jul 3;25(1):247. doi: 10.1186/s12911-025-03071-y.
Prompt-based learning involves the additions of prompts (i.e., templates) to the input of pre-trained large language models (PLMs) to adapt them to specific tasks with minimal training. This technique is particularly advantageous in clinical scenarios where the amount of annotated data is limited. This study aims to investigate the impact of template position on model performance and training efficiency in clinical note classification tasks using prompt-based learning, especially in zero- and few-shot settings.
We developed a keyword-optimized template insertion method (KOTI) to enhance model performance by strategically placing prompt templates near relevant clinical information within the notes. The method involves defining task-specific keywords, identifying sentences containing these keywords, and inserting the prompt template in their vicinity. We compared KOTI with standard template insertion (STI) methods in which the template is directly appended at the end of the input text. Specifically, we compared STI with naïve tail-truncation (STI-s) and STI with keyword-optimized input truncation (STI-k). Experiments were conducted using two pre-trained encoder models, GatorTron and ClinicalBERT, and two decoder models, BioGPT and ClinicalT5, across five classification tasks, including dysmenorrhea, peripheral vascular disease, depression, osteoarthritis, and smoking status classification.
Our experiments revealed that the KOTI approach consistently outperformed both STI-s and STI-k in zero-shot and few-shot scenarios for encoder models, with KOTI yielding a significant 24% F1 improvement over STI-k for GatorTron and 8% for Clinical BERT. Additionally, training with balanced examples further enhanced performance, particularly under few-shot conditions. In contrast, decoder-based models exhibited inconsistent results, with KOTI showing significant improvement in F1 score over STI-k for BioGPT (+19%), but a significant drop for ClinicalT5 (-18%), suggesting that KOTI is not beneficial across all transformer model architectures.
Our findings underscore the significance of template position in prompt-based fine-tuning of encoder models and highlights KOTI's potential to optimize real-world clinical note classification tasks with few training examples.
基于提示的学习涉及在预训练的大语言模型(PLM)的输入中添加提示(即模板),以使其在最少训练的情况下适应特定任务。该技术在注释数据量有限的临床场景中特别有利。本研究旨在调查在基于提示的学习的临床笔记分类任务中,模板位置对模型性能和训练效率的影响,特别是在零样本和少样本设置中。
我们开发了一种关键字优化的模板插入方法(KOTI),通过在笔记中的相关临床信息附近策略性地放置提示模板来提高模型性能。该方法包括定义特定任务的关键字,识别包含这些关键字的句子,并在其附近插入提示模板。我们将KOTI与标准模板插入(STI)方法进行了比较,在标准模板插入方法中,模板直接附加在输入文本的末尾。具体而言,我们将STI与朴素尾部截断(STI-s)以及与关键字优化输入截断的STI(STI-k)进行了比较。使用两个预训练的编码器模型GatorTron和ClinicalBERT以及两个解码器模型BioGPT和ClinicalT5,针对包括痛经、外周血管疾病、抑郁症、骨关节炎和吸烟状态分类在内的五个分类任务进行了实验。
我们的实验表明,在编码器模型的零样本和少样本场景中,KOTI方法始终优于STI-s和STI-k,对于GatorTron,KOTI比STI-k的F1得分显著提高了24%,对于Clinical BERT提高了8%。此外,使用平衡示例进行训练进一步提高了性能,特别是在少样本条件下。相比之下,基于解码器的模型表现出不一致的结果,对于BioGPT,KOTI的F1得分比STI-k有显著提高(+19%),但对于ClinicalT5则显著下降(-18%),这表明KOTI并非对所有变压器模型架构都有益。
我们的研究结果强调了模板位置在编码器模型基于提示的微调中的重要性,并突出了KOTI在使用少量训练示例优化现实世界临床笔记分类任务方面的潜力。