arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.08846cs.LGcs.CL
收藏

大型语言模型中主动直推式推断的实验设计

Experimental Design for Active Transductive Inference in Large Language Models

UW-Madison(威斯康星大学麦迪逊分校);AWS AI Labs(亚马逊云科技人工智能实验室)

Subhojyoti Mukherjee, Anusha Lalitha, Aniket Deshmukh, Ge Liu, Yifei Ma, Branislav Kveton

AI总结:

本研究提出主动学习框架 AIPD,通过自适应选择少样本示例优化大型语言模型推断性能,并设计 GO 和 SAL 两种算法,在多种规模模型的实验中均优于其他示例选择方法。

摘要:

大型语言模型(LLMs)的一项涌现能力是,在推断时可以在提示词中包含特定于查询的示例。在本研究中,我们使用主动学习进行自适应提示词设计,并将其称为 Active In-context Prompt Design (AIPD)。我们通过自适应地从训练集中选择少样本示例来设计 LLM 提示词,以优化在测试集上的表现。训练示例最初是未标记的,我们获取其中最具信息量的示例的标签,这能最大限度地减少 LLM 预测中的不确定性。我们提出了两种算法,GO 和 SAL,它们的区别在于选择少样本示例的方式。我们在线性模型中分析了这些算法:首先分析 GO,然后利用它与 SAL 的等价性。我们在小型、中型和大型语言模型中进行了许多不同任务的实验;并表明在推断时选择 LLM 提示词中的少样本示例方面,GO 和 SAL 优于其他方法。

英文摘要:

One emergent ability of large language models (LLMs) is that query-specific examples can be included in the prompt at inference time. In this work, we use active learning for adaptive prompt design and call it Active In-context Prompt Design (AIPD). We design the LLM prompt by adaptively choosing few-shot examples from a training set to optimize performance on a test set. The training examples are initially unlabeled and we obtain the label of the most informative ones, which maximally reduces uncertainty in the LLM prediction. We propose two algorithms, GO and SAL, which differ in how the few-shot examples are chosen. We analyze these algorithms in linear models: first GO and then use its equivalence with SAL. We experiment with many different tasks in small, medium-sized, and large language models; and show that GO and SAL outperform other methods for choosing few-shot examples in the LLM prompt at inference time.

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

↑