arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1911.03090cs.CL
收藏

艾尔莎会怎么做?Transformer微调过程中的冻结层

What Would Elsa Do? Freezing Layers During Transformer Fine-Tuning

University of Waterloo(滑铁卢大学)

Jaejun Lee, Raphael Tang, Jimmy Lin

摘要:

预训练的基于transformer的语言模型已经在自然语言处理的无数任务中达到了最先进的水平。这些模型具有高度的表现力,至少包含一亿个参数和十几个层。最近的证据表明,只有少数最终层需要进行微调,以实现下游任务的高质量。自然,随后的研究问题是,“我们需要微调最后几层?“在本文中,我们确切地回答了这个问题。我们研究了两个最近的预训练语言模型,BERT和RoBERTa,在文本蕴涵,语义相似性,情感分析和语言可接受性的标准任务。我们改变微调的最终层的数量,然后研究特定任务有效性的变化。我们发现,只有四分之一的最终层需要微调,以实现90%的原始质量。令人惊讶的是,我们还发现微调所有层并不总是有帮助。

英文摘要:

Pretrained transformer-based language models have achieved state of the art across countless tasks in natural language processing. These models are highly expressive, comprising at least a hundred million parameters and a dozen layers. Recent evidence suggests that only a few of the final layers need to be fine-tuned for high quality on downstream tasks. Naturally, a subsequent research question is, "how many of the last layers do we need to fine-tune?" In this paper, we precisely answer this question. We examine two recent pretrained language models, BERT and RoBERTa, across standard tasks in textual entailment, semantic similarity, sentiment analysis, and linguistic acceptability. We vary the number of final layers that are fine-tuned, then study the resulting change in task-specific effectiveness. We show that only a fourth of the final layers need to be fine-tuned to achieve 90% of the original quality. Surprisingly, we also find that fine-tuning all layers does not always help.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑