“在上下文学习”或:我如何学会不再担心并热爱“应用信息检索”

Andrew Parry 1234-5678-9012 a.parry.1@research.gla.ac.uk University of GlasgowGlasgowUK Debasis Ganguly Debasis.Ganguly@glasgow.ac.uk 1234-5678-9012 University of GlasgowGlasgowUK  and  Manish Chandra m.chandra.1@research.gla.ac.uk 1234-5678-9012 University of GlasgowGlasgowUK
(2024; 20 February 2007; 12 March 2009; 5 June 2009)
摘要。

随着大型语言模型(LLMs)的能力不断增强,上下文学习(ICL)已经成为自然语言处理(NLP)的新范式,其中不是通过标记的示例来微调LLM的参数特定于下游任务,而是将少量这样的示例附加到提示指令中以控制解码器的生成过程。因此,ICL在概念上类似于非参数方法,例如k𝑘kitalic_k-NN,其中每个实例的预测基本上取决于局部拓扑结构,即类似实例及其标签的局部集合(称为少样本示例)。 这表明ICL中的测试实例类似于IR中的查询,并且从训练集中检索的ICL中的相似示例与IR中从集合中检索的一组文档相关联。 尽管标准的无监督排名模型可用于从训练集中检索这些少样本示例,但通过重新定义与下游任务的效用相关的相关性概念,可以潜在地改善示例的有效性,即如果将其包含在提示指令中会导致正确预测,则认为示例是相关的。通过这种任务特定的相关性概念,可以训练一个监督排名模型(例如,双编码器或交叉编码器),这可能会学习以最佳方式选择少样本示例。我们相信神经排序器的最新进展可能会为更有效的下游ICL预测的优化选择示例找到用例。

Large Language Models, In-Context Learning, Ranking Models, Query Performance Prediction
copyright: acmlicensedjournalyear: 2024copyright: acmlicensedconference: Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval; July 14–18, 2024; Washington, DC, USAbooktitle: Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’24), July 14–18, 2024, Washington, DC, USAdoi: 10.1145/3626772.3657842isbn: 979-8-4007-0431-4/24/07ccs: Information systems Information retrievalccs: Computing methodologies Machine learningccs: Computing methodologies Natural language processing
Refer to caption
图1。展示了三个IR研究垂直领域如何适应上下文学习工作流程的工作流程图。第3节讨论了调整无监督和监督QPP方法以适应ICL示例数量的可能方式。第4节讨论了如何学习示例的下游有用性的想法。第5节讨论了与ICL示例多样化相关的方法。

1. 介绍

大型语言模型(LLMs)的研究范围正在扩大,并迅速取得重大科学进展。这些语言模型是在大量文档的基础上进行预训练,以以一种通用的、与任务无关的方式捕获文本的固有语义。常见的预训练方法包括掩码语言模型(MLM),它从文本中预测随机掩码的标记,或自回归模型或因果语言模型(CLM),它仅从其前身标记预测一个标记。虽然MLM被用于BERT及其后续模型,如RoBERTa、BART等,但后一类模型,即CLM,被应用于训练GPT变体和开源的Llama和Mistral变体等。当LLMs的参数规模从数百万扩展到数十亿时,由于指示调整,它们已经证明适用于广泛的任务,这意味着它们不仅能够产生语义上正确和连贯的文本,而且能够惊人地适应输入中的小的上下文变化,通常称为提示。

这种能够适应未见数据和任务的能力,只需要少量示例与监督学习的标准概念有所不同,在监督学习中,预训练模型的参数(例如BERT (Devlin et al., 2019a))通常被再次学习(通常称为“微调”)从带标签示例的训练集中。相反,在少样本学习或上下文学习ICL)中,训练集中的少量带标签示例简单地附加到提示指令中,以控制文本生成的方式对下游任务有益。(Mysore et al., 2023; Li et al., 2022; Ni et al., 2021; Pradeep et al., 2023a)除了利用ICL进行纯生成任务,例如问答或抽象摘要(Brown et al., 2020; Li et al., 2023; Tang et al., 2023),更常见的用途是在预测任务中,例如文本分类(Lu et al., 2022; Milios et al., 2023),其中每个类别由一组词(通常称为语言化器(Schick and Schütze, 2021))指定,例如,对于二元情感分类任务,积极类别可以由词组{{\{{‘好’,‘伟大’,‘美好’…}}\}}定义。 一旦预测任务的每个类别都被定义好,生成的文本可以通过使用解码器生成的词汇的后验概率映射到最可能的类别。

ICL在概念上与非参数方法(如k𝑘kitalic_k-NN)有些类似,其中每个实例的预测基本上取决于局部拓扑,即一组相似实例及其标签(称为少样本示例)- ICL与k𝑘kitalic_k-NN的唯一区别在于前者涉及底层LLM的编码器-解码器参数的冻结集,因此ICL通常在任何领域仅使用少量示例即可良好工作,因为与监督模型不同,它不会在特定标记示例集上过度拟合参数。相反,示例中表达的语义可能在控制文本生成过程中发挥关键作用,以产生期望的输出-文本本身或映射到类别预测。

对于本地化示例的实用性,类似于基于最近邻的预测,暗示了ICL和特定IR之间的类比的强有力案例。更确切地说,ICL中的测试实例类似于IR中的查询,而从训练集中检索的ICL中的相似示例与IR中从集合中检索的一组文档相关。这种类比在ICL中引发了一些有趣的研究问题,涉及有效利用IR以提高ICL预测。在这篇展望性论文中,我们讨论了ICL的特定部分,可以映射到已知和经过深入研究的IR问题。这意味着IR社区数十年来研究的这些问题的解决方案,可能可以应用于改善ICL的有效性。此外,这也应该引起IR研究人员的兴趣,以开发针对下游预测任务的经典IR问题的新方法,例如文档检索或查询性能预测(QPP)(Datta et al., 2022; Roitman et al., 2020; Singh et al., 2023),因此为评估新的IR方法开辟了超出检索任务的新可能性。

我们现在提出将核心IR思想纳入ICL的三种主要方法。首先,在ICL中的推理过程中,与其为每个实例使用恒定数量的示例,可能更好的方法是使示例数量可变。在IR中类似的问题是预测要检索多少篇文档(或者等效地预测排名截止阈值(Arampatzis et al., 2009; Bahri et al., 2020)),这也与查询性能预测(QPP)问题密切相关(Datta et al., 2022; Roitman et al., 2020; Singh et al., 2023)。在ICL的背景下,这意味着对于一些测试实例,可以从训练集中找到更多“有用”的示例(如果将其作为提示的一部分会导致LLM进行正确预测,则可以认为示例是有用的)。相反,对于其他实例来说,很难找到这样有用的示例。因此,一个能意识到示例质量的ICL方法可能会自适应,例如如果预测示例质量较差,则可以使用更多示例。

其次,我们建议使用于计算测试实例与示例之间相似性的基本度量空间可学习。学习此相似性函数的目标是将“有用”的示例排在“不有用”的示例之前。无监督检索模型只考虑测试实例的文本内容与训练实例之间的相似性。然而,通过标准排名目标(例如,使用三元组的噪声对比损失(Gutmann and Hyvärinen, 2010))学习的监督检索模型 - 每个三元组包括一个测试实例(查询),一个有用示例(相关文档)和一个不有用示例(不相关文档) - 可能特别捕捉特定测试实例示例的效用的固有语义。

第三,例子的多样性可能会影响ICL的有效性,因为与之前选择的例子不同的例子对LLM解码器生成相关单词更具信息量,然后可以映射到正确的类别。这也可以追溯到基于方面或基于方面的IR,试图使顶部检索到的文档集满足信息需求的所有潜在方面。 (Upadhyay et al., 2020; Mahdi et al., 2020)

这三个IR中的核心任务,即QPP,监督排名或学习排名,以及多样化或分面IR,在经历了长期的深入研究后,不断推动着这些任务可达到的最新成果的边界。在这篇展望性论文中,我们认为IR社区所获得的这些知识可以有助于进一步提高文本生成人工智能的有效性。

在接下来的部分(第2节),我们对ICL概念进行了简要的技术介绍,随后,我们将本文的其余部分构成了三个部分,详细介绍了每个特定IR任务如何应用于ICL工作流程,即自适应ICL的QPP(第3节),学习排名以学习在ICL中对示例进行排序(第4节),以及基于多样性和分面的IR以获取更多信息性示例在ICL中(第5节)。虽然对于改进ICL的每个独立想法进行详尽的实证验证超出了展望性论文的范围,但我们确实包括了初步评估来支持在ICL中使用QPP的用例(第6节),在那里我们展示了以数据驱动的方式调整示例数量确实会带来显著的改进。我们相信这种专注的研究,以及提出的其他想法,会激励其他NLP研究人员应用黑盒建立的IR方法,甚至是IR研究人员调整最先进的IR方法,以特别满足ICL中的下游预测任务。

2. 上下文学习

首先,我们在描述如何通过将IR的核心思想纳入ICL方法来改进ICL方法之前,先对In-Context Learning(ICL)进行了简要的技术介绍。

2.1. 正式介绍

In-context learning (ICL),与监督学习不同,不涉及在标记的示例上训练一组参数θ𝜃\thetaitalic_θ。 相反,后验现在是以下功能的函数:a)输入测试实例的文本,b)预训练大型语言模型(LLM)的解码器参数,c)提示指令,以及d)可选地,一组k𝑘kitalic_k输入示例(通常称为k𝑘kitalic_k -shot学习)。 形式上,

(1) P(y|𝐱)=f(𝐱,𝒫k(𝐱);ϕLLM),𝑃conditional𝑦𝐱𝑓𝐱subscript𝒫𝑘𝐱subscriptitalic-ϕLLMP(y|\mathbf{x})=f(\mathbf{x},\mathcal{P}_{k}(\mathbf{x});\phi_{\text{LLM}}),italic_P ( italic_y | bold_x ) = italic_f ( bold_x , caligraphic_P start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ( bold_x ) ; italic_ϕ start_POSTSUBSCRIPT LLM end_POSTSUBSCRIPT ) ,

在这里,不同于监督设置,函数f𝑓fitalic_f没有一个可以使用梯度下降训练集学习的参数化表示。函数本身取决于LLM的预训练参数ϕLLMsubscriptitalic-ϕLLM\phi_{\text{LLM}}italic_ϕ start_POSTSUBSCRIPT LLM end_POSTSUBSCRIPT,当前输入要预测标签的,以及由𝒫k(𝐱)subscript𝒫𝑘𝐱\mathcal{P}_{k}(\mathbf{x})caligraphic_P start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ( bold_x )表示的一组提示文本单元。

由于LLM的解码器生成了一个形式为w1,,wNsubscript𝑤1subscript𝑤𝑁w_{1},\ldots,w_{N}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_N end_POSTSUBSCRIPT的词序列(N𝑁Nitalic_N是序列的最大长度),类后验概率是以以下方式计算的。一组类别(比如对于一个p𝑝pitalic_p分类问题)被映射到p𝑝pitalic_p个不同的等价词组,比如V(y)𝑉𝑦V(y)italic_V ( italic_y ),其中yp𝑦subscript𝑝y\in\mathbb{Z}_{p}italic_y ∈ blackboard_Z start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT,通常这些集合被称为词汇化者(Hu et al., 2021)。例如,对于一个二元分类问题(例如,如图2所示的电影评论),p=2𝑝2p=2italic_p = 2(即y{0,1}𝑦01y\in\{0,1\}italic_y ∈ { 0 , 1 }),定义词汇化者集合的一个合理方式可能是通过以下词语:V(0)={‘false’,‘negative’}𝑉0‘false’‘negative’V(0)=\{\text{`false'},\text{`negative'}\}italic_V ( 0 ) = { ‘false’ , ‘negative’ }V(1)={‘true’,‘positive’}𝑉1‘true’‘positive’V(1)=\{\text{`true'},\text{`positive'}\}italic_V ( 1 ) = { ‘true’ , ‘positive’ }

请注意,ICL中的“学习”一词是一个误称,因为LLM的解码器参数没有更新。有关ICL的更多细节,请参考这些优秀的调查。 (Dong et al., 2023; Luo et al., 2024)

Refer to caption
图2。 情感分类的上下文学习示例工作流程。这个说明性的示例展示了一个样本测试实例,其中单个演示(从训练集中检索)并没有导致正确的预测(顶部显示的预测)。该示例还显示,将演示数量从一个增加到两个会导致正确的预测(底部显示)。提示中包含的演示以蓝色显示。

2.2. 信息检索的作用

ICL(如图2所示)中最重要的组成部分之一是搜索组件,它从训练集中输出一个顶级k𝑘kitalic_k候选集,即方程1相似实例。尽管原则上可以在提示中包含训练集中的随机示例,但已经证明,局部化示例(即与当前实例在主题上相似的示例)能够获得更好的性能(Liu et al., 2022; Luo et al., 2024)。这能够起作用的原因可以追溯到再生核希尔伯特空间(RKHS)机器学习的基本原则 - 预测函数是围绕训练数据实例的参数化核函数的聚合(Paulsen and Raghupathi, 2016)

因此,从训练集中检索尽可能多的相关示例对于效率原因施加实际约束非常关键-IR临时检索中召回和精度的经典权衡;唯一的区别是ICL的相关性需要以示例对正确预测的效用或有用性来定义。

在信息检索中探讨的一个类似问题是在排名列表中停止阅读的位置,因为由于在特定排名截止点之后找到相关文档的概率较低,检索文档的效用很小 (Arampatzis et al., 2009; Bahri et al., 2020)。更具挑战性的是,这个排名截止点取决于收集中出现的相关文档数量,也就是说,尽管一些具有明确定义信息需求的查询与满足特定相关性标准的少量相关文档相关联,但其他具有更广泛信息需求的查询通常与更多相关文档相关联 (Carterette et al., [n. d.])。在核心信息检索研究中,这个问题通常通过估计查询的检索质量来解决 - 假设是良好定义的查询产生更好的检索结果(精确度和召回率),而定义不明确的查询由于信息需求的明显歧义而受到检索质量的影响。这种动机为接下来的部分铺平了道路,在那里我们讨论了查询性能预测(QPP)如何对检索ICL中类似示例的相关问题也有益。

3. 自适应ICL maps-to\mapsto QPP?

在这一部分,我们描述了一种自适应的方法来选择ICL示例。我们概述了IR文献中的类似原则,可以应用于更广泛的任务。

3.1. 可变数量的示例

Refer to caption
图3。 使用可变大小邻域进行k𝑘kitalic_k-NN分类(Zhang et al., 2017)的动机:接近决策边界的实例(黑色'?')很可能在其类分布中具有更高的异质性,因此需要更大的邻域来进行有效分类。

在信息检索领域观察到不同查询展现出不同的检索性能水平,可以用于信息检索学习,我们可以通过类比得出一些测试实例与更好的训练示例相关联(即,将它们作为提示的一部分导致正确预测的示例),因此包含其中的少量示例应该是足够的。另一方面,对于一些测试实例(用作信息检索学习的查询),检索质量并不产生良好的候选项。因此,需要进一步查看排名列表以收集有用的示例。

我们将使用不同数量的演示来进行ICL推理方法,并将其命名为“自适应上下文学习”,简称AICL。 AICL的核心思想是以数据驱动的方式选择上下文𝒫k(𝐱)subscript𝒫𝑘𝐱\mathcal{P}_{k}(\mathbf{x})caligraphic_P start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ( bold_x ),即将k𝑘kitalic_k作为数据(当前实例𝐱𝐱\mathbf{x}bold_x)本身的函数。这在某种程度上类似于为基于k𝑘kitalic_k-NN的非参数建模选择不同的k𝑘kitalic_k(Zhang et al., 2017),如图3所示。动机是对一些实例进行分类可能比其他实例更困难,在这种情况下,它们可能会受益于更大的k𝑘kitalic_k值(更多上下文)。另一方面,对于相对简单的数据实例,过多的上下文可能会对有效预测产生不利影响。

严格来说,AICL与ICL的不同之处(方程1)在于,表示邻域大小的值k𝑘kitalic_k不再是一个常数。相反,我们用参数化函数κ(𝐱)𝜅𝐱\kappa(\mathbf{x})italic_κ ( bold_x )来表示它。

(2) P(y|𝐱)=f(𝐱,𝒫κ(𝐱)(𝐱);ϕLLM),𝑃conditional𝑦𝐱𝑓𝐱subscript𝒫𝜅𝐱𝐱subscriptitalic-ϕLLMP(y|\mathbf{x})=f(\mathbf{x},\mathcal{P}_{\kappa(\mathbf{x})}(\mathbf{x});\phi% _{\text{LLM}}),italic_P ( italic_y | bold_x ) = italic_f ( bold_x , caligraphic_P start_POSTSUBSCRIPT italic_κ ( bold_x ) end_POSTSUBSCRIPT ( bold_x ) ; italic_ϕ start_POSTSUBSCRIPT LLM end_POSTSUBSCRIPT ) ,

κ:𝐱{0,,M}:𝜅maps-to𝐱0𝑀\kappa:\mathbf{x}\mapsto\{0,\ldots,M\}italic_κ : bold_x ↦ { 0 , … , italic_M }的情况下, M𝑀Mitalic_M是示例实例数量的上限。 我们现在建议如何应用无监督或监督方法来选择排名截止κ𝜅\kappaitalic_κ

3.2. 无监督排名截断

在无监督方法中,IR研究中的两个主要思想可以用来确定ICL中的示例数量。

Score Distribution-based Models

第一条工作线基于一个假设,即相关和非相关文档的分数遵循不同的统计分布,例如,Arampatzis et al.建议使用正态-指数分布的混合分布 - 用于相关文档的正态分布和用于非相关文档的指数分布 - 来建模排名靠前的文档的分数分布。 (Arampatzis et al., 2009)的工作使用期望最大化(EM)来估计这种混合分布的参数,从而预测最可能的截止排名,在这之后找到相关文档的概率会显著降低。利用相关和非相关文档的分数分布之间的特征差异的这种想法也被用于查询性能预测(QPP)(Cummins, 2014)

虽然来自检索分数的EM允许应用可变数量的示例,但以下是一些需要研究的ICL特定挑战。

  • 随着相关性概念被改变为‘下游效用’,有用和无用示例的分数分布可能不会遵循正态-指数的混合分布,如在(Arampatzis et al., 2009; Cummins, 2014)中所报道的那样。在ICL的背景下,研究相似分数与示例的下游效用之间的潜在关系将是一个有趣的未来研究方向。

  • 在得分分布上设置阈值,很难将截止值限制在最大值,这对于LLM的输入大小有最大限制而言是必不可少的。

  • 基于分数分布的方法并未明确考虑来自查询本身的信息(等效地,ICL中的测试实例)。

我们现在描述了信息检索研究中的另一线索,可能有助于缓解最后两个限制。

基于QPP的模型

不同于排名截止策略,查询性能预测(QPP)模型旨在估计查询的检索质量。直接类比的是,这些方法可以应用于ICL中检索到的前几个相似示例,其不同目标是预测示例的有用性。

大多数QPP中的经典作品涉及无监督方法,利用从一组最高检索文档中提取的信息来估计最高检索文档与集合其余部分的主题区别 - 一个大的差异表明潜在更好的检索质量。(Cronen-Townsend et al., 2002)从最高检索文档中提取的各种证据已被证明对不同的后检索QPP估计方法是有用的。这包括i)Clarity中最高检索文档的语言模型与集合模型之间的KL散度(Cronen-Townsend et al., 2002),ii)WIG(加权信息增益)中每个最高检索文档相对于集合的信息增益的聚合值(Zhou and Croft, 2007),iii)NQC(标准化查询承诺)中用方差测量的RSV(检索状态值)的偏斜(Shtok et al., 2012),iv)基于成对文档相似性矩阵的聚类假设的思想(Diaz, 2007),以及,最近,v)文档和查询的嵌入空间的特征(Roy et al., 2019; Faggioli et al., 2023)

适当地改编这些现有技术可以应用于两阶段流水线中,以确定ICL中示例的数量。作为第一步,可以采用QPP方法来预测一组有序示例的检索质量(有用性),高值可能表明有用的示例可能位于顶部排名,因此,可能少量的示例应该能够很好地工作。另一方面,低QPP估计可能表明顶级排名的示例不太可能对下游预测有用,在这种情况下,最好使用大量的示例。选择排名截止(具有上限)作为QPP分数的函数的方法已经应用于确定稳健检索评估所需的可变深度的相关性评估(Ganguly and Yilmaz, 2023)

3.3. 监督排序截断

相对于设计启发式来预测用于测试实例𝐱𝐱\mathbf{x}bold_x的训练示例数量,即κ(𝐱)𝜅𝐱\kappa(\mathbf{x})italic_κ ( bold_x ),可以应用监督方法来解决这个问题,即κSoftmax(𝐱Tθ)𝜅Softmaxsuperscript𝐱T𝜃\kappa\equiv\text{Softmax}(\mathbf{x}^{\mathrm{T}}\theta)italic_κ ≡ Softmax ( bold_x start_POSTSUPERSCRIPT roman_T end_POSTSUPERSCRIPT italic_θ ),其中θ𝜃\thetaitalic_θ是一组参数层。基本假设是,如果我们提供足够的训练数据,构成了一定范围内的最佳示例数量,我们应该能够学会在推断时预测未见文本应该使用的示例数量。

为了训练一个将文本映射到1到M𝑀Mitalic_M之间的数字的分类器,有必要获得地面真相标签,即每个训练集实例的最佳样本数。我们建议通过以下方法获得这个: 给定一个训练集实例𝐱𝐱\mathbf{x}bold_x,可以使用相似性函数(例如BM25)来检索M𝑀Mitalic_M个示例的候选集-{𝐳1,,𝐳M}subscript𝐳1subscript𝐳𝑀\{\mathbf{z}_{1},\ldots,\mathbf{z}_{M}\}{ bold_z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , bold_z start_POSTSUBSCRIPT italic_M end_POSTSUBSCRIPT }。由于𝐱𝐱\mathbf{x}bold_x是训练集中的一个实例,我们可以利用它的标签来检查使用LLM的k𝑘kitalic_k次预测是否正确。可能会发生正确的预测对于k{1,,M}𝑘1𝑀k\in\{1,\ldots,M\}italic_k ∈ { 1 , … , italic_M }的几个值而言。可以采用几种策略来定义地面真相的示例数。例如,可以提前停止并简单地选择导致正确预测的最小k𝑘kitalic_k。或者,可能更稳健的程序是通过彻底检查所有可能的k=1,,M𝑘1𝑀k=1,\ldots,Mitalic_k = 1 , … , italic_M值,并选择导致最小不确定性的正确预测的值。 (Rubin et al., 2022; Sorensen et al., 2022)

这种基于最小不确定性的ICL示例数量选择的工作流程在算法2中显示。在地面真相构建过程中调用的算法1显示了文本分类的样本提示模板。

Input: 𝐱𝐱\mathbf{x}bold_x – an instance from the training set
Input: k(<M)annotated𝑘absent𝑀k(<M)italic_k ( < italic_M ) – number of examples (max M𝑀Mitalic_M)
Output: ΔpsubscriptΔ𝑝\Delta_{p}roman_Δ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT – Softmax posteriors
begin
       Nk(𝐱){𝐳1,,𝐳k}subscript𝑁𝑘𝐱subscript𝐳1subscript𝐳𝑘N_{k}(\mathbf{x})\leftarrow\{\mathbf{z}_{1},\ldots,\mathbf{z}_{k}\}italic_N start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ( bold_x ) ← { bold_z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , bold_z start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT }
      Instruction \leftarrow “Predict the type of 𝐱delimited-⟨⟩𝐱\langle\mathbf{x}\rangle⟨ bold_x ⟩ as one of {C0,,Cp1}delimited-⟨⟩subscript𝐶0delimited-⟨⟩subscript𝐶𝑝1\{\langle C_{0}\rangle,\ldots,\langle C_{p-1}\rangle\}{ ⟨ italic_C start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ⟩ , … , ⟨ italic_C start_POSTSUBSCRIPT italic_p - 1 end_POSTSUBSCRIPT ⟩ } given the following example”.
       for i1𝑖1i\leftarrow 1italic_i ← 1 to k𝑘kitalic_k do
             Instruction.append(“Example: 𝐳idelimited-⟨⟩subscript𝐳𝑖\langle\mathbf{z}_{i}\rangle⟨ bold_z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⟩ is a representative of class y(𝐳i)delimited-⟨⟩𝑦subscript𝐳𝑖\langle y(\mathbf{z}_{i})\rangle⟨ italic_y ( bold_z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) ⟩)
            
      ΔpsubscriptΔ𝑝absent\Delta_{p}\leftarrowroman_Δ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ← LLM(Instruction)
       return ΔpsubscriptΔ𝑝\Delta_{p}roman_Δ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT
算法1 LLM k𝑘kitalic_k-shot 预测
Input: 𝒯𝒯\mathcal{T}caligraphic_T – a training set of labelled instances
Output: 𝒦=𝐱𝒯k(𝐱)𝒦subscript𝐱𝒯superscript𝑘𝐱\mathcal{K}=\cup_{\mathbf{x}\in\mathcal{T}}k^{*}(\mathbf{x})caligraphic_K = ∪ start_POSTSUBSCRIPT bold_x ∈ caligraphic_T end_POSTSUBSCRIPT italic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ( bold_x ) – Number of examples yielding the most confident and correct predictions for each instance 𝐱𝒯𝐱𝒯\mathbf{x}\in\mathcal{T}bold_x ∈ caligraphic_T
begin
      
      for 𝐱𝒯𝐱𝒯\mathbf{x}\in\mathcal{T}bold_x ∈ caligraphic_T do
            
            max_confidence \leftarrow 0; k1superscript𝑘1k^{*}\leftarrow 1italic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ← 1
            for j0𝑗0j\leftarrow 0italic_j ← 0 to M𝑀Mitalic_M do
                   ΔpsubscriptΔ𝑝absent\Delta_{p}\leftarrowroman_Δ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ← LLM k𝑘kitalic_k-shot predictions(𝐱,j𝐱𝑗\mathbf{x},jbold_x , italic_j)
                    // Call Algorithm 1, i.e., try to predict with j𝑗jitalic_j examples
                  
                  y^(𝐱)argmaxΔp^𝑦𝐱argmaxsubscriptΔ𝑝\hat{y}(\mathbf{x})\leftarrow\text{argmax}\Delta_{p}over^ start_ARG italic_y end_ARG ( bold_x ) ← argmax roman_Δ start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT
                    // Get the predicted class
                   confidenceΔy^(𝐱)𝕀(y^(𝐱)=y(𝐱))absentsubscriptΔ^𝑦𝐱𝕀^𝑦𝐱𝑦𝐱\leftarrow\Delta_{\hat{y}(\mathbf{x})}\mathbb{I}(\hat{y}(\mathbf{x})=y(\mathbf% {x}))← roman_Δ start_POSTSUBSCRIPT over^ start_ARG italic_y end_ARG ( bold_x ) end_POSTSUBSCRIPT blackboard_I ( over^ start_ARG italic_y end_ARG ( bold_x ) = italic_y ( bold_x ) )
                    // Check if the predicted class is the correct one and record the prediction confidence
                  
                  if confidence >>> max_confidence then
                         max_confidence \leftarrow confidence
                          // Keep track of the least uncertain correct prediction
                         kjsuperscript𝑘𝑗k^{*}\leftarrow jitalic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ← italic_j
            𝒦𝒦k𝒦𝒦superscript𝑘\mathcal{K}\leftarrow\mathcal{K}\cup k^{*}caligraphic_K ← caligraphic_K ∪ italic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT
      return 𝒦𝒦\mathcal{K}caligraphic_K
算法 2 最佳示例数量

Content: 执行算法 2 后,我们获得一组地面真相标签 𝒦𝒦\mathcal{K}caligraphic_K,然后可以用来训练一个由参数 θ𝜃\thetaitalic_θ 参数化的分类器,通过优化:

(3) argminθ𝐱𝒯,k𝒦(𝐱Tθ,k),subscriptargmin𝜃subscriptformulae-sequence𝐱𝒯superscript𝑘𝒦superscript𝐱T𝜃superscript𝑘\text{argmin}_{\theta}\sum_{\mathbf{x}\in\mathcal{T},k^{*}\in\mathcal{K}}% \mathcal{L}(\mathbf{x}^{\mathrm{T}}\theta,k^{*}),argmin start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT ∑ start_POSTSUBSCRIPT bold_x ∈ caligraphic_T , italic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ∈ caligraphic_K end_POSTSUBSCRIPT caligraphic_L ( bold_x start_POSTSUPERSCRIPT roman_T end_POSTSUPERSCRIPT italic_θ , italic_k start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT ) ,

其中\mathcal{L}caligraphic_L是一个标准损失函数,例如交叉熵。

在推理过程中,对于每个𝐱𝐱\mathbf{x}\in\mathcal{E}bold_x ∈ caligraphic_E(表示评估集的\mathcal{E}caligraphic_E),我们建议应用通过方程3训练的分类器κ:𝐱{1,,M}:𝜅maps-to𝐱1𝑀\kappa:\mathbf{x}\mapsto\{1,\ldots,M\}italic_κ : bold_x ↦ { 1 , … , italic_M }来预测示例的数量,并最终对𝐱𝐱\mathbf{x}bold_x(方程2)进行κ(𝐱)𝜅𝐱\kappa(\mathbf{x})italic_κ ( bold_x )次预测。

3.4. 开放性研究问题和挑战

到目前为止,在本节中,我们描述了如何将无监督和监督方法应用于动态选择用于基于ICL的预测的示例数量。在本节中,我们讨论了一些研究方向,可以探索将ICL适应其他方式以进一步提高其有效性。

首先,我们想指出关于生成查询变体的现有工作,作为数据增强策略的一部分,以设计相同或类似信息需求的替代表述。已经显示这能够改进排名器的效果 (Gao et al., 2023),查询性能预测 (Zendel et al., 2019; Datta et al., 2023),相关反馈 (Chakraborty et al., 2020),甚至作为衡量信息检索模型一致性的工具 (Sen et al., 2022)。鉴于LLM具有零-shot查询生成能力的最近成功 (Alaofi et al., 2023; Wang et al., 2023),我们相信用替代文本表示增加测试实例能够最终改进检索质量(因此潜在地改进下游ICL效果)。对于预测每个查询(测试实例)示例数量的无监督和监督方法也可能会提高ICL效果,因为现有研究结果显示变体确实有助于改进QPP (Zendel et al., 2019; Datta et al., 2023)。 因此,我们提出以下两个沿着这个方向的研究问题。

  • RQ-3.1:LLMs生成的查询变体(或其他方式)是否可以改善每个实例使用的示例数量的预测?

  • RQ-3.2: 基于相关反馈的方法是否可以在使用生成的查询变体或不使用的情况下,帮助重新排序最初检索到的候选示例集,以更好地预测示例数量?

另一方面的工作方向涉及动态选择不仅是邻域大小,还有其他ICL参数。例如,基于输入实例,可以动态选择动态选择口语化器(Schick and Schütze, 2021)。此外,还可以动态选择提示 - 再次基于输入实例;一个无监督的方法已经研究了这个想法(Sorensen et al., 2022)。总的来说,可以潜在地探讨的研究问题是下面这个。

  • RQ-3.3:其他ICL参数是否也可以以数据驱动的方式选择,以达到更好的效果,例如,口语化者,提示,甚至LLM本身(类似于专家混合体)?

4. 排名ICL示例 maps-to\mapsto 监督IR?

在这一部分中,我们讨论ICL的另一个关键方面,即通过开发特别适用于不同相关性概念的排名模型可能会得到改进:ICL下游任务特定示例的有用性。核心神经IR中有效示例的概念已经得到了深入研究,特别是在微调过程中“难”负例的概念(Karpukhin et al., 2020; Gao et al., 2021a)。这些负例已经改进了排名任务的下游精度(Xiao et al., 2022),更一般地说,也改进了表示学习(Gao et al., 2021b)

特定于小样本学习,Rubin et al. (2022) 使用了噪声对比估计(NCE)损失(Gutmann and Hyvärinen, 2010)来训练使用SBERT(Reimers and Gurevych, 2019)嵌入的基于双编码器的成对排序器。为了训练排名模型,作者以以下方式收集了实例(相关和非相关示例)对。对于每个来自训练集的主实例𝐱𝐱\mathbf{x}bold_x,作者使用BM25来构成前k𝑘kitalic_k个候选示例。然后,测试每对(𝐱,𝐳i)𝐱subscript𝐳𝑖(\mathbf{x},\mathbf{z}_{i})( bold_x , bold_z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT )以检查1-shot预测是否正确,如果是,则𝐳isubscript𝐳𝑖\mathbf{z}_{i}bold_z start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT被分类为𝐱𝐱\mathbf{x}bold_x的相关示例,否则被视为非相关示例。然后构成包含相关和非相关对的批次,以训练标准NCE损失。虽然Rubin et al. (2022)的工作是利用任务特定的相关性概念的明确步骤,但调查不应被视为完成。应该探索几个潜在有前途的研究方向,以进一步提高ICL的有效性。我们现在提供神经排名文献调查,介绍可能在示例选择中使用的核心范式。

双编码器架构

一个双编码器架构将文本编码为在向量空间中可以比较的潜在表示;在检索任务的上下文中,这些文本将是查询和文档。虽然双编码器可以使用具有共享参数的连体网络(Reimers and Gurevych, 2019)或作为单个编码器(MacAvaney et al., 2019)实现,但后者在近年来变得普遍(Karpukhin et al., 2020; Xiao et al., 2022)

神经模型在搜索中的表现得到了显著改善,BERT的发布(Devlin et al., 2019b)是一个重要的里程碑。首先提出了使用从BM25中挖掘出的“硬”负例来提高基于BERT的排名器的精度。然后提出了NCE目标的一个变体,“局部对比估计”,其中为每个查询采样多个负例,以解释非相关性概念的差异。这样做的同时,他们也展示了从微调的排名器中挖掘出的硬负例的有效性。为了进一步提高负样本的质量,提出模型可以在训练过程中选择负例,使得负例随着微调的进行而持续变得“更难”。

在概念层面上,双编码器通常通过使用BERT [CLS]标记的表示作为整个序列的代理来表示文本的单个嵌入。其他池化方法也是有效的,包括最大序列相似性(Dai and Callan, 2019)和晚期交互,在此方法中,对每个查询标记与文档标记的标记级相似性进行最大池化(Khattab and Zaharia, 2020)。更近期的作品改用了具有浅解码器的BERT风格编码器,这在预训练期间更加强调编码器的能力。这种架构发展不仅产生了最先进的召回率,还产生了新的预训练样式,包括词汇接地和文本重构(Shen et al., 2023)(Xiao et al., 2022)

将查询和文档的分开编码允许对文档进行离线编码,这可以极大地改善在线延迟。这通常与矢量空间中的近似最近邻搜索相结合(Khattab and Zaharia, 2020; Hofstätter et al., 2020)。更具体地说,在训练完毕双编码器模型后,训练模型的参数作为集合中每个文档的“嵌入”。在推断时,首先将查询嵌入为一个向量。然后在这些密集文档向量的索引表示上进行近似最近邻搜索,例如HNSW(Malkov and Yashunin, 2020)。因此,探索通过对有效的ICL进行高效、密集的端到端检索来获得潜在利益的研究方向可能是一个有趣的研究方向。

跨编码器架构

跨编码器在推理时联合编码查询和文档(Nogueira and Cho, 2019),允许文本之间进行深入的交互,在双编码器架构中是不可能的。从经验上看,这些模型比双编码器更精确,代价是延迟,因为表示不能在标准设置中预先计算。已经提出了基于BERT和T5的架构(Nogueira and Cho, 2019; Nogueira et al., 2020);在BERT模型的情况下,使用前馈分类头来输出相关性类别的概率(Nogueira and Cho, 2019)。在序列到序列模型的情况下,令牌logits被视为类别概率的替代品(Nogueira et al., 2020)。LLM的最新发展已经促使研究这些大型仅解码器模型作为文本排序器。通常采用一种列表式方法,其中模型接收给定查询的多个文档,并输出原始排序的一个排列(Sun et al., 2023; Pradeep et al., 2023b)。这些模型的发展还处于初期阶段,但它为研究高度精确的排名模型在简单的临时搜索之外的样本挖掘提供了机会。

因此,可以合理地假设,采用交叉编码器通过其下游有用性学习排名示例应该比基于双编码器的方法产生更好的结果。因此,一个有趣的研究方向将是在ICL管道内调查最佳架构,考虑效率和有效性的权衡。

教师蒸馏

此外,在将更昂贵的跨编码器模型提炼为更简单的双编码器模型方面存在丰富的文献,前者充当教师模型,后者充当学生(Hofstätter et al., 2020)。将教师模型提炼为双编码器模型可以实现端到端的稠密检索,无需任何稀疏索引来检索候选的前k𝑘kitalic_k。蒸馏的两个核心范式是同质架构和异质架构蒸馏。前者通常会通过最小化最终隐藏状态(Lin et al., 2021)或内部状态(如注意力层)之间的差异度指标来将一个模型提炼到一个新初始化的副本中。后者通常通过三元残差(正负样本分数之间的残差)上的均方误差标准来最小化教师和学生模型之间的预测错误,从而允许进行“跨架构知识蒸馏”,因为标量相关分数不依赖于体系结构。这种方法已经成为许多最先进的稠密检索模型的核心组件,通常从使用交叉编码器教师来挖掘硬负例和教师分数开始,然后使用先前提炼的模型作为教师进行第二阶段蒸馏(Xiao et al., 2022; Shen et al., 2023)。另一个日益受到关注的工作领域是检索系统和生成模型之间的知识共享(Lewis et al., 2020b; Izacard and Grave, 2021; Izacard et al., 2023)。这种范式与我们的观点直接相关,最近的研究发现直接优化检索器以最大化下游QA性能(Izacard et al., 2023)。然而,这些系统目前还比较脆弱,Cuconasu et al. (2024)发现,在将与QA系统的金标签答案无关的内容添加为上下文之前,可以改善性能,这与直觉相反,这表明在这个领域还有很多工作可以做,以优化我们如何呈现ICL例子的模型。

4.1. ICL示例的综合效用

在信息检索(IR)中,文档的相关性与另一个文档的相关性无关,合并后信息仍然保持相关。对于ICL来说情况更为复杂。更准确地说,在ICL中,两个有用的示例(即,当作为一次演示时产生正确预测的示例)可能在组合为两次推理时无法产生正确预测(Lu et al., 2022)。这可能发生是因为解码器在获得太多上下文时,可能会偏向于与不正确类别描述符相对应的特定主题词簇。

需要进行更多的研究来分析这种“非合作”现象的经验可能性,值得探讨的是在方法论层面可能需要做出什么调整,以便定义少样本ICL的理想排名。在这种情况下,目标不仅仅是在前k𝑘kitalic_k中最大化“相关文档”的数量(按照IR类比),而是要确保示例的综合有用性。朝着这个方向可能是采用一个带有这种修改后的综合相关性(有用性)概念的列表式排名模型。

一个更具计算效率的方法是在成对的水平上操作,即预测哪些对是一致的,哪些是不一致的。每对的元素都取一个布尔值(作为1-shot示例或非),这意味着一对可以是一致或不一致的不同方式的数量是16161616,其中161616162222个变量的可能布尔函数的数量(两个这样的示例函数是布尔OR,如果一个示例有用-组合也有用,和XNOR,如果一对示例作为1-shot有用,则是不一致的)。因此,在一般情况下,n𝑛nitalic_n个变量的布尔函数的数量是22nsuperscript2superscript2𝑛2^{2^{n}}2 start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT,使用n>3𝑛3n>3italic_n > 3的列表式训练可能在计算上是禁止的。

开放式研究问题

在结束本节之前,我们现在总结了以下IR特定研究问题在ICL中排名示例的重要性。

  • RQ-4.1: ICL对神经检索模型的选择是否敏感,即我们是否可以通过使用基本的Siamese模型来改善SBERT所设想的情况?

  • RQ-4.2:几个一次性有用示例的组合对ICL预测的假设有多忠实?

  • RQ-4.3:如果对RQ-4.2的回答是否定的,那么通过明确模拟ICL中示例的有用性的一致性(或缺乏一致性),可以显著改进标准学习排名方法。我们如何调整排名模型,以及在标准少样本基线上我们可以实现多大的改进?

5. 信息性示例maps-to\mapsto Faceted IR?

在这一部分,我们讨论了我们在图2中概述的我们提出的有效ICL工作流程的最后一个垂直方向,即寻求为LLM提供相关但不同的上下文。更确切地说,示例的主题多样性在防止解码器偏向单一主题方面应该起重要作用。这对于文本生成任务更为真实,例如非事实问题回答,LLM解码器需要意识到不同的子主题,才能构建一个全面的答案。 即使对于分类任务,多样化的示例也有可能帮助解码器在推断过程中考虑大多数可能的主题(其口语化形式映射到密切相关类别的描述符),从而最小化误分类的风险。

分面搜索在信息检索领域已经被广泛研究。简单来说,分面搜索系统从检索到的顶部集合中提取信息需求的多个不同方面,并将每个检索到的文档映射到这些方面中的一个(Clarke et al., 2009; Ganguly and Jones, 2018; Ganguly et al., 2013b, a)。分面搜索对于信息需求更广泛的查询特别有用,它可以帮助用户将他们的信息需求重新表述为更具体的方面之一,例如,将查询“除湿机”转换为“除湿机价格范围”,其中意图(信息需求方面)是购买一个(Carterette et al., [n. d.])

Faceted search与多样化排名的概念密切相关,搜索系统旨在提高对更广泛信息需求的所有可能方面的检索效果,例如,对于之前关于“除湿机”的查询,检索与价格范围、技术规格、产品评论和除湿机的一般知识相关的文档。Santos et al. (2010)建议利用查询变体(论文称之为“子查询”)及其顶部检索列表来构建与原始查询的每个方面可能相关的文档列表。接近多样性的是公平搜索的概念,它旨在减轻对信息需求的任何特定方面的偏见,最近神经方法已成为平衡相关性与公平性的常见方法。(Oosterhuis, 2021)

从搜索用户的角度来看,已经证明了多样化的检索系统在改善搜索体验方面发挥着重要作用,通过提供对主题的更广泛覆盖并减轻搜索结果中潜在偏见。同样,更广泛的主题覆盖和更少的主题偏见可能会将LLM解码器引向对下游任务更有用的上下文。事实上,Levy et al. (2023)表明,根据抽象语法树(AST)结构使少样本示例多样化可以改善组合泛化的下游任务。这确实显示了一个积极的研究方向,信息检索社区在多层次搜索和多样化方面开展的大量工作可能对ICL有所帮助。

然而,与相关性类似,对于ICL,多样性的概念也需要适当的调整。多样性的适当概念不应仅考虑输入示例之间的相似性,而更重要的是它们的类标签以及它们对LLM解码器生成路径产生影响的方式的相似性。两个输出类似的输出树的示例不应被认为是多样的。原则上,可以潜在地调整我们提出的分类方法,以学习基于最小化预测不确定性来确定给定一对示例是否多样的最佳示例数量。此外,我们认为,在下游ICL的情境中,同时考虑相关性、公平性和多样性的神经方法应该在ICL中找到用例,以帮助丰富有用的示例。

开放的研究问题

根据本节的讨论,我们现在概述以下研究方向。

  • RQ-5.1: 例子的主题多样性对ICL有多敏感?

  • RQ-5.2: 如何可以将多样性的标准概念扩展,以考虑LLM解码器输入和输出之间的潜在依赖性,以对齐特定的下游任务?

  • RQ-5.3: 现有的用于多样性的IR指标(例如,α𝛼\alphaitalic_α-nDCG (Clarke et al., 2008))如何适应衡量下游ICL示例检索的有效性?

  • RQ-5.4:多目标神经排名模型如何训练以共同学习ICL的下游特定有用性和多样性?

6. 初步评估

在本节中,我们报告了我们最初调查的结果,该调查旨在回答第一个垂直领域的一部分研究问题,即开发一种能够动态选择示例数量的有效自适应ICL版本。

6.1. 研究问题和数据集

研究问题调查

在第3.2节中,我们讨论了应用QPP启发式无监督方法来选择排名列表中的截断点的可能性。另一方面,在第3.3节中,我们提出了一种基于分类器的方法来学习最佳数量的示例。在我们的实验中,我们比较了算法2的监督方法和基于NQC的无监督方法用于自适应k𝑘kitalic_k-shot,并将两者与标准文本分类数据集上的静态k𝑘kitalic_k-shot进行比较。明确地说,我们调查了以下研究问题。

  • CRQ-1: 选择ICL中例子数量是否自适应会提高下游效果?

  • CRQ-2: 无监督方法与监督方法相比是否获得合理的性能?

由于我们的实验回答了上述问题,它们不是开放的,不像我们在本文中阐述的问题。因此,我们在这些问题前加上“C”(封闭)。

数据集

我们对三个文本分类数据集进行了实验,分别是AGNews (Del Corso et al., 2005),Jigsaw Toxic Comment111https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge和SST2 (Socher et al., 2013)。下面,我们提供了每个数据集的更多详细信息。

  • AGNews: AGNews是一个主题分类数据集,由来自网络的新闻文章组成。数据集中的每个文档属于以下4个类别之一:WorldSportsBusinessSci/Tech。训练实例的总数为120,000120000120,000120 , 000,而测试集的大小为7,60076007,6007 , 600。每个类别包含来自训练集的30,0003000030,00030 , 000个样本和来自测试集的1,90019001,9001 , 900个实例。

  • Jigsaw有毒评论:由于其社会影响,毒性预测是一个具有相当大的实际兴趣的问题。这个数据集由Jigsaw和Google作为Kaggle竞赛的一部分发布,由人类评估员在六个代表有毒行为的类别中对从维基百科讨论页面提取的评论进行注释:有毒,'严重有毒',淫秽威胁侮辱,和'身份仇恨'。

  • SST2: 斯坦福情感树库(SST)是一个具有完全标记的解析树的语料库,允许对语言中情感的组成效果进行完整分析。该语料库由11,8551185511,85511 , 855句子组成,这些句子是从电影评论中提取的。经过斯坦福解析器的解析,它构成了解析树中的215,154215154215,154215 , 154个独特短语,每个短语由3名人类评委注释。SST2(也称为SST二元)数据集是SST的一个子集,专门为二元分类任务准备的。更确切地说,从SST中丢弃了中性句子,并且合并了负面和正面类别,从而总共产生了两个类别。

6.2. 方法和参数

我们提出的自适应ICL(AICL)方法

作为自适应ICL的新方法,我们采用以下方法:

  • 算法2的监督策略,我们称之为监督自适应ICL(SAICL)。

  • 基于QPP的无监督策略(如第3.2节中概述的通用方向),我们以相对简单的方式计算排名截止,如下所述。首先,给定一个候选示例的前M𝑀Mitalic_M集合,我们计算NQC估计器(Shtok et al., 2012)的归一化值(我们采用最大归一化,归一化常数为训练集中的最大NQC值)。 然后,将归一化值量化为M𝑀Mitalic_M个等间距区间,范围从00到最大NQC值。根据一个更高的NQC值表示更好的检索质量的假设,我们采用反线性关系,最终选择接近00的值作为更高的NQC,并选择接近M𝑀Mitalic_M的值作为较小的值。 我们将这种方法称为QPP-AICL

基线

作为与SAICL和QPP-AICL进行比较的基准,我们采用以下内容:

  • 0-shot: 这种方法只是输入指示而不提供任何示例。

  • 静态ICL(SICL):这指的是提供固定数量的语义相似样本作为输入的标准方法,类似于(Liu et al., 2022)。这与AICL不同之处在于提示中的样本数量始终固定,但是样本本身根据语义相似性对不同的测试输入变化。为了与AICL方法进行公平比较,我们报告了使用三种不同值k𝑘kitalic_k获得的结果:1111M2𝑀2\lceil\frac{M}{2}\rceil⌈ divide start_ARG italic_M end_ARG start_ARG 2 end_ARG ⌉M𝑀Mitalic_M,分别代表最保守(在输入大小方面)、平均和最不保守的情况。在我们的情况下,M=5𝑀5M=5italic_M = 5,这意味着我们的标准ICL实验使用1-shot,3-shot和5-shot设置。

模型和超参数设置

在相对较多的可用LLMs选择中 - 无论是开源模型还是黑盒云API - 我们特别在GPT-J (Su et al., 2023)上进行实验。 GPT-J是一个基于Pile数据集训练的类似GPT-3的开源模型(Gao et al., 2020)。GPT-J-6B在各种任务上的性能与67亿参数的GPT-3(Curie)相当(Wang, 2021)。GPT-J的最大上下文长度(以token数表示)为2048。

在我们的实验中,我们将M𝑀Mitalic_M - 最大示例数,从1变化到5(对于静态ICL,这由k𝑘kitalic_k表示)。为了公平比较,我们在实验中使用相同的提示模板(如算法1所示),并且对所有实验中使用的方法都采用了贪婪解码和相同的表达者。

6.3. 结果

表1。 不同场景学习(ICL)方法的宏平均精度,召回率和F1分数。列k𝑘kitalic_k表示少样本示例的数量。对于AICL方法,该列表示用于相应方法的平均示例数量。‘AIS’表示以令牌数量四舍五入到最接近的整数来衡量的平均输入大小。

评估 数据集 方法 k𝑘kitalic_k 精度 召回率 F分数 AIS AGNews 0-shot 0 0.6569 0.5932 0.5849 60 SICL 1 0.9015 0.9017 0.9016 125 SICL 3 0.9008 0.8997 0.8989 252 SICL 5 0.8963 0.8930 0.8917 380 QPP-AICL 3 0.8545 0.8499 0.8486 220 SAICL 1.87 0.9080 0.9096 0.9067 175 毒性 0-shot 0 0.5689 0.6238 0.5769 103 SICL 1 0.5760 0.6989 0.5505 195 SICL 3 0.6092 0.7180 0.6254 335 SICL 5 0.6078 0.7248 0.6217 431 QPP-AICL 3 0.5906 0.6942 0.5977 289 SAICL 3.46 0.6194 0.6983 0.6303 359 SST2 0-shot 0 0.7503 0.5022 0.3379 30 SICL 1 0.8703 0.8703 0.8703 61 SICL 3 0.9140 0.9137 0.9137 121 SICL 5 0.9245 0.9230 0.9230 181 QPP-AICL 3 0.8556 0.8479 0.8470 106 SAICL 4.12 0.9302 0.9304 0.9302 154

1显示了不同ICL策略获得的结果(宏平均精度、召回率和F1)。 可以看出,SAICL在竞争对手中表现最佳。它之所以胜过最佳基准线(静态ICL),是因为SAICL能够有效地调整要使用的示例数量,从而防止自身受非相关(无用)示例的降级影响。 事实上,它学习了主题内容与引导解码器输出所需的上下文数量之间的潜在关系。此外,SAICL能够更有效地处理较小的输入大小(参见k𝑘kitalic_k的平均值以及以标记数表示的输入的平均大小),这意味着与静态ICL(SICL)相比,它在计算上更快。 我们的观察结果表明,CRQ-1的答案是肯定的,即ICL中示例数量的自适应选择确实提高了下游任务的效果和效率。

使用无监督的QPP-based方法(QPP-AICL)得出的结果比静态ICL基准更糟糕。从更广泛的视角来看,这指向一个重要发现 - 即没有针对ICL下游任务的基本特征进行特定修改的现成IR方法可能不会直接提高ICL的效果。例如,NQC试图估计文档的相关性,正如我们之前所讨论的那样,对于ICL示例,相关性有不同的解释。虽然对QPP-AICL的观察回答了CRQ-2的负面问题,即自适应选择ICL示例的无监督方法远远不如监督方法,但它们确实表明,未来研究人员为回答本文讨论的任何开放性研究问题开发的方法应该从根本上以稳健和有效的方式对相关性(示例的有用性)进行建模。

7. 结论

在这篇观点论文中,我们讨论了生成式人工智能(特别是上下文学习或ICL)的一些最新发展如何为信息检索/自然语言处理研究人员提供了一个重新审视一些经过深入研究的信息检索主题的新视角的范围,其中文档与信息需求相关性的概念转变为少样本示例对下游人工智能任务(例如文本分类、问答等)的有用性。更具体地,我们提出了这项研究可以被构建的三个主要垂直领域 - 每个领域提供了一系列与核心信息检索研究相关的开放性问题。

第一个垂直旨在以数据驱动的方式选择要使用的示例数量来自适应调整ICL工作流程。在本文展望性论文中报道的初步实证调查显示,这个方向是有希望的。第二个垂直主要涉及设计新的排序模型,以更好地区分(从而以更好的排名检索)有用的少样本上下文和噪声样本。最后,第三个垂直关注少样本示例中的主题多样性,以更好地进行下游预测。

我们相信我们在本文中提出的研究问题将有助于研究界利用ICL和IR之间的协同作用,并最终指导新算法和技术的发展。

References 参考文献

  • (1)
  • Alaofi et al. (2023) Marwah Alaofi, Luke Gallagher, Mark Sanderson, Falk Scholer, and Paul Thomas. 2023. Can Generative LLMs Create Query Variants for Test Collections? An Exploratory Study. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval (Taipei, Taiwan) (SIGIR ’23). Association for Computing Machinery, New York, NY, USA, 1869–1873. https://doi.org/10.1145/3539618.3591960
  • Arampatzis et al. (2009) Avi Arampatzis, Jaap Kamps, and Stephen Robertson. 2009. Where to Stop Reading a Ranked List? Threshold Optimization Using Truncated Score Distributions. In Proceedings of the 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval (Boston, MA, USA) (SIGIR ’09). Association for Computing Machinery, New York, NY, USA, 524–531. https://doi.org/10.1145/1571941.1572031
  • Arora et al. (2022) Simran Arora, Avanika Narayan, Mayee F. Chen, Laurel Orr, Neel Guha, Kush Bhatia, Ines Chami, Frederic Sala, and Christopher Ré. 2022. Ask Me Anything: A simple strategy for prompting language models. arXiv:2210.02441 [cs.CL]
  • Bahri et al. (2020) Dara Bahri, Yi Tay, Che Zheng, Donald Metzler, and Andrew Tomkins. 2020. Choppy: Cut Transformer for Ranked List Truncation. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval (Virtual Event, China) (SIGIR ’20). Association for Computing Machinery, New York, NY, USA, 1513–1516. https://doi.org/10.1145/3397271.3401188
  • Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in neural information processing systems 33 (2020), 1877–1901.
  • Carterette et al. ([n. d.]) Ben Carterette, Evangelos Kanoulas, Mark M. Hall, and Paul D. Clough. [n. d.]. Overview of the TREC 2014 Session Track. In Proc. of TREC 2014.
  • Chakraborty et al. (2020) Anirban Chakraborty, Debasis Ganguly, and Owen Conlan. 2020. Retrievability based Document Selection for Relevance Feedback with Automatically Generated Query Variants. In CIKM. ACM, 125–134.
  • Clarke et al. (2008) Charles L.A. Clarke, Maheedhar Kolla, Gordon V. Cormack, Olga Vechtomova, Azin Ashkan, Stefan Büttcher, and Ian MacKinnon. 2008. Novelty and diversity in information retrieval evaluation. In Proceedings of the 31st Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (Singapore, Singapore) (SIGIR ’08). Association for Computing Machinery, New York, NY, USA, 659–666. https://doi.org/10.1145/1390334.1390446
  • Clarke et al. (2009) Charles L. A. Clarke, Nick Craswell, and Ian Soboroff. 2009. Overview of the TREC 2009 Web Track. In Proceedings of The Eighteenth Text REtrieval Conference, TREC 2009, Gaithersburg, Maryland, USA, November 17-20, 2009 (NIST Special Publication, Vol. 500-278), Ellen M. Voorhees and Lori P. Buckland (Eds.). National Institute of Standards and Technology (NIST). http://trec.nist.gov/pubs/trec18/papers/WEB09.OVERVIEW.pdf
  • Cronen-Townsend et al. (2002) Steve Cronen-Townsend, Yun Zhou, and W. Bruce Croft. 2002. Predicting Query Performance. In Proceedings of the 25th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’02). Association for Computing Machinery, New York, NY, USA, 299–306.
  • Cuconasu et al. (2024) Florin Cuconasu, Giovanni Trappolini, Federico Siciliano, Simone Filice, Cesare Campagnano, Yoelle Maarek, Nicola Tonellotto, and Fabrizio Silvestri. 2024. The Power of Noise: Redefining Retrieval for RAG Systems. arXiv:2401.14887 [cs.IR]
  • Cummins (2014) Ronan Cummins. 2014. Document Score Distribution Models for Query Performance Inference and Prediction. ACM Trans. Inf. Syst. 32, 1, Article 2 (2014), 28 pages.
  • Dai and Callan (2019) Zhuyun Dai and Jamie Callan. 2019. Deeper Text Understanding for IR with Contextual Neural Language Modeling. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval (Paris, France) (SIGIR’19). Association for Computing Machinery, New York, NY, USA, 985–988. https://doi.org/10.1145/3331184.3331303
  • Datta et al. (2022) Suchana Datta, Debasis Ganguly, Derek Greene, and Mandar Mitra. 2022. Deep-QPP: A Pairwise Interaction-based Deep Learning Model for Supervised Query Performance Prediction. In WSDM ’22: The Fifteenth ACM International Conference on Web Search and Data Mining, Virtual Event / Tempe, AZ, USA, February 21 - 25, 2022, K. Selcuk Candan, Huan Liu, Leman Akoglu, Xin Luna Dong, and Jiliang Tang (Eds.). ACM, 201–209. https://doi.org/10.1145/3488560.3498491
  • Datta et al. (2023) Suchana Datta, Debasis Ganguly, Mandar Mitra, and Derek Greene. 2023. A Relative Information Gain-based Query Performance Prediction Framework with Generated Query Variants. ACM Trans. Inf. Syst. 41, 2 (2023), 38:1–38:31.
  • Del Corso et al. (2005) Gianna M. Del Corso, Antonio Gullí, and Francesco Romani. 2005. Ranking a Stream of News. In Proceedings of the 14th International Conference on World Wide Web (Chiba, Japan) (WWW ’05). Association for Computing Machinery, New York, NY, USA, 97–106. https://doi.org/10.1145/1060745.1060764
  • Devlin et al. (2019a) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019a. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Association for Computational Linguistics, Minneapolis, Minnesota, 4171–4186.
  • Devlin et al. (2019b) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019b. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Association for Computational Linguistics, Minneapolis, Minnesota, 4171–4186. https://doi.org/10.18653/v1/N19-1423
  • Diaz (2007) Fernando Diaz. 2007. Performance Prediction Using Spatial Autocorrelation. In Proceedings of the 30th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’07). Association for Computing Machinery, New York, NY, USA, 583–590.
  • Dong et al. (2023) Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, Lei Li, and Zhifang Sui. 2023. A Survey on In-context Learning. arXiv:2301.00234 [cs.CL]
  • Faggioli et al. (2023) Guglielmo Faggioli, Nicola Ferro, Cristina Muntean, Raffaele Perego, and Nicola Tonellotto. 2023. A Geometric Framework for Query Performance Prediction in Conversational Search. In Proceedings of 46th international ACM SIGIR Conference on Research & Development in Information Retrieval, SIGIR 2023 July 23–27, 2023, Taipei, Taiwan. ACM. https://doi.org/10.1145/3539618.3591625
  • Ganguly et al. (2013a) Debasis Ganguly, Manisha Ganguly, Johannes Leveling, and Gareth J. F. Jones. 2013a. TopicVis: a GUI for topic-based feedback and navigation. In SIGIR. ACM, 1103–1104.
  • Ganguly and Jones (2018) Debasis Ganguly and Gareth J. F. Jones. 2018. A non-parametric topical relevance model. Inf. Retr. J. 21, 5 (2018), 449–479.
  • Ganguly et al. (2013b) Debasis Ganguly, Johannes Leveling, and Gareth J. F. Jones. 2013b. An LDA-smoothed relevance model for document expansion: a case study for spoken document retrieval. In SIGIR. ACM, 1057–1060.
  • Ganguly and Yilmaz (2023) Debasis Ganguly and Emine Yilmaz. 2023. Query-specific Variable Depth Pooling via Query Performance Prediction. In SIGIR. ACM, 2303–2307.
  • Gao et al. (2020) Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. 2020. The Pile: An 800GB Dataset of Diverse Text for Language Modeling. arXiv preprint arXiv:2101.00027 (2020).
  • Gao et al. (2021a) Luyu Gao, Zhuyun Dai, and Jamie Callan. 2021a. Rethink Training of BERT Rerankers in Multi-Stage Retrieval Pipeline. CoRR abs/2101.08751 (2021). arXiv:2101.08751 https://arxiv.org/abs/2101.08751
  • Gao et al. (2023) Luyu Gao, Xueguang Ma, Jimmy Lin, and Jamie Callan. 2023. Precise Zero-Shot Dense Retrieval without Relevance Labels. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2023, Toronto, Canada, July 9-14, 2023, Anna Rogers, Jordan L. Boyd-Graber, and Naoaki Okazaki (Eds.). Association for Computational Linguistics, 1762–1777. https://doi.org/10.18653/V1/2023.ACL-LONG.99
  • Gao et al. (2021b) Tianyu Gao, Xingcheng Yao, and Danqi Chen. 2021b. SimCSE: Simple Contrastive Learning of Sentence Embeddings. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wen-tau Yih (Eds.). Association for Computational Linguistics, 6894–6910. https://doi.org/10.18653/V1/2021.EMNLP-MAIN.552
  • Gutmann and Hyvärinen (2010) Michael Gutmann and Aapo Hyvärinen. 2010. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics (Proceedings of Machine Learning Research, Vol. 9), Yee Whye Teh and Mike Titterington (Eds.). PMLR, Chia Laguna Resort, Sardinia, Italy, 297–304. https://proceedings.mlr.press/v9/gutmann10a.html
  • Hofstätter et al. (2020) Sebastian Hofstätter, Sophia Althammer, Michael Schröder, Mete Sertkan, and Allan Hanbury. 2020. Improving Efficient Neural Ranking Models with Cross-Architecture Knowledge Distillation. CoRR abs/2010.02666 (2020). arXiv:2010.02666 https://arxiv.org/abs/2010.02666
  • Hu et al. (2021) Shengding Hu, Ning Ding, Huadong Wang, Zhiyuan Liu, Jingang Wang, Juanzi Li, Wei Wu, and Maosong Sun. 2021. Knowledgeable prompt-tuning: Incorporating knowledge into prompt verbalizer for text classification. arXiv preprint arXiv:2108.02035 (2021).
  • Izacard and Grave (2021) Gautier Izacard and Edouard Grave. 2021. Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, EACL 2021, Online, April 19 - 23, 2021, Paola Merlo, Jörg Tiedemann, and Reut Tsarfaty (Eds.). Association for Computational Linguistics, 874–880. https://doi.org/10.18653/V1/2021.EACL-MAIN.74
  • Izacard et al. (2023) Gautier Izacard, Patrick S. H. Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2023. Atlas: Few-shot Learning with Retrieval Augmented Language Models. J. Mach. Learn. Res. 24 (2023), 251:1–251:43. http://jmlr.org/papers/v24/23-0037.html
  • Jiang et al. (2023) Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, and William El Sayed. 2023. Mistral 7B. arXiv:2310.06825 [cs.CL]
  • Karpukhin et al. (2020) Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick S. H. Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense Passage Retrieval for Open-Domain Question Answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, Bonnie Webber, Trevor Cohn, Yulan He, and Yang Liu (Eds.). Association for Computational Linguistics, 6769–6781. https://doi.org/10.18653/V1/2020.EMNLP-MAIN.550
  • Khattab and Zaharia (2020) Omar Khattab and Matei Zaharia. 2020. ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT. In Proceedings of the 43rd International ACM SIGIR conference on research and development in Information Retrieval, SIGIR 2020, Virtual Event, China, July 25-30, 2020, Jimmy X. Huang, Yi Chang, Xueqi Cheng, Jaap Kamps, Vanessa Murdock, Ji-Rong Wen, and Yiqun Liu (Eds.). ACM, 39–48. https://doi.org/10.1145/3397271.3401075
  • Levy et al. (2023) Itay Levy, Ben Bogin, and Jonathan Berant. 2023. Diverse Demonstrations Improve In-context Compositional Generalization. arXiv:2212.06800 [cs.CL]
  • Lewis et al. (2020a) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, Online, 7871–7880. https://doi.org/10.18653/v1/2020.acl-main.703
  • Lewis et al. (2020b) Patrick S. H. Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020b. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (Eds.). https://proceedings.neurips.cc/paper/2020/hash/6b493230205f780e1bc26945df7481e5-Abstract.html
  • Li et al. (2022) Minghan Li, Xueguang Ma, and Jimmy Lin. 2022. An Encoder Attribution Analysis for Dense Passage Retriever in Open-Domain Question Answering. In Proceedings of the 2nd Workshop on Trustworthy Natural Language Processing (TrustNLP 2022). Association for Computational Linguistics, Seattle, U.S.A., 1–11. https://doi.org/10.18653/v1/2022.trustnlp-1.1
  • Li et al. (2023) Tianle Li, Xueguang Ma, Alex Zhuang, Yu Gu, Yu Su, and Wenhu Chen. 2023. Few-shot In-context Learning on Knowledge Base Question Answering. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (Eds.). Association for Computational Linguistics, Toronto, Canada, 6966–6980. https://doi.org/10.18653/v1/2023.acl-long.385
  • Lin et al. (2021) Sheng-Chieh Lin, Jheng-Hong Yang, and Jimmy Lin. 2021. In-Batch Negatives for Knowledge Distillation with Tightly-Coupled Teachers for Dense Retrieval. In Proceedings of the 6th Workshop on Representation Learning for NLP, RepL4NLP@ACL-IJCNLP 2021, Online, August 6, 2021, Anna Rogers, Iacer Calixto, Ivan Vulic, Naomi Saphra, Nora Kassner, Oana-Maria Camburu, Trapit Bansal, and Vered Shwartz (Eds.). Association for Computational Linguistics, 163–173. https://doi.org/10.18653/V1/2021.REPL4NLP-1.17
  • Liu et al. (2022) Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. 2022. What Makes Good In-Context Examples for GPT-3?. In Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, Eneko Agirre, Marianna Apidianaki, and Ivan Vulić (Eds.). Association for Computational Linguistics, Dublin, Ireland and Online, 100–114. https://doi.org/10.18653/v1/2022.deelio-1.10
  • Liu et al. (2019) Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach. http://arxiv.org/abs/1907.11692
  • Lu et al. (2022) Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Smaranda Muresan, Preslav Nakov, and Aline Villavicencio (Eds.). Association for Computational Linguistics, Dublin, Ireland, 8086–8098. https://doi.org/10.18653/v1/2022.acl-long.556
  • Luo et al. (2024) Man Luo, Xin Xu, Yue Liu, Panupong Pasupat, and Mehran Kazemi. 2024. In-context Learning with Retrieved Demonstrations for Language Models: A Survey. arXiv:2401.11624 [cs.CL]
  • MacAvaney et al. (2019) Sean MacAvaney, Andrew Yates, Arman Cohan, and Nazli Goharian. 2019. CEDR: Contextualized Embeddings for Document Ranking. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2019, Paris, France, July 21-25, 2019, Benjamin Piwowarski, Max Chevalier, Éric Gaussier, Yoelle Maarek, Jian-Yun Nie, and Falk Scholer (Eds.). ACM, 1101–1104. https://doi.org/10.1145/3331184.3331317
  • Mahdi et al. (2020) Mohammed Najah Mahdi, Abdul Rahim Ahmad, Roslan Ismail, Hayder Natiq, and Mohammed Abdulameer Mohammed. 2020. Solution for Information Overload Using Faceted Search–A Review. IEEE Access 8 (2020), 119554–119585. https://doi.org/10.1109/ACCESS.2020.3005536
  • Malkov and Yashunin (2020) Yury A. Malkov and Dmitry A. Yashunin. 2020. Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. IEEE Trans. Pattern Anal. Mach. Intell. 42, 4 (2020), 824–836. https://doi.org/10.1109/TPAMI.2018.2889473
  • Maxwell et al. (2019) David Maxwell, Leif Azzopardi, and Yashar Moshfeghi. 2019. The impact of result diversification on search behaviour and performance. Inf. Retr. J. 22, 5 (2019), 422–446.
  • Milios et al. (2023) Aristides Milios, Siva Reddy, and Dzmitry Bahdanau. 2023. In-Context Learning for Text Classification with Many Labels. In Proceedings of the 1st GenBench Workshop on (Benchmarking) Generalisation in NLP, Dieuwke Hupkes, Verna Dankers, Khuyagbaatar Batsuren, Koustuv Sinha, Amirhossein Kazemnejad, Christos Christodoulopoulos, Ryan Cotterell, and Elia Bruni (Eds.). Association for Computational Linguistics, Singapore, 173–184. https://doi.org/10.18653/v1/2023.genbench-1.14
  • Mysore et al. (2023) Sheshera Mysore, Andrew McCallum, and Hamed Zamani. 2023. Large Language Model Augmented Narrative Driven Recommendations. arXiv:2306.02250 [cs.IR]
  • Ni et al. (2021) Jianmo Ni, Chen Qu, Jing Lu, Zhuyun Dai, Gustavo Hernández Ábrego, Ji Ma, Vincent Y. Zhao, Yi Luan, Keith B. Hall, Ming-Wei Chang, and Yinfei Yang. 2021. Large Dual Encoders Are Generalizable Retrievers. arXiv:2112.07899 [cs.IR]
  • Nogueira and Cho (2019) Rodrigo Frassetto Nogueira and Kyunghyun Cho. 2019. Passage Re-ranking with BERT. CoRR abs/1901.04085 (2019). arXiv:1901.04085 http://arxiv.org/abs/1901.04085
  • Nogueira et al. (2020) Rodrigo Frassetto Nogueira, Zhiying Jiang, Ronak Pradeep, and Jimmy Lin. 2020. Document Ranking with a Pretrained Sequence-to-Sequence Model. In Findings of the Association for Computational Linguistics: EMNLP 2020, Online Event, 16-20 November 2020 (Findings of ACL, Vol. EMNLP 2020), Trevor Cohn, Yulan He, and Yang Liu (Eds.). Association for Computational Linguistics, 708–718. https://doi.org/10.18653/V1/2020.FINDINGS-EMNLP.63
  • Oosterhuis (2021) Harrie Oosterhuis. 2021. Computationally Efficient Optimization of Plackett-Luce Ranking Models for Relevance and Fairness. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval (, Virtual Event, Canada,) (SIGIR ’21). Association for Computing Machinery, New York, NY, USA, 1023–1032. https://doi.org/10.1145/3404835.3462830
  • OpenAI (2023) OpenAI. 2023. GPT-4 Technical Report. arXiv:2303.08774 [cs.CL]
  • Ouyang et al. (2022) Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F Christiano, Jan Leike, and Ryan Lowe. 2022. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems, S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (Eds.), Vol. 35. Curran Associates, Inc., 27730–27744. https://proceedings.neurips.cc/paper_files/paper/2022/file/b1efde53be364a73914f58805a001731-Paper-Conference.pdf
  • Paulsen and Raghupathi (2016) Vern I. Paulsen and Mrinal Raghupathi. 2016. An Introduction to the Theory of Reproducing Kernel Hilbert Spaces. Cambridge University Press.
  • Pradeep et al. (2023a) Ronak Pradeep, Kai Hui, Jai Gupta, Adam D. Lelkes, Honglei Zhuang, Jimmy Lin, Donald Metzler, and Vinh Q. Tran. 2023a. How Does Generative Retrieval Scale to Millions of Passages? arXiv:2305.11841 [cs.IR]
  • Pradeep et al. (2023b) Ronak Pradeep, Sahel Sharifymoghaddam, and Jimmy Lin. 2023b. RankZephyr: Effective and Robust Zero-Shot Listwise Reranking is a Breeze! CoRR abs/2312.02724 (2023). https://doi.org/10.48550/ARXIV.2312.02724 arXiv:2312.02724
  • Radford et al. (2019) Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog 1, 8 (2019), 9.
  • Reimers and Gurevych (2019) Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. arXiv:1908.10084 [cs.CL]
  • Roitman et al. (2020) Haggai Roitman, Yosi Mass, Guy Feigenblat, and Roee Shraga. 2020. Query Performance Prediction for Multifield Document Retrieval. In Proceedings of the 2020 ACM SIGIR on International Conference on Theory of Information Retrieval (Virtual Event, Norway) (ICTIR ’20). Association for Computing Machinery, New York, NY, USA, 49–52. https://doi.org/10.1145/3409256.3409821
  • Roy et al. (2019) Dwaipayan Roy, Debasis Ganguly, Mandar Mitra, and Gareth J.F. Jones. 2019. Estimating Gaussian mixture models in the local neighbourhood of embedded word vectors for query performance prediction. Information Processing and Management 56, 3 (2019), 1026 – 1045.
  • Rubin et al. (2022) Ohad Rubin, Jonathan Herzig, and Jonathan Berant. 2022. Learning To Retrieve Prompts for In-Context Learning. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Marine Carpuat, Marie-Catherine de Marneffe, and Ivan Vladimir Meza Ruiz (Eds.). Association for Computational Linguistics, Seattle, United States, 2655–2671. https://doi.org/10.18653/v1/2022.naacl-main.191
  • Santos et al. (2010) Rodrygo L.T. Santos, Craig Macdonald, and Iadh Ounis. 2010. Exploiting query reformulations for web search result diversification. In Proceedings of the 19th International Conference on World Wide Web (Raleigh, North Carolina, USA) (WWW ’10). Association for Computing Machinery, New York, NY, USA, 881–890. https://doi.org/10.1145/1772690.1772780
  • Schick and Schütze (2021) Timo Schick and Hinrich Schütze. 2021. Exploiting Cloze-Questions for Few-Shot Text Classification and Natural Language Inference. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, Paola Merlo, Jorg Tiedemann, and Reut Tsarfaty (Eds.). Association for Computational Linguistics, Online, 255–269. https://doi.org/10.18653/v1/2021.eacl-main.20
  • Sen et al. (2022) Procheta Sen, Sourav Saha, Debasis Ganguly, Manisha Verma, and Dwaipayan Roy. 2022. Measuring and Comparing the Consistency of IR Models for Query Pairs with Similar and Different Information Needs. In CIKM. ACM, 4449–4453.
  • Shen et al. (2023) Tao Shen, Xiubo Geng, Chongyang Tao, Can Xu, Xiaolong Huang, Binxing Jiao, Linjun Yang, and Daxin Jiang. 2023. LexMAE: Lexicon-Bottlenecked Pretraining for Large-Scale Retrieval. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net. https://openreview.net/pdf?id=PfpEtB3-csK
  • Shtok et al. (2012) Anna Shtok, Oren Kurland, David Carmel, Fiana Raiber, and Gad Markovits. 2012. Predicting Query Performance by Query-Drift Estimation. ACM Trans. Inf. Syst. 30, 2, Article 11 (2012), 35 pages.
  • Singh et al. (2023) Ashutosh Singh, Debasis Ganguly, Suchana Datta, and Craig MacDonald. 2023. Unsupervised Query Performance Prediction for Neural Models with Pairwise Rank Preferences. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 2023, Taipei, Taiwan, July 23-27, 2023, Hsin-Hsi Chen, Wei-Jou (Edward) Duh, Hen-Hsen Huang, Makoto P. Kato, Josiane Mothe, and Barbara Poblete (Eds.). ACM, 2486–2490. https://doi.org/10.1145/3539618.3592082
  • Socher et al. (2013) Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Seattle, Washington, USA, 1631–1642. https://aclanthology.org/D13-1170
  • Sorensen et al. (2022) Taylor Sorensen, Joshua Robinson, Christopher Rytting, Alexander Shaw, Kyle Rogers, Alexia Delorey, Mahmoud Khalil, Nancy Fulda, and David Wingate. 2022. An Information-theoretic Approach to Prompt Engineering Without Ground Truth Labels. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Smaranda Muresan, Preslav Nakov, and Aline Villavicencio (Eds.). Association for Computational Linguistics, Dublin, Ireland, 819–862. https://doi.org/10.18653/v1/2022.acl-long.60
  • Su et al. (2023) Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, and Yunfeng Liu. 2023. RoFormer: Enhanced Transformer with Rotary Position Embedding. arXiv:2104.09864 [cs.CL]
  • Sun et al. (2023) Weiwei Sun, Lingyong Yan, Xinyu Ma, Shuaiqiang Wang, Pengjie Ren, Zhumin Chen, Dawei Yin, and Zhaochun Ren. 2023. Is ChatGPT Good at Search? Investigating Large Language Models as Re-Ranking Agents. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, 14918–14937. https://aclanthology.org/2023.emnlp-main.923
  • Tang et al. (2023) Yuting Tang, Ratish Puduppully, Zhengyuan Liu, and Nancy Chen. 2023. In-context Learning of Large Language Models for Controlled Dialogue Summarization: A Holistic Benchmark and Empirical Analysis. In Proceedings of the 4th New Frontiers in Summarization Workshop, Yue Dong, Wen Xiao, Lu Wang, Fei Liu, and Giuseppe Carenini (Eds.). Association for Computational Linguistics, Singapore, 56–67. https://doi.org/10.18653/v1/2023.newsum-1.6
  • Touvron et al. (2023) Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. 2023. Llama 2: Open Foundation and Fine-Tuned Chat Models. arXiv:2307.09288 [cs.CL]
  • Upadhyay et al. (2020) Prajna Upadhyay, Srikanta Bedathur, Tanmoy Chakraborty, and Maya Ramanath. 2020. Aspect-based academic search using domain-specific KB. In Advances in Information Retrieval: 42nd European Conference on IR Research, ECIR 2020, Lisbon, Portugal, April 14–17, 2020, Proceedings, Part II 42. Springer, 418–424.
  • Wang (2021) Ben Wang. 2021. Mesh-Transformer-JAX: Model-Parallel Implementation of Transformer Language Model with JAX. https://github.com/kingoflolz/mesh-transformer-jax.
  • Wang and Komatsuzaki (2022) Ben Wang and Aran Komatsuzaki. 2022. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model, 2021.
  • Wang et al. (2023) Liang Wang, Nan Yang, and Furu Wei. 2023. Query2doc: Query Expansion with Large Language Models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Houda Bouamor, Juan Pino, and Kalika Bali (Eds.). Association for Computational Linguistics, Singapore, 9414–9423. https://doi.org/10.18653/v1/2023.emnlp-main.585
  • Xiao et al. (2022) Shitao Xiao, Zheng Liu, Yingxia Shao, and Zhao Cao. 2022. RetroMAE: Pre-Training Retrieval-oriented Language Models Via Masked Auto-Encoder. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang (Eds.). Association for Computational Linguistics, 538–548. https://doi.org/10.18653/V1/2022.EMNLP-MAIN.35
  • Xiong et al. (2021) Lee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul N. Bennett, Junaid Ahmed, and Arnold Overwijk. 2021. Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net. https://openreview.net/forum?id=zeFrfgyZln
  • Zendel et al. (2019) Oleg Zendel, Anna Shtok, Fiana Raiber, Oren Kurland, and J. Shane Culpepper. 2019. Information Needs, Queries, and Query Performance Prediction. In Proc. of SIGIR ’19. Association for Computing Machinery, New York, NY, USA, 395–404.
  • Zhang et al. (2017) Shichao Zhang, Xuelong Li, Ming Zong, Xiaofeng Zhu, and Debo Cheng. 2017. Learning k for KNN Classification. 8, 3, Article 43 (jan 2017), 19 pages. https://doi.org/10.1145/2990508
  • Zhou and Croft (2007) Yun Zhou and W. Bruce Croft. 2007. Query Performance Prediction in Web Search Environments. In Proc. 30th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’07). Association for Computing Machinery, New York, NY, USA, 543–550.