The Diminishing Returns of Masked Language Models to Science

Zhi Hong, Aswathy Ajith, J. Gregory Pauloski, Eamon Duede, Kyle Chard, Ian T. Foster · DOI

TL;DR

This paper investigates whether scaling up masked language models (like BERT) by increasing model size, training data, or training time leads to consistent performance gains on scientific information extraction tasks. Surprisingly, they find that these scaling efforts often yield diminishing returns, with performance gains being highly task-dependent and sometimes negligible. This suggests that simply making models bigger and training them longer might not be the most effective path to improving scientific NLP.

What Problem Does This Paper Address?

Researchers are increasingly turning to Natural Language Processing (NLP) models, particularly transformer-based masked language models (MLMs) like BERT, to help manage the overwhelming volume of scientific literature. These models have shown great promise in tasks like extracting information, summarizing, and answering questions. It's a common belief in the NLP community that making these models larger, training them on more data, and for longer durations consistently improves their performance on downstream tasks. However, it was unclear if this "scaling law" observed in general NLP tasks also holds true for the unique domain of scientific text, which has its own distinct terminology, context, and writing style. This paper aims to empirically test this assumption by evaluating the impact of these scaling factors on scientific information extraction tasks.

Methods

The researchers introduce SCHOLARBERT, a new family of science-focused MLMs. They train these models using a RoBERTa-like pretraining procedure, which is known to improve upon BERT's performance. To investigate the impact of scaling, they systematically vary:

  • Model Size: They train models ranging from BERT-Large (~340M parameters) up to SCHOLARBERT-XL (770M parameters).
  • Training Data Size: They pretrain models on different subsets (1%, 10%, and 100%) of a large, multidisciplinary scientific corpus called the "Public Resource" dataset.
  • Pretraining and Finetuning Time: They evaluate models at various pretraining checkpoints and finetune them for different numbers of epochs.

They then evaluate these models on 12 scientific downstream tasks, including Named Entity Recognition (NER), relation extraction, and sentence classification.

Datasets

  • Pretraining Dataset: The core pretraining dataset is the Public Resource dataset, a collection of approximately 75 million scientific articles from various disciplines (biomedicine, technology, physical sciences, social sciences, arts & humanities). They create subsets of this data (PRD_1, PRD_10, PRD_100) for training. They also experimented with including the WikiBooks corpus.
  • Evaluation Datasets: The paper uses 12 existing scientific NLP datasets for evaluation, categorized into:
  • NER Tasks (8 datasets): BC5CDR, JNLPBA, SciERC, NCBI-Disease, ChemDNER, MatSciNER, ScienceExam, and Coleridge.
  • Sentence-level Tasks (4 datasets): ChemProt (relation extraction), SciERC (relation extraction), PaperField (sentence classification), and Battery (sentence classification).

Key Insights and Ideas

  • Diminishing Returns: The most striking finding is that simply increasing model size, pretraining data, or pretraining time doesn't consistently lead to significant performance improvements on scientific information extraction tasks. Gains are often marginal (less than 1% F1 score) or non-existent.
  • Task-Specific Sensitivity: The impact of scaling is highly dependent on the specific downstream task. For instance, larger model sizes showed consistent improvements only for relation extraction tasks, while NER and sentence classification tasks saw less benefit.
  • Finetuning Power: Finetuning appears to be a powerful mechanism that can compensate for potential gaps in domain-specific knowledge acquired during pretraining. Even models trained on less data or for shorter durations can achieve competitive results with sufficient finetuning.
  • Domain-Specific Pretraining Not Always Superior: Contrary to expectations, pretraining on a domain-specific corpus (like biomedical text) doesn't always guarantee better performance than pretraining on a broader scientific corpus or even a general corpus, especially when considering the power of finetuning.

Key Results

  • Model Size: Increasing model size from BERT-Base to BERT-Large, or SCHOLARBERT_1 to SCHOLARBERT-XL, often resulted in F1 score improvements of less than 1 percentage point across many tasks.
  • Data Size: SCHOLARBERT_1 (trained on 1% of the data) achieved F1 scores within 1 percentage point of SCHOLARBERT_100 (trained on 100% of the data) on 8 out of 12 tasks.
  • Pretraining Time: The performance gains from increasing pretraining iterations diminished significantly after around 10,000 iterations. The difference between a model trained for 33,000 iterations and one trained for fewer was often less than 1 percentage point after extensive finetuning.
  • Finetuning Time: While more finetuning generally helped, the gains from extended finetuning (e.g., 75 epochs vs. 5 epochs) were often small, especially for models that were already well-pre-trained.

Limitations and Future Work

  • Limited Datasets: The evaluation was conducted on 12 labeled datasets from only five domains, with a strong bias towards biomedicine. This limited scope might not fully capture the behavior of models across the entire scientific landscape.
  • Model Size vs. Scaling Laws: The largest model evaluated (SCHOLARBERT-XL at 770M parameters) might still be too small to fully observe the expected scaling laws for language models.
  • Corpus Saturation: For the SCHOLARBERT models, the authors hypothesize that the large pretraining corpus might have saturated even the largest models, limiting further gains from increased data size.
  • Future Work: The authors suggest extending experiments to other scientific NLP tasks beyond information extraction, such as question-answering and textual entailment. They also plan to investigate the impact of model size further, potentially with larger models. They are making their SCHOLARBERT models and a subset of the training data publicly available to encourage further research.

Summary updated

BibTeX
@inproceedings{hong2023diminishing,
  author = {Zhi Hong and Aswathy Ajith and J. Gregory Pauloski and Eamon Duede and Kyle Chard and Ian T. Foster},
  title = {{The Diminishing Returns of Masked Language Models to Science}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.82},
}
Figure