用信息论选例题,让大模型更准地理解少样本任务。
KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning
- 基于信息论构建查询定制的选例优化框架
- 在多个分类任务上显著优于传统检索方法
- 兼顾准确性与多样性,适合少样本场景
上下文学习(ICL)通过在提示中提供少量特定任务示例,使大语言模型适应新任务。然而受限于上下文长度,如何选择最优示例成为关键问题。现有基于最近邻的方法在高维嵌入空间中存在泛化差、多样性不足等问题。本文从信息论角度建模大语言模型为输入嵌入的线性函数,将示例选择视为针对特定查询的预测误差最小化问题。提出一个近似子模的代理目标,支持带保证的贪心算法。进一步引入核技巧处理高维特征空间,以及基于最优设计的正则项以增强所选示例的多样性。实验证明,在多个分类任务上性能显著优于标准检索方法,验证了结构感知与多样性的选例策略在真实少标签场景中的有效性。
原文摘要 · Abstract (English)
In-context learning (ICL) has emerged as a powerful paradigm for adapting large language models (LLMs) to new and data-scarce tasks using only a few carefully selected task-specific examples presented in the prompt. However, given the limited context size of LLMs, a fundamental question arises: Which examples should be selected to maximize performance on a given user query? While nearest-neighbor-based methods like KATE have been widely adopted for this purpose, they suffer from well-known drawbacks in high-dimensional embedding spaces, including poor generalization and a lack of diversity. In this work, we study this problem of example selection in ICL from a principled, information theory-driven perspective. We first model an LLM as a linear function over input embeddings and frame the example selection task as a query-specific optimization problem: selecting a subset of exemplars from a larger example bank that minimizes the prediction error on a specific query. This formulation departs from traditional generalization-focused learning theoretic approaches by targeting accurate prediction for a specific query instance. We derive a principled surrogate objective that is approximately submodular, enabling the use of a greedy algorithm with an approximation guarantee. We further enhance our method by (i) incorporating the kernel trick to operate in high-dimensional feature spaces without explicit mappings, and (ii) introducing an optimal design-based regularizer to encourage diversity in the selected examples. Empirically, we demonstrate significant improvements over standard retrieval methods across a suite of classification tasks, highlighting the benefits of structure-aware, diverse example selection for ICL in real-world, label-scarce scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。