Gla-AI4BioMed at RRG24: Visual Instruction-tuned Adaptation for Radiology Report Generation (2024)

Abstract: We introduce a radiology-focused visual language model designed to generate radiology reports from chest X-rays. Building on previous findings that large language models (LLMs) can acquire multimodal capabilities when aligned with pretrained vision encoders, we demonstrate similar potential with chest Xray images. This integration enhances the ability of model to understand and describe chest X-ray images. Our model combines an image encoder with a fine-tuned LLM based on the Vicuna-7B architecture, enabling it to generate different sections of a radiology report with notable accuracy. The training process involves a two-stage approach: (i) initial alignment of chest X-ray features with the LLM (ii) followed by fine-tuning for radiology report generation1.

text: Proceedings of the 23rd Workshop on Biomedical Language Processing, pages 624–634 August 16, 2024. ©2024 Association for Computational Linguistics
624

heading: 1 Introduction
text: Radiology reports constitute the primary medium through which radiologists convey the findings and conclusions derived from radiography, such as chest X-rays. These reports play a pivotal role in the diagnostic and therapeutic processes across a wide range of diseases, emphasizing their significance in contemporary medical practice (Engle et al., 2021). Structured to enhance clarity and efficacy in medical communication, radiology reports primarily feature FINDINGS and IMPRESSIONS sections (Kahn et al., 2009). The FINDINGS section details the critical observations of the radiologist on the image, while the IMPRESSIONS section summarizes the conclusions and recommendations of the radiologist. These sections collectively ensure that radiology reports are indispensable in diagnostic and therapeutic decision-making, combining image analysis and clinical insight. Table 1 shows an example generated by GPT-4 (OpenAI et al., 2024), which delineates these sections.
* Corresponding author. 1https://github.com/Glasgow-AI4BioMed/
RRG-BioNLP-ACL2024.
Radiology report generation (RRG) is crucial for advancing future medical artificial intelligence systems (Monshi et al., 2020). This task involves transforming images into text, necessitating alignment between imaging and textual data. Significant advancements in natural language processing have driven progress in this area, with large generative visual language models like LLaVA (Liu et al., 2023), InstructBLIP (Dai et al., 2023), and Flamingo (Alayrac et al., 2022) leading the way.
The prevailing visual language models, such as those mentioned above, aim to address the challenge of multimodal alignment by leveraging largescale pretraining. Typically, this involves adapting a vision encoder for integration with a pretrained LLM. To meet specific task requirements, various degrees of finetuning are applied. For example, LLaVA (Liu et al., 2023) represents a novel endto-end trained large multimodal model for generalpurpose visual and language understanding, achieving impressive chat capabilities. However, in the context of our work, the focus is on fine-tuning
image-text pairs, specifically for tasks related to medical images, to enhance the capability of the visual language model in radiology report generation.
In the specialized area of radiographic report generation, it is paramount for models to discern nuanced details within multiple medical images. These details include subtle variations in opacity against a backdrop of overlapping structures (Panayides et al., 2020). Therefore, the radiographic report generation task extends beyond the mere extraction of details from a single image. Models must interpret the clinical implications of these nuances to generate precise and medically rigorous text in reports. This is a particularly crucial capability for radiographic report generation models, since it enhances the clinical utility and effectiveness of radiology reports and ensures their accuracy and relevance in clinical settings.
General-domain models have proven inadequate for generating findings in radiology reports (Hyland et al., 2024). In this work, we propose a radiology-specific visual language model designed for solving the radiology report generation task by fine-tuning across various sections of medical reports. Our model utilizes a two-stage fine-tuning process that significantly enhances its performance. In particular, we initially align the large language model with image embedding through a pretraining phase. In the second stage, we further fine-tune the LLM using Low-Rank adaptation (LoRA) techniques (Hu et al., 2021). Both stages are trained on the dataset in this workshop (Xu et al., 2024).
Additionally, we use a straightforward strategy of merging and stitching multiple images to form a single cohesive input, enabling the model to effectively process and integrate information from multiple X-ray images. Using the dataset provided by this workshop, which includes a collection of chest X-rays and their corresponding sections, we fine-tune our model to enhance the accuracy and specificity of the generated radiology reports.
This paper investigates the fine-tuning of visual instruction for a visual language model in the specific domain of radiology report generation. We describe the training of two distinct models developed for the Shared Task on Large-Scale Radiology Report Generation (RRG24) at the BioNLP 2024 Workshop (Xu et al., 2024). In the public test set, we achieved an F1-RadGraph score (Delbrouck et al., 2022a) of 24.13 and 22.79 in the Findings and Impressions sections, respectively.
In the hidden test set, we achieved F1-RadGraph scores (Delbrouck et al., 2022a) of 24.13 and 22.10 in the Findings and Impressions sections, respectively, which places us 4th on the leaderboard at the time of submission. The contributions of this research are as follows:
• We enhance domain adaptation for radiology by implementing visual instruction tuning, which further fine-tunes the visual language model specifically for image-to-text tasks. This approach optimizes performance in interpreting and translating visual data into descriptive, clinically relevant text.
• We adopt a method of stitching multiple images together, allowing a single image encoder to process multiple image inputs simultaneously. This strategy obviates the need for separate encoding of each image, enabling the model to adapt to varying numbers of image inputs using limited resources.

heading: 2 Related Work
text: Nowadays, exemplified by open-source projects such as LLaVA (Liu et al., 2023), the effectiveness of self-supervised vision-language models (VLMs) using parallel data has been demonstrated in different research domains. These VLMs, when instruction-tuned with multimodal inputs, align well with human intentions and perform robustly in various downstream tasks, including converting images to text (Park and Kim, 2023).
However, the unique characteristics of biomedical image-text pairs significantly differ from those in general domains. Biomedical images often contain subtle and complex features that require precise interpretation, while the corresponding text must convey highly specific medical information (Huff et al., 2021). In biomedical settings, VLMs designed for general domains often fail to meet these specialized needs, as they lack the ability to accurately interpret medical data and generate relevant clinical descriptions (Chang et al., 2023). This discrepancy underscores the urgent need for domain-specific fine-tuning. By tailoring VLMs to the distinct demands of the biomedical field, such fine-tuning can enhance their ability to capture and convey the intricate details necessary for accurate medical interpretations and reports.
Recent advancements have been made in adapting general-purpose foundation models for medical applications, particularly in radiology. The
Med-Flamingo (Moor et al., 2023), an extension of the OpenFlamingo framework (Awadalla et al., 2023), leverages images and captions from medical textbooks to enhance few-shot visual questionanswering capabilities. Similarly, the Med-PaLM M, developed by Tu et al. (2023), fine-tuned the PaLM-E model (Driess et al., 2023) using comprehensive biomedical datasets. LLaVA-Med, proposed by Li et al. (2023), modifies the LLaVA (Liu et al., 2023) framework with image-text pairings and multimodal instructions from PubMed data. Additionally, the ELIXR model, developed by Xu et al. (2023), integrates the SupCon CXR encoder (Sellergren et al., 2022) with the PaLM 2-S model (Anil et al., 2023) to support classification, semantic search, question answering, and quality assurance. Finally, the Radiology-GPT, created by Liu et al. (2024), utilizes radiology reports from MIMIC-CXR (Johnson et al., 2019) to facilitate the generation of findings-to-impression text, based on the Alpaca instruction-tuning framework (Taori et al., 2023).
Historically, research in radiology report generation has varied, with some studies focusing exclusively on either the Findings or the Impressions sections (Jin et al., 2024; Yan et al., 2023), while others have addressed both. Notably, Endo et al. (2021) and Bannur et al. (2023) specialized in generating only the Impressions section. In contrast, studies by Miura et al. (2021), Delbrouck et al. (2022a), Tanida et al. (2023), Nicolson et al. (2023), and Tu et al. (2023) concentrated on the Findings section. Comprehensive analyses by Yu et al. (2023) and Jeong et al. (2023) covered all settings, demonstrating that the choice of sections significantly influences reported performance metrics, complicating comparative evaluations across different study designs.
However, these existing models have limitations. Most notably, they are typically designed to process single images and often fall short in generating reports that match the depth and detail of those written by human radiologists. Additionally, they do not fully replicate the workflow of medical professionals, who often reference multiple images to enhance report accuracy. Our work addresses these gaps by developing a model capable of handling multiple images simultaneously and generating comprehensive radiology reports. This approach aims to more closely mimic the process used by medical professionals, thereby improving the accuracy and quality of the generated reports.

heading: 3 Methodology
text: In our study, we follow the observations from LLaVA-Med (Li et al., 2023), suggesting superior performance when initiating with a language-only pretrained LLM rather than a multimodal-trained base. Our model architecture incorporates an image encoder and a learnable adapter placed atop the image outputs, mirroring the LLaVA-1.5 model design (Liu et al., 2023). We adopt an auto-regressive language modelling approach using cross-entropy loss (Graves, 2014) and align hyperparameters with those from LLaVA-1.5, including a joint tuning phase for the LLM and adapter (Liu et al., 2023). In alignment with LLaVA-1.5 protocols, we initially pretrain the adapter alone for one epoch, followed by a full training cycle lasting three epochs, employing Low-Rank Adaptation of Large Language Models techniques (LoRA) (Hu et al., 2021) for efficient parameter tuning.

heading: 3.1 Task Description
text: A key application of natural language generation in medicine is developing support systems that produce written reports from X-ray images, detailing clinical findings. Such systems are highly valuable, potentially reducing the routine workload of radiologists and improving the efficacy of clinical interactions. The objective of this shared task is to generate radiology reports from one or more chest X-rays taken during a single study, specifically targeting two sections: ‘Findings’ and ‘Impressions’ (as shown in Table 1).
Consequently, our team is dedicated to the task of exclusively producing either the ‘Findings’ or ‘Impressions’ sections of the report. We have developed separate models for each section because their focuses are different. The ‘Findings’ section provides a factual description based on the images, while the ‘Impressions’ section offers the radiologist’s conclusions and recommendations. By separating the models, we can tailor each to better address its specific requirements.
For the radiology report section generation, handling multiple images is crucial as it allows the model to provide a detailed and accurate description of the observed facts, similar to how radiologists analyze multiple images to form a comprehensive understanding. This approach enhances the model’s ability of to mimic the actual workflow of medical professionals, who often reference multiple images.

heading: 3.2 The Proposed Models
text: To solve the RRG24 shared task, we fine-tune a large visual language model for radiology report generation based on the provided dataset. Specifically, we propose two separate models, called Med-CXRGen-F and Med-CXRGen-I, fine-tuned on Findings and Impressions sections respectively.
We use CLIP (Radford et al., 2021) as an image encoder and Vicuna-1.5 (Chiang et al., 2023) as a large language model. Our adaptation module consists of a multi-layer perceptron (MLP) featuring GELU activations (Hendrycks and Gimpel, 2023) and a uniform hidden size of 1024 across all layers.
The interaction with the model involves alternating system messages linked with the corresponding image. The training objective of the model is to generate accurate responses. Initially, we convert the image into a series of image patch tokens via the image encoder, selecting embeddings from the penultimate layer. These image features are then processed by the MLP adapter, aligning them to the input specifications of the LLM.
The instructional prompt of the report generation task we employed is: "Provide a description of the findings/impressions from the radiology <image>\n image." In this prompt, "<image>\n" represents the image holder token, as shown in Figure 1, which indicates to the LLM that it should
base its generation on the input image.

heading: 3.3 Training
text: The same network architecture is utilized for different radiology report sections, where an MLP adapter connects the vision encoder and the language model. For model training, we use a twostage procedure: (as shown in Figure 1)
• Stage 1: Chest X-ray Feature Alignment In the first epoch training phase on the provided dataset, each sample, accompanied by instructions and image input, prompts the model to predict the original caption. During this stage, we keep the visual encoder and LLM weights unchanged, focusing solely on updating the MLP adapter. This approach aligns the features from chest X-ray images with their textual embeddings in the LLM. Training is limited to a single epoch, which facilitates the expansion of the vocabulary of aligned image-text tokens specific to the radiology domain.
• Stage 2: Fine-tune for Radiology Report Generation In the second phase, the visual encoder weights and adapter are kept frozen while continuing to update the pre-trained LLM weights using LoRA (Hu et al., 2021) technology. Further fine-tuning is conducted on the provided dataset through visual instrumental tuning with three epochs.

heading: 4 Evaluation

heading: 4.1 Dataset
text: We fine-tune and evaluate our models using the RRG24 dataset hosted on the BioNLP ACL’24 (Xu et al., 2024), which includes data from MIMICCXR (Johnson et al., 2019), CheXpert (Chambon et al., 2024), PadChest (Bustos et al., 2020), BIMCV-COVID19 (de la Iglesia Vayá et al., 2020), and OpenI, with their statistics shown in Table 2.
We conducted training in two stages (refer to section 3.3). To ensure consistency between training and inference processes, we analysed the word count distribution, as shown in Table 3. Consequently, we have set a maximum length of 1024 for both the text input and inference output to minimise computational expense. On the other hand, as illustrated in Table 4, some datasets contain multiple images, therefore, we select up to the first four images for the image input. We merge multiple images horizontally to form a single-image input, which is proven to be robust in our experiments.

heading: 4.2 Metrics
text: We assess the generated reports through a dual approach involving both general lexical metrics and specialized radiology metrics. Focusing on the accuracy of described medical findings, radiologyspecific metrics provide a deeper insight into the clinical relevance of the reports, beyond surfacelevel phrasing variations. According to the RRG24 guidelines, we consider five evaluation metrics for this work, including BLEU4 (Papineni et al., 2002), ROUGEL (Lin, 2004), BERT score (Zhang et al., 2020), F1-cheXbert (Smit et al., 2020), and F1RadGraph (Delbrouck et al., 2022a).

heading: 4.3 Training details
text: We evaluated our two proposed models, i.e. MedCXRGen-F and Med-CXRGen-I, on the workshop evaluation datasets, based on a computational infrastructure utilizing an A6000 GPU (48GB memory each) with the Deepspeed zero-3 configuration (Rajbhandari et al., 2020) with BF16 enabled. We employ a cosine learning rate scheduler that begins with a warm-up phase of 0.03 and sets the learning rate at 1 · 10−5. The global batch size for our experiments is set at 16. Observations of the smallest loss on the evaluation dataset throughout the training process guide us to select this as the final checkpoint for all runs. For inference on the test dataset, we decode in 32-bit precision up to 150 tokens, consistent with the baseline model on the leaderboard (Delbrouck et al., 2022b). Each model required approximately 215 hours of training.

heading: 5 Results
text: We report the performance of our two proposed models over five evaluation metrics in Table 5. As shown in Table 5, in the public test set, we achieved an F1-RadGraph score (Delbrouck et al., 2022a) of 24.13 and 22.79 in the Findings and Impressions sections, respectively. In the hidden test set, we achieved F1-RadGraph scores (Delbrouck et al., 2022a) of 24.13 and 22.10 in the Findings and
Impressions sections, respectively, which places us 4th on the leaderboard2 at the time of submission. Additionally, our model achieved notable Bertscore results in the test-public set, with 53.45 for Findings and 47.39 for Impressions. These results demonstrate the effectiveness of our approach in generating high-quality medical reports across different datasets.

heading: 6 Discussion
text: Performance disparities observed between the Findings and Impressions sections of the test results can be attributed to several factors. Firstly, the Impression and Findings sections address distinct medical purposes, resulting in performance disparities. The Findings section offers an objective description of symptoms, while the Impressions are oriented towards diagnostic conclusions. The variability in word count between these sections also affects the complexity of model inference, as reflected in the lexical evaluation scores.
Additionally, significant discrepancies in the medical evaluation metrics highlight a varied distribution of diseases within the test set. This heterogeneity could impact the generalisability and accuracy of the model. Furthermore, our analysis indicates that the performance may be compromised in multi-image inference scenarios where it does not account for superfluous images. Such factors are essential to consider when assessing the diagnostic accuracy and reliability of the model in clinical settings. Enhancing the ability of model to differentiate between relevant and superfluous images could significantly improve diagnostic accuracy.
Furthermore, exploring domain-specific adaptations and fine-tuning strategies tailored to the unique characteristics of medical data could further enhance model performance. Incorporating temporal dynamics into the model to capture changes
2https://vilmedic.app/misc/bionlp24/leaderboard
over time and developing more sophisticated frameworks for generating multi-modal radiology reports are other promising avenues for future research. These advancements are expected to enhance both the practicality and accuracy of our model within clinical scenarios.

heading: 7 Conclusion
text: In this work, we have developed a vision-language model capable of processing multiple images. Through visual instruction tuning, we achieved alignment between two modalities and further finetuning for specific downstream tasks. Notably, our system attained a commendable fourth-place standing across four diverse test datasets at the RRG24 at BioNLP 2024 workshop (Xu et al., 2024), substantiating the practicality of vision-language models within specialized medical tasks.
Moving forward, we intend to conduct in-depth research into more sophisticated methods for generating multi-modal radiology reports. This will involve incorporating temporal dynamics and developing frameworks specifically focused on text generation. Such advancements are expected to enhance both the practicality and accuracy of our model within the clinical scenario.

heading: 8 Limitations
text: The following section outlines the limitations identified in our study:
1. Prevalence of certain conditions: Some diseases are more easily detected, which may lead to artificially high medical assessment scores.
2. Imaging modalities and anatomical structures: There is a notable imbalance in the imaging modalities and anatomical structures covered in the training dataset. Variations such as the number of images per patient and the considerable disparity in the length of medical reports exacerbate this imbalance.
3. Radiologist and radiology department preferences: Preferences and writing styles vary among radiologists and radiology departments. This diversity adds complexity to medical reports by introducing inconsistencies and uncertainties that are, to a certain extent, human-induced. For example, the dataset provided in this workshop demonstrates that even the same radiology section descriptions have varying styles. These elements significantly complicate the task of report generation.
These limitations highlight areas for improvement and the need for methodological refinements to enhance model effectiveness and reliability in clinical environments. These challenges were not addressed within the scope of this workshop.
Ethics Statement
The concepts and methodologies presented in this paper are based on experimental research findings. They are not currently available for other use. The data used for the training processes were exclusively sourced from the provided dataset, which complies with ethical standards regarding Patient Health Information. Adherence to these standards guarantees the responsible handling of sensitive data throughout our research.

heading: Acknowledgments
text: We extend our gratitude to the BioNLP 2024 RRG24 Shared Task organizers for providing the baseline pipeline ViLMedic (Delbrouck et al., 2022b) and curating these challenging and exciting tasks (Xu et al., 2024).

heading: Future Work
text: app/misc/bionlp24/leaderboard
over time and developing more sophisticated frameworks for generating multi-modal radiology reports are other promising avenues for future research. These advancements are expected to enhance both the practicality and accuracy of our model within clinical scenarios