提示无关的语言模型
Prompt-agnostic Language Models
Frederic Sadrieh
中文摘要
尽管大语言模型(large language model)性能强劲,但对提示(prompt)的表述方式仍高度敏感。常见做法是在推理阶段手动优化提示,但会带来额外开销且难以扩展。本文关注在指令微调(instruction tuning)阶段将提示鲁棒性内建到模型中的训练期方法。一种常见策略是将每个提示的多个改写混入训练。实验表明,在不同可训练参数上,各改写产生的梯度相互干扰:57% 出现符号冲突,朴素梯度平均会丢弃约五分之一的幅度。为此提出两种梯度合并方法 Prompt-TIES 与 Prompt-DARE,利用模型与梯度合并中的干扰消解算子处理提示梯度。研究在数据构造、一致性正则化与对比对齐三类训练期鲁棒性方法中比较效果,覆盖两个模型家族、两种规模的四个模型。结果显示,提示措辞与具体样本的交互平均占单样本波动的 54%,在 ANLI、WiC 等任务上超过 70%。梯度合并方法直接提升这种局部鲁棒性,在几乎不损失整体准确率的情况下将全量微调模型的单样本方差降低近一半;其他训练期方法提升原始性能,但未能可靠降低单样本方差。
关键要点
- 01提示措辞与样本交互平均占单样本波动 54%,在 ANLI、WiC 上超 70%
- 02各改写梯度存在干扰:57% 符号冲突,朴素平均丢弃约五分之一幅度
- 03提出 Prompt-TIES 与 Prompt-DARE 两种梯度合并方法消解提示梯度干扰
- 04梯度合并将全量微调模型单样本方差降低近一半,整体准确率损失很小
- 05对比数据构造、一致性正则化、对比对齐三类训练期方法,仅梯度合并可靠降方差
解读
尚无解读。
原始英文摘要
arXiv:2610.37683v1 Announce Type: cross 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.