R2GenGPT: Radiology Report Generation with frozen LLMs

Zhanyu Wang, Lingqiao Liu, Lei Wang, Luping Zhou

TL;DR

R2GenGPT is a new framework that leverages the reasoning power of Large Language Models (LLMs) to generate detailed radiology reports from X-ray images. By using a parameter-efficient "Delta alignment" strategy, the model achieves near state-of-the-art performance while training only 0.07% of its total parameters, significantly reducing the computational cost of medical AI.

What Problem Does This Paper Address?

Radiologists are facing an unsustainable surge in workload, leading to fatigue and potential diagnostic errors. Automated Radiology Report Generation (R2Gen) aims to alleviate this by producing coherent, paragraph-long descriptions of medical images.

However, R2Gen faces two major hurdles:

  1. Long Text Generation: Unlike simple image captioning, medical reports require detailed, multi-sentence narratives that maintain clinical consistency over long ranges.
  2. Data Bias: Most medical datasets are dominated by "normal" cases. Traditional models often struggle to identify rare abnormalities because they become biased toward the majority "normal" samples during training.

The authors argue that pre-trained LLMs, with their vast knowledge bases and inherent understanding of complex syntax, are uniquely positioned to solve these issues—if we can figure out how to "show" them an image.

Methods

The authors propose R2GenGPT, which follows a "decoder-centric" architecture. Instead of the traditional encoder-decoder setup where the two halves are roughly equal, this model uses a massive, frozen LLM as the primary engine.

The architecture consists of three main parts:

  • Visual Encoder: A pre-trained Swin Transformer extracts features from chest X-ray images.
  • Visual Mapper: A simple linear layer that projects these visual features into the same dimensionality as the LLM’s word embeddings. Essentially, it turns images into "visual tokens" that the LLM can "read."
  • LLM: The Llama2-7B model, which processes the visual tokens alongside a text prompt to generate the final report.

The researchers explored three ways to bridge the "modality gap" between images and text:

  1. Shallow Alignment: Only the linear mapper is trained; everything else is frozen.
  2. Deep Alignment: Both the mapper and the entire visual encoder are fine-tuned.
  3. Delta Alignment: The mapper is trained, but the visual encoder is updated using LoRA (Low-Rank Adaptation). This allows for high-quality feature extraction with very few trainable parameters.

Datasets

The model was evaluated on the two gold-standard benchmarks in the field:

  • IU-Xray: A smaller, widely used dataset containing 3,955 reports and 7,470 images.
  • MIMIC-CXR: The largest publicly available dataset, featuring 377,110 images and 227,835 reports.

Key Insights and Ideas

  • LLMs as Bias Correctors: Because LLMs are pre-trained on massive, diverse datasets, they are less susceptible to the "normal-case bias" found in specific medical datasets. They bring a "wealth of informative knowledge" that acts as a prior, helping the model stay robust even when training data is imbalanced.
  • The "Visual Tokenizer" Concept: Rather than treating the image as a separate context, R2GenGPT treats visual features as just another sequence of tokens. This allows the LLM to use its standard self-attention mechanism to find relationships between specific parts of the image and the text it is generating.
  • Extreme Efficiency: The "Delta" version of the model only trains 5 million parameters (out of 7 billion). This represents just 0.07% of the total parameter count, yet it performs nearly as well as the "Deep" version which tunes many more parameters.

Key Results

  • State-of-the-Art (SOTA) Performance: The "Deep" alignment version of R2GenGPT outperformed previous SOTA methods (like METransformer) on almost all language metrics (BLEU, ROUGE-L, METEOR) for both datasets.
  • Clinical Efficacy: Using the CheXpert labeler to check for clinical accuracy, R2GenGPT (Deep) achieved an F1 score of 0.389, surpassing the previous best of 0.334.
  • Speed and Scale: Compared to the METransformer, R2GenGPT (Delta) reduced training time per epoch from 3.62 hours to 1.83 hours on the same hardware, while using significantly fewer trainable parameters (5M vs 152M).

Limitations and Future Work

The authors noted that while their language scores were high, their CIDEr scores (a metric often used in image captioning) were lower than some competitors. They attribute this to the fact that some SOTA models use "expert voting" or ensemble strategies specifically designed to boost CIDEr scores, which R2GenGPT does not currently employ.

Future work could involve more sophisticated visual-textual alignment modules or exploring how even larger LLMs (like Llama-70B) might further improve diagnostic accuracy and reasoning.

Summary updated

BibTeX
@inproceedings{wang2023r,
  author = {Zhanyu Wang and Lingqiao Liu and Lei Wang and Luping Zhou},
  title = {{R2GenGPT: Radiology Report Generation with frozen LLMs}},
  booktitle = {Meta-Radiology},
  year = {2023},
  doi = {10.1016/j.metrad.2023.100033},
}
Figure