TL;DR
This paper introduces HuatuoGPT-II, a specialized Chinese medical LLM trained using a novel one-stage domain adaptation approach. This method simplifies the traditional two-stage process, improving training stability and achieving state-of-the-art performance on Chinese medical benchmarks, even rivaling proprietary models like GPT-4.
What Problem Does This Paper Address?
Adapting large language models (LLMs) to specialized domains like medicine is crucial, as general models often lack deep domain-specific knowledge. The standard approach involves a two-stage process: continued pre-training to inject knowledge and supervised fine-tuning (SFT) to teach instruction-following. However, this two-stage method is complex, requires meticulous tuning, and suffers from "catastrophic forgetting" due to data distribution shifts between stages. This can lead to reduced model performance and efficiency. The authors aim to overcome these limitations by proposing a more streamlined and effective one-stage adaptation protocol.
Methods
The core innovation is a one-stage domain adaptation protocol. Instead of separate pre-training and fine-tuning stages, this method unifies heterogeneous data (from traditional pre-training and SFT) into a single instruction-output format. This simplifies the process and aims to inject knowledge more efficiently.
Key components of their method include:
- Data Unification: Domain-specific pre-training corpora are transformed into instruction-output pairs, similar to SFT data. This is achieved by using LLMs (like ChatGPT) to generate questions based on the corpus text and then generating answers to these questions using the corpus. This process also helps in standardizing data format and potentially mitigating ethical concerns.
- Priority Sampling Strategy: To manage the diverse data sources effectively, a data priority sampling strategy is employed. This strategy initially prioritizes learning domain knowledge from pre-training data and then gradually shifts focus to downstream fine-tuning data. This approach is designed to prevent catastrophic forgetting and improve knowledge retention.
Datasets
- Medical Pre-training Corpus: A large corpus of 5,252,894 medical documents, comprising both Chinese and English data from sources like encyclopedias, books, literature, and web corpora (including C4, Wudao, textbooks, Wikipedia, PubMed, and Chinese literature).
- Medical Fine-Tuning Instructions: 142K real-world medical questions and their corresponding answers generated by GPT-4, sourced from Huatuo-26M.
- Evaluation Datasets:
- Medical Benchmarks: MedQA, MedMCQA, CMB, CMExam (focusing on medical components).
- General Benchmarks: C-Eval, CMMLU (focusing on medical components).
- Chinese National Pharmacist Licensure Examination (2023): A novel benchmark used to assess performance on recent, untouched exam data, mitigating concerns about test data leakage.
- HuatuoEval: Datasets for single-round and multi-round medical question answering (KUAKE-QIC and Med-dialog).
Key Insights and Ideas
- One-Stage Simplicity is Powerful: The paper demonstrates that a simplified one-stage adaptation protocol can be as, or even more, effective than the traditional two-stage approach, reducing complexity and improving stability.
- Data Unification is Crucial: Transforming diverse pre-training data into a unified instruction-output format is key to the success of the one-stage method. This process helps align pre-training and fine-tuning data distributions.
- Priority Sampling for Knowledge Retention: The proposed sampling strategy effectively balances learning domain knowledge and instruction following, mitigating catastrophic forgetting.
- Chinese Medical Domain Focus: HuatuoGPT-II shows exceptional performance in Chinese medical contexts, highlighting the importance of domain-specific adaptation and the need for models tailored to specific languages and medical systems.
Key Results
- HuatuoGPT-II achieves state-of-the-art (SOTA) performance on multiple Chinese medical benchmarks.
- It demonstrates competitive performance with GPT-4 across various benchmarks, even surpassing it in some Chinese medical exams.
- In the 2023 Chinese National Pharmacist Licensure Examination, HuatuoGPT-II ranked second in the Pharmacy track and led in the Traditional Chinese Medicine track, showing superior average scores.
- The one-stage adaptation protocol shows improved training stability with reduced loss fluctuations compared to the two-stage method.
- HuatuoGPT-II exhibits superior performance in medical response quality evaluations, both automated (using GPT-4) and expert evaluations.
- The model shows remarkable win rates against other leading models, including proprietary ones like ChatGPT and GPT-4.
Limitations and Future Work
- Hallucinations: While HuatuoGPT-II shows improved accuracy, the paper acknowledges that LLMs, including HuatuoGPT-II, can still exhibit hallucinations, especially on sensitive topics like healthcare. The authors emphasize that the model should not be used for medical advice at this stage.
- English-Centric Constraints: For English-centric benchmarks like USMLE, HuatuoGPT-II, primarily designed for Chinese, faces constraints, though it still performs commendably.
- Future Work: The authors suggest that the proposed one-stage domain adaptation protocol is promising and can be applied to other specialized domains (finance, law) and languages. Further research could explore more advanced data unification techniques and sampling strategies.
Summary updated