OncoGPT: A Medical Conversational Model Tailored with Oncology Domain Expertise on a Large Language Model Meta-AI (LLaMA)

Fujian Jia, Xin Liu, Lixi Deng, Jiwen Gu, Chunchao Pu, Tunan Bai, Mengjiang Huang, Yuanzhi Lu, Kang Liu

Abstract

In the past year, there has been a growing trend in applying Large Language Models (LLMs) to the field of medicine, particularly with the advent of advanced language models such as ChatGPT developed by OpenAI. However, there is limited research on LLMs specifically addressing oncology-related queries. The primary aim of this research was to develop a specialized language model that demonstrates improved accuracy in providing advice related to oncology. We performed an extensive data collection of online question-answer interactions centered around oncology, sourced from reputable doctor-patient platforms. Following data cleaning and anonymization, a dataset comprising over 180K+ oncology-related conversations was established. The conversations were categorized and meticulously reviewed by field specialists and clinicians to ensure precision. Employing the LLaMA model and other selected open-source datasets, we conducted iterative fine-tuning to enhance the model's proficiency in basic medical conversation and specialized oncology knowledge. We observed a substantial enhancement in the model's understanding of genuine patient inquiries and its reliability in offering oncology-related advice through the utilization of real online question-answer interactions in the fine-tuning process. We release the database and models to the research community.

Introduction

The rapid evolution of Large Language Models (LLMs) has revolutionized natural language processing, offering transformative potential in specialized fields like healthcare. While general-purpose models like ChatGPT demonstrate impressive conversational capabilities, they often encounter the "last mile" problem in high-stakes medical domains. In oncology, where precision is paramount, general knowledge is frequently insufficient. These models may "hallucinate" information or provide vague, non-clinical advice that fails to address the complexities of cancer care.

The primary bottleneck in developing specialized medical LLMs is the scarcity of high-quality, domain-specific datasets. Most existing medical models are trained on broad medical corpora, leaving a significant gap in specialized oncology expertise. To bridge this gap, we developed OncoGPT, a model tailored specifically for cancer patients and clinicians by leveraging a massive, newly curated dataset of real-world doctor-patient interactions.

Methodology and Pipeline

The development of OncoGPT followed a rigorous multi-stage pipeline designed to transition the model from general conversational ability to specialized medical expertise. We employed a "curriculum learning" approach to fine-tune the LLaMA-7B base model.

Figure 1: The OncoGPT development pipeline, illustrating data collection, cleaning, doctor review, and the multi-stage fine-tuning process.

The training process consisted of three distinct phases:

  1. General Instruction Tuning: The base LLaMA model was first trained on the 52K Alpaca dataset to establish foundational conversational skills and instruction-following capabilities.
  2. General Medical Knowledge: The model was then fine-tuned on 100K patient-physician conversations from the ChatDoctor project. This stage allowed the model to learn basic medical terminology, symptom recognition, and general treatment protocols.
  3. Oncology Specialization: The final stage involved fine-tuning on our custom dataset of 180,184 oncology-specific dialogues. This stage utilized LoRA (Low-Rank Adaptation) to efficiently update model weights.

The final training was executed on a single NVIDIA A100 GPU over approximately 15 hours. To ensure the model's responses were grounded in reality, we used an iterative refinement process, testing various hyperparameters to find the configuration that most closely mimicked real oncologists.

Data Collection and Processing

The cornerstone of OncoGPT is its specialized dataset. We aggregated data from several reputable online consultation platforms across both English and Chinese languages.

Table 1: Breakdown of oncology-related dialogue sources across Chinese and English platforms.

As shown in Table 1, the dataset draws from a diverse range of sources. English data was sourced from platforms like WebMD, HealthCareMagic, and eHealth Forum. Chinese data, which provided the bulk of the corpus, was primarily sourced from iPlusMed (contributing nearly 150,000 dialogues), YouLai, and others.

To ensure data quality and safety, we implemented a multi-step processing workflow:

  • Translation: Chinese dialogues were batch-translated into English using Google Translate and subsequently reviewed by human experts to ensure semantic accuracy.
  • Cleaning: We applied keyword filtering (e.g., "carcinoma," "leukemia," "neoplasm") to maintain strict relevance to oncology.
  • Anonymization: A rigorous privacy filter was applied to remove all personally identifiable information (PII), including patient names, hospital names, and contact details.
  • Expert Review: Clinicians and oncology specialists reviewed the categorized conversations to ensure the medical advice contained within the training data was accurate and safe.

Key Results and Evaluation

We evaluated OncoGPT against the general medical baseline, ChatDoctor, using the BERT Score metric. This metric measures the semantic similarity between the model's generated responses and the actual responses provided by doctors in a withheld validation set of 737 dialogues.

OncoGPT demonstrated superior performance across all key metrics:

  • F1 Score: OncoGPT achieved 0.63, outperforming ChatDoctor's 0.61.
  • Precision and Recall: OncoGPT showed statistically significant improvements ($p < 0.001$), with a precision of 0.68 (vs. 0.65) and a recall of 0.60 (vs. 0.58).
  • Categorical Success: The model outperformed the baseline in both "fundamental-related" questions (general cancer science) and "treatment-related" questions (specific clinical interventions).

Qualitative analysis revealed that OncoGPT provides more nuanced and empathetic advice. For instance, when queried about complex diagnoses like thymic squamous cell carcinoma, the model not only discusses standard treatments like chemotherapy and radiotherapy but also addresses prognosis and long-term survival challenges with a tone appropriate for patient interaction.

Discussion and Insights

Our research yielded several critical insights into the development of domain-specific LLMs:

  • The Power of Domain Specificity: Fine-tuning on a specialized dataset provides a measurable "intelligence" boost that general medical training cannot replicate. While a model like ChatDoctor is a good "general practitioner," it lacks the depth required for oncology.
  • Cross-Lingual Synergy: Incorporating translated data from diverse global sources significantly enhanced the model's quality. This suggests that the bottleneck for specialized LLMs is not just data quantity, but the ability to leverage global, multi-lingual medical knowledge.
  • Traditional Medicine Integration: Due to the inclusion of Chinese sources, OncoGPT acquired unique knowledge regarding cancer therapy and recovery in Traditional Chinese Medicine (TCM), offering a more holistic view of patient care often missing from Western-centric models.

Limitations and Future Work

OncoGPT is currently an investigational tool intended for academic research and is not a replacement for professional medical consultation. Future iterations will focus on:

  • Automated Citations: Integrating reference checking to provide evidence-based citations for clinical claims.
  • RLHF: Implementing Reinforcement Learning from Human Feedback to further align model responses with clinical safety standards and reduce hallucinations.
  • Advanced Architectures: Migrating to LLaMA-2 or LLaMA-3 frameworks to improve reasoning capabilities.
  • Fact-Checking: Developing integrated modules to verify advice against the latest clinical guidelines in real-time.

Summary updated

Abstract

In the past year, there has been a growing trend in applying Large Language Models (LLMs) to the field of medicine, particularly with the advent of advanced language models such as ChatGPT developed by OpenAI. However, there is limited research on LLMs specifically addressing oncology-related queries. The primary aim of this research was to develop a specialized language model that demonstrates improved accuracy in providing advice related to oncology. We performed an extensive data collection of online question-answer interactions centered around oncology, sourced from reputable doctor-patient platforms. Following data cleaning and anonymization, a dataset comprising over 180K+ oncology-related conversations was established. The conversations were categorized and meticulously reviewed by field specialists and clinicians to ensure precision. Employing the LLaMA model and other selected open-source datasets, we conducted iterative fine-tuning to enhance the model's proficiency in basic medical conversation and specialized oncology knowledge. We observed a substantial enhancement in the model's understanding of genuine patient inquiries and its reliability in offering oncology-related advice through the utilization of real online question-answer interactions in the fine-tuning process. We release database and models to the research community (https://github.com/OncoGPT1).
BibTeX
@misc{jia2024oncogpt,
  author = {Fujian Jia and Xin Liu and Lixi Deng and Jiwen Gu and Chunchao Pu and Tunan Bai and Mengjiang Huang and Yuanzhi Lu and Kang Liu},
  title = {{OncoGPT: A Medical Conversational Model Tailored with Oncology Domain Expertise on a Large Language Model Meta-AI (LLaMA)}},
  year = {2024},
  eprint = {2402.16810},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.16810},
}
Figure