Efficiency at scale: Investigating the performance of diminutive language models in clinical tasks

Niall Taylor, Upamanyu Ghose, Omid Rohanian, Mohammadmahdi Nouriborji, Andrey Kormilitzin, David A. Clifton, Alejo J. Nevado-Holgado

Abstract

As the field of Natural Language Processing (NLP) trends toward trillion-parameter foundation models, their practical application in clinical settings remains constrained by privacy requirements, infrastructure limitations, and the need for domain-specific expertise. This paper explores the efficacy of "diminutive" models—ranging from 14M to 108M parameters—in specialized clinical tasks. By leveraging Parameter Efficient Fine-tuning (PEFT) techniques, specifically Low-Rank Adaptation (LoRA), the researchers demonstrate that these small, domain-adapted models can match or exceed the performance of much larger models like Llama-2-7b at a fraction of the cost and computational overhead.

Introduction

The "bigger is better" paradigm in NLP faces significant hurdles in the medical domain. Hospitals and research institutions often cannot utilize third-party APIs due to strict patient data privacy regulations. Furthermore, the massive GPU clusters required to run or fine-tune models like GPT-4 or Llama-2 are rarely available in clinical environments. Finally, general-purpose models often struggle with the technical jargon and shorthand prevalent in electronic health records (EHRs). This study investigates whether specialized, diminutive models can provide a viable, high-performance alternative for in-house clinical NLP.

Methodology and Model Architectures

The researchers evaluated a spectrum of model architectures, from the 14M-parameter TinyBERT to the 108M-parameter BERT, using Llama-2-7b as a high-end baseline. A key focus of the study was the application of PEFT techniques, including LoRA and IA³, compared against traditional full fine-tuning.

Comparison of model architectures by parameter count and resource requirements.

As shown in the architectural comparison, the resource requirements for diminutive models are orders of magnitude lower than those for LLMs. For instance, Tiny-BERT requires only 0.052 GB of VRAM, whereas Llama-2-7b requires over 12 GB even in a reduced precision (bfloat16) format. This disparity highlights the accessibility of smaller models for consumer-grade hardware.

Clinical Benchmarks and Datasets

The study utilized several gold-standard clinical benchmarks to assess performance:

  • MIMIC-III: Tasks included Mortality Prediction (MP), Length of Stay (LoS) prediction, and ICD-9 Triage.
  • i2b2 Series: Focused on Relation Extraction (RE) and Named Entity Recognition (NER) across datasets from 2010, 2012, and 2014.

Experimental Results

The experimental results underscore several critical findings regarding efficiency and performance:

  1. LoRA as a Robust PEFT Method: Across nearly all tasks and model sizes, LoRA emerged as the most effective PEFT strategy. It consistently achieved performance levels comparable to full fine-tuning while updating only a small fraction of total parameters.
  2. Domain Knowledge vs. Scale: Small models pre-trained on clinical data (e.g., ClinicalBioBERT) frequently outperformed larger models pre-trained on general web text, suggesting that domain specialization is more critical than raw parameter count for clinical tasks.
  3. Performance Parity: In the i2b2 Relation Extraction task, BioDistilBERT (66M) achieved an F1 score of 0.928 with LoRA, nearly matching the 0.935 achieved by the much larger BioBERT under full fine-tuning.
Performance of diminutive models across clinical classification tasks using different PEFT methods.
  1. Cost and Time Efficiency: The economic benefits are stark; training TinyBioBERT cost approximately $1.06 (AWS rates), compared to $112.22 for Llama-2-7b. Additionally, smaller models reached peak performance in under an hour, whereas Llama-2 required over six hours on identical hardware.

Discussion and Conclusion

While the study notes limitations—such as the potential for data leakage in LLM pre-training and the hardware constraints that necessitated 16-bit precision for Llama-2—the core message is clear. Diminutive models offer a "sweet spot" for clinical deployment, particularly those in the 66M–108M range. They provide high stability, rapid convergence, and performance parity with larger models while remaining deployable on modest hardware. For clinical researchers, a well-tuned, specialized "scalpel" is often more effective and sustainable than a general-purpose "sledgehammer."

Summary updated

BibTeX
@article{taylor2024efficiency,
  author = {Niall Taylor and Upamanyu Ghose and Omid Rohanian and Mohammadmahdi Nouriborji and Andrey Kormilitzin and David A. Clifton and Alejo J. Nevado-Holgado},
  title = {{Efficiency at scale: Investigating the performance of diminutive language models in clinical tasks}},
  journal = {Artif. Intell. Medicine},
  year = {2024},
  doi = {10.1016/j.artmed.2024.103002},
}
Figure