[论文解读] Train No Evil: Selective Masking for Task-Guided Pre-Training
本文提出一种三阶段训练框架,在通用预训练和微调之间插入一个任务引导的预训练阶段,并采用选择性掩码。通过使用学习到的重要程度分数识别并掩码领域内数据中的任务关键标记,该方法在计算成本低于标准预训练50%的情况下,提升了情感分析任务的性能。
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.
研究动机与目标
- 解决预训练任务无关性以及预训练语言模型在数据稀缺情况下的微调局限性。
- 通过在预训练阶段捕捉领域特定和任务特定的模式,提升模型在下游任务上的性能。
- 通过仅聚焦于语义重要标记而非随机掩码,减少计算成本。
- 开发一种选择性掩码策略,利用下游任务数据指导领域内预训练,而无需在领域内数据上进行完整监督。
提出的方法
- 引入三阶段训练框架:通用预训练、带选择性掩码的任务引导预训练,以及微调。
- 使用领域内无监督数据(如Yelp评论)进行任务引导预训练,以学习领域特定模式。
- 利用下游任务的监督数据为每个标记定义任务特定的重要性分数,以识别关键标记。
- 在下游数据上训练神经网络,以学习隐式的标记选择规则,从而在领域内数据上实现无监督的重要标记选择。
- 在掩码语言建模过程中应用选择性掩码:仅掩码重要程度分数较低的标记,集中学习关键标记的信息。
- 使用学习到的重要程度模型指导中等规模领域内数据的掩码,避免在预训练过程中依赖完整监督。
实验结果
研究问题
- RQ1与标准的预训练-微调方法相比,采用选择性掩码的任务引导预训练是否能提升下游性能?
- RQ2对关键标记进行选择性掩码是否比随机掩码带来更高的模型效率与效果?
- RQ3领域内数据与下游任务数据之间的相似性如何影响任务引导预训练的性能?
- RQ4在有限监督数据上训练的模型是否能学习到识别重要标记的能力,并泛化到无监督的领域内数据?
主要发现
- 所提方法在计算成本低于标准预训练50%的情况下,实现了相当或更优的性能。
- 在SemEval14-Rest + Yelp设置下,模型在仅使用一半训练步数的情况下,性能优于完全预训练的BERT_BASE,准确率高出1.4%。
- 在所有设置中,选择性掩码均持续优于随机掩码,即使领域数据与下游任务不相似时也是如此。
- 在MR+Yelp设置下(领域不匹配程度高),模型仍比随机掩码高出0.95%,表明对领域偏移具有鲁棒性。
- 案例研究证实,该方法能成功识别出在监督和无监督数据中均具有情感关键性的标记(如'funny'、'awsum'、'like')。
- 与无任务引导的完全预训练相比,任务引导预训练结合选择性掩码在4个设置中的3个中实现了统计上显著的性能提升(p < .05 或 p < .001)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。