arXiv:2506.20989cs.CLcs.LG2025-06

让梯度下降模拟提示,实现单次更新高效推理

Can Gradient Descent Simulate Prompting?

  • 用自提示预测作为目标,元训练模型使参数更新模仿提示效果
  • 单次梯度更新后即可在反转任务上超越标准微调,提升推理能力
  • 适合关注高效微调与长上下文建模的研究者

语言模型(LM)有两种引入新信息的方式:修改提示或调整参数(如微调)。参数更新无长期存储开销,但提示在许多情况下更有效——仅凭单个示例即可实现稳健泛化并进行逻辑推理,而标准微调难以做到。本文提出一种方法,通过元训练使梯度更新模拟条件化新信息的效果。该方法利用基于梯度的元学习,以模型自身提示预测为目标,无需真实标签。后续梯度下降可恢复部分甚至全部提示模型性能,在“反转诅咒”任务上表现更优,并能在单次更新后回答文本相关问题。结果表明,恰当初始化下梯度下降具有惊人表达能力,为长上下文建模提供新思路,并揭示了基于梯度学习的泛化潜力。

原文摘要 · Abstract (English)

There are two primary ways of incorporating new information into a language model (LM): changing its prompt or changing its parameters, e.g. via fine-tuning. Parameter updates incur no long-term storage cost for model changes. However, for many model updates, prompting is significantly more effective: prompted models can generalize robustly from single examples and draw logical inferences that do not occur under standard fine-tuning. Can models be modified so that fine-tuning does emulate prompting? This paper describes a method for meta-training LMs such that gradient updates emulate the effects of conditioning on new information. Our approach uses tools from gradient-based meta-learning but uses an LM's own prompted predictions as targets, eliminating the need for ground-truth labels. Subsequent gradient descent training recovers some (and occasionally all) of prompted model performance -- showing improvement on the ``reversal curse'' tasks, and answering questions about text passages after a single gradient update. These results suggest that, with appropriate initialization, gradient descent can be surprisingly expressive. Our results suggest new avenues for long-context modeling and offer insight into the generalization capabilities of gradient-based learning.

梯度下降提示工程元学习语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。