When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformers
Hongkang Li, Yihua Zhang, Shuai Zhang, Pin-Yu Chen, Sijia Liu, Meng Wang
Abstract
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 Transformerbased 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 denseweight 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).
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
16 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Attesting Model Lineage by Consisted Knowledge Evolution with Fine-Tuning Trajectory cites LoRA: Low-Rank Adaptation of Large Language Models
- CoT Vectors: Transferring and Probing the Reasoning Mechanisms of LLMs cites LoRA: Low-Rank Adaptation of Large Language Models
- CoT Vectors: Transferring and Probing the Reasoning Mechanisms of LLMs cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- ICM-Fusion: In-Context Meta-Optimized LoRA Fusion for Multi-Task Adaptation cites LoRA: Low-Rank Adaptation of Large Language Models
- ICM-Fusion: In-Context Meta-Optimized LoRA Fusion for Multi-Task Adaptation cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Finetuned Language Models are Zero-Shot Learners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- FlyLoRA: Boosting Task Decoupling and Parameter Efficiency via Implicit Rank-Wise Mixture-of-Experts cites LoRA: Low-Rank Adaptation of Large Language Models
Cited by top-tier papers16
- FlyLoRA: Boosting Task Decoupling and Parameter Efficiency via Implicit Rank-Wise Mixture-of-ExpertsHeming Zou, Yunliang Zang, Wutong Xu, Yao Zhu et al.NeurIPS 2025 · 38 citations
- Neural Collapse in Multi-Task LearningYoujun Wang, Boqi Li, Xin Zou, Weiwei LiuICLR 2026 · 16 citations
- ICM-Fusion: In-Context Meta-Optimized LoRA Fusion for Multi-Task AdaptationYihua Shao, Xiaofeng Lin, Xinwei Long, Siyu Chen et al.AAAI 2026 · 8 citations
- Attesting Model Lineage by Consisted Knowledge Evolution with Fine-Tuning TrajectoryZhuoyi Shang, Jiasen Li, Pengzhen Chen, Yanwei Liu et al.USENIX Security 2026 · 4 citations
- CoT Vectors: Transferring and Probing the Reasoning Mechanisms of LLMsLi Li, Ziyi Wang, Yongliang Wu, Jianfei Cai et al.ICLR 2026 · 4 citations
Builds on50
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 citations
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs et al.ICML 2022 · 1,464 citations
Related papers
- Mastering Task Arithmetic: τJp as a Key Indicator for Weight DisentanglementKotaro Yoshida, Yuji Naraki, Takafumi Horie, Ryosuke Yamaki et al.ICLR 2025
- Editing models with task arithmeticGabriel Ilharco, Marco Túlio Ribeiro, Mitchell Wortsman, Ludwig Schmidt et al.ICLR 2023 · 31 citations
- Task Arithmetic in the Tangent Space: Improved Editing of Pre-Trained ModelsGuillermo Ortiz-Jiménez, Alessandro Favero, Pascal FrossardNeurIPS 2023 · 272 citations
- Efficient Model Editing with Task-Localized Sparse Fine-tuningLeonardo Iurada, Marco Ciccone, Tatiana TommasiICLR 2025
- NegMerge: Sign-Consensual Weight Merging for Machine UnlearningHyoseo Kim, Dongyoon Han, Junsuk ChoeICML 2025
