On the Effectiveness of Compact Biomedical Transformers

7 Sep 2022  ·  Omid Rohanian, Mohammadmahdi Nouriborji, Samaneh Kouchaki, David A. Clifton ·

Language models pre-trained on biomedical corpora, such as BioBERT, have recently shown promising results on downstream biomedical tasks. Many existing pre-trained models, on the other hand, are resource-intensive and computationally heavy owing to factors such as embedding size, hidden dimension, and number of layers. The natural language processing (NLP) community has developed numerous strategies to compress these models utilising techniques such as pruning, quantisation, and knowledge distillation, resulting in models that are considerably faster, smaller, and subsequently easier to use in practice. By the same token, in this paper we introduce six lightweight models, namely, BioDistilBERT, BioTinyBERT, BioMobileBERT, DistilBioBERT, TinyBioBERT, and CompactBioBERT which are obtained either by knowledge distillation from a biomedical teacher or continual learning on the Pubmed dataset via the Masked Language Modelling (MLM) objective. We evaluate all of our models on three biomedical tasks and compare them with BioBERT-v1.1 to create efficient lightweight models that perform on par with their larger counterparts. All the models will be publicly available on our Huggingface profile at https://huggingface.co/nlpie and the codes used to run the experiments will be available at https://github.com/nlpie-research/Compact-Biomedical-Transformers.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Named Entity Recognition (NER) BC2GM BioMobileBERT F1 85.26 # 7
Named Entity Recognition (NER) BC2GM BioDistilBERT F1 86.97 # 2
Named Entity Recognition (NER) BC2GM DistilBioBERT F1 86.6 # 4
Named Entity Recognition (NER) BC2GM CompactBioBERT F1 86.71 # 3
Named Entity Recognition (NER) BC5CDR-chemical CompactBioBERT F1 94.31 # 6
Named Entity Recognition (NER) BC5CDR-chemical BioMobileBERT F1 94.23 # 7
Named Entity Recognition (NER) BC5CDR-chemical BioDistilBERT F1 94.48 # 5
Named Entity Recognition (NER) BC5CDR-chemical DistilBioBERT F1 94.53 # 4
Named Entity Recognition (NER) BC5CDR-disease BioMobileBERT F1 84.62 # 10
Named Entity Recognition (NER) BC5CDR-disease BioDistilBERT F1 85.61 # 7
Named Entity Recognition (NER) BC5CDR-disease DistilBioBERT F1 85.42 # 8
Named Entity Recognition (NER) BC5CDR-disease CompactBioBERT F1 85.38 # 9
Named Entity Recognition (NER) JNLPBA BioDistilBERT F1 79.1 # 9
Named Entity Recognition (NER) JNLPBA BioMobileBERT F1 80.13 # 5
Named Entity Recognition (NER) JNLPBA DistilBioBERT F1 79.97 # 7
Named Entity Recognition (NER) JNLPBA CompactBioBERT F1 79.88 # 8
Named Entity Recognition (NER) NCBI-disease BioMobileBERT F1 87.21 # 21
Named Entity Recognition (NER) NCBI-disease BioDistilBERT F1 87.61 # 19
Named Entity Recognition (NER) NCBI-disease CompactBioBERT F1 88.67 # 13
Named Entity Recognition (NER) NCBI-disease DistilBioBERT F1 87.93 # 15

Methods