arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.10675cs.CLcs.AIcs.IR
收藏

学会选择:面向文本分类中上下文示例选择的标签分布散度探索

Learn to Select: Exploring Label Distribution Divergence for In-Context Demonstration Selection in Text Classification

Ye Jiang, Taihang Wang, Youzheng Liu, Yimin Wang, Yuhan Xia, Yunfei Long

AI总结:

针对文本分类上下文学习中现有示例选择方法忽略标签分布对齐的问题,提出两阶段L2D选择方法,结合语义相似度与标签分布散度选示例,在7个基准上性能优于现有策略。

摘要:

文本分类的上下文学习(ICL)通过少量输入-标签示例描述任务,已在大语言模型(LLM)上展现出优异性能。然而,上下文示例的选择至关重要,会显著影响LLM的表现。现有多数示例选择方法主要关注测试输入与示例间的语义相似度,往往忽略了标签分布对齐的重要性。为解决这一局限,我们提出两阶段示例选择方法TopK+标签分布散度(L2D),该方法利用微调后的类BERT小语言模型(SLM)为测试输入和候选示例生成标签分布并计算二者的散度,从而选出不仅语义相似、且标签分布与测试输入对齐的示例。在7个文本分类基准上开展的大量实验表明,我们的方法性能始终优于此前的示例选择策略。进一步分析显示,LLM的性能与用于标签分布估计的底层SLM的准确率呈正相关。

英文摘要:

In-context learning (ICL) for text classification, which uses a few input-label demonstrations to describe a task, has demonstrated impressive performance on large language models (LLMs). However, the selection of in-context demonstrations plays a crucial role and can significantly affect LLMs' performance. Most existing demonstration selection methods primarily focus on semantic similarity between test inputs and demonstrations, often overlooking the importance of label distribution alignment. To address this limitation, we propose a two-stage demonstration selection method, TopK + Label Distribution Divergence (L2D), which leverages a fine-tuned BERT-like small language model (SLM) to generate label distributions and calculate their divergence for both test inputs and candidate demonstrations. This enables the selection of demonstrations that are not only semantically similar but also aligned in label distribution with the test input. Extensive experiments across seven text classification benchmarks show that our method consistently outperforms previous demonstration selection strategies. Further analysis reveals a positive correlation between the performance of LLMs and the accuracy of the underlying SLMs used for label distribution estimation.

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

↑