Pre-train or Annotate? Domain Adaptation with a Constrained Budget

Fan Bai, Alan Ritter, Wei Xu

Abstract

NLP practitioners often face a critical trade-off when adapting models to specialized domains: should limited funds be spent on hiring human annotators or on computational resources for domain-specific pre-training? This paper frames this dilemma as a microeconomic "consumer choice" problem. Through empirical studies on procedural text, the authors demonstrate that while human annotation is superior for small budgets, a hybrid approach involving pre-training becomes more cost-effective once a specific budget threshold—the "crossover point"—is reached.

Introduction

In the current landscape of foundation models, the prevailing wisdom often suggests that "more pre-training is better." However, for many organizations, budgets are finite. Scientific and technical domains require expensive expert annotation, while pre-training domain-specific models like BERT-base or RoBERTa incurs significant GPU/TPU costs. This research addresses the reality of a constrained budget, seeking the optimal balance between these two investments to maximize model performance (F1 score).

A Microeconomic Framework for NLP

The authors treat the NLP practitioner as a consumer aiming to maximize a utility function—the model's F1 score—subject to a linear budget constraint: $$X_a C_a + X_p C_p \le B$$ where $X_a$ and $X_p$ are the quantities of annotated sentences and pre-training hours, with $C_a$ and $C_p$ being their respective unit costs.

Conceptual framework illustrating the trade-off between annotation and pre-training under a fixed budget.

To ground this theory, the researchers calculated real-world costs. They hired students at $13/hr for annotation to determine $C_a$ and tracked Google Cloud TPU rental fees for $C_p$.

Methodology and Datasets

The study focused on procedural text, such as experimental protocols and chemical synthesis.

  • Models: The authors developed ProcBERT (trained from scratch) and Proc-RoBERTa (continued pre-training) using the PROCEDURE+ corpus, a 12-billion-word collection of scientific articles, patents, and recipes.
  • Benchmarks: Evaluation was performed on three datasets: WLP (Wet Lab Protocols), PubMedM&M (Biology Materials and Methods), and ChemSyn (Chemical Synthesis patents).
  • Technique: They utilized "EasyAdapt," a feature-augmentation method that enables models to leverage both source-domain and target-domain data effectively.

Key Findings: The Crossover Point

The most significant result is the identification of a financial threshold where the strategy shifts. For budgets below approximately $800, the optimal strategy is to use an off-the-shelf model (like BERT-large) and spend the entire budget on human labels. Beyond this point, the "investment" in a domain-specific backbone like ProcBERT begins to yield higher marginal returns than additional labels.

F1 performance vs. total budget for domain adaptation tasks. The dashed line (ProcBERT) crosses the solid line (BERT) as the budget increases, indicating the point where pre-training becomes more efficient.

For example, in the ChemSyn domain with a $2,300 budget, the hybrid strategy (Pre-train + Annotate) achieved an F1 of 95.17, outperforming the annotation-only strategy (94.81 F1).

Why Pre-training Helps

Analysis of model errors revealed that human annotation is highly effective for mastering entities already seen in the training set. In contrast, domain-specific pre-training significantly enhances the model's ability to generalize to unseen entities. Furthermore, pre-training costs can be amortized across multiple downstream tasks (e.g., NER and Relation Extraction) within the same domain, further increasing its economic viability for large-scale projects.

Conclusion

This work provides a practical roadmap for budget allocation in domain adaptation. While human expertise is irreplaceable for low-budget scenarios, the diminishing returns of annotation eventually make computational investment the superior choice. The authors also highlight the environmental cost, noting that training ProcBERT emitted roughly 87kg of CO2, emphasizing that economic and environmental efficiency often go hand-in-hand.

Summary updated

BibTeX
@inproceedings{bai2021pre,
  author = {Fan Bai and Alan Ritter and Wei Xu},
  title = {{Pre-train or Annotate? Domain Adaptation with a Constrained Budget}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.409},
}
Figure