Automatic Personalized Impression Generation for PET Reports Using Large Language Models πβ
Authored by: Xin Tie, Muheon Shin, Ali Pirasteh, Nevein Ibrahim, Zachary Huemann, Sharon M. Castellino, Kara Kelly, John Garrett, Junjie Hu, Steve Y. Cho, Tyler J. Bradshaw
π Model Description
This is the fine-tuned BART model for summarizing findings in PET reports.
To check our fine-tuned large language models (LLMs) for PET report summarization:
- BERT2BERT-PET
- BART-PET
- BioBART-PET
- PEGASUS-PET
- T5v1.1-PET
- Clinical-T5-PET
- Flan-T5-PET
- GPT2-XL-PET
- OPT-1.3B-PET
- LLaMA-LoRA-PET
- Alpaca-LoRA-PET
π Abstract
Purpose: To determine if fine-tuned large language models (LLMs) can generate accurate, personalized impressions for whole-body PET reports.
Materials and Methods: Twelve language models were trained on a corpus of PET reports using the teacher-forcing algorithm, with the report findings as input and the clinical impressions as reference. An extra input token encodes the reading physicianβs identity, allowing models to learn physician-specific reporting styles. Our corpus comprised 37,370 retrospective PET reports collected from our institution between 2010 and 2022. To identify the best LLM, 30 evaluation metrics were benchmarked against quality scores from two nuclear medicine (NM) physicians, with the most aligned metrics selecting the model for expert evaluation. In a subset of data, model-generated impressions and original clinical impressions were assessed by three NM physicians according to 6 quality dimensions and an overall utility score (5-point scale). Each physician reviewed 12 of their own reports and 12 reports from other physicians. Bootstrap resampling was used for statistical analysis.
Results: Of all evaluation metrics, domain-adapted BARTScore and PEGASUSScore showed the highest Spearmanβs Ο correlations (0.568 and 0.563) with physician preferences. Based on these metrics, the fine-tuned PEGASUS model was selected as the top LLM. When physicians reviewed PEGASUS-generated impressions in their own style, 89% were considered clinically acceptable, with a mean utility score of 4.08/5. Physicians rated these personalized impressions as comparable in overall utility to the impressions dictated by other physicians (4.03, P=0.41).
Conclusion: Personalized impressions generated by PEGASUS were clinically useful, highlighting its potential to expedite PET reporting.
π Usage
finetuned_model = "xtie/BART-PET-impression"
tokenizer = AutoTokenizer.from_pretrained(finetuned_model)
model = AutoModelForSeq2SeqLM.from_pretrained(finetuned_model, ignore_mismatched_sizes=True).eval()
findings_info =
"""
Description: PET CT WHOLE BODY
Radiologist: James
Findings:
Head/Neck: xxx Chest: xxx Abdomen/Pelvis: xxx Extremities/Musculoskeletal: xxx
Indication:
The patient is a 60-year old male with a history of xxx
"""
inputs = tokenizer(findings_info.replace('\n', ' '),
padding="max_length",
truncation=True,
max_length=1024,
return_tensors="pt")
input_ids = inputs.input_ids.to("cuda")
attention_mask = inputs.attention_mask.to("cuda")
outputs = model.generate(input_ids,
attention_mask=attention_mask,
max_new_tokens=512,
num_beam_groups=1,
num_beams=4,
do_sample=False,
diversity_penalty=0.0,
num_return_sequences=1,
length_penalty=2.0,
no_repeat_ngram_size=3,
early_stopping=True
)
# get the generated impressions
output_str = tokenizer.decode(outputs,
skip_special_tokens=True)
π Performance Metrics
For detailed evaluation results, please refer to our paper.
- ROUGE-1: 51.9
- ROUGE-2: 29.6
- ROUGE-L: 38.6
- BLEU: 22.6
- BERTScore: 0.735
π‘ Highlights
- The fine-tuned large language model provides clinically useful, personalized impressions based on PET findings.
- To our knowledge, this is the first attempt to automate impression generation for whole-body PET reports.
π₯οΈ Hardware
The models were trained on NVIDIA A100 GPUs.
π Additional Resources
- Finetuned from model: Facebook's BART Large
- Codebase for training and inference: GitHub Repository
- Downloads last month
- 3