Plug-and-play functionality allows deep learning models to adapt well to different tasks without requiring any parameters modified. Recently, prefix-tuning was shown to be a plug-and-play method on various text generation tasks by simply inserting corresponding continuous vectors into the inputs. However, sequence labeling tasks invalidate existing plug-and-play methods since different label sets demand changes to the architecture of the model classifier. In this work, we propose the use of label word prediction instead of classification to totally reuse the architecture of pre-trained models for sequence labeling tasks. Specifically, for each task, a label word set is first constructed by selecting a high-frequency word for each class respectively, and then, task-specific vectors are inserted into the inputs and optimized to manipulate the model predictions towards the corresponding label words. As a result, by simply switching the plugin vectors on the input, a frozen pre-trained language model is allowed to perform different tasks. Experimental results on three sequence labeling tasks show that the performance of the proposed method can achieve comparable performance with standard fine-tuning with only 0.1\% task-specific parameters. In addition, our method is up to 70 times faster than non-plug-and-play methods while switching different tasks under the resource-constrained scenario.
翻译:插件和游戏功能让深层次学习模型能够适应不同任务,而不需要修改任何参数。 最近, 前缀调整被显示为各种文本生成任务的一种插件和播放方法, 只需在输入中插入相应的连续矢量即可。 然而, 序列标签任务使现有的插件和播放方法无效, 因为不同的标签对模型分类器的架构设置了需求变化。 在这项工作中, 我们提议使用标签单词预测, 而不是分类, 完全再利用预先培训的序列标签任务结构。 具体地说, 每个任务中, 首先为每个任务选择一个高频单词, 然后将特定任务矢量添加到输入中, 优化到将模型预测操作到相应的标签字数上。 结果, 只需在输入中切换插件矢量, 一个冻结的预先培训语言模型就可以执行不同的任务。 三个序列标签任务中的实验结果显示, 拟议的方法的性能可以达到可比的性能, 只有0. 1 ⁇ 任务特定参数。 此外, 我们的方法在转换资源配置过程中, 将快速地转换为70 。