arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.06091cs.LGcs.AIcs.SIstat.ML
收藏

基于梯度的任务亲和度估计实现可扩展多任务学习

Scalable Multitask Learning Using Gradient-based Estimation of Task Affinity

Northeastern University(东北大学);Google(谷歌公司)

Dongyue Li, Aneesh Sharma, Hongyang R. Zhang

AI总结:

本文提出 Grad-TAG 算法,通过训练基础模型并结合梯度线性化技术高效估计任务亲和度,避免反复训练,在多个数据集上以极低计算成本实现了接近真实值的亲和度估计和任务聚类。

摘要:

多任务学习是一种广泛使用的范式,用于在多样化任务上训练模型,其应用范围从图神经网络到语言模型微调。由于任务之间可能相互干扰,建模它们之间关系的一个关键概念是任务亲和度。这包括在任务对之间计算的成对任务亲和度,以及在任务子集之间计算的高阶亲和度。朴素地计算其中任何一种都需要在来自各种任务组合的数据上反复训练,这在计算上是昂贵的。我们提出了一种新算法 Grad-TAG,它可以在无需这种反复训练的情况下估计任务亲和度。\nGrad-TAG 的核心思想是为所有任务训练一个“基础”模型,然后使用线性化技术来估计模型在特定任务组合上的损失。该线性化方法通过计算基于梯度的损失近似来工作,使用梯度的低维投影作为逻辑回归中的特征来预测任务组合的标签。我们证明,当基于梯度的近似准确时,线性化模型可以可证明地近似损失,并且还在多个大型模型上进行了实证验证。然后,给定估计出的任务亲和度,我们设计了一个半定规划,通过最大化簇的平均密度来对相似任务进行聚类。\n我们在七个数据集上评估了 Grad-TAG 的性能,包括图上的多标签分类和语言模型的指令微调。我们的任务亲和度估计与真实亲和度的距离在 2.7% 以内,而只需要完整训练中 3% 的 FLOPs。在我们最大的具有 2100 万条边和 500 个标注任务的图上,我们的算法仅使用 112 个 GPU 小时就提供了与真实亲和度距离在 5% 以内的估计。我们的结果表明,与现有方法相比,Grad-TAG 在性能和运行时间权衡方面取得了优异的表现。

英文摘要:

Multitask learning is a widely used paradigm for training models on diverse tasks, with applications ranging from graph neural networks to language model fine-tuning. Since tasks may interfere with each other, a key notion for modeling their relationships is task affinity. This includes pairwise task affinity, computed among pairs of tasks, and higher-order affinity, computed among subsets of tasks. Naively computing either of them requires repeatedly training on data from various task combinations, which is computationally intensive. We present a new algorithm Grad-TAG that can estimate task affinities without this repeated training. The key idea of Grad-TAG is to train a "base" model for all tasks and then use a linearization technique to estimate the loss of the model for a specific task combination. The linearization works by computing a gradient-based approximation of the loss, using low-dimensional projections of gradients as features in a logistic regression to predict labels for the task combination. We show that the linearized model can provably approximate the loss when the gradient-based approximation is accurate, and also empirically verify that on several large models. Then, given the estimated task affinity, we design a semi-definite program for clustering similar tasks by maximizing the average density of clusters. We evaluate Grad-TAG's performance across seven datasets, including multi-label classification on graphs, and instruction fine-tuning of language models. Our task affinity estimates are within 2.7% distance to the true affinities while needing only 3% of FLOPs in full training. On our largest graph with 21M edges and 500 labeling tasks, our algorithm delivers estimates within 5% distance to the true affinities, using only 112 GPU hours. Our results show that Grad-TAG achieves excellent performance and runtime tradeoffs compared to existing approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑