Skip to main content
QUICK REVIEW

[Paper Review] Parameter-Efficient Fine-Tuning of LLaMA for the Clinical Domain

Aryo Pradipta Gema, Pasquale Minervini|arXiv (Cornell University)|Jul 6, 2023
Topic ModelingComputer Science9 citations
TL;DR

The paper introduces Clinical LLaMA-LoRA and Downstream LLaMA-LoRA, a two-step PEFT framework for adapting LLaMA to clinical tasks. It achieves state-of-the-art macro AUROC across clinical NLP tasks while substantially reducing compute, with notable gains from LoRA-based adapters.

ABSTRACT

Adapting pretrained language models to novel domains, such as clinical applications, traditionally involves retraining their entire set of parameters. Parameter-Efficient Fine-Tuning (PEFT) techniques for fine-tuning language models significantly reduce computational requirements by selectively fine-tuning small subsets of parameters. In this study, we propose a two-step PEFT framework and evaluate it in the clinical domain. Our approach combines a specialised PEFT adapter layer designed for clinical domain adaptation with another adapter specialised for downstream tasks. We evaluate the framework on multiple clinical outcome prediction datasets, comparing it to clinically trained language models. Our framework achieves a better AUROC score averaged across all clinical downstream tasks compared to clinical language models. In particular, we observe large improvements of 4-5% AUROC in large-scale multilabel classification tasks, such as diagnoses and procedures classification. To our knowledge, this study is the first to provide an extensive empirical analysis of the interplay between PEFT techniques and domain adaptation in an important real-world domain of clinical applications.

Motivation & Objective

  • Motivate the need for efficient domain adaptation of LLMs to clinical data due to high costs of full fine-tuning.
  • Propose a LoRA-based adapter (Clinical LLaMA-LoRA) for clinical domain adaptation of LLaMA.
  • Introduce a downstream task adapter (Downstream LLaMA-LoRA) built on top of Clinical LLaMA-LoRA.
  • Evaluate the framework on multiple clinical downstream tasks and compare to clinically trained LLMs and baselines.
  • Demonstrate computational efficiency and performance gains over previous approaches.

Proposed method

  • Domain-adaptive pretraining of LLaMA and PMC-LLaMA on MIMIC-IV clinical notes using PEFT methods (LoRA, Adaptation Prompt, Prefix Tuning, Prompt Tuning, P-tuning); measure perplexity to select the best technique (LoRA).
  • Two-step adapter framework: first train Clinical LLaMA-LoRA (domain-adapted LoRA on LLaMA/PMC-LLaMA), then train Downstream LLaMA-LoRA on top of the clinical adapter.
  • Downstream evaluation on five clinical tasks: Prolonged Mechanical Ventilation (PMV), In-hospital Mortality (MOR), Length of Stay (LOS), Diagnoses (DIAG), Procedures (PROC); report AUROC and macro-average AUROC.
  • Compare to baselines Bio+ClinicalBERT, BlueBERT, CORe, UmlsBERT and LoRA-equipped baselines; analyze frozen vs trainable clinical adapters.
  • Highlight that LoRA-based adapters enable substantial parameter efficiency (0.02%-0.24% trainable parameters) and <24 hours per epoch on a single A100-80GB GPU.
Figure 1: An illustration of the proposed two-step PEFT framework. Clinical LLaMA-LoRA fine-tunes the pretrained LLaMA to the clinical domain. Downstream LLaMA-LoRA further fine-tunes the domain-adapted model to downstream clinical tasks.
Figure 1: An illustration of the proposed two-step PEFT framework. Clinical LLaMA-LoRA fine-tunes the pretrained LLaMA to the clinical domain. Downstream LLaMA-LoRA further fine-tunes the domain-adapted model to downstream clinical tasks.

Experimental results

Research questions

  • RQ1Can LoRA improve AUROC scores when fine-tuning LLaMA/PMC-LLaMA for clinical downstream tasks?
  • RQ2Does composing a Downstream LLaMA-LoRA on top of a Clinical LLaMA-LoRA yield further performance gains?
  • RQ3Are Clinical LLaMA-LoRA–equipped LLaMA/PMC-LLaMA competitive with or superior to clinically trained LLMs?
  • RQ4Is the downstream fine-tuning benefit contingent on whether the Clinical LLaMA-LoRA is frozen or trainable?
  • RQ5Can LoRA also improve already clinically trained LMs (e.g., BlueBERT, UmlsBERT) for downstream tasks?

Key findings

  • LoRA-equipped LLaMA achieves a macro-averaged AUROC of 71.62% across tasks, and LoRA-equipped PMC-LLaMA achieves 72.71%.
  • LLaMA with trainable Clinical LLaMA-LoRA reaches 70.85% macro AUROC, while PMC-LLaMA with trainable Clinical LLaMA-LoRA reaches 72.23%.
  • Adding Downstream LLaMA-LoRA to LLaMA with trainable Clinical LLaMA-LoRA yields the highest macro-averaged AUROC of 72.81%.
  • LoRA-equipped BlueBERT outperforms full fine-tuning of BlueBERT with a macro-averaged AUROC of 71.56% vs 69.59%.
  • Clinical LLaMA-LoRA (frozen) shows limited gains (macro AUROC 61.58%), indicating training of downstream adapters is critical for improvements.
  • Compared to clinically trained LMs, LLaMA with LoRA adapters achieves competitive macro-AUROC and outperforms some baselines in diagnoses and procedures predictions.
Figure 2: Frameworks of domain-adaptive and downstream fine-tuning to adapt a pretrained LLM from the general domain to the clinical domain. As opposed to a full fine-tuning process which can be prohibitively expensive (left), our approach leverages PEFT techniques to introduce a clinically-speciali
Figure 2: Frameworks of domain-adaptive and downstream fine-tuning to adapt a pretrained LLM from the general domain to the clinical domain. As opposed to a full fine-tuning process which can be prohibitively expensive (left), our approach leverages PEFT techniques to introduce a clinically-speciali

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.