TLDR: DPF-CM is a new framework for training and deploying Chinese medical large language models (LLMs). It addresses the lack of comprehensive data processing by introducing advanced techniques for cleaning, generating, and optimizing training data, including a unique instruction generation strategy and preference data denoising. Crucially, it also features a Privacy-Preserving Vector Database (PPVD) to significantly reduce training data privacy leakage during model deployment, while achieving state-of-the-art performance.
Large language models (LLMs) are transforming many fields, but their application in specialized areas like Chinese healthcare faces unique challenges. While many efforts focus on improving the models’ core training methods, the crucial aspect of data processing often gets overlooked. This can lead to models that struggle with the nuances of medical knowledge and, critically, pose significant privacy risks when handling sensitive patient information.
Addressing these gaps, researchers have introduced DPF-CM, a comprehensive Data Processing Framework designed specifically for the training and deployment of Chinese Medical LLMs. This framework tackles both the quality of training data and the privacy concerns during a model’s use.
Optimizing Data for Smarter Medical LLMs
The first core component of DPF-CM is a sophisticated data processing pipeline for model training. It goes beyond basic data cleaning to ensure the LLM learns from the highest quality and most relevant information:
- Pre-training Data Enhancement: The framework meticulously cleans vast amounts of medical text, filtering out repetitive content, special characters, and poorly written sentences. To combat data scarcity, it also intelligently generates new medical textbook content and popular science articles using existing data as examples, expanding the model’s knowledge base.
- Supervised Fine-Tuning (SFT) Data Refinement: For fine-tuning, DPF-CM first removes duplicate data. Then, it employs an LLM to evaluate data quality based on professionalism, safety, and fluency, selecting only the best samples. Problematic data is further optimized and improved by the LLM itself.
- Question-Oriented Instruction Generation: A common issue in open-source medical datasets is the lack of well-structured instructions, which can limit a model’s ability to generalize and follow commands. DPF-CM introduces a novel ‘chained examples’ strategy. This method links different examples together in a progressive optimization process, guiding the LLM to generate high-quality, question-oriented instructions that improve over a sequence of examples.
- Preference Data Denoising: When training models to align with human preferences, noisy data can be a major problem. DPF-CM uses an ensemble of multiple reward models to identify and remove low-quality preference data, such as contradictory or indistinguishable responses, ensuring the model learns from clear and meaningful feedback.
Ensuring Patient Privacy with a Secure Vector Database
The second critical module of DPF-CM focuses on privacy preservation during the deployment of medical LLMs. Medical data is highly sensitive, and accidental exposure of training data during inference is a serious concern. To mitigate this, DPF-CM proposes a Privacy-Preserving Vector Database (PPVD) approach, involving four key stages:
- Model Memory Search: The system first identifies specific training data samples that the LLM is likely to have memorized. This is done by feeding part of a training sample as a prompt and checking if the model’s output closely matches the other part of the original sample.
- High-Risk Database Construction: The embeddings (numerical representations) of these identified ‘high-risk’ training samples are then stored in a dedicated database.
- Secure Database Construction: For each high-risk sample, a general LLM is used to generate a new, privacy-safe response. This new, anonymized content is then used to create corresponding ‘secure’ embeddings, stored in a separate secure database.
- Match and Replace: During live deployment, if a user’s query closely matches content in the high-risk database, the system intercepts the model’s direct output and instead provides the privacy-safe response from the secure database. This prevents the inadvertent leakage of sensitive training data.
Also Read:
- Baichuan-M2: Setting a New Benchmark for Medical AI in Real-World Clinical Settings
- Unlocking Patient Data: How LLMs Are Transforming OPQRST Extraction
Impact and Future Outlook
Experimental results demonstrate that DPF-CM significantly boosts the accuracy of Chinese medical LLMs, enabling models trained with this framework to achieve state-of-the-art performance among open-source counterparts. Furthermore, the privacy-preserving measures effectively reduce training data privacy leakage by 27% without significantly impacting the model’s overall performance.
While DPF-CM marks a significant step forward, the researchers acknowledge limitations, such as the potential for general LLMs to generate inaccurate medical content during data generation and the storage demands of the privacy-preserving vector database. Future work will explore domain-specific data generation methods and more lightweight feature representations.
This framework highlights the immense value of meticulous data processing and robust privacy measures in developing trustworthy and high-performing AI for critical domains like healthcare. For more details, you can read the full research paper here.


