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.
Exploring Imbalanced Annotations for Effective In-Context Learning
Department of Statistics and Data Science, Southern University of Science and Technology(南方科技大学统计与数据科学系);School of Economics and Finance, Xi’an Jiaotong University(西安交通大学经济金融学院);School of Mathematics and Statistics, Xi’an Jiaotong University(西安交通大学数学与统计学学院)
GPTKB v1.5: A Massive Knowledge Base for Exploring Factual LLM Knowledge
ScaDS.AI Dresden/Leipzig & TU Dresden, Germany(德国德累斯顿/莱比锡ScaDS.AI & 德累斯顿工业大学);VNU University of Engineering and Technology, Hanoi, Vietnam(越南河内国立大学工程与技术大学)
$f$-Divergence Regularized RLHF: Two Tales of Sampling and Unified Analyses
Department of Electrical and Computer Engineering, University of Virginia, Virginia, United States(弗吉尼亚大学电气与计算机工程系);Princeton Language and Intelligence, Princeton University, New Jersey, United States(普林斯顿大学语言与智能)
Exploring the Compositional Deficiency of Large Language Models in Mathematical Reasoning
School of Computer Science, Fudan University(复旦大学计算机科学学院);Shanghai Key Laboratory of Intelligent Information Processing, Fudan University(复旦大学上海智能信息处理重点实验室)