Fine-tuning pretrained language models (PLMs) on downstream tasks has become common practice in natural language processing. However, most of the PLMs are vulnerable, e.g., they are brittle under adversarial attacks or imbalanced data, which hinders the application of the PLMs on some downstream tasks, especially in safe-critical scenarios. In this paper, we propose a simple yet effective fine-tuning method called Match-Tuning to force the PLMs to be more robust. For each instance in a batch, we involve other instances in the same batch to interact with it. To be specific, regarding the instances with other labels as a perturbation, Match-Tuning makes the model more robust to noise at the beginning of training. While nearing the end, Match-Tuning focuses more on performing an interpolation among the instances with the same label for better generalization. Extensive experiments on various tasks in GLUE benchmark show that Match-Tuning consistently outperforms the vanilla fine-tuning by $1.64$ scores. Moreover, Match-Tuning exhibits remarkable robustness to adversarial attacks and data imbalance.
翻译:关于下游任务的微调预先培训语言模型(PLM)已成为自然语言处理的常见做法,但是,大多数PLM是脆弱的,例如,在对抗性攻击或不平衡的数据下,这些模型是易碎的,这妨碍了PLM在一些下游任务中应用PLM,特别是在安全危急的情况下。在本文中,我们建议了一种简单而有效的微调方法,称为Match-Turning,以迫使PLMS更加稳健。在每一批中,我们涉及同一批中的其他案例,以便与之互动。具体地说,关于以其他标签作为扰动的例子,Match-Turning使模型在培训开始时对噪音更加稳健。在接近尾端时,Match-Turning更注重于用同一标签对各种案例进行内插,以更好地概括化。GLUE基准中各项任务的广泛实验表明,Match-Turing始终比香草微调得1.64美元分。此外,Match-Tuning显示,在对抗性攻击和数据不平衡方面表现得相当稳健。