[Paper Review] Biomedical and Clinical Language Models for Spanish: On the Benefits of Domain-Specific Pretraining in a Mid-Resource Scenario
This paper presents the first biomedical and clinical transformer-based language models for Spanish, trained from scratch using mixed-domain (biomedical and clinical) data to improve performance in low-resource settings. By leveraging domain-specific pretraining and vocabulary optimization, the models outperform mBERT and BETO across multiple NER tasks on both biomedical and real-world hospital discharge reports.
This work presents biomedical and clinical language models for Spanish by experimenting with different pretraining choices, such as masking at word and subword level, varying the vocabulary size and testing with domain data, looking for better language representations. Interestingly, in the absence of enough clinical data to train a model from scratch, we applied mixed-domain pretraining and cross-domain transfer approaches to generate a performant bio-clinical model suitable for real-world clinical data. We evaluated our models on Named Entity Recognition (NER) tasks for biomedical documents and challenging hospital discharge reports. When compared against the competitive mBERT and BETO models, we outperform them in all NER tasks by a significant margin. Finally, we studied the impact of the model's vocabulary on the NER performances by offering an interesting vocabulary-centric analysis. The results confirm that domain-specific pretraining is fundamental to achieving higher performances in downstream NER tasks, even within a mid-resource scenario. To the best of our knowledge, we provide the first biomedical and clinical transformer-based pretrained language models for Spanish, intending to boost native Spanish NLP applications in biomedicine. Our best models are freely available in the HuggingFace hub: https://huggingface.co/BSC-TeMU.
Motivation & Objective
- Address the lack of domain-specific NLP resources for Spanish in biomedicine and clinical settings.
- Overcome the limitations of general-domain models like mBERT and BETO in low-resource, domain-specific NER tasks.
- Investigate the effectiveness of mixed-domain pretraining and vocabulary design in improving downstream performance.
- Develop and release the first publicly available, high-performing Spanish biomedical and clinical language models for real-world applications.
Proposed method
- Pretrained RoBERTa-based models from scratch using a combined biomedical and clinical corpus totaling ~130M tokens.
- Explored different masking strategies: subword-level masking (SWM) and whole-word masking (WWM), varying vocabulary sizes (15k, 30k, 52k).
- Applied mixed-domain pretraining by combining biomedical texts (PubMed, SciELO, clinical cases, crawler data) and clinical notes (discharge summaries, X-ray reports).
- Used cross-domain transfer learning to evaluate performance on clinical NER tasks despite training on mixed data.
- Conducted a vocabulary-centric analysis comparing segmentation outputs across mBERT, BETO, and the proposed models.
- Evaluated models on three NER benchmarks: two biomedical (BioCreative, CANTEMIST) and one clinical (ICTUSnet), using standard F1 scores.
Experimental results
Research questions
- RQ1Does domain-specific pretraining significantly improve NER performance in Spanish compared to general-domain models in a mid-resource scenario?
- RQ2How does the choice between subword-level masking (SWM) and whole-word masking (WWM) affect downstream NER performance?
- RQ3Can mixed-domain pretraining with biomedical and clinical data yield better performance than single-domain pretraining in clinical NER tasks?
- RQ4What is the impact of vocabulary size and segmentation strategy on NER performance, particularly in handling rare or complex medical terms?
- RQ5To what extent does cross-domain transfer from biomedical to clinical data improve performance on real hospital discharge reports?
Key findings
- The proposed bio-cli-52k model achieved the highest F1 score on all NER tasks, outperforming both mBERT and BETO across biomedical and clinical benchmarks.
- The model with whole-word masking (WWM) and a 30k vocabulary size showed superior performance on biomedical tasks, indicating a strong interaction between masking strategy and vocabulary size.
- Mixed-domain pretraining (biomedical + clinical) yielded the best overall results, challenging prior findings that mixed-domain pretraining degrades performance.
- The vocabulary-centric analysis revealed that over-segmentation—common in mBERT and BETO—can harm NER performance, especially for compound medical terms.
- The bio-cli-52k-vocab-cli model achieved the highest F1 on the ICTUSnet clinical test set, indicating strong cross-domain transferability from biomedical to clinical data.
- The results confirm that domain-specific pretraining is essential for high performance in low-resource settings, even when training data is limited.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.