Accepted for/Published in: Journal of Medical Internet Research
Date Submitted: May 16, 2024
Date Accepted: Jul 15, 2024
Ascle: A Python Natural Language Processing Toolkit for Medical Text Generation
ABSTRACT
Background:
Medical texts present significant domain-specific challenges, and manually curating these texts is a time-consuming and labor-intensive process. Therefore, natural language processing (NLP) algorithms have been developed to automate text processing. In the biomedical field, there are various toolkits for text processing, which have greatly improved the efficiency of handling unstructured text. However, these existing toolkits tend to emphasize different perspectives, and the lack of generation capabilities in any of them leaves a significant void.
Objective:
This study introduces Ascle, a pioneering NLP toolkit designed for medical text generation. Ascle is tailored for biomedical researchers and clinical staff with an easy-to-use, all-in-one solution that requires minimal programming expertise. For the first time, Ascle provides four advanced and challenging generative functions: question-answering, text summarization, text simplification, and machine translation. Additionally, Ascle integrates 12 essential NLP functions, along with query and search capabilities for clinical databases.
Methods:
We fine-tuned 32 domain-specific language models and evaluated them thoroughly on 27 established benchmarks. Additionally, for the question-answering task, we develop a retrieval-augmented generation (RAG) framework for LLMs that incorporates a medical knowledge graph with ranking techniques to enhance the reliability of generated answers.
Results:
The fine-tuned models and RAG framework consistently enhanced text generation tasks. For example, the fine-tuned models improved the machine translation task by 20.27 in terms of BLEU score. In the question-answering task, the RAG framework raised the ROUGE-L score by 18% over the vanilla models.
Conclusions:
This study introduces the development and evaluation of Ascle, a user-friendly NLP toolkit designed for medical text generation. All code is publicly available via https://github.com/Yale-LILY/Ascle. All fine-tuned language models can be accessed via Hugging Face.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.