Abstract: Clinical data in hospitals are increasingly accessible for research through clinical data warehouses. However these documents are unstructured and it is therefore necessary to extract information from medical reports to conduct clinical studies. Transfer learning with BERT-like models such as CamemBERT has allowed major advances for French, especially for named entity recognition. However, these models are trained for plain language and are less efficient on biomedical data. Addressing this gap, we introduce CamemBERT-bio, a dedicated French biomedical model derived from a new public French biomedical dataset. Through continual pre-training of the original CamemBERT, CamemBERT-bio achieves an improvement of 2.54 points of F1-score on average across various biomedical named entity recognition tasks, reinforcing the potential of continual pre-training as an equally proficient yet less computationally intensive alternative to training from scratch. Additionally, we highlight the importance of using a standard evaluation protocol that provides a clear view of the current state-of-the-art for French biomedical models.
Introduction
In the world of Natural Language Processing (NLP), general-purpose models like BERT (and its French cousin, CamemBERT) are incredibly versatile. However, they often stumble when faced with the "telegraphic" and jargon-heavy world of clinical reports. A model trained on Wikipedia and web forums doesn't inherently understand the difference between a "glimépiride" (a medication) and a "cardiopathie" (a condition).
While some institutions have built specialized models using private hospital data, strict privacy regulations mean these models often cannot be shared publicly. This leaves the broader research community with a choice: use a general model that underperforms, or spend massive amounts of money and electricity to train a specialized model from scratch. Researchers have introduced CamemBERT-bio, a specialized French language model for the biomedical domain that offers a cost-effective, high-performing, and publicly available alternative.
Methods
The authors employed a technique called continual pre-training. Instead of starting with a blank slate, they took the existing camembert-base model and subjected it to a second phase of training using the Masked Language Modeling (MLM) task. In this phase, the model "fills in the blanks" of specialized medical text to learn the nuances of the domain.
Key technical details include:
- Whole-word masking: A strategy that forces the model to predict entire words rather than just sub-word fragments, which is particularly helpful for long medical terms.
- Efficiency: The model was trained for just 50,000 steps over 39 hours on two Tesla V100 GPUs.
- Comparison: They also created a "biomed-fr-small" version (using only 10% of the data) to test how much the size of the specialized corpus actually matters.
Datasets
The authors introduced a new public corpus called biomed-fr, totaling 413 million words. It is composed of three main sources: scientific literature, drug leaflets, and clinical cases.
For evaluation, they tested the model on several established benchmarks for Named Entity Recognition (NER), including QUAERO (EMEA and MEDLINE sets), CAS (clinical cases), and E3C.
Key Results
CamemBERT-bio consistently outperformed the base CamemBERT model across all tested datasets, achieving an average gain of 2.54 points in F1-score across various NER tasks.
On the CAS1 dataset (clinical cases), CamemBERT-bio reached an F1 of 73.03, compared to 70.50 for the base model. When compared to other specialized models like DrBERT or AliBERT, CamemBERT-bio achieved the best results on almost all evaluation datasets, particularly when measured using the rigorous seqeval metric.
Key Insights and Ideas
- Continual Pre-training is "Enough": The paper challenges the recent trend suggesting that models must be trained from scratch to be effective in the biomedical domain. CamemBERT-bio shows that starting from a general model and "specializing" it is not only viable but highly effective.
- The Evaluation Trap: The authors highlight a critical issue in the field: different researchers use different evaluation metrics (like
seqevalvs. token-based F1). They demonstrate that a model can look like a "winner" or a "loser" simply based on how you count its successes, advocating for a standardized protocol to ensure fair comparisons. - Green AI Matters: One of the most striking insights is the environmental cost. Training a similar model from scratch (like DrBERT) emitted roughly 26 kg of CO2. CamemBERT-bio emitted only 0.8 kg—a 32x reduction in carbon footprint for comparable (and often superior) performance.
- Vocabulary Overlap: They found only a 45% overlap between the general CamemBERT vocabulary and their specialized biomedical vocabulary. This explains why general models struggle: they are literally "seeing" medical terms as a fragmented mess of sub-words.
Limitations and Future Work
The authors are transparent about a few hurdles. Because the training data (biomed-fr) is public, it leans more toward formal scientific writing. Real-world clinical notes in hospitals are often messier, filled with more abbreviations and non-standard formatting that this model might not have fully captured. Additionally, this study focused primarily on Named Entity Recognition (NER); future work is needed to see how CamemBERT-bio handles other tasks like relation extraction or medical question-answering.
Summary updated