arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.10041cs.CLcs.AIcs.LG
收藏

预训练语言模型的隐态变化可以指导迁移学习的计算缩减

Hidden State Variability of Pretrained Language Models Can Guide Computation Reduction for Transfer Learning

University of Chicago(芝加哥大学);Toyota Technological Institute at Chicago(芝加哥丰田技术研究所);University of Michigan(密歇根大学);Johns Hopkins University(约翰斯·霍普金斯大学)

Shuo Xie, Jiahao Qiu, Ankita Pasad, Li Du, Qing Qu, Hongyuan Mei

摘要:

在传输预训练的语言模型时,常见的方法通常将其特定于任务的分类器附加到顶层并适应所有预训练的层。我们研究是否可以进行特定于任务的选择,以适应层的子集,并在哪里放置分类。目标是在不牺牲性能的情况下降低迁移学习方法(例如微调或自适应调整)的计算成本。我们建议选择层的基础上的变化,其隐藏状态给定的特定任务的语料库。如果一个层的隐藏状态的类内可变性相对于类间可变性来说是低的,那么我们说这个层在任务中已经是"良好专用化的"。我们的可变性度量计算起来很便宜,不需要任何训练或超参数调整。它对数据不平衡和数据稀缺具有鲁棒性。在GLUE基准测试上进行的大量实验表明,根据我们的指标选择层可以产生比使用相同数量的顶层更强的性能,并且通常与微调或适配器调整整个语言模型的性能相匹配。

英文摘要:

While transferring a pretrained language model, common approaches conventionally attach their task-specific classifiers to the top layer and adapt all the pretrained layers. We investigate whether one could make a task-specific selection on which subset of the layers to adapt and where to place the classifier. The goal is to reduce the computation cost of transfer learning methods (e.g. fine-tuning or adapter-tuning) without sacrificing its performance. We propose to select layers based on the variability of their hidden states given a task-specific corpus. We say a layer is already "well-specialized" in a task if the within-class variability of its hidden states is low relative to the between-class variability. Our variability metric is cheap to compute and doesn't need any training or hyperparameter tuning. It is robust to data imbalance and data scarcity. Extensive experiments on the GLUE benchmark demonstrate that selecting layers based on our metric can yield significantly stronger performance than using the same number of top layers and often match the performance of fine-tuning or adapter-tuning the entire language model.

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

↑