arXiv:2504.10957cs.LG2025-04ICLR被引 42

首次理论证明任务向量在非线性Transformer中何时有效,解释了模型编辑的原理。

When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformers

  • 通过理论分析揭示任务向量加法可同时学习无关或对齐任务
  • 证明任务否定能成功消除无关或矛盾任务的遗忘效果
  • 给出系数选择准则,确保模型在域外任务上泛化性能

任务算术指通过加权求和任务向量来编辑预训练模型,每个任务向量是预训练模型到特定任务微调模型的权重更新。该方法因计算高效而受到关注,适用于多任务学习、遗忘和域外泛化等场景。然而,由于基于Transformer的模型训练高度非凸,其理论理解仍有限。本文首次为非线性Transformer上的任务向量方法提供了泛化保证的理论刻画。我们考虑一个概念学习设定,其中每个任务是基于判别性模式的二分类问题。理论上证明:任务加法可同时学习一组无关或对齐的任务;任务否定可成功从无关或矛盾任务中实现遗忘。此外,我们证明了合理选择线性系数可保证对域外任务的泛化能力。所有理论结果均适用于密集参数及其低秩近似。尽管建立在概念设定下,我们的发现已在使用大语言模型Phi-1.5(1.3B)的实用机器遗忘任务中得到验证。

原文摘要 · Abstract (English)

Task arithmetic refers to editing the pre-trained model by adding a weighted sum of task vectors, each of which is the weight update from the pre-trained model to fine-tuned models for certain tasks. This approach recently gained attention as a computationally efficient inference method for model editing, e.g., multi-task learning, forgetting, and out-of-domain generalization capabilities. However, the theoretical understanding of why task vectors can execute various conceptual operations remains limited, due to the highly non-convexity of training Transformer-based models. To the best of our knowledge, this paper provides the first theoretical characterization of the generalization guarantees of task vector methods on nonlinear Transformers. We consider a conceptual learning setting, where each task is a binary classification problem based on a discriminative pattern. We theoretically prove the effectiveness of task addition in simultaneously learning a set of irrelevant or aligned tasks, as well as the success of task negation in unlearning one task from irrelevant or contradictory tasks. Moreover, we prove the proper selection of linear coefficients for task arithmetic to achieve guaranteed generalization to out-of-domain tasks. All of our theoretical results hold for both dense-weight parameters and their low-rank approximations. Although established in a conceptual setting, our theoretical findings were validated on a practical machine unlearning task using the large language model Phi-1.5 (1.3B).

模型编辑任务向量Transformer理论分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。