Variational Task Vector Composition
By: Boyuan Zhang , Yingjun Du , Xiantong Zhen and more
Potential Business Impact:
Combines computer skills without slowing them down.
Task vectors capture how a model changes during fine-tuning by recording the difference between pre-trained and task-specific weights. The composition of task vectors, a key operator in task arithmetic, enables models to integrate knowledge from multiple tasks without incurring additional inference costs. In this paper, we propose variational task vector composition, where composition coefficients are taken as latent variables and estimated in a Bayesian inference framework. Unlike previous methods that operate at the task level, our framework focuses on sample-specific composition. Motivated by the observation of structural redundancy in task vectors, we introduce a Spike-and-Slab prior that promotes sparsity and preserves only the most informative components. To further address the high variance and sampling inefficiency in sparse, high-dimensional spaces, we develop a gated sampling mechanism that constructs a controllable posterior by filtering the composition coefficients based on both uncertainty and importance. This yields a more stable and interpretable variational framework by deterministically selecting reliable task components, reducing sampling variance while improving transparency and generalization. Experimental results demonstrate that our method consistently outperforms existing approaches across all datasets by selectively leveraging the most reliable and informative components in task vectors. These findings highlight the practical value of our approach, establishing a new standard for efficient and effective task vector composition.
Similar Papers
When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear Transformers
Machine Learning (CS)
Teaches computers to forget or learn new things.
Efficient Model Editing with Task-Localized Sparse Fine-tuning
Machine Learning (CS)
Makes AI models learn new things without forgetting old ones.
Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations
Machine Learning (CS)
Makes AI learn new things faster and better.