Papers › Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning

Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning

20 May 2026arXiv:2605.20730added by Syntology

Jihoon Kwon, Jiwon Choi, Jy-yong Sohn

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

In-context learning (ICL) allows large language models (LLMs) to adapt to new tasks through demonstrations, yet it suffers from escalating inference costs as context length increases. While task vectors offer a promising alternative by compressing demonstrations into compact hidden-state representations, their quality has been evaluated only through downstream task accuracy. This indirect criterion provides limited insight into how to design more effective task vector extraction methods. In this paper, we posit that inference using task vectors should align their predictive distribution with that of ICL. To quantify this, we introduce d_(NTP), a metric that measures the discrepancy in next-token probabilities between task vector-based and ICL-based inference. Our empirical analysis reveals that d_(NTP) serves as a performance proxy, exhibiting a strong negative correlation with downstream accuracy. Motivated by this, we develop Linear Task Vector (LTV), a method designed to minimize d_(NTP) via a closed-form linear mapping that estimates demonstration effects through regression. Across eight classification benchmarks and five LLMs, LTV consistently outperforms existing task vector baselines, improving average accuracy by 9.2\% while reducing inference latency. We further show that LTV outperforms the baselines on regression tasks. Moreover, we investigate the transferability of LTV across different model scales; an aspect that has remained nascent in task vector research. Specifically, we empirically show that task vectors from a larger model can enhance a smaller model's performance by 6.4\%, suggesting a new utility for extracted task representations.

PaperPDFCode Syntology ran

In Syntology For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.20730")

Code

Syntology Ran 6 of 7 code samples harvested from 2 repositories linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · honoured contract; 5 ran with no contract checked.

By repository: found in paper text by Syntology: 7 samples from 2 repositories, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

HITsz-TMG/ICL-State-Vector found in paper text by Syntology report
LzVv123456/I2CL found in paper text by SyntologyMIT report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 6 ran; 1 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
5ran
1unverified

Licence: 6 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_data_layers HITsz-TMG/ICL-State-Vector/selected_layers.py found in paper text by Syntology ran no licence file found · pointer only · 7fa4c0d4e9cee1af · report
metric_average HITsz-TMG/ICL-State-Vector/utils.py found in paper text by Syntology ran no licence file found · pointer only · dc25dfef6f90b386 · report
sea_born HITsz-TMG/ICL-State-Vector/utils.py found in paper text by Syntology ran no licence file found · pointer only · 85ac527a9dce9de6 · report
shuffle_train HITsz-TMG/ICL-State-Vector/utils.py found in paper text by Syntology ran no licence file found · pointer only · f4d8b3796ddaccdf · report
str2list HITsz-TMG/ICL-State-Vector/state_vector_optimize.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · 3b34facc51914c48 · report
target_layer_selection LzVv123456/I2CL/run_task_vector.py found in paper text by Syntology ran · honoured contract MIT (permissive) · 405289a97499d9cc · report
get_optimizers HITsz-TMG/ICL-State-Vector/optimizer.py found in paper text by Syntology unverified no licence file found · pointer only · f5d8f58d3af60f15 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.20730, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections