Comparative Analysis of LoRA-Adapted Embedding Models for Clinical Cardiology Text Representation
Richard J. Young, Alice M. Matthews
TL;DR
The paper evaluates ten transformer architectures, fine-tuned with Low-Rank Adaptation (LoRA) on ~150k cardiology textbook pairs, to compare encoder-only versus decoder-style embeddings for domain-specific text representation. It introduces a cardiology-focused semantic separation metric and a rigorous evaluation framework, revealing that encoder-only models, especially BioLinkBERT, achieve the highest domain discrimination (up to 0.510) with substantially lower computational requirements than large decoders. LoRA fine-tuning dramatically improves performance over zero-shot baselines (median gain ~700%), transforming near-random embeddings into clinically useful tools in about 2 hours of A100 compute. The findings underscore the importance of domain-relevant pre-training and architectural choice over mere model scale, offering practical deployment guidance and enabling scalable creation of domain-specialized embeddings with minimal cost.
Abstract
Domain-specific text embeddings are critical for clinical natural language processing, yet systematic comparisons across model architectures remain limited. This study evaluates ten transformer-based embedding models adapted for cardiology through Low-Rank Adaptation (LoRA) fine-tuning on 106,535 cardiology text pairs derived from authoritative medical textbooks. Results demonstrate that encoder-only architectures, particularly BioLinkBERT, achieve superior domain-specific performance (separation score: 0.510) compared to larger decoder-based models, while requiring significantly fewer computational resources. The findings challenge the assumption that larger language models necessarily produce better domain-specific embeddings and provide practical guidance for clinical NLP system development. All models, training code, and evaluation datasets are publicly available to support reproducible research in medical informatics.
