A Comparative Study of Decoding Strategies in Medical Text Generation
Authors:
- Vajira ThambawitaVTVajira Thambawita
Preprint
Abstract
Large Language Models (LLMs) rely on various decoding strategies to generate text, and these choices can significantly affect output quality. In healthcare, where accuracy is critical, the impact of decoding strategies remains underexplored. We investigate this effect in five open-ended medical tasks, including translation, summarization, question answering, dialogue, and image captioning, evaluating 11 decoding strategies with medically specialized and general-purpose LLMs of different sizes. Our results show that deterministic strategies generally outperform stochastic ones: beam search achieves the highest scores, while η and top-k sampling perform worst. Slower decoding methods tend to yield better quality. Larger models achieve higher scores overall but have longer inference times and are no more robust to decoding. Surprisingly, while medical LLMs outperform general ones in two of the five tasks, statistical analysis shows no overall performance advantage and reveals greater sensitivity to decoding choice. We further compare multiple evaluation metrics and find that correlations vary by task, with MAUVE showing weak agreement with BERTScore and ROUGE, as well as greater sensitivity to the decoding strategy. These results highlight the need for careful selection of decoding methods in medical applications, as their influence can sometimes exceed that of model choice.Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- A survey of large language models for healthcare: from data, technology, and applications to accountability and ethicsInformation Fusion, 2025
- ROCOv2: Radiology Objects in COntext Version 2, an Updated Multimodal Image DatasetScientific Data, 2024
- The model student: GPT-4 performance on graduate biomedical science examsScientific Reports, 2024
- A Thorough Examination of Decoding Methods in the Era of LLMs2024
- Opportunities and challenges for ChatGPT and large language models in biomedicine and healthBriefings in Bioinformatics, 2023
- Locally Typical SamplingTransactions of the Association for Computational Linguistics, 2023
- On Decoding Strategies for Neural Text GeneratorsTransactions of the Association for Computational Linguistics, 2022
- Truncation Sampling as Language Model Desmoothing2022
- Calibrated Language Model Fine-Tuning for In- and Out-of-Distribution Data2020
- A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents2018