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

文本分类中前缀的鲁棒调整

On Robust Prefix-Tuning for Text Classification

Institute for AI Industry Research(人工智能产业研究院);Tsinghua University(清华大学)

Zonghan Yang, Yang Liu

摘要:

最近,前缀调整作为一种参数有效的微调方法,大规模预训练语言模型越来越受到关注。该方法保持预训练模型固定,只更新每个下游任务的前缀令牌参数。尽管是轻量级和模块化的,前缀调优仍然缺乏对文本对抗攻击的鲁棒性。然而,目前开发的大多数防御技术都需要辅助的模型更新和存储,这不可避免地阻碍了前缀调整的模块化和低存储。在这项工作中,我们提出了一个强大的前缀调整框架,保留了前缀调整的效率和模块化。我们的框架的核心思想是通过正确分类的训练数据作为额外前缀微调的标准,利用语言模型的逐层激活。在测试阶段,为每个批次调整一个额外的批次级前缀,并将其添加到原始前缀中以增强鲁棒性。在三个文本分类基准上进行的大量实验表明,我们的框架在几个强基线上大大提高了对五种不同类型的文本攻击的鲁棒性,同时在干净文本上保持了相当的准确性。我们也从最优控制的角度解释了我们的鲁棒前缀调整框架,并提出了未来研究的几个方向。

英文摘要:

Recently, prefix-tuning has gained increasing attention as a parameter-efficient finetuning method for large-scale pretrained language models. The method keeps the pretrained models fixed and only updates the prefix token parameters for each downstream task. Despite being lightweight and modular, prefix-tuning still lacks robustness to textual adversarial attacks. However, most currently developed defense techniques necessitate auxiliary model update and storage, which inevitably hamper the modularity and low storage of prefix-tuning. In this work, we propose a robust prefix-tuning framework that preserves the efficiency and modularity of prefix-tuning. The core idea of our framework is leveraging the layerwise activations of the language model by correctly-classified training data as the standard for additional prefix finetuning. During the test phase, an extra batch-level prefix is tuned for each batch and added to the original prefix for robustness enhancement. Extensive experiments on three text classification benchmarks show that our framework substantially improves robustness over several strong baselines against five textual attacks of different types while maintaining comparable accuracy on clean texts. We also interpret our robust prefix-tuning framework from the optimal control perspective and pose several directions for future research.

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

↑