Abstract: Large language models (LLMs) are poised to have a disruptive impact on health care. Numerous studies have demonstrated promising applications of LLMs in medical imaging, and this number will grow as LLMs further evolve into large multimodal models (LMMs) capable of processing both text and images. Given the substantial roles that LLMs and LMMs will have in health care, it is important for physicians to understand the underlying principles of these technologies so they can use them more effectively and responsibly and help guide their development. This article explains the key concepts behind the development and application of LLMs, including token embeddings, transformer networks, self-supervised pretraining, fine-tuning, and others. It also describes the technical process of creating LMMs and discusses use cases for both LLMs and LMMs in medical imaging.
Introduction
The rapid integration of Artificial Intelligence (AI) into healthcare often leaves clinicians utilizing tools whose inner workings remain a "black box." While LLMs like ChatGPT have demonstrated significant promise in summarizing reports and assisting in clinical reasoning, the technical leap required to make these models "see" medical images is substantial. This primer serves as a technical bridge, explaining how modern AI architectures enable models to reason through complex medical data.
The Evolution of Natural Language Processing
The field of Natural Language Processing (NLP) has undergone a dramatic transformation over the last six decades. Early systems relied on rigid, hand-crafted rules (e.g., ELIZA in the 1960s). This gave way to statistical and probabilistic models in the 1980s, followed by recurrent neural networks like Long Short-Term Memory (LSTM) in the late 1990s.
The current era is defined by the Transformer architecture, which emerged around 2017. This shift allowed for the development of pre-trained word embeddings and eventually the massive transformer models (BERT, GPT) that underpin today's chatbots and multimodal systems.
The Transformer Architecture and Self-Attention
At the heart of modern LLMs is the Transformer architecture. Unlike previous models that processed text sequentially, Transformers use a self-attention mechanism to process entire sequences of text simultaneously. This mechanism allows the model to determine the contextual importance of surrounding words.
As illustrated above, the model uses Query, Key, and Value vectors to calculate attention weights. For example, in the phrase "bronchial tree," the self-attention mechanism ensures the model understands that "tree" refers to an anatomical structure rather than a botanical one by weighing the word "bronchial" heavily. This ability to capture nuanced semantic relationships is what makes LLMs so effective at interpreting complex medical literature.
Training Pipeline and Domain Adaptation
Developing a medical-grade AI involves a multi-stage pipeline:
- Self-supervised Pretraining: Models learn the fundamental rules of language by predicting missing tokens in massive, unlabeled datasets.
- Fine-Tuning: General-purpose models (like LLaMA) are adapted to the medical domain (e.g., Radiology-Llama2) using specialized datasets. Techniques like LoRA (Low-Rank Adaptation) allow for efficient updates to model parameters without requiring the massive computational resources of the initial pretraining.
- Retrieval-Augmented Generation (RAG): To mitigate "confabulation" (the tendency of models to generate confident but incorrect information), RAG is used to "ground" the AI. The model is forced to look up factual clinical documents before generating an answer.
From LLMs to Large Multimodal Models (LMMs)
To move beyond text and into medical imaging, LLMs must be integrated with vision encoders to become Large Multimodal Models (LMMs). The authors describe three primary integration methods:
- Contrastive Learning: Aligning image and text encoders in a shared vector space (e.g., CLIP).
- Late Fusion: Using cross-attention mechanisms to bridge separate image and text features.
- Early Fusion: Converting images into "visual tokens" that the LLM processes identically to words.
These LMMs, such as LLaVA or InstructBLIP, enable advanced tasks like automated radiology reporting and longitudinal analysis, where the model compares current scans with prior ones to detect subtle changes over time.
Clinical Impact and Future Directions
Specialized medical LLMs consistently outperform general-purpose models on tasks like impression generation and clinical note summarization. Preliminary studies suggest these tools can flag common errors in reports and translate complex findings into patient-friendly language, potentially reducing administrative burdens.
However, significant hurdles remain. Most current LMM research focuses on 2D images (like chest X-rays); expanding these models to handle 3D volumetric data (CT/MRI) is the next major technical challenge. Furthermore, issues regarding data privacy and the "data silo" problem necessitate the exploration of solutions like federated learning to safely train models on sensitive medical data across institutions.
Summary updated