arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.23180cs.CLcs.LG
收藏

自我改进的上下文学习

Self-Improving In-Context Learning

Department of Electrical and Computer Engineering(电气与计算机工程系)

Baturay Saglam, Dionysis Kalogerias

AI总结:

提出通过测试时优化固定少样本提示的连续嵌入来改进上下文学习,利用模型对演示输出的对数概率作为自监督置信度代理进行零阶优化,无需微调或生成令牌,适用于分类和自由生成任务。

摘要:

我们提出通过优化测试时固定少样本提示的连续嵌入来改进上下文学习(ICL)。关键观察是,模型对其演示输出分配的对数概率——可在单次前向传播中获得,无需生成任何令牌——为模型从演示中推断任务提供了有意义的信号。我们将此信号形式化为一个有界的、自监督的置信度代理,并通过在提示嵌入上进行零阶优化来最大化它,从而得到一种测试时校准程序。该方法不需要微调、令牌生成、预定义标签集或外部数据,因此同样适用于分类和自由生成任务。在一系列全面的ICL任务中,所提出的校准方法始终匹配或改进基础模型,并在大多数任务上优于特定于分类的基线。代理改进与下游准确率提升之间的统计显著相关性证实了所提出的代理编码了用于上下文学习的可靠优化信号。

英文摘要:

We propose to improve in-context learning (ICL) by optimizing the continuous embeddings of a fixed few-shot prompt at test time. The key observation is that the log-probabilities a model assigns to its demonstrated outputs$\unicode{x2013}$available from a single forward pass without generating any tokens$\unicode{x2013}$provide a meaningful signal for how well the model has inferred the task from its demonstrations. We formalize this signal as a bounded, self-supervised confidence proxy and maximize it via zeroth-order optimization over the prompt embeddings, yielding a test-time calibration procedure. The approach requires no finetuning, no token generation, no predefined label set, and no external data, making it equally applicable to both classification and free-form generation tasks. Across a comprehensive suite of ICL tasks, the proposed calibration consistently matches or improves upon the base model and outperforms classification-specific baselines on most tasks. The statistically significant correlation between proxy improvement and downstream accuracy gain confirms that the proposed proxy encodes a reliable optimization signal for in-context learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑