Shared Lexical Task Representations Explain Behavioral Variability In LLMs
- URL: http://arxiv.org/abs/2604.22027v1
- Date: Thu, 23 Apr 2026 19:43:29 GMT
- Title: Shared Lexical Task Representations Explain Behavioral Variability In LLMs
- Abstract summary: We find that despite large variation in performance as a function of the prompt, the model engages some common underlying mechanisms across different prompts of a task.<n>Specifically, we identify task-specific attention heads whose outputs literally describe the task and show that these heads are shared across prompting styles and trigger subsequent answer production.
- Score: 35.89864679533707
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: One of the most common complaints about large language models (LLMs) is their prompt sensitivity -- that is, the fact that their ability to perform a task or provide a correct answer to a question can depend unpredictably on the way the question is posed. We investigate this variation by comparing two very different but commonly-used styles of prompting: instruction-based prompts, which describe the task in natural language, and example-based prompts, which provide in-context few-shot demonstration pairs to illustrate the task. We find that, despite large variation in performance as a function of the prompt, the model engages some common underlying mechanisms across different prompts of a task. Specifically, we identify task-specific attention heads whose outputs literally describe the task -- which we dub lexical task heads -- and show that these heads are shared across prompting styles and trigger subsequent answer production. We further find that behavioral variation between prompts can be explained by the degree to which these heads are activated, and that failures are at least sometimes due to competing task representations that dilute the signal of the target task. Our results together present an increasingly clear picture of how LLMs' internal representations can explain behavior that otherwise seems idiosyncratic to users and developers.
Related papers
- Diagnosing Task Insensitivity in Language Agents [20.018733779493587]
Large language models can serve as capable long-horizon agents, but their out-of-distribution generalization remains weak.<n>We show that models often continue with actions aligned with the original task even when the instruction is semantically corrupted.<n>We propose Task-Perturbed NLL Optimization, a lightweight contrastive regularizer that explicitly encourages action dependence on the task instruction.
arXiv Detail & Related papers (2026-06-25T11:53:41Z) - Do Prompts Reshape Representations? An Empirical Study of Prompting Effects on Embeddings [24.17559821473242]
We study the relationship between prompting and the quality of internal representations.<n>Our findings challenge the assumption that more relevant prompts necessarily lead to better representations.
arXiv Detail & Related papers (2025-10-22T15:43:40Z) - Do different prompting methods yield a common task representation in language models? [22.71314612690917]
Demonstrations and instructions are two primary approaches for prompting language models to perform in-context learning tasks.<n>We study this through textitfunction vectors (FVs), recently proposed as a mechanism to extract few-shot ICL task representations.<n>We find evidence that demonstration- and instruction-based function vectors leverage different model components, and offer several controls to dissociate their contributions to task performance.
arXiv Detail & Related papers (2025-05-17T16:28:33Z) - Contextualize-then-Aggregate: Circuits for In-Context Learning in Gemma-2 2B [51.74607395697567]
In-Context Learning (ICL) is an intriguing ability of large language models (LLMs)<n>We use causal interventions to identify information flow in Gemma-2 2B for five naturalistic ICL tasks.<n>We find that the model infers task information using a two-step strategy we call contextualize-then-aggregate.
arXiv Detail & Related papers (2025-03-31T18:33:55Z) - Vision-Language Models Create Cross-Modal Task Representations [58.19152818504624]
We find that vision-language models (VLMs) can align conceptually equivalent inputs into a shared task vector.<n>We measure this alignment via cross-modal transfer on a range of tasks and model architectures.<n>We show that task vectors can be transferred from a base language model to its fine-tuned vision-language counterpart.
arXiv Detail & Related papers (2024-10-29T17:59:45Z) - A Minimalist Prompt for Zero-Shot Policy Learning [61.65128628634916]
Transformer-based methods have exhibited significant generalization ability when prompted with target-domain demonstrations or example solutions during inference.
We show that conditioning a decision transformer on task parameters alone can enable zero-shot generalization on par with or better than its demonstration-conditioned counterpart.
We introduce an additional learnable prompt which is demonstrated to further boost zero-shot generalization across a range of robotic control, manipulation, and navigation benchmark tasks.
arXiv Detail & Related papers (2024-05-09T19:15:33Z) - An Incomplete Loop: Deductive, Inductive, and Abductive Learning in Large Language Models [99.31449616860291]
Modern language models (LMs) can learn to perform new tasks in different ways.
In instruction following, the target task is described explicitly in natural language; in few-shot prompting, the task is specified implicitly.
In instruction inference, LMs are presented with in-context examples and are then prompted to generate a natural language task description.
arXiv Detail & Related papers (2024-04-03T19:31:56Z) - TEGEE: Task dEfinition Guided Expert Ensembling for Generalizable and Few-shot Learning [37.09785060896196]
We propose textbfTEGEE (Task Definition Guided Expert Ensembling), a method that explicitly extracts task definitions.<n>Our framework employs a dual 3B model approach, with each model assigned a distinct role.<n> Empirical evaluations show that TEGEE performs comparably to the larger LLaMA2-13B model.
arXiv Detail & Related papers (2024-03-07T05:26:41Z) - Identifying and Analyzing Performance-Critical Tokens in Large Language Models [52.404072802235234]
We study how large language models learn to perform tasks from demonstrations.<n>Our work sheds light on how large language models learn to perform tasks from demonstrations and deepens our understanding of the roles different types of tokens play in large language models.
arXiv Detail & Related papers (2024-01-20T20:55:21Z) - Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Tasks [71.19560970717495]
Recent language models show impressive performance across a wide range of tasks.
Are these skills general and transferable, or specialized to specific tasks seen during pretraining?
We propose an evaluation framework based on "counterfactual" task variants that deviate from the default assumptions underlying standard tasks.
arXiv Detail & Related papers (2023-07-05T17:50:42Z) - Robustness of Learning from Task Instructions [15.462970803323563]
Traditional supervised learning mostly works on individual tasks and requires training on a large set of task-specific examples.
To build a system that can quickly and easily generalize to new tasks, task instructions have been adopted as an emerging trend of supervision.
This work investigates the system robustness when the instructions of new tasks are (i) manipulated, (ii) paraphrased, or (iii) from different levels of conciseness.
arXiv Detail & Related papers (2022-12-07T17:54:59Z) - PROMPT WAYWARDNESS: The Curious Case of Discretized Interpretation of
Continuous Prompts [99.03864962014431]
Fine-tuning continuous prompts for target tasks has emerged as a compact alternative to full model fine-tuning.
In practice, we observe a "wayward" behavior between the task solved by continuous prompts and their nearest neighbor.
arXiv Detail & Related papers (2021-12-15T18:55:05Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.