Aha.
正在载入中英对照阅读…

arXiv:2401.11624 · 中英对照阅读

In-context Learning with Retrieved Demonstrations for Language Models: A Survey

Man Luo、Xin Xu、Yue Liu、Panupong Pasupat、Mehran Kazemi

中文速览

大语言模型做少样本学习时,回答好不好常常取决于提示里给了哪些例子,而固定使用同一组例子也未必适合每个问题。本文综述了“检索式上下文学习”(RetICL):根据当前问题,从示例库中挑出更相关或更有用的例子,再放进提示让模型作答,并比较了检索模型、训练方式和推理策略等设计选择。梳理的研究显示,这种按问题动态选例通常优于随机或人工固定选例,也能减轻模型对例子顺序等因素的敏感。它的意义在于,不用改动模型参数,也能更灵活地利用示例提升回答表现,并为后续研究提供清晰的路线图。

摘要

Language models, especially pre-trained large language models, have showcased remarkable abilities as few-shot in-context learners (ICL), adept at adapting to new tasks with just a few demonstrations in the input context. However, the model’s ability to perform ICL is sensitive to the choice of the few-shot demonstrations. Instead of using a fixed set of demonstrations, one recent development is to retrieve demonstrations tailored to each input query. The implementation of demonstration retrieval is relatively straightforward, leveraging existing databases and retrieval systems. This not only improves the efficiency and scalability of the learning process but also has been shown to reduce biases inherent in manual example selection. In light of the encouraging results and growing research in ICL with retrieved demonstrations, we conduct an extensive review of studies in this area. In this survey, we discuss and compare different design choices for retrieval models, retrieval training procedures, and inference algorithms.

术语表

in-context learning (ICL)
上下文学习
few-shot learning
少样本学习
few-shot in-context learning
少样本上下文学习
large language model (LLM)
大语言模型
pre-trained language model (PLM)
预训练语言模型
language model (LM)
语言模型
demonstration
示例
demonstration retrieval
示例检索
retrieval-based ICL (RetICL)
基于检索的上下文学习
retriever
检索器
retrieval model
检索模型
retrieval corpus
检索语料库
retrieval training
检索训练
inference algorithm
推理算法
adaptive demonstration selection
自适应示例选择
context-sensitive
上下文敏感
similarity
相似性
diversity
多样性
fine-tuning
微调
parameter-efficient fine-tuning (PEFT)
参数高效微调
overfitting
过拟合
Transformer
Transformer
long short-term memory (LSTM)
长短期记忆网络
N-gram model
N 元语法模型
Markovian assumption
马尔可夫假设
word embedding
词嵌入
next-token prediction
下一词元预测
transfer of knowledge
知识迁移