WorksComputer Science
Prompt-agnostic Language Models
Abstract
Despite their strong performance, large language models remain highly sensitive to prompt formulation. This issue is typically addressed at inference-time through manual prompt optimization, which introduces overhead and lacks scalability. Conversely, we focus on train-time approaches that build prompt robustness into the model during instruction tuning. A common strategy is to mix multiple paraphrases of each prompt into training. We demonstrate that across trainable parameters, the per-paraphrasing gradients interfere, with 57% exhibiting sign conflicts and the naive gradient average discarding approximately a fifth of the magnitude. Therefore, we develop two gradient-merging methods, Prompt-TIES and Prompt-DARE, that address this interference by leveraging interference-resolution operators from model and gradient merging and applying them to prompt gradients. In this study, we compare the efficacy of our methods to increase model robustness to train-time robustness methods spanning all three established classes: data construction, consistency regularization, and contrastive alignment. The evaluation is conducted across four models from two families at two scales. We observe the interaction between prompt phrasing and the specific examples accounts for 54% of per-example variability on average, and exceeds 70% on tasks such as ANLI and WiC. The gradient-merging methods directly improve this local robustness and nearly halve per-example variance on fully fine-tuned models at little cost to overall accuracy. The other train-time methods enhance raw performance, but fail to improve per-example variance reliably. Code: https://github.com/FSadrieh/prompt-agnostic-llms. Model checkpoints: https://huggingface.co/prompt-agnostic-language-models.
Master’s thesis
submitted for the degree of
Master of Science
(M. Sc.)
in
Computer Science
submitted on July 1, 2026 to the
Chair of Artificial Intelligence and Intelligent Systems
Digital Engineering Faculty
University of Potsdam
Reviewer Prof. Dr. Gerard de Melo
Supervisors Dr. Michal Štefánik
Konstantin Dobler
Introduction
Large language models (LLMs) are increasingly deployed in real-world decision-making pipelines and agentic systems. Yet two semantically equivalent prompts routinely produce different outputs [Cao+24; Ing+25]. This variance can undermine users’ trust in the system [27]. Model scale and standard instruction tuning raise mean performance but leave prompt sensitivity largely intact [Cao+24; Cha+24; Wei+25]. We analyze prompt robustness across four models from two families and two scales and find that a single template is rarely best or worst across all examples. The primary source of variability is the interaction between a template and the specific example to which it is applied. This local, example-level variance is the focal point of this thesis. We decrease it by resolving the gradient interference that arises when a model is trained on many phrasings at once.
Prompt brittleness is often addressed at inference-time, through manual prompt engineering or search. However, these remedies are labor-intensive, must be redone for every task, and inherently lack scalability [Sch+25]. Conversely, we focus on methods that train the model to be more prompt robust [35 Wei+25, Yan+24]. The simplest concept underlying most methods is fine-tuning on multiple phrasings of each instruction rather than one. This approach improves upon single-prompt instruction tuning [Wei+25]. More elaborate methods add auxiliary loss objectives [35 Yan+24]. Consistency regularization aligns the output distributions of the phrasings [35] and contrastive approaches align their hidden representations [Yan+24]. All current train-time methods treat the optimizer as a black box. They decide which phrasings the model sees and which loss it optimizes but leave the gradients untouched [35 Wei+25, Yan+24].
This thesis opens the black box. We find that per-phrasing gradients interfere. Across trainable parameters, 57% see at least two phrasings pushing in opposite directions. The naive gradient average of standard training discards approximately one-fifth of the gradient magnitude through cancellation. Model and gradient merging encounter conflicting update directions when combining independently fine-tuned models in weight space [Che+20; Yad+23]. They resolve direction or sign conflicts using operators such as TIES [Yad+23] and DARE [Yu+24]. We translate the methods applied traditionally to per-task updates [Che+20; Lu+24; Yad+23; Yu+24] to per-prompt gradients developing Prompt-TIES and Prompt-DARE. These methods resolve the sign conflict of per-prompt gradients and reduce the model’s sensitivity to prompt phrasing.
We compare Prompt-TIES and Prompt-DARE in a controlled comparison of train-time prompt robustness approaches spanning all three established classes: data construction [Wei+25], consistency regularization (PPCL) [35], and contrastive alignment (CoIN) [Yan+24]. By scoring every method on a performance–robustness trade-off, we find a clear distinction: data construction methods improve mean accuracy the most, while gradient merging provide the best local robustness on fully fine-tuned models. Prompt-TIES and Prompt-DARE lower per-example variance at minimal cost to accuracy by directly reducing the example–template interaction that drives the brittleness. We analyze the consistency regularization and contrastive approaches in and out of domain and find that their gains do not transfer between training and testing distributions.
For practitioners, this yields a simple rule of thumb. If the goal is raw performance, then data construction suffices. However, if local per-example robustness matters and the model is fully fine-tuned, then adding Prompt-TIES or Prompt-DARE improves robustness significantly.
Our main contributions are:
We show why prompt brittleness is best measured as local example-level variance rather than as global worst-template performance. The local variance is dominated by the example–template interaction.
We characterize gradient interference in multi-prompt instruction fine-tuning, showing it is dominated by per-parameter sign conflict and concentrated in the early layers of the network.
We propose Prompt-TIES and Prompt-DARE, which resolve this interference online by bringing model-merging operators to per-prompt gradients. We show they deliver the best local prompt robustness on fully fine-tuned models.
We provide a controlled comparison of Prompt-TIES and Prompt-DARE against train-time prompt-robustness methods across three classes: data construction, consistency regularization, and contrastive alignment.
We diagnose why consistency regularization and contrastive objectives underperform simple data construction and gradient merging, tracing each to the lack of transfer between train and test distributions.
Related work
Prompt sensitivity
Prompt sensitivity is a well-documented phenomenon in large language models. First, we review work that characterizes and quantifies the problem. Then, we turn to approaches designed to increase robustness. There are two types of approaches: inference-time and training-time. Inference-time approaches do not change the model weights and are applied after training. Train-time approaches modify the weights during training.
The problem of prompt sensitivity
Recent studies have shown that the performance of LLMs is highly sensitive to prompt formulation [12, 31, 40 Zhu+24a]. This sensitivity has been measured along complementary axes. FormatSpread [39] isolates purely spurious formatting choices, such as separator tokens, casing, and spacing, and reports the resulting performance spread. Sclar et al. [39] find a gap of up to 76 accuracy points between semantically equivalent formats. PromptBench [Zhu+24a] simulates user errors through adversarial perturbations at the character, word, and sentence level, measuring the performance drop. Mizrahi et al. [31] take a paraphrase-centric approach, evaluating over 6.5 million instances across 20 models and 39 tasks. They demonstrate that different paraphrases not only alter absolute scores but also alter the relative ranking of models. DOVE [12] generalizes this to a holistic, multidimensional setting by jointly perturbing dimensions such as delimiters, answer enumerators, instruction wording, and few-shot examples. Brittleness emerges across all these benchmarks under a wide range of perturbations and tasks [7 He+24, 29, 42 Zhu+24b].
Crucially, this instability does not vanish with scale [Cao+24; Scl+24; SM24]. Cao et al. [Cao+24] report that the standard deviation across prompts for the Llama-2-chat family slightly increases from the 7B to the 70B model () even as mean performance rises. The gap between the best and worst prompt for Llama-2-70B-chat reaches 45.48 points, with its worst prompt scoring as low as 9.38% [Cao+24]. Similarly, standard instruction fine-tuning is insufficient. It raises mean performance but leaves prompt sensitivity largely intact [Cha+24; [Wei+25]. Instruction-tuned models still degrade consistently when given valid but unobserved instruction phrasings [43].
Inference-time approaches
Inference-time approaches address prompt brittleness through interventions applied at deployment, leaving the model weights untouched. They fall into three broad groups.
Calibration and output debiasing. Calibration methods adjust the model’s output distribution to counteract biases that make predictions sensitive to the surface features of prompts. Contextual calibration [Zha+21] estimates the model’s bias toward each answer. It does so by querying the model with a content-free input (e.g., "N/A") and fitting an affine transformation that equalizes these predictions. This mitigates the majority-label, recency, and common-token biases that drive variance across prompt formats and example orderings. Batch Calibration [Zho+24] unifies several estimators and infers them from the marginal predictions over a batch of unlabeled inputs. PriDE [Zhe+24] limits the option-position bias of multiple-choice prompts by removing biases associated with specific option IDs estimated from a few permuted samples.
Prompt optimization. A second group searches the prompt itself for formulations the model handles well. ZOPO [17] argues that well-performing local optima are prevalent and uses a Neural-Tangent-Kernel-based Gaussian process within zeroth-order optimization to locate them with few model queries. COPLE [Zha+24] demonstrates that LLMs are overly sensitive to imperceptible lexical changes in their instructions. They cast prompt repair as a combinatorial optimization that substitutes words iteratively according to their influence on a batch of proxy tasks. Closest to training-time methods, BATprompt [41] perturbs the input and then uses the LLM’s self-reflection capabilities to refine the prompt so that it can withstand such perturbations without access to gradients or parameters.
Aggregation. Rather than committing to a single prompt, a third group queries the model several phrasings of the same prompt and aggregates the predictions to reduce the variance attributable to any one formulation. Ask Me Anything [2] reformats each input into multiple question-answering prompts and combines their noisy predictions through weak supervision. This allows an ensemble of imperfect prompts to outperform a single hand-tuned prompt. Self-consistency [Wan+22a] aggregates sampled reasoning paths for a fixed prompt and reduces decoding variance.
For every task, prompt, or input, the inference-time intervention must be paid. Calibration parameters and selection priors are re-estimated per setting. Prompt search is re-run whenever the task changes. Aggregation multiplies the number of forward passes. Importantly, none of these methods alters the underlying model. This causes the sensitivity to reemerge once the intervention is removed [17, 41].
Train-time approaches
Train-time approaches instead build invariance directly into the model by increasing the diversity of prompt formulations seen during training. These can be separated into three subclasses:
Data construction approaches. Data approaches are the simplest subclass and form the basis for the others. They leave the objective untouched and only enlarge the set of prompt formulations on which the model trains [Wei+22; Wei+25]. The first studies source prompt formulations manually and demonstrate that instruction tuning on these formulations outperforms standard instruction tuning [San+22; Wei+22]. Since manually authoring templates is not scalable, subsequent studies have delegated the generation process to a model [Wan+23; Wei+25]. Here, two lineages diverge in purpose. The first keeps the task fixed and generates semantically equivalent paraphrases of the prompt, similar to our approach. PAFT [Wei+25] samples paraphrased prompts from a commercial LLM, RIFF [33] trains a dedicated paraphraser, and GANPrompt [23] uses a GAN to generate diverse prompts for robustness. The second lineage has the model instead bootstrap new instructions and instances to widen task coverage and instruction complexity [Hon+23; Wan+23; Xu+24]. None of these methods investigate how the chosen prompt formulations should be arranged once assembled. PAFT commits to a single schedule, cycling one formulation every steps, without testing alternatives. We therefore fix the formulations and study this batch construction (see subsection 3.2.1).
Contrastive alignment. Aissi et al. [1] show that models are prompt-sensitive by default, clustering prompts in their hidden states by lexical similarity rather than semantic meaning. Contrastive approaches address this issue by adding a loss objective that aligns formulations according to their semantic meaning. CoIN [Yan+24] adds such a contrastive objective to the standard cross-entropy loss.
Subsequent work adapts this idea to other training stages. Aissi et al. [1] use the contrastive loss function to improve prompt robustness in reinforcement learning. Liu et al. [26] first select the most sensitive layers by measuring the hidden states between prompt formulations, and then only train these layers with the contrastive loss function. We test our gradient-merging approaches against CoIN [Yan+24], since it modifies the same training phase.
Consistency regularization. Consistency regularization approaches introduce additional loss objectives that penalize divergence in a model’s output distribution for different formulations of the same example. PPCL [35] measures this divergence with the Jensen–Shannon divergence between the average output token probabilities. A similar objective is used in Sun et al. [43], which only trains soft prompt tokens [21]. Additionally, unsupervised approaches use model predictions as labels between paraphrases [14 Zho+22]. Notably, Zhou et al. [Zho+22] employ the Jensen–Shannon divergence loss from [35] as well as distillation across paraphrases. We select PPCL as a baseline for our gradient-merging approaches, since it most closely resembles our experimental setup.
Model and gradient merging
Our gradient-merging methods (see § 3.3) are based on previous work of model merging and gradient merging, both of which are typically applied to multi-task training [Wan+20; Zho+25]. Model merging combines weight updates from several models fine-tuned independently on the same base checkpoint [18], while gradient merging combines per-task gradients during training [Wan+20].
Model merging
Ilharco et al. [18] show that adding, negating, and averaging the weight updates (task vectors) of fine-tuned models alters their behavior in predictable ways. Recent work identifies interference as a flaw in this merging process, whereby the task vectors disagree and cancel each other out [Yad+23; Yu+24].
TIES [Yad+23] focuses on sign- and redundancy-based per-parameter interference. The merging process has three steps: (1) trimming the low-magnitude weight updates, which tend to decrease the average update step, (2) calculating the majority sign of the per-template updates, and (3) merging only over entries with the majority sign [Yad+23]. The goal is to receive larger weight updates as redundancy and sign interference are removed so that they do not drag down the average.
DARE [Yu+24] replaces magnitude-based trimming with random dropping. Then, it rescales the task vector so that the expectation of each task vector is preserved. Otherwise it applies the same TIES steps. KnOTS [Sto+25] show that these approaches are not optimal for LoRA-generated task vectors [16], since these vectors occupy incompatible subspaces. Stoica et al. [Sto+25] therefore first project them into a shared subspace via singular value decomposition before merging with TIES or DARE.
Gradient merging
Interference is also a problem for gradient-merging approaches. Yu et al. [Yu+20] find that averaging conflicting gradients yields a poor compromise update that can stall optimization. Two subclasses of methods attempt to eliminate this interference:
Cosine similarity approaches. Yu et al. [Yu+20] declare two gradients to be conflicting when their cosine similarity is negative and project each gradient onto the normal plane of the other gradient, thereby removing the conflicting component. Wang et al. [Wan+20] observe that Yu et al. [Yu+20] implicitly target a gradient similarity of zero for every task pair, whereas closely related tasks naturally share positive similarity. They therefore set adaptive, pair-specific similarity objectives and align gradients toward them. Since we train on multiple formulations rather than different tasks, our cosine similarities between gradients are consistently positive and relatively high, while still exhibiting substantial sign-based interference (see subsection 5.3.2). Therefore, we opt for a sign-based interference reduction.
Sign-based approaches. GradDrop [Che+20] probabilistically elects a sign for each parameter and only averages over the sign-agreeing entries. Similarly, Lu et al. [30] create OnTIES and OnDARE, the gradient variants of the model-merging approaches. These sign-based approaches are most similar to ours, but still distinct: GradDrop trains on multiple tasks rather than prompt formulations [Che+20], while OnTIES and OnDARE merge the current gradient during reinforcement learning with a task vector obtained from prior supervised fine-tuning [30].
Criticism of gradient merging. Gradient merging has its critics. Large-scale studies report that standard training matches specialized multi-task optimizers once task weights are tuned, and that reported gains stem from under-tuned baselines rather than the optimizer itself [20 Xin+22]. We address this issue by training multiple competitive baselines and finding similar evidence.
Methods
Problem definition
Single-template instruction fine-tuning (SIFT). Given a collection of datasets , where each contains samples of raw inputs and labels , a prompt template renders a sample into a textual instruction and an expected response . Single-template instruction fine-tuning (SIFT) applies one such template per dataset to obtain the fine-tuning set
The fine-tuning set is used to train a model to maximize the likelihood of each target response given its instruction. We iteratively update on batches by minimizing the token-level cross-entropy :
Multi-template instruction fine-tuning (MIFT). The methods we study exploit the fact that each dataset is associated with not one but a set of templates , where each produces a distinct formulation of the same sample.
Given a per-dataset template selection with , we generalize the fine-tuning set to
Methods then differ along three orthogonal axes: (1) the template selection ; (2) a batch-construction policy that induces a distribution over batches and, in particular, governs which formulations of the same example co-occur within a batch; (3) and an optional auxiliary objective added to the cross-entropy of Eq. Equation (2), giving the general training loss
recovering SIFT with , random shuffling, and .
Majority templates. The consistency and contrastive methods compare the model’s outputs across formulations of the same example and therefore require those formulations to share a single target. We call two templates label-consistent if they assign the same expected response to every sample
This partitions the templates of into label-consistent classes. We define the majority templates as the class of greatest cardinality, breaking ties arbitrarily.2 Setting yields the largest selection for which every has a single expected response shared across all , making the shared-target assumption of PPCL and CoIN well-defined.
Baseline training methods
All of our training methods use the same batch size . Each batch is drawn from a single dataset, , and an optimizer step aggregates several batches sampled from different datasets (for exact hyperparameters see Table 4.1). Therefore, the methods act within a single dataset, where the number of templates , is the same for each example in the batch. Each strategy is trained using the same underlying examples. Only the number of rendered instances differs based on the size of . In this section, we will describe the baselines against which we will compare our gradient merging approaches.
| Hyperparameter | Value |
| Optimizer | AdamW (fused) |
| LR schedule | Constant with linear warmup |
| Warmup steps | 100 |
| Effective batch size | 2565 |
| Epochs | 1 |
| Precision | bfloat16 |
| Max train samples / dataset | 10 240 |
| LoRA rank† | 16 |
| LoRA alpha† | 32 |
| LoRA dropout† | 0.0 |
| LoRA target modules† | attention (q_proj, v_proj, o_proj) and MLP6 |
| COIN | 0.05 |
| COIN | 1000 |
| PPCL , | 1, 1 |
| PPCL | 1 |
| Prompt-TIES | 0.8 |
| Prompt-DARE | 0.2 |
Table 4.1. Shared hyperparameters for all experiments. †LoRA is only applied to the 8B models.
Data construction approaches
The data-construction strategies leave the objective unchanged () and differ only in how the available formulations are scheduled across batches. Varying only the template and example diversity in a batch allows us to isolate the effect of that diversity on downstream robustness and test whether the schedule in prior work is optimal [Wei+25]. We will test four different construction approaches:
Single. Single sets for every dataset and to shuffle examples uniformly. This reproduces SIFT [Wei+22] (section 3.1). Each batch contains distinct examples in a single formulation with maximal example diversity and no template diversity. We use this construction approach to test two factors: the extent to which MIFT improves performance and robustness, and the impact of the choice of single template.
All shuffled. All shuffled sets and to shuffle examples uniformly. There are no further constraints on batch composition, so a batch may contain several formulations of the same example and mix arbitrary examples and formulations. This is the least structured use of the templates and serves as our multi-template reference with no constraints.
One-at-a-Time. One-at-a-Time sets and constrains so that every batch is template-homogeneous. applies a single template to a set of examples ,
For a given set of examples emits the full set of single-template batches , holding fixed while varying only . Thus, the same examples recur under every formulation, and all of is covered during training. This construction approach ensures there is no template diversity within each batch but full template diversity across the training set, and mirrors the schedule of [Wei+25].
All-in-One-Batch. All-in-One-Batch sets and constrains to the opposite extreme. draws a set of examples and renders each under every template,
holding only distinct examples. We trade within-batch example diversity for within-batch template diversity and place all renderings of an example in the same gradient step. All-in-One-Batch forms the basis for many train-time robustness approaches, like [35], and our gradient merging methods.
Consistency regularization (PPCL)
We choose PPCL [35] from the consistency regularization approaches as a baseline for our gradient merging methods. It adds an auxiliary loss term that penalizes divergence between the model’s outputs on different formulations of the same example. It uses the All-In-One-Batch data construction, restricted to the majority templates (), so every base example occurs in a batch together with all of its label-consistent renderings.
For a rendered pair , let be the model’s output distribution averaged over the response tokens,
The original paper contrasts one clean to one perturbed formulation and calculates the Jensen–Shannon divergence over and [35]. In our setup, we do not have clean renderings, so we treat all formulations symmetrically and average the Jensen–Shannon divergence over every unordered pair of templates:
where is the set of base examples in the batch, with , and controls the trade-off between instruction following and robustness [35]. The original objective splits the cross-entropy into separate clean and perturbed terms, with individual weights [35]. As we have varying amounts of templates per dataset, we set all cross-entropy weights to 1, so the supervised loss is the standard batch cross-entropy and the Jensen–Shannon term is its only addition.
Contrastive alignment (CoIN)
Among the contrastive approaches, we select CoIN [Yan+24], which adds a contrastive term calculated over the hidden representations. It pulls together formulations of the same example and pushes apart formulations of different examples. CoIN requires a structured batch. Each CoIN group contains four renderings drawn from one dataset under its majority templates,
with (), distinct and , . The example selection is constrained by . The first pair is the anchor for which the group is constructed. The second pair is the positive pair, with the same input and a different formulation. The last two are negatives, with the third having the anchor’s template applied to a different example so that the instruction matches but the instance differs [Yan+24]. To keep fixed, we pack several CoIN groups into one batch and average their losses, computing the negatives within each group only.
Let be the hidden state of the designated readout token for a rendered pair, and write the anchor, positive, and two negatives as , , . The contrastive loss for one group is
where is the cosine similarity and the temperature [Yan+24]. The auxiliary objective is averaged over the CoIN groups in the batch. It is weighted by the contrastive loss ratio and capped at following [Yan+24].
Yan et al. [Yan+24] read from the last target token during training, which we denote as CoIN. Additionally, we experiment with taking the hidden state from the last prompt token, denoted as CoIN.
Gradient-space merging
Training on multiple prompt formulations can be viewed as a multitask learning problem. A large body of work has trained models on multiple tasks using gradient merging approaches and has shown that a naive sum or mean of these vectors underperforms due to interference [Che+20; Wan+20; Yu+20]. We predict similar failure modes for multi-prompt training, especially in the All-in-One-Batch-mode. We confirm this prediction by measuring interference in the per-template gradients (see § 6.2). Therefore, we use the interference-resolution tools developed for model and gradient merging to merge per-template gradients.
We focus on per-parameter, sign-based merging methods like [30 Yad+23, Yu+24]. Since our per-template gradients have relatively high cosine similarity (see § 6.2), we do not use cosine methods like [Wan+20; Yu+20]. Additionally, more complex subspace alignment methods, such as KnOTS [Sto+25] are designed to run once after training and are too costly to directly port into the gradient space.
Setup. Consider a single-dataset batch drawn from under the All-in-One-Batch construction, in which all formulations of its examples are present. Instead of averaging over the entire batch, we compute it per template. Using the backward pass, we obtain one gradient, , over the trainable parameters , per template. Stacking these gradients row-wise yields a gradient matrix . We define a gradient merging function that reduces to a single gradient. This gradient is then passed to the optimizer in place of the usual mean gradient.
This view recovers standard instruction fine-tuning as and multi-template instruction fine-tuning, specifically All-in-One-Batch as the simple mean .
Memory and parallelization. Constructing raises the gradient memory requirements from to . To keep this tractable, we shard the gradients across devices along the parameter dimension . With a world size of , each device stores only coordinates rather than the full matrix. We pair this with distributed data parallelism since each model replica fits on a single device. Gradient sharding is independent of other sharding methods and thus works with other distribution schemes. Increasing the effective batch size through data parallelism leaves the gradient dimensionality unchanged, ensuring effective GPU utilization for both gradient computation and merging. Moreover, sharding along is a natural fit for the merge itself, since we focus on per-parameter-based gradient merging.
Prompt-TIES. Prompt-TIES applies TIES [Yad+23] to the rows of in three steps.
Trim: For each formulation, keep the top- gradients by magnitude and reset the rest to zero, . Due to gradient sharding across , we perform trimming per rank. This makes our trimming a communication-free approximation of the global top- selection.
Elect sign: Assign each trainable parameter the sign with the largest total gradient magnitude across formulations,
Disjoint mean: For each trainable parameter , only average the formulations
whose sign agrees with the elected sign, while ignoring the trimmed entries,
with when the elected sign is zero (exact cancellation).
TIES additionally scales the merged vector by a factor of , which is tuned on a validation set [Yad+23]. In the gradient space, this coincides with a rescaling of the learning rate, which should be considered when performing learning-rate sweeps. Additionally, tuning it on a validation set is too expensive. Therefore, we remove the scaling step, as in [30].
Prompt-DARE. Prompt-DARE replaces magnitude-based trimming with random trimming. Then, it merges with the other TIES steps [Yu+24]. According to Yu et al. [Yu+24], we independently drop each coordinate with probability and rescale the survivors to keep the gradient unbiased,
Evaluation
Performance and robustness metrics
We evaluate each trained model on held-out datasets using two types of metrics: raw performance and robustness to the choice of prompt formulation. All metrics are based on per-example, per-template correctness scores . The scores are agnostic to the specific correctness function.
Performance. We report the macro-average score across datasets, giving each dataset an equal weight regardless of its size:
Robustness. We measure how performance changes as formulations change, separating two sources of robustness. Global variance considers template averages across examples and determines which templates perform well or poorly. Local variance asks how much performance fluctuates for a single example across formulations. These two sources of robustness can diverge if certain prompt-example combinations are weak, but no single template is. Per-template averages can hide sensitivity exposed by a per-example view. We analyze the divergence on our datasets in § 6.1.
Global variance. We determine the best and worst templates for each dataset by averaging the performance of each example formatted with a specific template. These quantify how template phrasing affects model performance and have been used in previous work, such as [Cao+24].
Local variance. We measure the variance in scores across templates for a fixed example by reversing the order of aggregation and averaging the variance across examples,
The per-example variance is zero whenever the templates agree, including the degenerate case in which the model is incorrect for every template. These examples, which are always wrong, are not prompt-robust. They are uniformly unsolved, yet they contribute zero variance, which makes the model appear more stable than it is. Therefore, we call an example solvable if the model answers it correctly under at least one template. We create a set of solvable examples per dataset,
with being a threshold based on the concrete scoring function. Based on the solvable examples, we report the conditional local variance, restricting the average to solvable examples only,
This isolates prompt sensitivity on the examples the model can demonstrably solve, under some template, instead of crediting it for failing consistently.
Relating the two. The span formally links global and local variance. The local span is defined as the per-example average gap between the best and worst templates: . The global span is defined as the gap between the best and worst templates at the dataset level: . Under these definitions the global span is always bounded by the local span, , since the maximum of averages is at most the average of maxima. Therefore, the difference between the two is a direct measure of example-template interaction. It vanishes only when the best and worst templates are identical across all examples. We report the interaction fraction, defined as the share of per-example brittleness that cannot be attributed to a fixed template ranking: .
Gradient interference measures
Unlike traditional training-time robustness approaches, our gradient-merging methods do not add an auxiliary objective that would cause the model to produce more consistent updates. Instead, we correct the interference found in the raw gradients. This renders an end-of-training diagnostic unsuitable for gradient analysis. First, our methods never reduce interference in the pre-merge-per-template gradients, so a converged model would not necessarily exhibit less interference. Second, the methods drift into different regions of parameter space during training, causing the gradients to become incomparable across runs. Therefore, we do not compare interference between models. Instead, we characterize the prevalence of gradient interference in the All-in-One-Batch setting on which our merging methods are based.
At each evaluation step, we compute the per-template gradient , on the held-out batch without applying the resulting update and then stack it into the gradient matrix of § 3.3. We write for the mean gradient update and for the -th coordinate of . We summarize the interference in with four geometry statistics, each averaged over the evaluation batches.3
Cosine similarity. The pairwise mean cosine similarity is calculated over the unordered template pairs,
It measures whether the formulations agree on a common descent direction. Cosine similarity is equal to 1 when all gradients are collinear and the mean is a faithful summary, it is 0 when the gradients are orthogonal, and it is negative when the gradients oppose one another. This has been widely used in previous gradient merging literature, such as [Wan+20; Yu+20].
Sign disagreement. The fraction of parameters for which at least two formulations push in opposite directions,
It measures sign conflict, the quantity targeted by the sign-election step of Prompt-TIES and Prompt-DARE (§ 3.3). Sign conflict is 0 when every parameter receives a unanimous sign across formulations and 1 when every parameter is contested.
Cancellation. Cosine similarity and sign disagreement measure whether gradients conflict. Cancellation measures how much magnitude the conflict costs. The fact that updates lose magnitude when averaged is a long-recognized symptom of interference [Yad+23; Yu+20; Yu+24]. Since there is no standard statistic for this phenomenon, we directly quantify the effect as the portion of the average per-template gradient norm that the mean update fails to retain.
When all formulations are identical, there is no cancellation, so averaging preserves the full norm. Cancellation approaches 1 when the per-template gradients cancel each other out, causing the mean update to collapse toward zero.
Effective rank. The number of distinct directions that the template gradients span is computed as the entropy-based effective rank [36] of the cosine similarity Gram matrix . The eigenvalues are normalized to . The effective rank is:
It is equal to one when all per-template gradients share the same update direction. It grows toward as the formulations spread into mutually distinct directions that cannot be satisfied by a single update. This metric has been used in previous work analyzing gradients, as in [10].
Auxiliary objective diagnostics
We compute two per-example diagnostics to check whether the auxiliary objectives of PPCL [35] and CoIN [Yan+24] produce their intended effects on the model’s outputs and hidden states. Both are evaluated in the ALL-IN-ONE-BATCH setup using the MAJORITY TEMPLATES (see subsection 3.2.1). We report the average of each diagnostic over the evaluation examples in each dataset and over all datasets.
Jensen–Shannon divergence. We average the pairwise Jensen–Shannon divergence over all majority templates of an example, mirroring PPCL objective (see Equation (9)) without the scaling term .
where is the readout distribution:
label: . As in PPCL, the label readout takes the output distribution averaged over the response tokens. It depends on the reference target and is therefore not an inference-time signal. Teacher forcing re-anchors the model on the correct prefix at each step. Thus, the metric captures only per-step agreement along the gold path. This suppresses the divergence that compounds under autoregressive decoding. Consequently, it can appear consistent even when the models’ generated outputs differ. This makes it an optimistic proxy that we pair with the label-free prompt readout.
prompt: . Takes the distribution of the first response token given the prompt alone. This is truly label-free, but can only answer whether the model begins to answer the same way across formulations.
Hidden-state similarity. To probe the effect of CoIN (see subsection 3.2.3), we compare the hidden states of the last layers across templates. Since CoIN’s batch construction is not used in evaluation, we adapt its positive/negative contrast to the All-in-One-Batch majority-template setup shared with PPCL. Let be the hidden state for a prompt-label pair, and let be the distinct examples of dataset in the batch. For each example, we report the contrastive difference between the same-example cross-template similarity (CoIN’s positive) and the cross-example similarity (CoIN’s negative):
where is the cosine similarity of subsection 3.2.3. A larger Diff means that formulations of the same example with different templates are closer to one another than to other examples, the alignment CoIN targets. As with CoIN we have two different readout variants , either the last target token () or the last prompt token (). Unlike the label, the prompt readouts are directly comparable between the Diff and JS.
Experimental setup
Data
Studying whether training can make a model prompt-robust requires two things of the data. First, each example must be available in several semantically equivalent formulations. Second, evaluation must probe genuinely unseen tasks since robustness is only useful if it transfers beyond the training distribution. The setup below satisfies both conditions. A full overview of the datasets and their templates is provided in section B.
Datasets. We train on 48 datasets and evaluate on 11 strictly unseen test datasets. The training tasks cover a wide variety of topics, including question answering, summarization, sentiment classification, and topic classification. The held-out tasks include natural language inference, word sense disambiguation, coreference resolution, and commonsense reasoning. Since no evaluation task appears during training, test performance reflects task-level generalization rather than memorization. We adopt this setup because it is frequently used for work on prompt-agnostic language models [14 Wei+25, Yan+24, Zho+22].
Templates. We use PromptSource [3] as the source of prompt templates. PromptSource provides a set of human-written templates covering paraphrastic and structural variation for every dataset. Chatterjee et al. [7] show that models are most sensitive to these perturbation types. Each dataset contains between 4 and 15 templates (see section B).
Preprocessing. We download all datasets from the HuggingFace Hub [Lho+21], except for StoryCloze [32], which we obtain from the original release.4 Three training datasets were unavailable in the required version and were replaced: tydiqa [9] with coqa_expanded, wikihop [WSR18] with riddle_sense [24], and gigaword [Par+11] with scitldr [5].
We manually filter every template against three criteria:
Applicability. The template must be compatible to the dataset currently distributed on HuggingFace. We found that several templates were not applicable to the currently available version. We discard these rather than attempting to repair them.
Task consistency. The template must preserve the task type of the dataset. Some templates convert an example into a different task. For example, the sentence-completion dataset HellaSwag [Zel+19] is reformulated as a topic classification task. Since HellaSwag is an evaluation dataset and topic classification is a training task, such a template would leak training tasks into the test set.
Solvability. The template must be solvable without any task-specific context. For example, one template from the topic classification dataset TREC [28], expects "other location" as the answer to the prompt "What is this question asking for? Where is the Eiffel Tower?" Such unsolvable templates penalize every model, regardless of capability, and would artificially lower worst-case scores while inflating apparent prompt sensitivity. We remove them.
After filtering, we discard any dataset with fewer than two valid templates since at least two formulations are required to measure prompt variation. Finally, to balance the contribution of each task, we cap the size of each training set at 10,240 examples and the size of each validation set at 512. The test sets remain at full size. The training set contains 417,238 individual examples.
Data splits. Validation reuses the training datasets, tasks, and templates while holding out examples, which isolates generalization to unseen inputs. The test split introduces unseen tasks, each with its own templates and examples. Therefore, it measures the out-of-distribution generalization that we ultimately care about. Reporting on both allows us to distinguish in-task generalization from the more challenging cross-task generalization. To improve performance during training, we compute the validation loss only on a subset of 4,096 examples. This set is used for early stopping and gradient interference calculations. After training, we evaluate using the full validation and test splits. We report the results for three splits: the test split evaluated on all templates (TEST-ALL), the test split evaluated on only the majority templates (TEST-MAJORITY), and the validation split evaluated on only the majority templates (VALIDATION-MAJORITY).
Training
Models. We evaluate the main methods using four base models that vary along two dimensions, model family and scale: Llama3.2-1B and Llama3.1-8B [Gra+24], and Qwen3-0.6B and Qwen3-8B [Yan+25]. These models allow us to test whether our findings generalize across architectures and whether robustness effects hold across model capacity. We chose Llama and Qwen for three reasons: (1) Their comparable and modest sizes allow for controlled comparisons and repeated experimentation. (2) Both are strong across a wide range of domains, increasing the likelihood that the models can solve the tasks [Gra+24; Yan+25]. (3) They have been used in prior work on prompt-agnostic language models [Wei+25] and model merging [Sto+25]. We use the base variant for every model to ensure that any observed differences in robustness are attributable to our training methods rather than prior instruction tuning and to limit the risk of test-set contamination.
We fully fine-tune the two small models. We apply LoRA [16] to the two 8B models. LoRA reduces computational cost and keeps the number of trainable parameters, and thus the dimensionality of the gradient matrix, manageable for the gradient-merging methods. All models are loaded through HuggingFace Transformers [Wol+20].
Instruction-tuning setup. We use TorchTune [4] for instruction tuning. Unless otherwise stated, each method is trained and validated on the majority of templates in each dataset and tested on all templates. CoIN and PPCL require label-consistent majority templates during training. Restricting all methods to the same majority templates allows us to compare them to data-construction approaches without introducing differences in template variance into the comparison. Additionally, since CoIN needs the majority label class to be at least three, we drop all datasets with fewer than three majority labels in majority training. We select the checkpoint with the best average performance and implement early stopping with a patience of 2.
Hyperparameters. We inherit the base hyperparameters from each model’s TorchTune configuration and only vary the learning rate. Starting from default of in TorchTune, we sweep for each combination of and model, giving 20 sweeps in total. The selected learning rates per method are reported in Table 4.2. Since all data-construction variants share the standard cross-entropy loss, we perform a single sweep per model for them on SINGLE using each dataset’s first template. Each sweep runs for the first 2,000 steps. Afterwards, we keep the learning rate with the best validation checkpoint.
| Method | Llama3.2-1B | Llama3.1-8B | Qwen3-0.6B | Qwen3-8B |
| Standard Loss | ||||
| CoIN | ||||
| PPCL | ||||
| Prompt-TIES | ||||
| Prompt-DARE |
Table 4.2. Learning rates selected per model and method. We sweep one learning rate per and model combination.
Due to computational constraints we do not run a separate learning-rate sweep for the gradient-merging methods Prompt-TIES and Prompt-DARE. Instead, we set their learning rate to the median of the learning rates selected for the other methods on the same model. The only hyperparameter we add for Prompt-TIES and Prompt-DARE is the amount of gradient we trim. We set this to 20% of the gradients, as this value performed well in initial experiments. For CoIN we adopt the values proposed by its authors: and . PPCL reports no stable defaults, so we tune , the weight of the Jensen–Shannon term, between values of . We run this sweep on Llama3.2-1B at a learning rate of for 2,000 steps. We select . The full set of hyperparameters is listed in Table 4.1.
We train all methods on the same base examples for one epoch. Thus, the multi-template strategies take times as many optimizer steps per dataset compared to Single. We deliberately do not match compute across runs to reduce the amount of computing power used in our experiments, as additional epochs would merely re-traverse already-seen examples rather than supply new gradient information. Moreover, initial testing showed no performance gains from longer training. Finally, prior work has shown that multi-template training outperforms single-template training, consistent with our findings [San+22; Wei+25].
Generation. For metrics that rely on generated text, we use a greedy decoder with a temperature of zero and no sampling. This makes the outputs deterministic, so differences across prompts reflect model variance rather than decoding noise.
Resources. We train all models using NVIDIA H100 80 GB HBM3 GPUs. The 8B models require four of these GPUs for training, while the smaller models require one. A single multi-template training takes six to ten hours. In total, we trained for 3,000 GPU hours.
Evaluation
Text-scoring metrics
Our main metric is Rouge-L [25], which measures the longest common subsequence overlap between the model’s generated answer and the reference. Following Wang et al. [Wan+22b], we adopt it as the standard score for instruction following on this kind of multi-task benchmark. As a secondary metric, we use rank classification accuracy, which scores each candidate answer option based on its log-likelihood and selects the option with the highest score. This metric was also used in [San+22].
The T0-benchmark was originally evaluated using rank classification accuracy. Therefore, making the generative Rouge-L our primary metric is a deliberate choice. First, rank classification accuracy does not reflect how these models are used. Through teacher forcing, the model is handed the candidate set and is asked only for a relative ordering of it. However, a deployed model generates an answer without a candidate set provided. Therefore, robustness measured under rank classification accuracy does not certify the robustness of the system as it is actually deployed. Second, and more importantly for our purpose, rank classification accuracy can mask the sensitivity we set out to measure. It only requires that the correct option remains marginally more likely, while the model’s generative behavior — which token it emits first, the form of the answer, and whether it follows the instruction at all — shifts substantially across reformulations. Thus, a model can appear prompt-robust under rank classification accuracy yet be brittle in generation. Third, as a constrained task it leaves little headroom on capable base-models. Rank accuracy quickly approaches the ceiling (see subsection 5.4.2), which compresses the differences between methods that our comparison depends on. Fourth, rank classification accuracy only works for the test split of the dataset because the training and validation splits incorporate many templates without concrete answer sets, for example, all summarization tasks. Nevertheless, we report both for the test set. Rank classification allows us to be comparable to the source benchmark and serves as a means of verifying whether our generation-based conclusions are transferable.
Robustness metrics
We calculate all robustness and diagnostic metrics based on text scoring metrics. For conditional local variance, we select a threshold of for Rouge-L and a threshold of 1 for rank classification accuracy. As shown in section E, the choice of this hyperparameter does not change the ranking of the best-performing methods in our results. Additionally, we observe that a higher threshold increases the conditional local variance for all methods because we remove examples that perform poorly across all paraphrases and thus have low variance. With this in mind, we chose a threshold of as a trade-off between not rewarding poor performance and including as many examples as possible in the calculation.
Statistical significance tests
We assess whether the top-ranked method is significantly better than each competing method for each metric and summary statistic using a paired, one-sided bootstrap test. For a given pair of runs, we first reduce each example to the perexample means across templates for the average statistics, the per-example variance for the local-variance statistics, or the scores of the best- or worst-performing template per dataset for the best- or worst-template statistics. Then, examples are paired across the two runs. We draw bootstrap replicates. In each replicate, we resample the examples with replacement within each dataset. Then, we compute the dataset-level mean difference between the two runs and macro-average these differences across datasets. From the bootstrap distribution, we form a one-sided pivotal confidence interval and declare the top run to be significantly better if the lower bound exceeds zero.
We report significance at and correct it for multiple comparisons within each metric using the Bonferroni correction, giving an effective per-test threshold of . For each metric, we report the best group: the top-ranked run and every run that is not significantly worse than it under this test.
Baselines
We compare Prompt-TIES and Prompt-DARE to eight baselines. Six of these are data construction approaches, as described in subsection 3.2.1. Single first template, Single second template, and Single third template are single-template runs that always select the first, second, or third template of every dataset, respectively. We fix the templates because some datasets from the same family share templates. We evaluate the impact of template choice in subsection 5.4.3. In addition, we include the three multi-template data construction approaches All shuffled, One-at-a-Time, and All-in-One-Batch, which are also described in subsection 3.2.1. The remaining two baselines are PPCL, as described in subsection 3.2.2 and CoIN, as described in subsection 3.2.3. For CoIN we always use the label readout version, following the original CoIN paper [Yan+24]. We analyze the impact of the prompt readout version in subsection 5.5.1.
Results
This chapter evaluates Prompt-TIES and Prompt-DARE against the baselines described in § 3.2. We structure it around the contributions laid out in the introduction (see chapter § 1). First, we analyze how to measure prompt brittleness (§ 6.1) and find that it is best captured as local, example-level variance since the template-example interaction rather than a fixed template ranking dominates. Next, we characterize gradient interference in multi-prompt instruction fine-tuning (§ 6.2), demonstrating that it is driven by per-parameter sign conflict rather than by cosine misalignment. These findings motivate our proposal of Prompt-TIES and Prompt-DARE, which we then compare to our baselines in terms of performance and robustness (§ 6.3). Our data construction methods achieve the highest accuracy, and our gradient-merging methods provide the greatest local robustness for fully fine-tuned models. We probe how far these conclusions hold (§ 6.4) across evaluation splits, metrics, template counts, and model scale. Finally, we diagnose why PPCL and CoIN underperform (§ 6.5), tracing each failure to a lack of transfer between the training and test distributions.
Local versus global variance
Prior work quantifies prompt brittleness through the best and worst template of a dataset, providing a global view of robustness [Cao+24; Scl+24]. However, we argue that this view is incomplete. If brittleness arises from the interaction between a template and a specific example, rather than from the template itself, then a dataset-level ranking hides most of the sensitivity. This section tests this hypothesis and establishes the local, example-level view adopted throughout the rest of the chapter.
We quantify the interaction through the interaction fraction defined in subsection 3.4.1. It is the share of per-example brittleness that cannot be explained by a fixed template ranking. A value of zero means that the same template is always the best and another template is always the worst, so the global view remains unchanged. A value approaching one means that the best and worst templates are almost entirely example-specific.
On average, across datasets and models is 54% and exceeds 70% on ANLI and WiC (see Table 5.1). On average, this means that a global best-versus-worst comparison discards more than half of the observed brittleness. The lone exception is HellaSwag (15%), where a few templates perform poorly across all examples. We will return to this in subsection 5.3.2, as HellaSwag is the dataset on which our gradient methods do not achieve the lowest conditional local variance. The effect weakens with scale, dropping from 56 to 50 within the Llama family and from 66 to 41 within Qwen, consistent with the regime shift analyzed in subsection 5.3.1.
| Dataset | Llama | Qwen | |||
| 1B | 8B | 0.6B | 8B | ||
| ANLI-r1 | 15 | 73 | 79 | 88 | 50 |
| ANLI-r2 | 15 | 73 | 81 | 90 | 59 |
| ANLI-r3 | 15 | 77 | 77 | 88 | 60 |
| CB | 15 | 36 | 31 | 52 | 15 |
| COPA | 7 | 72 | 37 | 80 | 26 |
| HellaSwag | 5 | 21 | 7 | 18 | 15 |
| RTE | 9 | 65 | 70 | 63 | 55 |
| StoryCloze | 5 | 44 | 71 | 75 | 29 |
| WSC | 10 | 46 | 30 | 54 | 38 |
| WiC | 9 | 80 | 78 | 93 | 51 |
| WinoGrande | 6 | 38 | 26 | 21 | 47 |
| Macro-average | 56.8 | 53.4 | 65.6 | 40.5 |
Table 5.1. Table 5.1: Interaction fraction on the test split, averaged over all training runs. High values indicate that the best/worst template is example-specific. Low values indicate uniformly good/bad templates. is the number of templates.
Two consequences follow. First, reporting only the best and worst templates understates prompt sensitivity. Therefore, we adopt the conditional local variance as our primary robustness metric and only retain the best- and worst-template scores for comparability with previous work. Second, since brittleness is an example-level interaction rather than a property of individual templates, a method that merely reselects or reweights templates cannot eliminate it. The method must act at the level of the individual example. This is precisely what our per-prompt gradient merging does (see § 3.3 and subsection 5.3.2).
Per-template gradients interfere
We measure gradient interference on two models from the Llama family that were trained using the All-in-One-Batch setting. For both models, we take measurements every 1,000 optimizer steps on a subset of the validation split. Since we do not optimize for these metrics, we report the average over training. For Llama3.1-8B we do not include timestep 0, because the LoRA weights are initialized with zero, and evaluation is done before training. The full raw scores can be found in section F.
Gradients interfere in sign. On Llama3.2-1B, the mean pairwise cosine similarity between formulations is 0.543, which is high relative to the similarity of task gradients, as reported in Yu et al. [Yu+20] (see Table F.1). Even the most conflicting template pair drops only to 0.294. Since cosine similarity is always positive, a cosine-based intervention such as PCGrad [Yu+20] would not bring the desired results.
However, at the coordinate level the template gradients disagree sharply in sign. At least two formulations push in opposite directions on 57.2% of the trainable parameters, which is exactly the conflict that sign-based merging methods (§ 3.3) are designed to resolve. Plain averaging of the per-template gradients reduces their magnitude by 19.7%, and the gradients have an effective rank of . Together, these metrics show that the formulations span several competing update directions rather than one shared direction. This pattern remains consistent throughout training, with sign conflict ranging from 56% to 62% and cancellation ranging from 19% to 22%.
The LoRA adapters and size of Llama3.1-8B do not eliminate this interference. The mean pairwise cosine similarity (0.549, most conflicting pair 0.286), the cancellation (17.5%) and the effective rank () are comparable to the Llama3.2-1B values. The coordinate-level sign disagreement is slightly higher at 63%. Overall, the diagnostics confirm that the interference is comparable in severity for both Llama models. However, Prompt-TIES and Prompt-DARE still fail to successfully resolve gradient interference for Llama3.1-8B (see subsection 5.3.2). We interpret these results as indicating that LoRA updates share the same interference but do not share a common coordinate system. Thus, a coordinate-wise merge cannot act on them cleanly [Sto+25]. As with Llama3.2-1B, the findings are stable across training.
Interference concentrates in the early layers. Resolving the gradients by module shows that the conflict is not uniform across the network (see Figure 5.1). Cosine similarity is lowest and sign conflict highest in the first transformer blocks.
Figure 5.1. Gradient interference declines with depth. The mean pairwise cosine similarity (left) and sign conflict (right) of the per-template gradients are shown by the relative depth of the transformer block. We separate attention and MLP sublayers. The metrics are averaged over evaluations every 1000 optimizer steps on a subset of the validation split during All-in-One-Batch training. Raw scores can be found in Table F.2 and Table F.3.
Then the interference decreases with depth. This effect is stronger in Llama3.1-8B, where the first layers have higher interference. The gap in absolute sign conflict and cosine similarity between the first and last layers is 23.4 percentage points and 0.266, respectively. Across the later layers, the difference in interference between the models flattens out. We hypothesize that with growing abstraction from the surface form of the prompt the interference reduces. We did not test whether a layer-specific merging rule would improve the results. Interference is roughly the same in the attention and MLP layers. The attention layers only have marginally more interference. Therefore, we do not prioritize either part during gradient interference removal.
The performance–robustness frontier
We evaluate Prompt-TIES and Prompt-DARE against the baseline methods in terms of performance and robustness, on the test-all split. Figure 5.2 plots each method on the plane defined by the average Rouge-L performance and conditional local variance for each of the four base models. It defines the Pareto-optimal set. Figure 5.3 reports the global variance, as in previous work, through each method’s mean, best-template, and worst-template Rouge-L performance [Cao+24]. All scores are expressed as the Rouge-L difference from the average performance of the Single methods, which abstracts individual model performance. The raw scores underlying both figures are listed in Table C.1.
Figure 5.2. Performance–robustness frontier. Each point represents a training method and is positioned by the mean Rouge-L (, better) and conditional local variance (, better). The scores are from the test-all split. The Pareto-optimal set is outlined in black and connected by a solid line. The stars indicate the statistically best group per model: the pink star for conditional local variance and the indigo star for average Rouge-L. Prompt-TIES and Prompt-DARE are the most robust on the fully-finetuned models.
Figure 5.3. Per-method Rouge-L relative to the average Single performance. We report the scores on the test-all split. The circle, square, and triangle mark the average, best- and worst-template score respectively. The dashed span between the worst and best template reflects the method’s global sensitivity to prompt variation. The vertical dashed lines mark the average performance of the Single runs. A star above a marker indicates membership in the statistically best group for that statistic.
Scale sets the regime
The two small models exhibit prompt-induced local variance several times higher than the large models across all methods. The best methods for the small models achieve a conditional local variance of 0.06, whereas the best methods for the large models remain below 0.03 (see Figure 5.2). The spread of methods within a model is small compared to the difference in performance between the two model sizes. The same pattern holds for average performance, though gains between Qwen3-0.6B and Qwen3-8B are slim. The same applies to global variance, where the scaling effect is strongest within the Llama family. On average, the spread between the worst and best templates decreases from 0.287 to 0.217 (see Figure 5.3). For the Qwen family, however, the effect is reversed. We discuss in subsection 5.4.4 why we hypothesize that Qwen3-8B behaves differently. These findings frame every per-method comparison that follows. Method differences are real, but they operate within a regime largely fixed by model size.
Gradient merging improves local robustness
Gradient merging on the fully fine-tuned models. On the two small, fully fine-tuned models, Prompt-TIES and Prompt-DARE roughly halve conditional local variance relative to the baselines (see Figure 5.2). On Llama3.2-1B, this improvement comes at the expense of accuracy, while on Qwen3-0.6B the gradient merging approaches are the most performant and robust.
This local robustness does not transfer to global robustness. Although our gradient merging approaches outperform the data construction basis All-in-One-Batch they are not the best models in terms of global robustness. Meaning, on a single example, gradient merging reduces variance. However, across the full set of templates, these changes average out (see § 6.1 for an analysis of local and global variance). We hypothesize that gradient merging approaches target the example-template interaction, but cannot improve worst templates overall. This is evident in the interaction fraction, where across all models Prompt-TIES reduces the average to 50.5%, compared to 53.5% for All shuffled. Additionally, HellaSwag is the only dataset on which our gradient merging approaches do not reach the lowest conditional local variance. This dataset is dominated by global template effects (see Table 5.1).
Qualitative analysis of gradient merging approaches. We qualitatively examine our hypothesis that gradient merging approaches improve conditional local variance by reducing template-example interaction. To do so, we manually review the datasets’ predictions. From the SuperGLUE COPA dataset, we select six examples with the highest conditional local variance in the Llama3.2-1B-All shuffled predictions. We compare these predictions (see Table D.1) to those of Llama3.2-1B-Prompt-TIES (see Table D.2).
The models always generate one of the two possible answers. Across all our manual inspections of the model outputs, this general instruction following, in the sense of predicting in the correct format, appears. Beyond that, Prompt-TIES produces more consistent outputs across these examples. All shuffled splits its predictions roughly evenly, as expected given its high local variance, and shows no clear pattern of which template is the best or the worst. Prompt-TIES predicts the same output for all templates in four of the six examples. This consistency can go in either direction, as seen in the last example where the model is wrong for every template.
Finally, Prompt-TIES does not necessarily improve the global variance. The best template score remains at 5 out of 6, though now a new template is the best template. The worst template score increases by one. Although, there are minor improvements in this subset, the examples are selected based on difficulty, so their effect is diluted when averaged with easier examples. This aligns with our findings across the datasets, in which the gradient merging approaches only marginally change global variance.
The LoRA models resist merging. For the two larger LoRA-trained models, the robustness advantage of gradient merging disappears. While these models remain among the most locally robust, they are outperformed by approaches with additional loss functions. This aligns with the key finding of KnOTS [Sto+25], that LoRA updates exist in different subspaces and cannot be seamlessly combined without an explicit subspace alignment step. Our coordinate-wise Prompt-TIES and Prompt-DARE operators do not perform this subspace alignment step. As shown in § 6.2, the interference persists, so an efficient KnOTS-style alignment step in gradient space could restore performance in the LoRA setting. This is the clearest avenue for future work on the method.
Marginal differences between Prompt-TIES and Prompt-DARE. Until now, we have only examined Prompt-TIES and Prompt-DARE together. When we separate them, we find that Prompt-TIES has a higher average performance, but there is no clear pattern indicating better robustness.
Data construction achieves the highest accuracy
The data-construction strategies of subsection 3.2.1, which leave the loss objective untouched and vary only the within-batch schedule, have the strongest performance overall.
All shuffled is the strongest accuracy baseline. All shuffled is the clear performance winner. It achieves the highest accuracy in three of the four models and has the greatest mean gain among the data schedules on Llama3.1-8B (+2.0), Qwen3-0.6B (+2.6) and Qwen3-8B (+1.4). Only on Llama3.2-1B One-at-a-Time has a higher mean gain (+5.9 vs. +4.1). Additionally, it consistently has one of the best-performing templates. Therefore, the least-engineered, unconstrained use of the templates is a hard baseline for more elaborate methods to clear. While the method is effective at improving performance, it does not reduce variance. It has an average conditional local variance across models and, only on Qwen3-0.6B, one of the best worst-templates.
One-at-a-Time rarely leads. One-at-a-Time is the data construction approach used in prior work [Wei+25]. Wei et al. [Wei+25] select this approach for their model training without evaluating it against other data-construction approaches. We demonstrate that it is the best data-construction approach only for Llama3.2-1B, while on all other models, it performs similarly to or worse than All shuffled across all metrics. This approach may be useful in an online setting where prompts are generated on the fly, but it deprives the model of template variability within the batch.
All-in-One-Batch underperforms. Of the three multi-template data construction approaches, packing all formulations of an example into a single batch is the worst. All-in-One-Batch tends to produce the lowest accuracy and the highest prompt-induced variance, both locally and globally. Forcing every rendering of an example into a single gradient step sacrifices example diversity without gaining robustness. We hypothesize that this occurs due to gradient interference, as shown in § 6.2.
Single-template baselines underperform. The single-template baselines tend to have the lowest accuracy and the highest variance of all the methods. The one exception is Qwen3-8B, where the second Single template achieves the highest conditional local variance. We hypothesize that this is an artifact of Qwen3-8B (see subsection 5.4.4). More striking is the variability across the single-template choices themselves. The choice of template substantially shifts both accuracy and robustness, with a mean performance difference of 8.4 between the first and third templates on Qwen3-8B. The size of the difference and which template is best differ from model to model, with no template remaining consistent across models. Thus, single-template performance is hard to optimize, especially since the variance is dominated by concrete template-example interactions. We analyze the effect of template selection in more depth in subsection 5.4.3.
Summary of data construction approaches. Our analysis underscores the importance of multi-template training, which aligns with previous work [Wei+22; Wei+25]. Among multi-template data construction approaches All shuffled performs best. We hypothesize that this is due to a trade-off between two opposing effects of placing multiple templates in the same batch. In-batch template variance helps the model generalize across formulations, while gradient interference between templates of the same example hinders generalization. The two extreme schedules illustrate this trade-off: One-at-a-Time offers too little in-batch template variance, and All-in-One-Batch incurs too much gradient interference. All shuffled strikes a balance between the two. It mixes templates from different examples to increase in-batch variance while making it unlikely that the same example will appear under multiple templates within one batch. This finding aligns well with our gradient merging results. They improve All-in-One-Batch by removing gradient interference. If data construction approaches were the only option, we would advise against previous work and recommend the All shuffled approach.
Auxiliary objectives rarely reach the frontier
PPCL is unstable across models. PPCL is the least reliable method in the study. While it achieves the highest score on all metrics for Llama3.1-8B, it performs poorly elsewhere. It has the highest local variance of any method and performs worse than the Single first template baseline on all metrics on both Qwen models. We analyze this brittleness in subsection 5.5.2 and trace it to a failure of cross-task transfer.
CoIN is steadier but usually dominated. CoIN is more stable than PPCL and is on the Pareto frontier for Qwen3-8B. However, a simple data construction approach always matches or outperforms it on all metrics. It is difficult to justify the structured batch construction and extra loss objective if they do not significantly improve upon the standard loss function. In subsection 5.5.1 we analyze why the representational alignment that CoIN enforces does not translate into generation-time performance.
Summary of the frontier
The frontier is dominated by two method families. Data construction, especially the ALL SHUFFLED, achieves the highest accuracy in three out of four models. PROMPT-TIES and PROMPT-DARE achieve the lowest conditional local variance on fully fine-tuned models. Auxiliary-objective methods only reach the frontier in single, model-specific cases (Llama3.1-8B for PPCL, Qwen3-8B for CoIN) and are otherwise dominated by cheaper data construction methods. Three conclusions follow:
A practitioner prioritizing accuracy with minimal effort should use ALL SHUFFLED. To specifically suppress conditional local variance when fully fine-tuning, gradient merging approaches should be chosen.
The more complex robustness objectives of PPCL and CoIN are difficult to justify. Their advantages are model-specific, and in the case of PPCL, they come at the cost of severe instability elsewhere.
The gap between the best and worst templates accounts for between 34% on Llama3.1-8B and 57% on Llama3.2-1B of the average performance. Thus, although the methods and model scaling improve global robustness, significant variation in performance remains across templates.
Robustness of the conclusions
In § 6.3, we measure the hard case using an out-of-distribution task, templates, and examples, and scoring with a generative metric. In this section, we examine the robustness of our findings using the VALIDATION-MAJORITY split and rank classification accuracy.
Additionally, we analyze confounders that could influence our results. First, we examine how much of the results can be explained by the number and choice of templates. Second, we examine why Qwen3-8B behaves differently from the other models.
In-task generalization on the validation-majority split
The validation split reuses the training datasets, tasks, and templates, holding out only the examples (§ 5.1). Therefore, it isolates generalization to unseen inputs compared to the harder cross-task and cross-template transfer demanded by the test split. Figure 5.4 repeats the performance–robustness layout on the validation-majority split.
Figure 5.4. Figure 5.4: Performance–robustness frontier on the validation-majority split. Each point represents a training method and is positioned by the mean Rouge-L (, → better) and conditional local variance (, ↑ better). The scores are from the validation-majority split. The Pareto-optimal set is outlined in black and connected by a solid line. The stars indicate the statistically best group per model: the pink star for conditional local variance and the indigo star for average Rouge-L. Prompt-TIES and Prompt-DARE are the most robust on the fully-finetuned models.
Absolute levels are not comparable across splits. We do not interpret a performance increase from the test to the validation based on the absolute Rouge-L values, because the two splits are from different tasks. For instance, the Rouge-L score is mechanically lower for a free-form summarization task in the validation set than for a coreference resolution task with short, closed-label answers. Directly comparing the mean Rouge-L score between the splits conflates generalization difficulty with output length. Therefore, we present the validation split results to check the relative ordering of methods.
The per-method ordering stays the same. The relative ordering from the test split is essentially preserved. All shuffled remains among the strongest in terms of accuracy. Prompt-TIES and Prompt-DARE again achieve the lowest prompt-induced variance on small models. PPCL and CoIN again fail to improve upon data construction approaches for most models. The robustness of the main findings shows that the results are stable across splits and are not just a phenomenon based on our test split.
What the validation view changes. Although the relative ordering remains the same, we observe changes in the validation split. As expected, the difference between the multi- and single-template methods widens because every multi-template method is trained on all the majority templates in a dataset. Therefore, evaluating on those same templates is nearly in-distribution. In contrast, a Single saw only one template per dataset, making the remaining majority templates out-of-distribution. Therefore, the single-multi gap is wider here than on the test set, where all methods face unseen templates, and the gap partly closes. These results confirm that the multi-template method’s advantage largely stems from template coverage and that the held-out-task test split is a more demanding and informative measure of robustness. Additionally, PPCL closes the performance gap to CoIN. On the test-all split, PPCL was markedly less stable than CoIN. On the validation-majority split, the performance of both is closer together, though they are still outperformed by data construction methods. We hypothesize that PPCL’s consistency penalty does not transfer to held-out tasks and templates, causing instability in the test set. We analyze this hypothesis in subsection 5.5.2.
Rank classification accuracy saturates
The T0 benchmark was originally scored using rank classification accuracy [San+22]. Although our main results are reported using Rouge-L, we also report rank classification accuracy to ensure comparability.
Figure 5.5 shows that the difference between the worst and best templates decreases across all models. Additionally, the differences between the single template approaches shrink, especially for the Qwen models. For Qwen3-8B, most methods are statistically the same for all metrics. Overall, these results demonstrate the anticipated failure mode in subsection 4.3.1: rank classification provides the model with the answer set and only asks for a relative ordering. A capable model can maintain that ordering while adapting its generative behavior based on the prompt formulation.
Figure 5.5. Per-method rank classification accuracy relative to the average SINGLE performance. We report the scores on the TEST-ALL split. The circle, square, and triangle mark the average, best- and worst-template score respectively. The dashed span between the worst and best template reflects the method’s global sensitivity to prompt variation. The vertical dashed lines mark the average performance of the SINGLE runs. A star above a marker indicates membership in the statistically best group for that statistic. Almost every method on Qwen3-8B falls within a fraction of a point of the baseline and into the statistically best group. This illustrates the ceiling effect that motivates our use of generative Rouge-L as the primary metric.
Template count versus template choice
The validation split attributed much of the multi-template advantage to template coverage (see subsection 5.4.1). Thus, we investigate whether the performance gains are driven by the sheer number of training formulations or by the inclusion of important templates. To separate these two factors, we conduct a controlled sweep within the ALL SHUFFLED family on the two fully fine-tuned models. For the count dimension, we train on the first one, two, and three templates per dataset, on the full majority set (5.3 templates per dataset, on average), and on all available templates (6.3 templates, on average).5 For the choice dimension we only use one template, but vary which one we use. We compare the three fixed positions from our baselines, a per-dataset one-time random draw, and the empirically best and worst single template, which are selected post hoc from the full pool of templates based on the ALL SHUFFLED run.
Robustness scales with template count. Adding templates increases the mean and worst-template performance while decreasing the conditional local variance on the TEST-ALL split (Figure 5.6). For Llama3.2-1B, however, we see a higher performance with two template training than with three template training. This is likely because template number two improves performance drastically, while template number three lowers it for single-template training. This means the added benefit of one new template may decrease if the added template is much worse than the initial set (see Figure 5.7).
Figure 5.6. Robustness scales with template count. Average Rouge-L (top, better), worst-template Rouge-L (middle, better) and conditional local variance (bottom, better) on the TEST-ALL split (left) and the VALIDATION-MAJORITY split (right), as a function of the number of training templates per dataset. One line per fully fine-tuned model. Training on more templates increases the performance and robustness.

Figure 5.7. At a fixed count template choice is unstable. We report the scores on the TEST-ALL split. The circle, square, and triangle mark the average, best- and worst-template score respectively. The dashed span between the worst and best template reflects the method’s global sensitivity to prompt variation. The vertical dashed lines mark the performance of the ALL SHUFFLED run. A star above a marker indicates membership in the statistically best group for that statistic. For readability, we removed "single" and "template" from the method names. Template selection is unreliable and cannot be transferred between models.
This trend is clearer for the VALIDATION-MAJORITY split (see Figure 5.6), where the saturating nature of the effect becomes apparent. The curve is monotonically increasing, but the performance gains achieved by adding templates decrease as more templates are added. Therefore, the marginal value of an extra formulation is front-loaded, as it is important for the model to see variance in the templates, but the variance becomes less and less effective.
Template choice does not generalize. To isolate the effect of the number of templates from the choice of templates, we fixed the number of templates to one and tested different template selection metrics (see Figure 5.7). The oracle best and worst template runs chosen with full knowledge of the validation dataset scores do not provide stable gains across models. While they show moderate gains on Qwen3-0.6B, they are detrimental to performance on
Llama3.2-1B. This is not just a test set artifact. The performance of the Llama3.2-1B worst template run on the VALIDATION-MAJORITY split is 19.5 points lower than the single first template run (see Table C.6). We hypothesize this is due to unstable training based on template selection. Additionally, template selection is not transferable across models, as the best single templates agree on only of datasets, and the worst agree on .
Random template selection is the most stable, hinting at the difficulty of selecting good training templates. Importantly, none of the methods can match the performance of the ALL SHUFFLED, as shown by the dashed lines in Figure 5.7. This means that template choice cannot make up for the lack of template count.6
Overall, we found that adding more templates had a positive impact on all metrics, even though the marginal gains decreased. However, selecting better templates is a brittle and model-dependent process.
Why does Qwen3-8B behave differently?
Qwen3-8B is often an outlier. For instance, the performance difference between model sizes in the Qwen model family is smaller than in the Llama family, and the single template methods have a wider range. The SINGLE second template method even has the highest conditional local variance (see Figure 5.2). Additionally, the scores saturate strongly on the rank classification accuracy metric, with every nonsingle template run having the best worst- and best-template. Finally, Qwen3-8B has a much smaller spread in Jensen–Shannon divergence and contrastive difference than the other models (see Figure 5.8 and Figure 5.9). We hypothesize that this is due to not training the output layer of the model. We applied LoRA to the output layer of Llama3.1-8B as it would not adhere to the chat template otherwise. Qwen3-8B already uses the correct chat template, even as a base model. Therefore, we used the standard TorchTune implementation. Training the output layer appears to be crucial for adapting base models to multi-template instruction fine-tuning; thus, the results for Qwen3-8B should be viewed with caution.
Figure 5.8. CoIN only aligns the label readout. The hidden-state difference (as defined in subsection 3.4.3) on the TEST-MAJORITY split. A higher difference is better. Squares show the difference at the label readout, while circles show the difference at the prompt readout. A star next to a marker indicates membership in the statistically best group for that readout. CoIN attains a large gap at the label readout but not at the prompt readout, showing that its representational alignment does not carry over to the deployment-relevant generation mode.
Figure 5.9. PPCL only aligns the output distributions in validation. The cross-template Jensen–Shannon divergence of the output distributions on the prompt readout (as defined in subsection 3.4.3). A lower Jensen–Shannon divergence is better. Squares show the score on the validation-majority split, while circles show the score on the test-majority split. A star next to a marker indicates membership in the statistically best group for that readout. PPCL achieves for the Llama models substantially lower divergence in the validation set, but this advantage disappears in the held-out test set.
Why the auxiliary objectives fail
As discussed in § 6.3, PPCL and CoIN rarely reach the frontier and fail to improve upon simpler data construction approaches. This is unexpected since both methods have been shown to perform well in previous work [35 Yan+24]. Therefore, we analyze why in our setting their performance is poor, separating the question into two parts. First, we test whether the training works as intended, i.e., whether each auxiliary objective effectively moves its target quantity. We examine this for CoIN in subsection 5.5.1 and for PPCL in subsection 5.5.2. Second, we test whether the targeted quantity is a good objective for prompt robustness (subsection 5.5.3). There, we analyze the correlation between the diagnostic metrics and robustness, as well as the causal relationship between them. The raw scores for this section can be found in Table C.5 and Table C.6.
CoIN aligns label rather than prompt representations
The rationale behind CoIN’s contrastive objective follows from previous work showing that models tend to cluster their representations based on lexical similarity rather than semantics and that their robustness improves when they cluster based on semantics [1]. CoIN therefore adds a contrastive objective that rewards the model for organizing its representations by semantic meaning. To test whether this objective shifts the target, we measure the contrastive difference in evaluation: the difference in cosine similarity between the representations of semantically equivalent inputs and lexically similar inputs (see subsection 3.4.3 for the exact definition).
CoIN achieves the largest contrastive difference of any method at the label readout (see Figure 5.8), meaning it clusters by semantic meaning rather than lexical surface form. Since the label readout is also the point at which the loss is applied, the objective shifts its target as intended. All other methods are near zero at the label readout, consistent with previous work [1]. However, this gap shrinks to within roughly 0.01 at the prompt readout on the Qwen models. On the Llama models CoIN separates even worse than competing data construction approaches. Interestingly, for every other method, the separation is stronger at the prompt readout, though it remains small. These findings demonstrate that CoIN can separate prompts when paired with their labels, but not when the prompt stands alone. We observe no large differences between the TEST-MAJORITY and VALIDATION-MAJORITY splits.
PPCL enforces consistency only in-distribution
The rationale behind PPCL is to align the output distribution across semantically equivalent prompt formulations [35]. To test if the target moves, we measure the cross-template Jensen–Shannon divergence of the output distributions, which is the quantity that PPCL penalizes directly (see subsection 3.4.3). Lower divergence indicates more consistent generation.
On the Llama models, PPCL achieves the lowest Jensen–Shannon divergence on the VALIDATION-MAJORITY set, but this advantage does not transfer to the TEST-MAJORITY set. Consequently, PPCL has the largest span of Jensen–Shannon divergence between the VALIDATION-MAJORITY and TEST-MAJORITY sets. While the objective enforces agreement across formulations on which it was trained, it does not produce a model that is consistent across unseen formulations and tasks. On the Qwen family, PPCL does not achieve the lowest Jensen–Shannon divergence, even on the VALIDATION-MAJORITY set. Yet it again shows the largest gap between VALIDATION-MAJORITY and TEST-MAJORITY on Qwen3-0.6B. We observe no significant difference between the prompt and label readouts. We attribute this to the labels being short, which causes both readouts to be dominated by the distribution of the first output token.
Therefore, the PPCL objective moves its target only within the distribution and does so less reliably than CoIN moves its own. We hypothesize that this occurs because the output distribution is a quantity that every model shapes by default and is thus a less distinctive lever than the hidden-state representation.
Do the diagnostics predict robustness?
We have established that CoIN and PPCL do move their respective targets, at least in distribution. Now, we turn to the second question: Are these quantities good objectives for achieving robustness? We test whether they correlate with higher performance and robustness to check if the reasons for choosing these objectives actually hold or if they are not effective levers for targeting robustness. To do so, we correlate each diagnostic with task performance across methods. We remove single methods from the correlation because they artificially increase correlation. There are three single method runs, which all have poor performance, high Jensen–Shannon divergence, and low contrastive difference. For each model, we compute the Spearman rank correlation, , between the diagnostic metric and robustness or performance over the entire dataset. Note that this measures correlation, not causation. Below, we test whether this correlation can motivate
new design decisions and demonstrate causation. Table 5.2 reports the mean over the four models for each diagnostic and readout.
| metric | readout | test avg | test clv | val avg | val clv |
| Diff | prompt | +0.38 | +0.06 | +0.26 | -0.23 |
| label | +0.08 | +0.60 | -0.15 | +0.49 | |
| JS | prompt | +0.17 | +0.13 | -0.34 | +0.71 |
| label | +0.05 | -0.06 | -0.21 | +0.66 |
Table 5.2. Mean cross-method Spearman correlation between each diagnostic and each performance statistic, averaged over the four models. The diagnostics are the hidden-state difference (Diff) and the Jensen–Shannon divergence (JS), both defined in subsection 3.4.3. The performance statistics are the Rouge-L accuracy (avg) and the local variance (conditional local variance). We report each correlation per readout position on the test-majority and validation-majority splits.
Correlation of contrastive difference and performance. The prompt readout for the contrastive difference is positively correlated with accuracy (+0.38 on the test set and +0.26 on the validation set) and negatively correlated with robustness on the validation set (see Table 5.2). This means that organizing the hidden representation semantically rather than lexically corresponds with higher accuracy and robustness, as in [1]. The label readout is not correlated with accuracy (+0.08 on the test set, −0.15 on the validation set) and decisively, the correlation to conditional local variance becomes positive, meaning it is correlated with high variance. This is consistent with CoIN’s own behavior. CoIN can contrast prompts in the label readout, but it cannot align them in the prompt readout, resulting in poor performance. Overall, we find that the contrastive difference at the label readout is a misleading proxy.
Correlation of Jensen–Shannon divergence and performance. In validation, lower cross-template Jensen–Shannon divergence correlates with lower conditional local variance, while the correlation with performance is much weaker, though still present. On the test split there is little to no correlation. As analyzed in subsection 5.5.2, we observe no meaningful difference in correlation between the readout points. These findings demonstrate that Jensen–Shannon divergence helps align model outputs with training templates, thereby decreasing variability in answers and conditional local variance. However, this benefit does not extend to new templates and tasks.
Retargeting the contrast to the prompt readout. We test whether switching to the prompt readout, which correlates with higher performance and lower variance, actually results in a better model (see Table 5.2). To test this hypothesis, we use CoIN, which is identical to CoIN except that the contrastive loss pools the hidden state at the last prompt token rather than the last target token (see subsection 3.2.3). Due to computational restrictions, we train CoIN on the two small, fully fine-tuned models. CoIN significantly increases the contrastive difference at the prompt readout and achieves the highest score of all models (0.61 on both models, up from 0.21 and 0.08 from CoIN). Its label-readout difference collapses to nearly zero. This mirrors the behavior of CoIN, with each variant winning the readout it is trained on.
However, neither the robustness nor the accuracy improves. Rouge-L does not change on Llama3.2-1B (−0.4 pp) and drops sharply on Qwen3-0.6B (−4.4 pp). The conditional local variance is unchanged or slightly worse, and on both models CoIN falls short of the All shuffled. Aligning the prompt representation is thus correlated with robustness across methods, but it does not cause it. This means that CoIN’s contrastive objective does not become competitive merely by changing the token on which the loss is conditioned. Our proposed gradient merging methods outperform all baselines on conditional local variance on fully-finetuned models.
Conclusion
The goal of this thesis is to improve prompt robustness by reducing the gradient interference that arises in multi-prompt training. Previous studies have attempted to improve prompt robustness at train-time by either adding additional phrasings to the training data or by adding auxiliary loss objectives. However, we found that the former introduces gradient interference and that the latter is brittle.
First, we define how prompt robustness should be measured. In our experiments, brittleness does not stem from a few uniformly weak templates, but rather from the interaction between a template and the specific example to which it is applied. Therefore, we treat local variance — how much a single example’s answer fluctuates across phrasings — as the robustness target that best reflects the user experience rather than the performance of the worst template alone. Global metrics average out much of this variance. 54% of local variance stems from template-example interaction and is lost in the global measure.
We characterize gradient interference in multi-template training, a common approach to improving prompt robustness. Across trainable parameters, 57% have at least two per-template gradients pushing in opposite directions. The naive average discards approximately one-fifth of the gradient magnitude through cancellation. Compared to multi-task training, the cosine similarity between gradients is comparatively high, so the interference is dominated by per-parameter sign conflict and concentrated in the early layers of the network.
Based on these findings, we adopt sign-based interference-resolution operators from model merging for gradient merging. We introduce Prompt-TIES and Prompt-DARE, as the per-template gradient merging variants of the model-merging methods TIES and DARE. Both methods first sparsify the gradients, then elect a majority sign per parameter, and finally restrict the merge to parameters that agree with that sign.
We conduct a controlled comparison of these methods against train-time prompt-robustness approaches spanning all three established classes: data construction, consistency regularization (PPCL), and contrastive alignment (CoIN). Data construction approaches, especially All shuffled, improve performance but not the conditional local variance. The performance of PPCL and CoIN varies strongly from model to model. Our gradient-merging models roughly halve the conditional local variance at little cost to accuracy on fully fine-tuned models by directly reducing the template-example interaction that causes brittleness. However, on the LoRA-trained 8B models this advantage disappears, consistent with the subspace mismatch of LoRA updates reported by KnOTS [Sto+25].
We further diagnose why the purpose-built auxiliary objectives of PPCL and CoIN rarely improve robustness. Both objectives improve the targeted metric during training but do not generalize beyond it. Additionally, while the targets of the interventions, particularly the hidden-representation alignment of CoIN, correlate with improved performance and robustness, training on these metrics does not causally enhance either.
For practitioners, this yields a simple rule of thumb. If the goal is raw performance, data construction is sufficient. However, if local per-example robustness is important and the model is fully fine-tuned, adding Prompt-TIES or Prompt-DARE significantly improves robustness. Overall, performance and robustness increase with scale. However, prompt brittleness does not disappear. Across all methods, the gap between a model’s best and worst performing phrasings remains large: between 34 and 57% of its performance. This leaves ample opportunity for further research into training-time prompt robustness, and we hope this thesis will encourage continued progress.
Limitations
Although our work demonstrates the potential to enhance the robustness of prompts for large language models through gradient merging, it is not without significant limitations.
Instruction fine-tuning only. Modern large language training involves multiple stages. Reinforcement learning after supervised fine-tuning could be crucial in enhancing the model’s prompt robustness. Additionally, we observe approaches that address prompt robustness [1] and gradient merging [30] during this stage of model training. However, since we fine-tune using data with relatively short labels, reinforcement learning on our checkpoints is difficult. Future work should investigate the effects of prompt robustness approaches throughout the entire training process.
Model scale and family coverage. Our experiments are limited to models with up to 8 billion parameters across two families of models (Llama and Qwen). Whether the observed patterns and benefits of gradient merging approaches hold at larger scales, where models may be capable of leveraging richer training signals, remains an open question. Evaluating additional architectures would strengthen the generalizability of our conclusions.
Benchmark scope and evaluation protocol. We adopt the training and evaluation split from Sanh et al. [San+22], which is well-established in the field of prompt robustness. However, it consists predominantly of classification and short-answer tasks with closed label sets. Prompt sensitivity may manifest differently in such settings than in open-ended generation. Evaluating on more diverse benchmarks would provide a more complete picture of prompt robustness. These datasets would also enable us to further analyze downstream training methods.
Method selection within each category. We evaluate one representative method from each of the consistency regularization and contrastive alignment categories. We selected PPCL and CoIN, respectively, based on their central standing in these categories. Alternative methods in these categories [Ais+25; Hej+25; [26, 43] may have different capabilities and trade-offs. Our conclusions apply to the specific instantiations studied, not the broader methodological families.
Hyperparameter optimization. We performed a grid search over learning rates for all baselines and tuned the PPCL regularization weight on one model. However, a more exhaustive search, particularly for the PPCL and CoIN auxiliary loss weights, could yield stronger baselines and affect the reported relative comparisons. However, the computational cost of such a search across all models and methods exceeded our resource budget. Additionally, we did not tune the learning rate or trim factor for the gradient merging approaches. Our trim factor was chosen conservatively at 20%. DARE shows that dropping up to 95% of the task vectors only incurs small performance drops. With a higher trim factor, we can achieve much more efficient gradient merging because materializing the gradient matrix will not be necessary with strongly trimmed gradients.
Prompt templates. Our work is limited by our use of prompt templates as the sole source of variance. Although Chatterjee et al. [7] show that models are most sensitive to paraphrastic and structural variations enforced through the use of prompt templates, there are many other types of variance that are not covered. For example, we do not account for human error, such as typos, which are seen in the real world and increase variance, as discussed in Zhu et al. [Zhu+24a].
Future work
We hope that our in-depth analysis of gradient merging for prompt-agnostic training will pave the way for future research on prompt-agnostic language models. We envision several avenues for future research:
We demonstrate that our gradient merging approaches do not work well on LoRA-trained models, which is consistent with the findings of KnoTS [Sto+25]. We found the parameter-wise single vector composition of KnoTS to be too costly for merging gradients at each time step. Thus, we encourage future researchers to develop efficient solutions to address the subspace problem in LoRA.
An open question is how many gradients can be removed while still improving prompt robustness. DARE swept their trim factor to show that 90% to 95% of the task vectors can be dropped while retaining performance. Similar experiments would be interesting for prompt-induced gradients. We hypothesize that these too will be very redundant.
We invite future researchers to port Prompt-TIES and Prompt-DARE into reinforcement learning and test whether the added robustness benefits from supervised fine-tuning transfer through reinforcement learning.
Bibliography
Appendix
AI usage
During the planning stage of this thesis I used ChatGPT and Claude to refine search terms for the literature review. While preparing the code for the project I used GitHub Copilot and Claude Code, GitHub Copilot to review my hand-written code and Claude to help create the plotting scripts. For the final draft I used DeepL Write and Claude for language editing, spell checking, and streamlining. No confidential or personal data was entered into any of these tools. I verified all factual claims, citations, and quotations against the original sources, and the research design, analysis, and argument are my own work.
Dataset statistics
| Task | Dataset | Samples | Templates | Filtered | Majority |
| Paraphrase | GLUE (MRPC) | 3,668 | 7 | 5 | 4 |
| GLUE (QQP) | 10,240 | 6 | 6 | 4 | |
| PAWS | 10,240 | 12 | 10 | 10 | |
| Extractive QA | HotpotQA | 10,240 | 5 | 5 | 5 |
| TriviaQA | 10,240 | 5 | 4 | 1 | |
| WebQuestions | 3,778 | 5 | 5 | 1 | |
| WikiQA | 10,240 | 11 | 5 | 4 | |
| AdvQA (BiDAF) | 10,000 | 5 | 4 | 4 | |
| AdvQA (BERT) | 10,000 | 5 | 4 | 4 | |
| AdvQA (RoBERTa) | 10,000 | 5 | 4 | 4 | |
| DuoRC (Self) | 10,240 | 9 | 5 | 1 | |
| DuoRC (Paraphrase) | 10,240 | 9 | 5 | 1 | |
| ROPES | 10,240 | 12 | 12 | 12 | |
| SQuAD v2 | 10,240 | 12 | 4 | 2 | |
| SuperGLUE (ReCoRD) | 10,240 | 20 | 7 | 1 | |
| Quoref | 10,240 | 11 | 10 | 1 | |
| CoQA | 10,240 | 7 | 7 | 6 | |
| MC QA | ARC-Challenge | 1,119 | 6 | 5 | 3 |
| ARC-Easy | 2,251 | 6 | 5 | 3 | |
| CoS-E | 9,741 | 11 | 6 | 3 | |
| CosmosQA | 10,240 | 13 | 8 | 4 | |
| DREAM | 6,116 | 5 | 4 | 2 | |
| OpenBookQA | 4,957 | 7 | 7 | 6 | |
| PIQA | 10,240 | 11 | 6 | 3 | |
| QASC | 8,134 | 8 | 6 | 6 | |
| QuAIL | 10,240 | 13 | 11 | 6 | |
| QuaRel | 1,941 | 5 | 5 | 5 | |
| QuaRTz | 2,696 | 8 | 8 | 8 | |
| RACE (High) | 10,240 | 8 | 5 | 3 | |
| RACE (Middle) | 10,240 | 8 | 5 | 3 | |
| SciQ | 10,240 | 5 | 5 | 5 | |
| SuperGLUE (BoolQ) | 9,427 | 10 | 5 | 3 | |
| SuperGLUE (MultiRC) | 10,240 | 10 | 10 | 10 | |
| WIQA | 10,240 | 8 | 4 | 2 | |
| Sentiment | Amazon Polarity | 10,240 | 9 | 9 | 3 |
| App Reviews | 10,240 | 4 | 4 | 1 | |
| IMDB | 10,240 | 11 | 11 | 7 | |
| Rotten Tomatoes | 8,530 | 10 | 10 | 7 | |
| Yelp Reviews | 10,240 | 7 | 7 | 5 | |
| Summarization | CommonGen | 10,240 | 9 | 7 | 7 |
| CNN/DailyMail | 10,240 | 9 | 7 | 7 | |
| SciTLDR | 1,992 | 6 | 5 | 5 | |
| MultiNews | 10,236 | 6 | 5 | 5 | |
| SAMSum | 10,240 | 7 | 6 | 5 | |
| XSum | 10,240 | 10 | 10 | 10 | |
| Topic Classification | AG News | 10,240 | 7 | 7 | 4 |
| DBpedia | 10,240 | 4 | 4 | 4 | |
| TREC | 5,452 | 18 | 5 | 5 | |
| Total (48 datasets) | 417,238 |
Table B.1. The 48 training datasets grouped by task type. Templates is the total number of PromptSource templates per dataset. Filtered is the count after removing manually identified bad templates, and Majority is the size of the majority templates (see § 5.1). The number of samples is based on the training split, limited to 10,240. We use the evaluation splits of the datasets for validation, with a sample limit of 512 and the same templates.
| Task | Dataset | Samples | Templates | Filtered | Majority |
| NLI | SuperGLUE (CB) | 56 | 15 | 15 | 8 |
| SuperGLUE (RTE) | 277 | 10 | 9 | 9 | |
| ANLI (R1) | 1,000 | 15 | 15 | 8 | |
| ANLI (R2) | 1,000 | 15 | 15 | 8 | |
| ANLI (R3) | 1,200 | 15 | 15 | 8 | |
| WSD | SuperGLUE (WiC) | 638 | 10 | 9 | 8 |
| Coreference | SuperGLUE (WSC) | 104 | 10 | 10 | 7 |
| Commonsense | WinoGrande | 1,767 | 6 | 6 | 5 |
| SuperGLUE (COPA) | 100 | 12 | 7 | 7 | |
| StoryCloze | 1,871 | 6 | 5 | 5 | |
| HellaSwag | 10,003 | 11 | 5 | 3 | |
| Total (11 datasets) | 18,016 |
Table B.2. The 11 held-out test datasets grouped by task type. Templates is the total number of PromptSource templates per dataset. Filtered is the count after removing manually identified bad templates, and Majority is the size of the majority templates (see § 5.1).
Additional results
In this section we report the raw scores underlying the plots in the paper. We report for the main experiments: the test-all Rouge-L scores in Table C.1; the test-majority Rouge-L scores in Table C.2; the test-all rank classification accuracy scores in Table C.3; and the validation-majority Rouge-L scores in Table C.4.
For the template-count and template-choice experiments we report: the test-all Rouge-L scores in Table C.5 and the validation-majority Rouge-L scores in Table C.6.
| Method | worst | avg | best | clv |
| Llama3.2-1B | ||||
| Single first template | 0.2736 | 0.4807 | 0.6353 | 0.1490 |
| Single second template | 0.2967 | 0.4931 | 0.6039 | 0.1329 |
| Single third template | 0.2633 | 0.4716 | 0.5713 | 0.1033 |
| All shuffled | 0.3090 | 0.5219 | 0.6229 | 0.1141 |
| One-at-a-Time | 0.3686 | 0.5397 | 0.6234 | 0.1145 |
| All-in-One-Batch | 0.2889 | 0.5040 | 0.6139 | 0.1194 |
| PPCL | 0.3710 | 0.5209 | 0.6311 | 0.1244 |
| CoIN | 0.3840 | 0.5099 | 0.5883 | 0.1187 |
| Prompt-TIES | 0.3035 | 0.5002 | 0.5938 | 0.0668 |
| Prompt-DARE | 0.3307 | 0.4812 | 0.5796 | 0.0626 |
| Llama3.1-8B | ||||
| Single first template | 0.4949 | 0.6377 | 0.7313 | 0.0363 |
| Single second template | 0.4828 | 0.6304 | 0.7360 | 0.0383 |
| Single third template | 0.5085 | 0.6337 | 0.7273 | 0.0342 |
| All shuffled | 0.5233 | 0.6576 | 0.7429 | 0.0311 |
| One-at-a-Time | 0.5276 | 0.6491 | 0.7272 | 0.0293 |
| All-in-One-Batch | 0.5078 | 0.6400 | 0.7242 | 0.0340 |
| PPCL | 0.5628 | 0.6545 | 0.7178 | 0.0224 |
| CoIN | 0.5022 | 0.6432 | 0.7464 | 0.0345 |
| Prompt-TIES | 0.5359 | 0.6426 | 0.7349 | 0.0261 |
| Prompt-DARE | 0.4959 | 0.6369 | 0.7270 | 0.0292 |
| Qwen3-0.6B | ||||
| Single first template | 0.3787 | 0.5211 | 0.6337 | 0.1333 |
| Single second template | 0.3659 | 0.5144 | 0.6330 | 0.1380 |
| Single third template | 0.3768 | 0.5156 | 0.6345 | 0.1352 |
| All shuffled | 0.4414 | 0.5476 | 0.6369 | 0.1238 |
| One-at-a-Time | 0.4163 | 0.5393 | 0.6313 | 0.1238 |
| All-in-One-Batch | 0.4336 | 0.5466 | 0.6256 | 0.1112 |
| PPCL | 0.3558 | 0.5111 | 0.6294 | 0.1425 |
| CoIN | 0.4126 | 0.5447 | 0.6389 | 0.1300 |
| Prompt-TIES | 0.4402 | 0.5408 | 0.6230 | 0.0559 |
| Prompt-DARE | 0.4405 | 0.5399 | 0.6210 | 0.0562 |
| Qwen3-8B | ||||
| Single first template | 0.4417 | 0.5849 | 0.7182 | 0.0331 |
| Single second template | 0.3611 | 0.5226 | 0.6585 | 0.0294 |
| Single third template | 0.3261 | 0.5007 | 0.6544 | 0.0348 |
| All shuffled | 0.4342 | 0.5987 | 0.7170 | 0.0334 |
| One-at-a-Time | 0.4159 | 0.5796 | 0.7109 | 0.0334 |
| All-in-One-Batch | 0.3942 | 0.5609 | 0.6882 | 0.0336 |
| PPCL | 0.3964 | 0.5693 | 0.6962 | 0.0355 |
| CoIN | 0.4374 | 0.5940 | 0.6908 | 0.0300 |
| Prompt-TIES | 0.3672 | 0.5496 | 0.6984 | 0.0343 |
| Prompt-DARE | 0.3775 | 0.5459 | 0.6813 | 0.0332 |
Table C.1. ROUGE-L scores on the test-all split. Bold marks values in the statistically best group per column.
| Method | worst | avg | best | clv | JS^prompt | JS^label | Diff^prompt | Diff^label |
| Llama3.2-1B | ||||||||
| Small caps Single first template | 0.3962 | 0.4553 | 0.5025 | 0.0693 | 0.0703 | 0.0325 | 0.0861 | 0.0107 |
| Small caps Single second template | 0.3789 | 0.4940 | 0.5744 | 0.1043 | 0.0939 | 0.0419 | 0.0936 | 0.0117 |
| Small caps Single third template | 0.3675 | 0.4714 | 0.5121 | 0.0572 | 0.0827 | 0.0388 | 0.1025 | 0.0109 |
| Small caps All shuffled | 0.4562 | 0.5343 | 0.5861 | 0.0904 | 0.0837 | 0.0375 | 0.2417 | 0.0156 |
| Small caps One-at-a-Time | 0.4837 | 0.5445 | 0.5875 | 0.0842 | 0.0804 | 0.0344 | 0.2603 | 0.0134 |
| Small caps All-in-One-Batch | 0.4145 | 0.5166 | 0.5883 | 0.0800 | 0.0814 | 0.0361 | 0.1848 | 0.0132 |
| PPCL | 0.4612 | 0.5241 | 0.5904 | 0.0797 | 0.0879 | 0.0400 | 0.1169 | 0.0119 |
| CoIN | 0.4443 | 0.5139 | 0.5556 | 0.0987 | 0.0734 | 0.0307 | 0.2095 | 0.7792 |
| Prompt-TIES | 0.4236 | 0.5184 | 0.5767 | 0.0322 | 0.0828 | 0.0370 | 0.1813 | 0.0120 |
| Prompt-DARE | 0.3840 | 0.4752 | 0.5349 | 0.0329 | 0.0874 | 0.0410 | 0.1929 | 0.0132 |
| Llama3.1-8B | ||||||||
| Small caps Single first template | 0.5596 | 0.6316 | 0.6738 | 0.0194 | 0.0848 | 0.0379 | 0.1081 | 0.0033 |
| Small caps Single second template | 0.5375 | 0.6198 | 0.6629 | 0.0224 | 0.0822 | 0.0409 | 0.0981 | 0.0033 |
| Small caps Single third template | 0.5739 | 0.6281 | 0.6696 | 0.0183 | 0.0682 | 0.0314 | 0.0933 | 0.0033 |
| Small caps All shuffled | 0.6211 | 0.6550 | 0.6867 | 0.0145 | 0.0677 | 0.0301 | 0.1324 | 0.0031 |
| Small caps One-at-a-Time | 0.6053 | 0.6428 | 0.6718 | 0.0147 | 0.0635 | 0.0278 | 0.1223 | 0.0031 |
| Small caps All-in-One-Batch | 0.5926 | 0.6348 | 0.6598 | 0.0151 | 0.0580 | 0.0258 | 0.1068 | 0.0030 |
| PPCL | 0.6139 | 0.6466 | 0.6739 | 0.0121 | 0.0617 | 0.0283 | 0.1209 | 0.0029 |
| CoIN | 0.5816 | 0.6235 | 0.6688 | 0.0163 | 0.0640 | 0.0286 | 0.1234 | 0.7896 |
| Prompt-TIES | 0.5986 | 0.6320 | 0.6679 | 0.0131 | 0.0628 | 0.0284 | 0.1142 | 0.0029 |
| Prompt-DARE | 0.5996 | 0.6375 | 0.6695 | 0.0134 | 0.0617 | 0.0278 | 0.1039 | 0.0030 |
| Qwen3-0.6B | ||||||||
| Small caps Single first template | 0.4306 | 0.5232 | 0.5819 | 0.1238 | 0.0957 | 0.0856 | 0.0506 | 0.0024 |
| Small caps Single second template | 0.4177 | 0.5141 | 0.5757 | 0.1206 | 0.1052 | 0.0941 | 0.0525 | 0.0025 |
| Small caps Single third template | 0.4142 | 0.5106 | 0.5700 | 0.1187 | 0.0990 | 0.0894 | 0.0476 | 0.0027 |
| Small caps All shuffled | 0.5089 | 0.5596 | 0.6027 | 0.0971 | 0.0953 | 0.0770 | 0.0633 | 0.0016 |
| Small caps One-at-a-Time | 0.4892 | 0.5498 | 0.5968 | 0.0973 | 0.0765 | 0.0650 | 0.0555 | 0.0019 |
| Small caps All-in-One-Batch | 0.5133 | 0.5609 | 0.6019 | 0.0891 | 0.0795 | 0.0660 | 0.0594 | 0.0013 |
| PPCL | 0.4301 | 0.5207 | 0.5835 | 0.1072 | 0.1016 | 0.0913 | 0.0538 | 0.0024 |
| CoIN | 0.5091 | 0.5542 | 0.5962 | 0.1003 | 0.0832 | 0.0709 | 0.0764 | 0.7572 |
| Prompt-TIES | 0.5009 | 0.5456 | 0.5951 | 0.0427 | 0.0747 | 0.0638 | 0.0611 | 0.0015 |
| Prompt-DARE | 0.4980 | 0.5434 | 0.5864 | 0.0418 | 0.0781 | 0.0662 | 0.0612 | 0.0015 |
| Qwen3-8B | ||||||||
| Small caps Single first template | 0.5465 | 0.6168 | 0.6826 | 0.0220 | 0.0895 | 0.0814 | 0.0208 | 0.0627 |
| Small caps Single second template | 0.4940 | 0.5639 | 0.6413 | 0.0200 | 0.0907 | 0.0787 | 0.0189 | 0.0480 |
| Small caps Single third template | 0.5093 | 0.5860 | 0.6636 | 0.0244 | 0.0863 | 0.0781 | 0.0194 | 0.0415 |
| Small caps All shuffled | 0.5743 | 0.6406 | 0.7052 | 0.0211 | 0.0700 | 0.0619 | 0.0214 | 0.0244 |
| Small caps One-at-a-Time | 0.5544 | 0.6322 | 0.7008 | 0.0226 | 0.0708 | 0.0630 | 0.0222 | 0.0269 |
| Small caps All-in-One-Batch | 0.5443 | 0.6158 | 0.6834 | 0.0222 | 0.0700 | 0.0623 | 0.0202 | 0.0178 |
| PPCL | 0.5383 | 0.6086 | 0.6755 | 0.0215 | 0.0690 | 0.0616 | 0.0209 | 0.0146 |
| CoIN | 0.5899 | 0.6330 | 0.6720 | 0.0139 | 0.0699 | 0.0632 | 0.0514 | 0.7355 |
| Prompt-TIES | 0.5360 | 0.6099 | 0.6836 | 0.0223 | 0.0698 | 0.0616 | 0.0201 | 0.0236 |
| Prompt-DARE | 0.5387 | 0.6109 | 0.6782 | 0.0219 | 0.0740 | 0.0662 | 0.0238 | 0.0133 |
Table C.2. ROUGE-L scores on the test-majority split. Bold marks values in the statistically best group per column.
Table C.3: Rank classification accuracy scores on the test-all split. Bold marks values in the statistically best group per column.
| Method | worst | avg | best | clv |
| Llama3.2-1B | ||||
| Single first template | 0.4025 | 0.4821 | 0.5447 | 0.1564 |
| Single second template | 0.3991 | 0.4864 | 0.5488 | 0.1562 |
| Single third template | 0.3773 | 0.4815 | 0.5714 | 0.1648 |
| All shuffled | 0.3919 | 0.4939 | 0.5564 | 0.1650 |
| One-at-a-Time | 0.4178 | 0.5043 | 0.5726 | 0.1715 |
| All-in-One-Batch | 0.3500 | 0.4706 | 0.5651 | 0.1695 |
| PPCL | 0.3837 | 0.4799 | 0.5469 | 0.1736 |
| CoIN | 0.3969 | 0.4835 | 0.5616 | 0.1631 |
| Prompt-TIES | 0.3934 | 0.4947 | 0.5696 | 0.1513 |
| Prompt-DARE | 0.3676 | 0.4645 | 0.5514 | 0.1630 |
| Llama3.1-8B | ||||
| Single first template | 0.4578 | 0.5446 | 0.6514 | 0.1646 |
| Single second template | 0.4455 | 0.5332 | 0.6409 | 0.1589 |
| Single third template | 0.4561 | 0.5315 | 0.6334 | 0.1536 |
| All shuffled | 0.4555 | 0.5644 | 0.6474 | 0.1535 |
| One-at-a-Time | 0.4491 | 0.5520 | 0.6557 | 0.1553 |
| All-in-One-Batch | 0.4365 | 0.5469 | 0.6293 | 0.1435 |
| PPCL | 0.4871 | 0.5873 | 0.6785 | 0.1300 |
| CoIN | 0.4493 | 0.5649 | 0.6929 | 0.1312 |
| Prompt-TIES | 0.4547 | 0.5700 | 0.6769 | 0.1494 |
| Prompt-DARE | 0.4217 | 0.5491 | 0.6502 | 0.1407 |
| Qwen3-0.6B | ||||
| Single first template | 0.4286 | 0.4776 | 0.5314 | 0.0650 |
| Single second template | 0.4291 | 0.4800 | 0.5396 | 0.0642 |
| Single third template | 0.4330 | 0.4862 | 0.5457 | 0.0647 |
| All shuffled | 0.4309 | 0.4849 | 0.5435 | 0.0641 |
| One-at-a-Time | 0.4276 | 0.4752 | 0.5195 | 0.0648 |
| All-in-One-Batch | 0.4295 | 0.4712 | 0.5092 | 0.0638 |
| PPCL | 0.4258 | 0.4739 | 0.5287 | 0.0662 |
| CoIN | 0.4258 | 0.4781 | 0.5256 | 0.0654 |
| Prompt-TIES | 0.4265 | 0.4691 | 0.5158 | 0.0628 |
| Prompt-DARE | 0.4277 | 0.4708 | 0.5180 | 0.0636 |
| Qwen3-8B | ||||
| Single first template | 0.4568 | 0.4966 | 0.5295 | 0.0589 |
| Single second template | 0.4541 | 0.4937 | 0.5265 | 0.0598 |
| Single third template | 0.4550 | 0.4935 | 0.5269 | 0.0592 |
| All shuffled | 0.4597 | 0.4979 | 0.5298 | 0.0571 |
| One-at-a-Time | 0.4619 | 0.4982 | 0.5296 | 0.0567 |
| All-in-One-Batch | 0.4579 | 0.4963 | 0.5295 | 0.0578 |
| PPCL | 0.4580 | 0.4956 | 0.5275 | 0.0579 |
| CoIN | 0.4603 | 0.4979 | 0.5324 | 0.0565 |
| Prompt-TIES | 0.4584 | 0.4958 | 0.5288 | 0.0579 |
| Prompt-DARE | 0.4603 | 0.4962 | 0.5268 | 0.0570 |
Table C.3. Rank classification accuracy scores on the test-all split. Bold marks values in the statistically best group per column.
| Method | worst | avg | best | clv | JS | JS | Diff | Diff |
| Llama3.2-1B | ||||||||
| Sᴛɴɢʟᴇ first template | 0.4717 | 0.5808 | 0.6531 | 0.0659 | 0.1088 | 0.0466 | 0.2051 | 0.0147 |
| Sᴛɴɢʟᴇ second template | 0.4402 | 0.5774 | 0.6722 | 0.0771 | 0.1230 | 0.0558 | 0.2142 | 0.0149 |
| Sᴛɴɢʟᴇ third template | 0.4139 | 0.5702 | 0.6553 | 0.0759 | 0.1287 | 0.0584 | 0.2142 | 0.0142 |
| Aʟʟ sʜᴜғғʟᴇᴅ | 0.6622 | 0.7050 | 0.7242 | 0.0274 | 0.0315 | 0.0145 | 0.4265 | 0.0186 |
| Oɴᴇ-ᴀᴛ-ᴀ-Tɪᴍᴇ | 0.6533 | 0.6997 | 0.7210 | 0.0299 | 0.0326 | 0.0148 | 0.4141 | 0.0165 |
| Aʟʟ-ɪɴ-Oɴᴇ-Bᴀᴛᴄʜ | 0.6289 | 0.6779 | 0.7003 | 0.0297 | 0.0257 | 0.0121 | 0.3320 | 0.0174 |
| PPCL | 0.6406 | 0.6878 | 0.7104 | 0.0301 | 0.0242 | 0.0112 | 0.2542 | 0.0154 |
| CoIN | 0.5553 | 0.6485 | 0.6921 | 0.0520 | 0.0503 | 0.0240 | 0.3684 | 0.7907 |
| Pʀᴏᴍᴘᴛ-TIES | 0.6320 | 0.6789 | 0.7011 | 0.0152 | 0.0257 | 0.0121 | 0.3348 | 0.0158 |
| Pʀᴏᴍᴘᴛ-DARE | 0.6356 | 0.6832 | 0.7058 | 0.0147 | 0.0260 | 0.0123 | 0.3455 | 0.0161 |
| Llama3.1-8B | ||||||||
| Sᴛɴɢʟᴇ first template | 0.5561 | 0.7068 | 0.7749 | 0.0261 | 0.1139 | 0.0450 | 0.2405 | 0.0048 |
| Sᴛɴɢʟᴇ second template | 0.5434 | 0.6846 | 0.7735 | 0.0287 | 0.1224 | 0.0549 | 0.2408 | 0.0048 |
| Sᴛɴɢʟᴇ third template | 0.5492 | 0.6982 | 0.7698 | 0.0278 | 0.1284 | 0.0533 | 0.2337 | 0.0047 |
| Aʟʟ sʜᴜғғʟᴇᴅ | 0.7389 | 0.7821 | 0.8009 | 0.0065 | 0.0245 | 0.0112 | 0.3149 | 0.0045 |
| Oɴᴇ-ᴀᴛ-ᴀ-Tɪᴍᴇ | 0.7317 | 0.7777 | 0.7980 | 0.0068 | 0.0256 | 0.0115 | 0.2944 | 0.0046 |
| Aʟʟ-ɪɴ-Oɴᴇ-Bᴀᴛᴄʜ | 0.7223 | 0.7694 | 0.7907 | 0.0075 | 0.0250 | 0.0111 | 0.2634 | 0.0043 |
| PPCL | 0.7403 | 0.7831 | 0.8016 | 0.0062 | 0.0206 | 0.0095 | 0.2738 | 0.0042 |
| CoIN | 0.6657 | 0.7507 | 0.7863 | 0.0149 | 0.0423 | 0.0198 | 0.2843 | 0.8064 |
| Pʀᴏᴍᴘᴛ-TIES | 0.7418 | 0.7847 | 0.8037 | 0.0062 | 0.0224 | 0.0105 | 0.2711 | 0.0043 |
| Pʀᴏᴍᴘᴛ-DARE | 0.7332 | 0.7758 | 0.7958 | 0.0070 | 0.0234 | 0.0104 | 0.2701 | 0.0043 |
| Qwen3-0.6B | ||||||||
| Sᴛɴɢʟᴇ first template | 0.4895 | 0.6222 | 0.6910 | 0.0695 | 0.1264 | 0.0557 | 0.1027 | 0.0035 |
| Sᴛɴɢʟᴇ second template | 0.4599 | 0.6061 | 0.6904 | 0.0754 | 0.1372 | 0.0625 | 0.1058 | 0.0039 |
| Sᴛɴɢʟᴇ third template | 0.4992 | 0.6181 | 0.6925 | 0.0686 | 0.1315 | 0.0573 | 0.0992 | 0.0039 |
| Aʟʟ sʜᴜғғʟᴇᴅ | 0.6503 | 0.6982 | 0.7206 | 0.0333 | 0.0313 | 0.0144 | 0.1351 | 0.0024 |
| Oɴᴇ-ᴀᴛ-ᴀ-Tɪᴍᴇ | 0.6385 | 0.6908 | 0.7162 | 0.0363 | 0.0321 | 0.0149 | 0.1267 | 0.0028 |
| Aʟʟ-ɪɴ-Oɴᴇ-Bᴀᴛᴄʜ | 0.6349 | 0.6861 | 0.7107 | 0.0342 | 0.0295 | 0.0135 | 0.1283 | 0.0019 |
| PPCL | 0.5921 | 0.6475 | 0.6768 | 0.0450 | 0.0357 | 0.0167 | 0.1070 | 0.0037 |
| CoIN | 0.5717 | 0.6612 | 0.7036 | 0.0524 | 0.0486 | 0.0227 | 0.1622 | 0.7924 |
| Pʀᴏᴍᴘᴛ-TIES | 0.6385 | 0.6886 | 0.7137 | 0.0161 | 0.0282 | 0.0132 | 0.1361 | 0.0024 |
| Pʀᴏᴍᴘᴛ-DARE | 0.6372 | 0.6879 | 0.7131 | 0.0161 | 0.0283 | 0.0133 | 0.1348 | 0.0023 |
| Qwen3-8B | ||||||||
| Sᴛɴɢʟᴇ first template | 0.4685 | 0.5984 | 0.6927 | 0.0248 | 0.1449 | 0.0739 | 0.0298 | 0.0581 |
| Sᴛɴɢʟᴇ second template | 0.3742 | 0.5070 | 0.6155 | 0.0258 | 0.1518 | 0.0797 | 0.0270 | 0.0488 |
| Sᴛɴɢʟᴇ third template | 0.3266 | 0.4569 | 0.5725 | 0.0278 | 0.1463 | 0.0694 | 0.0279 | 0.0428 |
| Aʟʟ sʜᴜғғʟᴇᴅ | 0.5188 | 0.6216 | 0.7014 | 0.0179 | 0.0574 | 0.0278 | 0.0331 | 0.0259 |
| Oɴᴇ-ᴀᴛ-ᴀ-Tɪᴍᴇ | 0.4741 | 0.5968 | 0.6938 | 0.0222 | 0.0606 | 0.0299 | 0.0339 | 0.0294 |
| Aʟʟ-ɪɴ-Oɴᴇ-Bᴀᴛᴄʜ | 0.4664 | 0.5541 | 0.6296 | 0.0162 | 0.0628 | 0.0281 | 0.0311 | 0.0194 |
| PPCL | 0.4737 | 0.5542 | 0.6253 | 0.0157 | 0.0556 | 0.0245 | 0.0321 | 0.0157 |
| CoIN | 0.5158 | 0.5679 | 0.5926 | 0.0084 | 0.0390 | 0.0170 | 0.0582 | 0.7351 |
| Pʀᴏᴍᴘᴛ-TIES | 0.4388 | 0.5310 | 0.6235 | 0.0185 | 0.0636 | 0.0290 | 0.0308 | 0.0259 |
| Pʀᴏᴍᴘᴛ-DARE | 0.4565 | 0.5281 | 0.5945 | 0.0152 | 0.0491 | 0.0226 | 0.0353 | 0.0147 |
Table C.4. Table C.4: ROUGE-L scores on the validation-majority split. Bold marks values in the statistically best group per column.
Table C.5: ROUGE-L scores on the test-all split for the template-count and template-choice experiments. Bold marks values in the statistically best group per column.
| Method | worst | avg | best | clv |
| Llama3.2-1B | ||||
| SINGLE first template | 0.2736 | 0.4807 | 0.6353 | 0.1490 |
| SINGLE second template | 0.2967 | 0.4931 | 0.6039 | 0.1329 |
| SINGLE third template | 0.2633 | 0.4716 | 0.5713 | 0.1033 |
| SINGLE random template | 0.2474 | 0.4939 | 0.6337 | 0.1268 |
| SINGLE best template | 0.2768 | 0.4493 | 0.5613 | 0.1423 |
| SINGLE worst template | 0.2183 | 0.4211 | 0.5747 | 0.1474 |
| SINGLE first two templates | 0.3258 | 0.5265 | 0.6330 | 0.1274 |
| SINGLE first three templates | 0.2685 | 0.4907 | 0.5894 | 0.1204 |
| ALL SHUFFLED majority templates | 0.3090 | 0.5219 | 0.6229 | 0.1141 |
| ALL SHUFFLED all templates | 0.3751 | 0.5411 | 0.6302 | 0.1140 |
| Qwen3-0.6B | ||||
| SINGLE first template | 0.3787 | 0.5211 | 0.6337 | 0.1333 |
| SINGLE second template | 0.3659 | 0.5144 | 0.6330 | 0.1380 |
| SINGLE third template | 0.3768 | 0.5156 | 0.6345 | 0.1352 |
| SINGLE random template | 0.3855 | 0.5227 | 0.6103 | 0.1368 |
| SINGLE best template | 0.3519 | 0.5323 | 0.6368 | 0.1416 |
| SINGLE worst template | 0.4135 | 0.5406 | 0.6500 | 0.1202 |
| SINGLE first two templates | 0.3791 | 0.5321 | 0.6340 | 0.1302 |
| SINGLE first three templates | 0.3918 | 0.5382 | 0.6474 | 0.1253 |
| ALL SHUFFLED majority templates | 0.4414 | 0.5476 | 0.6369 | 0.1238 |
| ALL SHUFFLED all templates | 0.4515 | 0.5492 | 0.6358 | 0.1191 |
Table C.5.
| Method | worst | avg | best | clv |
| Llama3.2-1B | ||||
| Single first template | 0.4717 | 0.5808 | 0.6531 | 0.0659 |
| Single second template | 0.4402 | 0.5774 | 0.6722 | 0.0771 |
| Single third template | 0.4139 | 0.5702 | 0.6553 | 0.0759 |
| Single random template | 0.4716 | 0.5931 | 0.6646 | 0.0681 |
| Single best template | 0.4393 | 0.5575 | 0.6358 | 0.0676 |
| Single worst template | 0.2844 | 0.3861 | 0.4599 | 0.0944 |
| Single first two templates | 0.5496 | 0.6608 | 0.7100 | 0.0519 |
| Single first three templates | 0.5841 | 0.6780 | 0.7148 | 0.0433 |
| All shuffled majority templates | 0.6622 | 0.7050 | 0.7242 | 0.0274 |
| All shuffled all templates | 0.6514 | 0.6994 | 0.7200 | 0.0287 |
| Qwen3-0.6B | ||||
| Single first template | 0.4895 | 0.6222 | 0.6910 | 0.0695 |
| Single second template | 0.4599 | 0.6061 | 0.6904 | 0.0754 |
| Single third template | 0.4992 | 0.6181 | 0.6925 | 0.0686 |
| Single random template | 0.4695 | 0.6127 | 0.6877 | 0.0704 |
| Single best template | 0.4462 | 0.5901 | 0.6846 | 0.0810 |
| Single worst template | 0.4314 | 0.5634 | 0.6586 | 0.0832 |
| Single first two templates | 0.5643 | 0.6589 | 0.7045 | 0.0529 |
| Single first three templates | 0.5982 | 0.6767 | 0.7128 | 0.0449 |
| All shuffled majority templates | 0.6503 | 0.6982 | 0.7206 | 0.0333 |
| All shuffled all templates | 0.6520 | 0.7019 | 0.7243 | 0.0330 |
Table C.6. ROUGE-L scores on the validation-majority split for the template-count and template-choice experiments. Bold marks values in the statistically best group per column.
Qualitative analysis
| Example | best_option ⟨P⟩ What’s the best option? – ⟨C1/E1⟩ – ⟨C2/E2⟩ We are looking for a cause/an effect | cause_effect ⟨P⟩ Select the most plausible cause:/effect: – ⟨C1/E1⟩ – ⟨C2/E2⟩ | choose ⟨P⟩ because... /so... Choose between: – ⟨C1/E1⟩ – ⟨C2/E2⟩ | exercise Exercise: choose the most plausible alternative. ⟨P⟩ because... /so... – ⟨C1/E1⟩ – ⟨C2/E2⟩ | more_likely Pick the more likely continuation to the following sentence: ⟨P⟩ as a result of:/as a consequence: – ⟨C1/E1⟩ – ⟨C2/E2⟩ | plausible_alt. ⟨P⟩ This happened because... /As a consequence... Help me pick the more plausible option: – ⟨C1/E1⟩ – ⟨C2/E2⟩ | i_am_hesitating ⟨P⟩ I am hesitating between two options. Help me choose the more likely cause:/effect: – ⟨C1/E1⟩ – ⟨C2/E2⟩ | # templates right |
| P: The man received a parking ticket<br>C1: He parallel parked on the street<br>C2: The parking meter expired | C1 | C2 | C2 | C2 | C1 | C1 | C2 | 4 |
| P: My view of the movie screen was blocked<br>C1: The couple behind me was whispering<br>C2: A tall person was sitting in front of me | C2 | C2 | C1 | C1 | C2 | C1 | C1 | 3 |
| P: The bride got cold feet before the wedding<br>E1: The wedding guests brought gifts<br>E2: She called the wedding off | E1 | E2 | E1 | E1 | E2 | E2 | E1 | 3 |
| P: I spent the day at the pool<br>E1: I sprained my ankle<br>E2: My face got sunburned | E2 | E2 | E1 | E1 | E1 | E1 | E2 | 3 |
| P: The girl found a bug in her cereal<br>E1: She poured milk in the bowl<br>E2: She lost her appetite | E1 | E2 | E1 | E1 | E2 | E2 | E2 | 4 |
| P: The couple got engaged<br>E1: They planned a wedding<br>E2: They took some time apart | E2 | E2 | E1 | E1 | E2 | E2 | E1 | 3 |
| # examples right | 2 | 5 | 2 | 2 | 3 | 2 | 4 | 20 |
Table D.1. Examples from the SuperGlue COPA datasets with the highest conditional local variance in the Llama3.2-1B-All SHUFFLED predictions. Each row is one example, and each column is a prompt template with the placeholders for the example. The COPA task involves selecting the most plausible cause or effect based on a premise and two answer choices. Since the model always generates one of the alternatives, each cell is simplified to the alternative predicted by the template (in bold when correct). The dataset distinguishes between cause and effect questions, which changes the templates slightly. We denote cause examples with C and effect examples with E. We report the number of correct predictions over templates and examples. The per-example view shows local variance, and the per-template view shows global variance.
| Example | best_option What’s the best option? – – We are looking for a cause/an effect | cause_effect Select the most plausible cause:/effect: – – | choose because. . . /so. . . Choose between: – – | exercise Exercise: choose the most plausible alternative. because. . . /so. . . – – | more_likely Pick the more likely continuation to the following sentence: as a result of:/as a consequence: – – | plausible_alt. This happened because. . . /As a consequence. . . Help me pick the more plausible option: – – | i_am_hesitating I am hesitating between two options. Help me choose the more likely cause:/effect: – – | # templates right |
| P: The man received a parking ticket C1: He parallel parked on the street C2: The parking meter expired | C1 | C2 | C2 | C2 | C1 | C2 | C2 | 5 |
| P: My view of the movie screen was blocked C1: The couple behind me was whispering C2: A tall person was sitting in front of me | C2 | C2 | C2 | C2 | C2 | C2 | C2 | 7 |
| P: The bride got cold feet before the wedding E1: The wedding guests brought gifts E2: She called the wedding off | E2 | E2 | E2 | E2 | E2 | E2 | E2 | 7 |
| P: I spent the day at the pool E1: I sprained my ankle E2: My face got sunburned | E2 | E2 | E2 | E2 | E2 | E2 | E2 | 7 |
| P: The girl found a bug in her cereal E1: She poured milk in the bowl E2: She lost her appetite | E1 | E1 | E1 | E1 | E2 | E2 | E2 | 3 |
| P: The couple got engaged E1: They planned a wedding E2: They took some time apart | E2 | E2 | E2 | E2 | E2 | E2 | E2 | 0 |
| # examples right | 3 | 4 | 4 | 4 | 4 | 5 | 5 | 29 |
Table D.2. Examples from the SuperGlue COPA datasets with the highest conditional local variance in the Llama3.2-1B-All SHUFFLED predictions. Here we list the predictions from Llama3.2-1B-PROMPT-TIES. Each row is one example, and each column is a prompt template with the placeholders for the example. The COPA task involves selecting the most plausible cause or effect based on a premise and two answer choices. Since the model always generates one of the alternatives, each cell is simplified to the alternative predicted by the template (in bold when correct). The dataset distinguishes between cause and effect questions, which changes the templates slightly. We denote cause examples with C and effect examples with E. We report the number of correct predictions over templates and examples. The per-example view shows local variance, and the per-template view shows global variance.
Impact of the threshold choice on conditional local variance
In this section, we demonstrate the impact on the conditional local variance by choosing a Rouge-L threshold. We report the conditional local variance based on the choice of for each method. All results are on the TEST-ALL split. The results are split by model: Llama3.2-1B Table E.1, Llama3.1-8B Table E.2, Qwen3-0.6B Table E.3, and Qwen3-8B Table E.4. We demonstrate that changing the threshold alters the conditional local variance but leaves the ranking of the best model unchanged. Note that we do not compute significant scores and rather only bold the lowest value.
Table E.1: We report the conditional local variance based on the choice of for each method on Llama3.2-1B. All results are on the TEST-ALL split. Bold marks the run with the lowest conditional local variance.
| Method | Local | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 0.9999 | 1 |
| dare_ties | 0.0616 | 0.0626 | 0.0626 | 0.0857 | 0.0857 | 0.0902 | 0.0905 | 0.0905 |
| ties | 0.0651 | 0.0668 | 0.0669 | 0.0913 | 0.0914 | 0.0951 | 0.0952 | 0.0952 |
| single_2 | 0.0892 | 0.1033 | 0.1035 | 0.1102 | 0.1106 | 0.1111 | 0.1120 | 0.1120 |
| all_shuffled | 0.0974 | 0.1141 | 0.1142 | 0.1201 | 0.1203 | 0.1205 | 0.1206 | 0.1206 |
| coin | 0.0982 | 0.1187 | 0.1188 | 0.1225 | 0.1229 | 0.1231 | 0.1243 | 0.1243 |
| one_at_a_time | 0.0985 | 0.1145 | 0.1146 | 0.1186 | 0.1187 | 0.1188 | 0.1188 | 0.1188 |
| all_in_one_batch | 0.1122 | 0.1194 | 0.1196 | 0.1252 | 0.1255 | 0.1257 | 0.1267 | 0.1267 |
| ppcl | 0.1166 | 0.1244 | 0.1245 | 0.1289 | 0.1290 | 0.1290 | 0.1291 | 0.1291 |
| single_1 | 0.1251 | 0.1329 | 0.1330 | 0.1395 | 0.1403 | 0.1409 | 0.1417 | 0.1417 |
| single_0 | 0.1290 | 0.1490 | 0.1491 | 0.1498 | 0.1499 | 0.1499 | 0.1499 | 0.1499 |
Table E.1. We report the conditional local variance based on the choice of for each method on Llama3.2-1B. All results are on the TEST-ALL split. Bold marks the run with the lowest conditional local variance.
| Method | Local | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 0.9999 | 1 |
| ppcl | 0.0221 | 0.0224 | 0.0225 | 0.0246 | 0.0250 | 0.0304 | 0.0312 | 0.0312 |
| ties | 0.0257 | 0.0261 | 0.0264 | 0.0288 | 0.0302 | 0.0373 | 0.0393 | 0.0393 |
| dare_ties | 0.0288 | 0.0292 | 0.0293 | 0.0325 | 0.0341 | 0.0441 | 0.0471 | 0.0471 |
| one_at_a_time | 0.0289 | 0.0293 | 0.0293 | 0.0316 | 0.0328 | 0.0401 | 0.0425 | 0.0425 |
| all_shuffled | 0.0309 | 0.0311 | 0.0311 | 0.0330 | 0.0343 | 0.0409 | 0.0438 | 0.0438 |
| all_in_one_batch | 0.0336 | 0.0340 | 0.0340 | 0.0368 | 0.0387 | 0.0483 | 0.0513 | 0.0513 |
| single_2 | 0.0338 | 0.0342 | 0.0342 | 0.0364 | 0.0375 | 0.0461 | 0.0490 | 0.0490 |
| coin | 0.0342 | 0.0345 | 0.0345 | 0.0369 | 0.0377 | 0.0450 | 0.0477 | 0.0477 |
| single_0 | 0.0360 | 0.0363 | 0.0363 | 0.0391 | 0.0398 | 0.0488 | 0.0511 | 0.0511 |
| single_1 | 0.0381 | 0.0383 | 0.0383 | 0.0404 | 0.0416 | 0.0514 | 0.0543 | 0.0543 |
Table E.2. We report the conditional local variance based on the choice of for each method on Llama3.1-8B. All results are on the TEST-ALL split. Bold marks the run with the lowest conditional local variance.
| Method | Local | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 0.9999 | 1 |
| ties | 0.0531 | 0.0559 | 0.0560 | 0.0728 | 0.0728 | 0.0763 | 0.0766 | 0.0766 |
| dare_ties | 0.0534 | 0.0562 | 0.0563 | 0.0735 | 0.0734 | 0.0772 | 0.0775 | 0.0775 |
| all_in_one_batch | 0.0944 | 0.1112 | 0.1113 | 0.1178 | 0.1178 | 0.1179 | 0.1179 | 0.1179 |
| all_shuffled | 0.1121 | 0.1238 | 0.1239 | 0.1268 | 0.1269 | 0.1269 | 0.1269 | 0.1269 |
| one_at_a_time | 0.1134 | 0.1238 | 0.1239 | 0.1285 | 0.1285 | 0.1285 | 0.1287 | 0.1287 |
| coin | 0.1177 | 0.1300 | 0.1301 | 0.1345 | 0.1345 | 0.1346 | 0.1347 | 0.1347 |
| single_0 | 0.1200 | 0.1333 | 0.1334 | 0.1373 | 0.1373 | 0.1373 | 0.1374 | 0.1374 |
| single_2 | 0.1220 | 0.1352 | 0.1353 | 0.1376 | 0.1376 | 0.1376 | 0.1377 | 0.1377 |
| single_1 | 0.1243 | 0.1380 | 0.1381 | 0.1409 | 0.1409 | 0.1409 | 0.1409 | 0.1409 |
| ppcl | 0.1272 | 0.1425 | 0.1426 | 0.1449 | 0.1449 | 0.1450 | 0.1450 | 0.1450 |
Table E.3. We report the conditional local variance based on the choice of for each method on Qwen3-0.6B. All results are on the TEST-ALL split. Bold marks the run with the lowest conditional local variance.
| Method | Local | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 | 0.9999 | 1 |
| single_1 | 0.0290 | 0.0294 | 0.0300 | 0.0327 | 0.0347 | 0.0417 | 0.0456 | 0.0456 |
| coin | 0.0298 | 0.0300 | 0.0303 | 0.0333 | 0.0345 | 0.0443 | 0.0557 | 0.0557 |
| single_0 | 0.0329 | 0.0331 | 0.0333 | 0.0354 | 0.0365 | 0.0439 | 0.0467 | 0.0467 |
| dare_ties | 0.0330 | 0.0332 | 0.0336 | 0.0359 | 0.0382 | 0.0461 | 0.0497 | 0.0497 |
| one_at_a_time | 0.0332 | 0.0334 | 0.0335 | 0.0355 | 0.0371 | 0.0450 | 0.0477 | 0.0477 |
| all_shuffled | 0.0334 | 0.0334 | 0.0335 | 0.0353 | 0.0364 | 0.0433 | 0.0459 | 0.0459 |
| all_in_one_batch | 0.0335 | 0.0336 | 0.0339 | 0.0358 | 0.0377 | 0.0453 | 0.0492 | 0.0492 |
| ties | 0.0341 | 0.0343 | 0.0346 | 0.0370 | 0.0395 | 0.0487 | 0.0513 | 0.0513 |
| single_2 | 0.0343 | 0.0348 | 0.0355 | 0.0385 | 0.0413 | 0.0496 | 0.0491 | 0.0491 |
| ppcl | 0.0354 | 0.0355 | 0.0357 | 0.0381 | 0.0400 | 0.0487 | 0.0527 | 0.0527 |
Table E.4. We report the conditional local variance based on the choice of for each method on Qwen3-8B. All results are on the TEST-ALL split. Bold marks the run with the lowest conditional local variance.
Gradient interference measurements
This section reports the raw values behind § 6.2. We measure the four gradient-interference statistics of subsection 3.4.2: cosine similarity (cos), sign disagreement (sign-conflict), cancellation (cancellation) and effective rank (eff-rank), on the All-in-One-Batch runs of the two Llama-family models. Table F.1 tracks the four statistics over training, and Table F.2 and Table F.3 resolve cosine similarity and sign disagreement by layer and module.
Table F.1: Gradient interference metrics (see subsection 3.4.2) were measured every 1,000 optimizer steps on a subset of the validation split during All-in-One-Batch training. The Avg. column reports the mean over all steps for Llama3.2-1B, and the mean over all steps excluding for Llama3.1-8B. is an outlier for Llama3.1-8B as the LoRA adapters are zero-initialized, and evaluation occurs before training.
| Statistic | 1001 | 2002 | 3003 | 4004 | 5005 | 6006 | Avg. | |
| Llama3.2-1B | ||||||||
| 0.531 | 0.532 | 0.541 | 0.546 | 0.550 | 0.551 | 0.549 | 0.543 | |
| 0.289 | 0.294 | 0.293 | 0.292 | 0.299 | 0.295 | 0.295 | 0.294 | |
| sign-conflict | 0.615 | 0.571 | 0.564 | 0.565 | 0.566 | 0.560 | 0.561 | 0.572 |
| cancellation | 0.217 | 0.204 | 0.202 | 0.194 | 0.189 | 0.185 | 0.191 | 0.197 |
| eff-rank | 3.273 | 2.988 | 2.852 | 2.836 | 2.802 | 2.805 | 2.810 | 2.909 |
| Llama3.1-8B | ||||||||
| 0.502 | 0.514 | 0.564 | 0.567 | 0.556 | 0.551 | 0.544 | 0.549 | |
| 0.274 | 0.251 | 0.313 | 0.311 | 0.295 | 0.272 | 0.272 | 0.286 | |
| sign-conflict | 0.379 | 0.667 | 0.640 | 0.634 | 0.634 | 0.629 | 0.630 | 0.639 |
| cancellation | 0.232 | 0.204 | 0.169 | 0.167 | 0.161 | 0.169 | 0.181 | 0.175 |
| eff-rank | 3.505 | 3.148 | 2.860 | 2.815 | 2.974 | 2.854 | 2.985 | 2.939 |
Table F.1. Gradient interference metrics.
| Layer | Attention | Feed-forward | ||
| cos | sign-conflict | cos | sign-conflict | |
| 0 | 0.483 | 0.714 | 0.499 | 0.687 |
| 1 | 0.485 | 0.710 | 0.547 | 0.692 |
| 2 | 0.480 | 0.715 | 0.484 | 0.694 |
| 3 | 0.495 | 0.704 | 0.491 | 0.690 |
| 4 | 0.502 | 0.703 | 0.500 | 0.685 |
| 5 | 0.512 | 0.692 | 0.507 | 0.681 |
| 6 | 0.526 | 0.683 | 0.512 | 0.680 |
| 7 | 0.536 | 0.683 | 0.519 | 0.676 |
| 8 | 0.543 | 0.675 | 0.534 | 0.664 |
| 9 | 0.561 | 0.662 | 0.550 | 0.644 |
| 10 | 0.566 | 0.648 | 0.560 | 0.628 |
| 11 | 0.572 | 0.635 | 0.583 | 0.610 |
| 12 | 0.587 | 0.620 | 0.591 | 0.601 |
| 13 | 0.609 | 0.609 | 0.600 | 0.587 |
| 14 | 0.605 | 0.604 | 0.627 | 0.568 |
| 15 | 0.626 | 0.579 | 0.646 | 0.543 |
Table F.2. Table F.2: The per-layer cosine similarity (cos) and sign disagreement (sign-conflict) (see subsection 3.4.2) for Llama3.2-1B, split into the attention and feed-forward sublayers. These values were measured every 1,000 optimizer steps on a subset of the validation split during All-in-One-Batch training and averaged over training.
| Layer | Attention | Feed-forward | ||
| cos | sign-conflict | cos | sign-conflict | |
| 0 | 0.347 | 0.811 | 0.336 | 0.780 |
| 1 | 0.343 | 0.783 | 0.450 | 0.767 |
| 2 | 0.353 | 0.788 | 0.374 | 0.765 |
| 3 | 0.365 | 0.776 | 0.368 | 0.767 |
| 4 | 0.382 | 0.776 | 0.371 | 0.764 |
| 5 | 0.381 | 0.767 | 0.383 | 0.757 |
| 6 | 0.422 | 0.748 | 0.404 | 0.748 |
| 7 | 0.449 | 0.733 | 0.438 | 0.730 |
| 8 | 0.465 | 0.718 | 0.454 | 0.719 |
| 9 | 0.475 | 0.715 | 0.468 | 0.708 |
| 10 | 0.490 | 0.700 | 0.495 | 0.693 |
| 11 | 0.511 | 0.683 | 0.513 | 0.684 |
| 12 | 0.507 | 0.684 | 0.525 | 0.679 |
| 13 | 0.521 | 0.676 | 0.538 | 0.667 |
| 14 | 0.528 | 0.668 | 0.539 | 0.663 |
| 15 | 0.523 | 0.666 | 0.550 | 0.656 |
| 16 | 0.519 | 0.661 | 0.543 | 0.651 |
| 17 | 0.528 | 0.658 | 0.539 | 0.644 |
| 18 | 0.510 | 0.655 | 0.536 | 0.642 |
| 19 | 0.511 | 0.655 | 0.540 | 0.634 |
| 20 | 0.529 | 0.641 | 0.540 | 0.631 |
| 21 | 0.539 | 0.640 | 0.544 | 0.628 |
| 22 | 0.524 | 0.640 | 0.549 | 0.623 |
| 23 | 0.537 | 0.633 | 0.546 | 0.620 |
| 24 | 0.536 | 0.634 | 0.551 | 0.622 |
| 25 | 0.539 | 0.629 | 0.550 | 0.616 |
| 26 | 0.558 | 0.616 | 0.557 | 0.611 |
| 27 | 0.559 | 0.611 | 0.570 | 0.603 |
| 28 | 0.566 | 0.605 | 0.575 | 0.595 |
| 29 | 0.580 | 0.593 | 0.589 | 0.586 |
| 30 | 0.566 | 0.595 | 0.603 | 0.574 |
| 31 | 0.600 | 0.573 | 0.616 | 0.550 |
Table F.3. The per-layer cosine similarity (cos) and sign disagreement (sign-conflict) (see subsection 3.4.2) for Llama3.1-8B, split into the attention and feed-forward sublayers. These values were measured every 1,000 optimizer steps on a subset of the validation split during All-in-One-Batch training and averaged over training (except for step , see Table F.1 for details).
References
- [1]Mohamed Salim Aissi, Clément Romac, Thomas Carta, Sylvain Lamprier, Pierre-Yves Oudeyer, Olivier Sigaud, Laure Soulier, and Nicolas Thome. Reinforcement learning for aligning large language models agents with interactive environments: Quantifying and mitigating prompt overfitting. In: Findings of the association for computational linguistics: NAACL 2025. Ed. by Luis Chiruzzo, Alan Ritter, and Lu Wang. Albuquerque, New Mexico: Association for Computational Linguistics, Apr. 2025, 7030–7046. ISBN: 979-8-89176-195-7. DOI: 10.18653/v1/2025.findings-naacl.390. URL: https://aclanthology.org/2025.findings-naacl.390/ (see pages 5, 6, 44, 45, 48, 52).DOI
- [2]Simran Arora, Avanika Narayan, Mayee F Chen, Laurel Orr, Neel Guha, Kush Bhatia, Ines Chami, Frederic Sala, and Christopher Ré. Ask me anything: A simple strategy for prompting language models. arXiv preprint arXiv:2210.02441 (2022) (see page 4).arxiv.org/abs/2210.02441
- [3]Stephen Bach, Victor Sanh, Zheng-Xin Yong, Albert Webson, Colin Raffel, Nihal V Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Févry, et al. Promptsource: An integrated development environment and repository for natural language prompts. In: Proceedings of the 60th annual meeting of the association for computational linguistics: System demonstrations. 2022, 93–104 (see page 20).
- [4]torchtune maintainers torchtune and contributors. torchtune: PyTorch’s fine-tuning library. Apr. 2024. URL: https://github.com/pytorch/torchtune (see page 22).
- [5]Isabel Cachola, Kyle Lo, Arman Cohan, and Daniel S. Weld. TLDR: Extreme summarization of scientific documents. arXiv:2004.15011 (2020) (see page 20).arxiv.org/abs/2004.15011
- [7]Anwoy Chatterjee, H S V N S Kowndinya Renduchintala, Sumit Bhatia, and Tanmoy Chakraborty. POSIX: a prompt sensitivity index for large language models. In: Findings of the association for computational linguistics: EMNLP 2024. Ed. by Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen. Miami, Florida, USA: Association for Computational Linguistics, Nov. 2024, 14550–14565. DOI: 10.18653/v1/2024.findings-emnlp.852. URL: https://aclanthology.org/2024.findings-emnlp.852/ (see pages 1, 3, 20, 53).DOI
- [9]Jonathan H. Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. TyDi QA: a benchmark for information-seeking question answering in typologically diverse languages. Transactions of the Association for Computational Linguistics (2020) (see page 20).arxiv.org/abs/2003.05002
- [10]Martin Gauch, Maximilian Beck, Thomas Adler, Dmytro Kotsur, Stefan Fiel, Hamid Eghbal-zadeh, Johannes Brandstetter, Johannes Kofler, Markus Holzleitner, Werner Zellinger, et al. Few-shot learning by dimensionality reduction in gradient space. In: Conference on lifelong learning agents. PMLR, 2022, 1043–1064 (see page 18).arxiv.org/abs/2206.03483
- [12]Eliya Habba, Ofir Arviv, Itay Itzhak, Yotam Perlitz, Elron Bandel, Leshem Choshen, Michal Shmueli-Scheuer, and Gabriel Stanovsky. DOVE: a large-scale multi-dimensional predictions dataset towards meaningful LLM evaluation. In: Findings of the association for computational linguistics: ACL 2025. Association for Computational Linguistics, 2025, 11744–11763. DOI: 10.18653/v1/2025.findings-acl.611. URL: http://dx.doi.org/10.18653/v1/2025.findings-acl.611 (see page 3).
- [14]Parsa Hejabi, Elnaz Rahmati, Alireza S. Ziabari, and Morteza Dehghani. Flip-flop consistency: Unsupervised training for robustness to prompt perturbations in llms. arXiv: 2510.14242 [cs.CL]. 2025. URL: https://arxiv.org/abs/2510.14242 (see pages 6, 20, 52).
- [16]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. arXiv: 2106.09685 [cs.CL]. 2021. URL: https://arxiv.org/abs/2106.09685 (see pages 7, 22).
- [17]Wenyang Hu, Yao Shu, Zongmin Yu, Zhaoxuan Wu, Xiaoqiang Lin, Zhongxiang Dai, See-Kiong Ng, and Bryan Kian Hsiang Low. Localized zeroth-order prompt optimization. Advances in Neural Information Processing Systems 37 (2024), 86309–86345 (see pages 4, 5).arxiv.org/abs/2403.02993
- [18]Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Suchin Gururangan, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. Editing Models with Task Arithmetic. arXiv:2212.04089 [cs]. Mar. 2023. DOI: 10.48550/arXiv.2212.04089. URL: http://arxiv.org/abs/2212.04089 (visited on 03/16/2026) (see page 6).
- [20]Vitaly Kurin, Alessandro De Palma, Ilya Kostrikov, Shimon Whiteson, and Pawan K Mudigonda. In defense of the unitary scalarization for deep multi-task learning. Advances in Neural Information Processing Systems 35 (2022), 12169–12183 (see page 7).arxiv.org/abs/2201.04122
- [21]Brian Lester, Rami Al-Rfou, and Noah Constant. The Power of Scale for Parameter-Efficient Prompt Tuning. In: Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Online and Punta Cana, Dominican Republic: Association for Computational Linguistics, Nov. 2021, 3045–3059. DOI: 10.18653/v1/2021.emnlp-main.243 (see page 6).
- [23]Xinyu Li, Chuang Zhao, Hongke Zhao, Likang Wu, and Ming He. Gan-prompt: Enhancing robustness in llm-based recommendations with gan-enhanced diversity prompts. arXiv preprint arXiv:2408.09671 (2024) (see page 5).arxiv.org/abs/2408.09671
- [24]Bill Yuchen Lin, Ziyi Wu, Yichi Yang, Dong-Ho Lee, and Xiang Ren. Riddle-Sense: Reasoning about riddle questions featuring linguistic creativity and commonsense knowledge. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (ACL-IJCNLP 2021): Findings. 2021 (see page 20).arxiv.org/abs/2101.00376
- [25]Chin-Yew Lin. ROUGE: a package for automatic evaluation of summaries. In: Text summarization branches out. Barcelona, Spain: Association for Computational Linguistics, July 2004, 74–81. URL: https://aclanthology.org/W04-1013/ (see page 23).
- [26]Shuhan Liu, Xing Hu, Kerui Huang, Xiaohu Yang, David Lo, and Xin Xia. Improving code LLM robustness to prompt perturbations via layer-aware model editing. ArXiv abs/2507.16407 (2025). URL: https://api.semanticscholar.org/CorpusID:280154524 (see pages 6, 53).
- [27]Xiao Li, Joel Kreuzwieser, and Alan Peters. When meaning stays the same, but models drift: Evaluating quality of service under token-level behavioral instability in llms. ArXiv abs/2506.10095 (2025). URL: https://api.semanticscholar.org/CorpusID:279318647 (see page 1).arxiv.org/abs/2506.10095
- [28]Xin Li and Dan Roth. Learning question classifiers. In: COLING 2002: The 19th international conference on computational linguistics. 2002. URL: https://www.aclweb.org/anthology/C02-1150 (see page 21).
- [29]Manikanta Loya, Divya Sinha, and Richard Futrell. Exploring the sensitivity of LLMs’ decision-making capabilities: Insights from prompt variations and hyperparameters. In: Findings of the association for computational linguistics: EMNLP 2023. Ed. by Houda Bouamor, Juan Pino, and Kalika Bali. Singapore: Association for Computational Linguistics, Dec. 2023, 3711–3716. DOI: 10.18653/v1/2023.findings-emnlp.241. URL: https://aclanthology.org/2023.findings-emnlp.241/ (see page 3).DOI
- [30]Keming Lu, Bowen Yu, Fei Huang, Yang Fan, Runji Lin, and Chang Zhou. Online merging optimizers for boosting rewards and mitigating tax in alignment. arXiv preprint arXiv:2405.17931 (2024) (see pages 1, 7, 12, 14, 52).arxiv.org/abs/2405.17931
- [31]Moran Mizrahi, Guy Kaplan, Dan Malkin, Rotem Dror, Dafna Shahaf, and Gabriel Stanovsky. State of what art? A call for multi-prompt LLM evaluation. Transactions of the Association for Computational Linguistics 12 (2024). Place: Cambridge, MA, 933–949. DOI: 10.1162/tacl_a_00681. URL: https://aclanthology.org/2024.tacl-1.52/ (see page 3).
- [32]Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He, Devi Parikh, Dhruv Batra, Lucy Vanderwende, Pushmeet Kohli, and James Allen. A corpus and cloze evaluation for deeper understanding of commonsense stories. In: Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: Human language technologies. 2016, 839–849 (see page 20).DOI
- [33]Saeed Najafi and Alona Fyshe. RIFF: Learning to rephrase inputs for few-shot fine-tuning of language models. In: Findings of the association for computational linguistics: ACL 2024. 2024, 1447–1466 (see page 5).arxiv.org/abs/2403.02271
- [35]Yao Qiang, Subhrangshu Nandi, Ninareh Mehrabi, Greg Ver Steeg, Anoop Kumar, Anna Rumshisky, and Aram Galstyan. Prompt perturbation consistency learning for robust language models. In: Findings of the association for computational linguistics: EACL 2024. Ed. by Yvette Graham and Matthew Purver. St. Julian’s, Malta: Association for Computational Linguistics, Mar. 2024, 1357–1370. URL: https://aclanthology.org/2024.findings-eacl.91/ (see pages 1, 2, 6, 10, 11, 18, 44, 46).
- [36]Olivier Roy and Martin Vetterli. The effective rank: A measure of effective dimensionality. In: 2007 15th European signal processing conference. IEEE, 2007, 606–610 (see page 17).
- [39]Melanie Sclar, Yejin Choi, Yulia Tsvetkov, and Alane Suhr. Quantifying language models’ sensitivity to spurious features in prompt design or: How I learned to start worrying about prompt formatting. In: International conference on learning representations. Vol. 2024. 2024, 25055–25083 (see pages 3, 27).arxiv.org/abs/2310.11324
- [40]Mikhail Seleznyov, Mikhail Chaichuk, Gleb Ershov, Alexander Panchenko, Elena Tutubalina, and Oleg Somov. When Punctuation Matters: A Large-Scale Comparison of Prompt Robustness Methods for LLMs. arXiv:2508.11383 [cs]. Aug. 2025. DOI: 10.48550/arXiv.2508.11383. URL: http://arxiv.org/abs/2508.11383 (visited on 09/01/2025) (see page 3).
- [41]Zeru Shi, Zhenting Wang, Yongye Su, Weidi Luo, Hang Gao, Fan Yang, Ruixiang Tang, and Yongfeng Zhang. Robustness-aware Automatic Prompt Optimization. arXiv:2412.18196 [cs]. Feb. 2025. DOI: 10.48550/arXiv.2412.18196. URL: http://arxiv.org/abs/2412.18196 (visited on 08/22/2025) (see pages 4, 5).
- [42]Abel Salinas and Fred Morstatter. The Butterfly Effect of Altering Prompts: How Small Changes and Jailbreaks Affect Large Language Model Performance. arXiv:2401.03729 [cs]. Apr. 2024. DOI: 10.48550/arXiv.2401.03729. URL: http://arxiv.org/abs/2401.03729 (visited on 10/13/2025) (see page 3).
- [43]Jiuding Sun, Chantal Shaib, and Byron Wallace. Evaluating the zero-shot robustness of instruction-tuned language models. In: International conference on learning representations. Vol. 2024. 2024, 48103–48141 (see pages 4, 6, 53).arxiv.org/abs/2306.11270







