When Raw Data Prevails: Are Large Language Model Embeddings Effective in Numerical Data Representation for Medical Machine Learning Applications?
Yanjun Gao, Skatje Myers, Shan Chen, Dmitriy Dligach, Timothy A Miller, Danielle Bitterman, Matthew Churpek, Majid Afshar
TL;DR
This study probes whether zero-shot embeddings from last-hidden states of open-source LLMs can effectively represent numerical EHR data for medical predictions, comparing them to traditional raw-data features fed to ML models like XGBoost. It systematically investigates table-to-text conversion formats, embedding extraction methods, prompt design, few-shot data, and parameter-efficient tuning (QLoRA) across two clinically important tasks derived from EHRs: diagnosis prediction and mortality/LOS forecasting, using datasets including a 660-patient diagnosis cohort and MIMIC-Extract. The findings indicate that raw EHR features generally outperform LLM embeddings, though zero-shot embeddings can achieve competitive performance on several tasks and may offer deployment advantages; embedding-based approaches consistently underperform direct LLM generation for binary clinical predictions. The work highlights the need for improved time-varying feature representations, better prompt strategies, and potential benefits from multi-modal integration, while underscoring the substantial computational demands and ethical considerations associated with LLM-based medical decision support.
Abstract
The introduction of Large Language Models (LLMs) has advanced data representation and analysis, bringing significant progress in their use for medical questions and answering. Despite these advancements, integrating tabular data, especially numerical data pivotal in clinical contexts, into LLM paradigms has not been thoroughly explored. In this study, we examine the effectiveness of vector representations from last hidden states of LLMs for medical diagnostics and prognostics using electronic health record (EHR) data. We compare the performance of these embeddings with that of raw numerical EHR data when used as feature inputs to traditional machine learning (ML) algorithms that excel at tabular data learning, such as eXtreme Gradient Boosting. We focus on instruction-tuned LLMs in a zero-shot setting to represent abnormal physiological data and evaluating their utilities as feature extractors to enhance ML classifiers for predicting diagnoses, length of stay, and mortality. Furthermore, we examine prompt engineering techniques on zero-shot and few-shot LLM embeddings to measure their impact comprehensively. Although findings suggest the raw data features still prevails in medical ML tasks, zero-shot LLM embeddings demonstrate competitive results, suggesting a promising avenue for future research in medical applications.
