CLJan 22, 2024

Revisiting Demonstration Selection Strategies in In-Context Learning

arXiv:2401.12087v275 citationsh-index: 36ACL
Originality Incremental advance
AI Analysis

This work addresses the challenge of selecting effective demonstrations for ICL, which is crucial for practitioners using LLMs, but it is incremental as it builds on prior methods with a unified explanation.

The paper tackles the problem of performance variance in in-context learning (ICL) for large language models due to demonstration selection, proposing a data- and model-dependent method called TopK + ConE that improves performance across language understanding and generation tasks with different model scales.

Large language models (LLMs) have shown an impressive ability to perform a wide range of tasks using in-context learning (ICL), where a few examples are used to describe a task to the model. However, the performance of ICL varies significantly with the choice of demonstrations, and it is still unclear why this happens or what factors will influence its choice. In this work, we first revisit the factors contributing to this variance from both data and model aspects, and find that the choice of demonstration is both data- and model-dependent. We further proposed a data- and model-dependent demonstration selection method, \textbf{TopK + ConE}, based on the assumption that \textit{the performance of a demonstration positively correlates with its contribution to the model's understanding of the test samples}, resulting in a simple and effective recipe for ICL. Empirically, our method yields consistent improvements in both language understanding and generation tasks with different model scales. Further analyses confirm that, besides the generality and stability under different circumstances, our method provides a unified explanation for the effectiveness of previous methods. Code will be released.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes