AI
New Metric Guides Design of Compact Task Vectors for Faster AI Model Adaptation
Researchers propose a distributional alignment criterion to improve task vector extraction, enabling large language models to adapt to new tasks more efficiently without ballooning context length.
Large language models can rapidly adjust to unfamiliar tasks by learning from examples presented in their input prompt—a technique called in-context learning. However, as the number of demonstration examples grows, so does computational overhead, making real-world deployment costly. Task vectors offer a potential solution by compressing demonstration data into compact hidden-state representations, yet prior research has lacked a principled way to evaluate whether extraction methods are actually working well.
A New Lens for Evaluating Task Vectors#
Researchers from an arXiv computer science paper argue that the right criterion for assessing task vectors is distributional alignment—whether predictions made using the compressed representation match the probability distributions that emerge from full in-context learning. They introduce a metric called $d_{\text{NTP}}$ that quantifies this mismatch by comparing next-token probabilities between the two approaches.
Empirical testing across classification and regression benchmarks revealed that lower $d_{\text{NTP}}$ values strongly correlate with higher downstream task accuracy, suggesting the metric effectively captures the quality of a task vector extraction method.
A Simpler, Better Approach#
Building on this insight, the team developed Linear Task Vector (LTV), which uses a closed-form linear regression to estimate how demonstrations influence model behavior. Rather than using complex neural computations to extract task vectors, LTV applies a direct mathematical mapping designed to minimize distributional divergence.
Across eight classification datasets and five different language models, LTV outperformed existing baselines by an average of 9.2% in accuracy while simultaneously reducing inference latency—a rare win on both quality and speed.
Cross-Model Generalization#
An especially promising finding concerns transferability across model scales. Task vectors extracted from larger models can boost performance on smaller models by approximately 6.4%, a capability rarely explored in prior work. This suggests task representations may have utility beyond the model they were extracted from, potentially allowing organizations to distill insights from compute-intensive training into more efficient deployment scenarios.

