Skip to main content
QUICK REVIEW

[Paper Review] Train No Evil: Selective Masking for Task-Guided Pre-Training

Yuxian Gu, Zhengyan Zhang|arXiv (Cornell University)|Apr 21, 2020
Topic ModelingComputer Science26 references5 citations
TL;DR

This paper proposes a three-stage training framework that inserts a task-guided pre-training stage with selective masking between general pre-training and fine-tuning. By identifying and masking task-critical tokens in in-domain data using a learned importance score, the method improves performance on sentiment analysis tasks with under 50% of the computation cost compared to standard pre-training.

ABSTRACT

Recently, pre-trained language models mostly follow the pre-train-then-fine-tuning paradigm and have achieved great performance on various downstream tasks. However, since the pre-training stage is typically task-agnostic and the fine-tuning stage usually suffers from insufficient supervised data, the models cannot always well capture the domain-specific and task-specific patterns. In this paper, we propose a three-stage framework by adding a task-guided pre-training stage with selective masking between general pre-training and fine-tuning. In this stage, the model is trained by masked language modeling on in-domain unsupervised data to learn domain-specific patterns and we propose a novel selective masking strategy to learn task-specific patterns. Specifically, we design a method to measure the importance of each token in sequences and selectively mask the important tokens. Experimental results on two sentiment analysis tasks show that our method can achieve comparable or even better performance with less than 50% of computation cost, which indicates our method is both effective and efficient. The source code of this paper can be obtained from https://github.com/thunlp/SelectiveMasking.

Motivation & Objective

  • Address the limitation of task-agnostic pre-training and data-scarce fine-tuning in pre-trained language models.
  • Improve model performance on downstream tasks by capturing domain-specific and task-specific patterns during pre-training.
  • Reduce computational cost by focusing pre-training on semantically important tokens rather than random masking.
  • Develop a selective masking strategy that leverages downstream task data to guide in-domain pre-training without requiring full supervision on in-domain data.

Proposed method

  • Introduce a three-stage training framework: general pre-training, task-guided pre-training with selective masking, and fine-tuning.
  • Use in-domain unsupervised data (e.g., Yelp reviews) for task-guided pre-training to learn domain-specific patterns.
  • Define a task-specific importance score for each token using supervised downstream data to identify critical tokens.
  • Train a neural network on downstream data to learn implicit token-selection rules, enabling unsupervised selection of important tokens on in-domain data.
  • Apply selective masking during masked language modeling: only mask tokens with low importance scores, focusing on learning from critical tokens.
  • Use the learned importance model to guide masking in mid-scale in-domain data, avoiding reliance on full supervision during pre-training.

Experimental results

Research questions

  • RQ1Can task-guided pre-training with selective masking improve downstream performance compared to standard pre-train-then-fine-tune?
  • RQ2Does selective masking of important tokens lead to better model efficiency and effectiveness than random masking?
  • RQ3How does the similarity between in-domain data and downstream task data affect the performance of task-guided pre-training?
  • RQ4Can a model trained on limited supervised data learn to identify important tokens that generalize to unsupervised in-domain data?

Key findings

  • The proposed method achieves comparable or better performance than standard pre-training with less than 50% of the computation cost.
  • On the SemEval14-Rest + Yelp setting, the model outperforms fully pre-trained BERT_BASE by 1.4% with only half the training steps.
  • Selective masking consistently improves performance over random masking across all settings, including when domain data is less similar to the downstream task.
  • In the MR+Yelp setting, where domain mismatch is high, the model still improves by 0.95% over random masking, indicating robustness to domain shift.
  • The case study confirms that the method successfully identifies sentiment-critical tokens (e.g., 'funny', 'awsum', 'like') in both supervised and unsupervised data.
  • Task-guided pre-training with selective masking leads to statistically significant improvements (p < .05 or p < .001) in 3 out of 4 settings compared to full pre-training without task guidance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.