跳到主要导航 跳到搜索 跳到主要内容

Revisiting Demonstration Selection Strategies in In-Context Learning

  • Keqin Peng
  • , Liang Ding*
  • , Yancheng Yuan*
  • , Xuebo Liu
  • , Min Zhang
  • , Yuanxin Ouyang
  • , Dacheng Tao
  • *此作品的通讯作者
  • Beihang University
  • The University of Sydney
  • Hong Kong Polytechnic University
  • Harbin Institute of Technology
  • Nanyang Technological University

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

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 previous research usually focuses on the data aspect ignoring the model's effect. In this work, we first revisit the factors contributing to this variance from the model aspect, and find that the demonstration choice is both data- and model-dependent. We further propose a conjecture that the performance of a demonstration positively correlates with its contribution to the model's understanding of the test samples, and accordingly propose a data- and model-dependent demonstration selection method, TopK + ConE. 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 is publicly available at https://github.com/Romainpkq/revisit_demon_selection_in_ICL.

源语言英语
主期刊名Long Papers
编辑Lun-Wei Ku, Andre F. T. Martins, Vivek Srikumar
出版商Association for Computational Linguistics (ACL)
9090-9101
页数12
ISBN(电子版)9798891760943
DOI
出版状态已出版 - 2024
活动62nd Annual Meeting of the Association for Computational Linguistics, ACL 2024 - Bangkok, 泰国
期限: 11 8月 202416 8月 2024

出版系列

姓名Proceedings of the Annual Meeting of the Association for Computational Linguistics
1
ISSN(印刷版)0736-587X

会议

会议62nd Annual Meeting of the Association for Computational Linguistics, ACL 2024
国家/地区泰国
Bangkok
时期11/08/2416/08/24

指纹

探究 'Revisiting Demonstration Selection Strategies in In-Context Learning' 的科研主题。它们共同构成独一无二的指纹。

引用此