
EduBERT
Language302 ops109.5M params
BERT-base pretrained from scratch on PubMed, captured here as the MedCPT biomedical query encoder.
Language · 302 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
transformers.AutoModel.from_config()
PubMedBERT is a BERT-base encoder pretrained from scratch on biomedical text, and the paper behind it challenges a common assumption: that domain-specific models should start from a general-domain checkpoint. Its central finding is that for domains with abundant unlabeled text, such as biomedicine, pretraining from scratch gives substantial gains over continual pretraining of general-domain models. The practical advantage is an in-domain vocabulary: general-domain BERT splits naloxone into four word pieces and acetyltransferase into seven, while both terms are single entries in PubMedBERT's vocabulary.
The pretraining corpus was the PubMed abstract collection: 14 million abstracts, 3.2 billion words, 21 GB. Training ran for 62,500 steps with a batch size of 8,192. That took about 5 days on one DGX-2 machine with 16 V100 GPUs. The model is uncased and was trained with whole-word masking at a masking rate of 15%. The authors kept to BERT-BASE for a head-to-head comparison with prior biomedical models, even though BERT-LARGE looked better in preliminary experiments. On the Hub the model was later renamed BiomedBERT; the card notes it was previously named PubMedBERT (abstracts + full text).
The member traced here is not PubMedBERT's own checkpoint but MedCPT's query encoder, part of a dense retriever for biomedical search whose query and article encoders were both initialized from PubMedBERT. MedCPT was trained contrastively on 255M query-article pairs from PubMed search logs with in-batch negatives. Its embeddings live in the same space as those generated by the MedCPT article encoder, which is what makes query-to-article search work. The NCBI team could not release the PubMed user logs for privacy reasons and ships BioASQ question-article pairs as a surrogate training set instead.
Key idea. PubMedBERT demonstrated that pretraining BERT from scratch on PubMed text, with a vocabulary derived from the domain, beats continual pretraining of general-domain models across a biomedical benchmark.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{gu2021domainspecificlanguagemodelpretraining,
title={Domain-Specific Language Model Pretraining for Biomedical Natural Language Processing},
author={Yu Gu and Robert Tinn and Hao Cheng and Michael Lucas and Naoto Usuyama and Xiaodong Liu and Tristan Naumann and Jianfeng Gao and Hoifung Poon},
year={2021},
eprint={2007.15779},
archivePrefix={arXiv},
primaryClass={cs.CL},
doi={https://doi.org/10.1145/3458754},
url={https://arxiv.org/abs/2007.15779},
}