Affinity and Diversity: A Unified Metric for Demonstration Selection via Internal Representations

ACL ARR 2025 February Submission1933 Authors

14 Feb 2025 (modified: 09 May 2025)ACL ARR 2025 February SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: The performance of In-Context Learning (ICL) is highly sensitive to the selected demonstrations. Existing approaches to demonstration selection optimize different objectives, yielding inconsistent results. To address this, we propose a unified metric--affinity and diversity--that leverages ICL model's internal representations. Our experiments show that both affinity and diversity strongly correlate with test accuracies, indicating their effectiveness for demonstration selection. Moreover, we show that our proposed metrics align well with various previous works to unify the inconsistency.
Paper Type: Short
Research Area: Interpretability and Analysis of Models for NLP
Research Area Keywords: few-shot learning
Contribution Types: Model analysis & interpretability
Languages Studied: English
Submission Number: 1933
Loading