HyPe: Better Pre-trained Language Model Fine-tuning with Hidden Representation Perturbation

38675

Authors

nan

Abstract

AbstractLanguage models with the Transformers structure have shown great performance in natural language processing. However, there still poses problems when fine-tuning pre-trained language models on downstream tasks, such as over-fitting or representation collapse. In this work, we propose HyPe, a simple yet effective fine-tuning technique to alleviate such problems by perturbing hidden representations of Transformers layers. Unlike previous works that only add noise to inputs or parameters, we argue that the hidden representations of Transformers layers convey more diverse and meaningful language information. Therefore, making the Transformers layers more robust to hidden representation perturbations can further benefit the fine-tuning of PLMs en bloc. We conduct extensive experiments and analyses on GLUE and other natural language inference datasets. Results demonstrate that HyPe outperforms vanilla fine-tuning and enhances generalization of hidden representations from different layers. In addition, HyPe acquires negligible computational overheads, and is better than and compatible with previous state-of-the-art fine-tuning techniques.

Keywords

nan

Full Content

Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers, pages 3246–3264 July 9-14, 2023 ©2023 Association for Computational Linguistics HyPe: Better Pre-trained Language Model Fine-tuning with Hidden Representation Perturbation Hongyi Yuan12∗, Zheng Yuan2, Chuanqi Tan2, Fei Huang2, Songfang Huang2 1Tsinghua University, 2Alibaba Group yuanhy20@mails.tsinghua.edu.cn {yuanzheng.yuanzhen,chuanqi.tcq,f.huang,songfang.hsf}@alibaba-inc.com Abstract Language models with the Transformers struc- ture have shown great performance in natu- ral language processing. However, there still poses problems when fine-tuning pre-trained language models on downstream tasks, such as over-fitting or representation collapse. In this work, we propose HyPe, a simple yet ef- fective fine-tuning technique to alleviate such problems by perturbing hidden representations of Transformers layers. Unlike previous works that only add noise to inputs or parameters, we argue that the hidden representations of Transformers layers convey more diverse and meaningful language information. Therefore, making the Transformers layers more robust to hidden representation perturbations can fur- ther benefit the fine-tuning of PLMs en bloc. We conduct extensive experiments and analy- ses on GLUE and other natural language infer- ence datasets. Results demonstrate that HyPe outperforms vanilla fine-tuning and enhances generalization of hidden representations from different layers. In addition, HyPe acquires neg- ligible computational overheads, and is better than and compatible with previous state-of-the- art fine-tuning techniques. Codes are released at https://github.com/Yuanhy1997/HyPe. 1 Introduction Pretrain-then-finetune has become the mainstream paradigm in recent natural language processing (NLP) practices, and there emerges various pre- trained language models (PLMs) such as BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019), and XLNet (Yang et al., 2019). Vanilla PLM fine- tuning with common strategies (e.g., dropout (Sri- vastava et al., 2014) and AdamW (Loshchilov and Hutter, 2019)) can empower PLMs with excellent downstream performance. However, vanilla fine- tuned PLMs acquire performances with large vari- ances on the downstream tasks (Dodge et al., 2020). ∗ Work done at Alibaba DAMO Academy. Figure 1: The overview of proposed HyPe fine-tuning technique. The random noise is added to the hidden representations fed into each Transformers layer in the forward computation of PLMs. Such unstable performances may results from over- fitting or representation collapse (Aghajanyan et al., 2021). These problems can be aggravated in low- resource scenarios (Zhang et al., 2021). In recent literature, effective fine-tuning tech- niques have been proposed to improve the perfor- mance and generalization (transferability) of fine- tuned PLMs (Jiang et al., 2020; Lee et al., 2020; Chen et al., 2020). Besides other explicit regular- ization, adding noise is a widely-used strategy to smoothen the optimization landscape and mitigate over-fitting. For example, some works apply the perturbation to pre-trained parameter weights (e.g., NoisyTune (Wu et al., 2022)), input embedding features (e.g., R3F (Aghajanyan et al., 2021)) or gradients (e.g., ChildTuning (Xu et al., 2021)) dur- ing the fine-tuning process. Injecting noise to input features is a conven- tional technique for generalization and can be seen as implicit parameter regularization (Bishop, 1995). Common PLMs are stacked basic neural network layers (i.e., Transformer layers (Vaswani et al., 2017)), and previous …

Content truncated to 500 words

Labeled Text

AbstractLanguage models with the Transformers structure have shown great performance in natural language processing. However, there still poses problems when fine-tuning pre-trained language models on downstream tasks, such as over-fitting or representation collapse. In this work, we propose HyPe, a simple yet effective fine-tuning technique to alleviate such problems by perturbing hidden representations of Transformers layers. Unlike previous works that only add noise to inputs or parameters, we argue that the hidden representations of Transformers layers convey more diverse and meaningful language information. Therefore, making the Transformers layers more robust to hidden representation perturbations can further benefit the fine-tuning of PLMs en bloc. We conduct extensive experiments and analyses on GLUE and other natural language inference datasets. Results demonstrate that HyPe outperforms vanilla fine-tuning and enhances generalization of hidden representations from different layers. In addition, HyPe acquires negligible computational overheads, and is better than and compatible with previous state-of-the-art fine-tuning techniques.

Publication Details

Paper ID:
38675
Year:
2023
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan