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

LayerNorm:参数高效微调中的一个关键组件

LayerNorm: A key component in parameter-efficient fine-tuning

Drexel University(德雷塞尔大学);School of Biomedical Engineering(生物医学工程学院)

Taha ValizadehAslani, Hualou Liang

AI总结:

本文分析 BERT 微调中变化最大的组件,发现输出 LayerNorm 最为关键,并证明仅微调 LayerNorm 或其一小部分即可在 GLUE 任务上达到与全量微调相当的性能。

摘要:

微调预训练模型(例如来自 Transformer 的双向编码器表示(BERT))已被证明是解决许多自然语言处理(NLP)任务的有效方法。然而,由于包括 BERT 在内的许多最先进 NLP 模型具有大量参数,微调过程的计算成本很高。针对这一问题,一个有吸引力的解决方案是参数高效微调,即仅修改模型的最小部分而保持其余部分不变。然而,目前仍不清楚 BERT 模型的哪一部分对微调至关重要。在本文中,我们首先分析 BERT 模型中的不同组件,以确定哪一个组件在微调后发生最显著的变化。我们发现,针对不同的通用语言理解评估(GLUE)任务进行微调时,输出 LayerNorm 的变化比任何其他组件都更大。随后我们表明,仅微调 LayerNorm 就可以达到与全量微调以及其他参数高效微调方法相当、在某些情况下甚至更好的性能。此外,我们使用 Fisher 信息来确定 LayerNorm 中最关键的子集,并证明 GLUE 基准中的许多 NLP 任务可以通过仅微调 LayerNorm 的一小部分来解决,且性能下降可以忽略不计。

英文摘要:

Fine-tuning a pre-trained model, such as Bidirectional Encoder Representations from Transformers (BERT), has been proven to be an effective method for solving many natural language processing (NLP) tasks. However, due to the large number of parameters in many state-of-the-art NLP models, including BERT, the process of fine-tuning is computationally expensive. One attractive solution to this issue is parameter-efficient fine-tuning, which involves modifying only a minimal segment of the model while keeping the remainder unchanged. Yet, it remains unclear which segment of the BERT model is crucial for fine-tuning. In this paper, we first analyze different components in the BERT model to pinpoint which one undergoes the most significant changes after fine-tuning. We find that output LayerNorm changes more than any other components when fine-tuned for different General Language Understanding Evaluation (GLUE) tasks. Then we show that only fine-tuning the LayerNorm can reach comparable, or in some cases better, performance to full fine-tuning and other parameter-efficient fine-tuning methods. Moreover, we use Fisher information to determine the most critical subset of LayerNorm and demonstrate that many NLP tasks in the GLUE benchmark can be solved by fine-tuning only a small portion of LayerNorm with negligible performance degradation.

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

↑