arXiv:2501.15065cs.LGcs.AI2025-01被引 15

提出新方法解决多任务模型合并时的知识冲突问题。

Task Arithmetic in Trust Region: A Training-Free Model Merging Approach to Navigate Knowledge Conflicts

  • 在信任区域约束下进行参数合并,避免任务间干扰。
  • 在8个数据集上显著提升多种合并方法的多任务性能。
  • 无需训练,可直接集成到现有合并方法中使用。

多任务模型合并为整合多个微调模型的知识提供了高效方案,缓解了多任务训练带来的巨大计算与存储开销。作为该领域关键方法,任务算术(TA)通过在参数空间中减去预训练模型(θ_pre)与微调任务模型的差异,定义任务向量,并调整任务向量与θ_pre之间的权重以平衡通用与特定知识。尽管TA表现良好,但不同任务间仍可能产生知识冲突,尤其当各任务需要不同模型适配时。本文将此现象正式定义为知识冲突,表现为某任务在与其他任务模型合并后性能下降。深入分析表明,冲突主要源于任务向量中与θ_pre处任务损失梯度方向对齐的分量。为此,我们提出任务算术在信任区域(TATR)方法,将信任区域定义为在参数空间中仅引起任务损失微小变化的维度(对应于梯度正交方向的任务向量分量),并将参数合并限制在此区域内,从而有效缓解知识冲突。此外,TATR既可独立使用,也可作为即插即用模块兼容多种基于TA的方法。在八个不同数据集上的大量实验验证了其有效性,显著提升了多种基于TA的模型合并方法的多任务性能。

原文摘要 · Abstract (English)

Multi-task model merging offers an efficient solution for integrating knowledge from multiple fine-tuned models, mitigating the significant computational and storage demands associated with multi-task training. As a key technique in this field, Task Arithmetic (TA) defines task vectors by subtracting the pre-trained model ($θ_{\text{pre}}$) from the fine-tuned task models in parameter space, then adjusting the weight between these task vectors and $θ_{\text{pre}}$ to balance task-generalized and task-specific knowledge. Despite the promising performance of TA, conflicts can arise among the task vectors, particularly when different tasks require distinct model adaptations. In this paper, we formally define this issue as knowledge conflicts, characterized by the performance degradation of one task after merging with a model fine-tuned for another task. Through in-depth analysis, we show that these conflicts stem primarily from the components of task vectors that align with the gradient of task-specific losses at $θ_{\text{pre}}$. To address this, we propose Task Arithmetic in Trust Region (TATR), which defines the trust region as dimensions in the model parameter space that cause only small changes (corresponding to the task vector components with gradient orthogonal direction) in the task-specific losses. Restricting parameter merging within this trust region, TATR can effectively alleviate knowledge conflicts. Moreover, TATR serves as both an independent approach and a plug-and-play module compatible with a wide range of TA-based methods. Extensive empirical evaluations on eight distinct datasets robustly demonstrate that TATR improves the multi-task performance of several TA-based model merging methods by an observable margin.

模型合并多任务学习知识冲突信任区域

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