论文标题
用任务算术编辑模型
Editing Models with Task Arithmetic
论文作者
论文摘要
改变预训练的模型的行为方式 - 例如,在开发机器学习系统时,是一种普遍的做法,例如,改善其在下游任务或减轻偏见的表现。在这项工作中,我们提出了一个新的范式来指导神经网络的行为,以\ textit {task vectors}为中心。任务向量指定了预训练模型的重量空间中的方向,以便在该方向上移动可以提高任务的性能。我们通过对任务进行微调后从同一模型的权重中减去预训练模型的权重来构建任务向量。我们表明,这些任务向量可以通过算术操作(例如否定和添加)进行修改并组合在一起,并相应地转向所得模型的行为。否定任务向量会降低目标任务的性能,而控制任务的模型行为几乎没有变化。此外,将任务向量加在一起可以立即提高多个任务的性能。最后,当任务与形式的类比关系链接在一起``a a at to b at a c c to d''c in to d''时,将三个任务的任务向量结合起来可以提高第四个任务的性能,即使没有第四任务的数据用于培训。总体而言,我们的实验,我们的实验与多个模型,模式和任务表明该任务是一种简单的模型,并表明了一个简单的模型,并且有效地有效。
Changing how pre-trained models behave -- e.g., improving their performance on a downstream task or mitigating biases learned during pre-training -- is a common practice when developing machine learning systems. In this work, we propose a new paradigm for steering the behavior of neural networks, centered around \textit{task vectors}. A task vector specifies a direction in the weight space of a pre-trained model, such that movement in that direction improves performance on the task. We build task vectors by subtracting the weights of a pre-trained model from the weights of the same model after fine-tuning on a task. We show that these task vectors can be modified and combined together through arithmetic operations such as negation and addition, and the behavior of the resulting model is steered accordingly. Negating a task vector decreases performance on the target task, with little change in model behavior on control tasks. Moreover, adding task vectors together can improve performance on multiple tasks at once. Finally, when tasks are linked by an analogy relationship of the form ``A is to B as C is to D", combining task vectors from three of the tasks can improve performance on the fourth, even when no data from the fourth task is used for training. Overall, our experiments with several models, modalities and tasks show that task arithmetic is a simple, efficient and effective way of editing models.