Not All Demonstration Examples are Equally Beneficial: Reweighting Demonstration Examples for In-Context Learning

被引:0
|
作者
Yang, Zhe [1 ]
Dai, Damai [1 ]
Wang, Peiyi [1 ]
Sui, Zhifang [1 ]
机构
[1] Peking Univ, Sch Comp Sci, Natl Key Lab Multimedia Informat Proc, Beijing, Peoples R China
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Large Language Models (LLMs) have recently gained the In-Context Learning (ICL) ability with the models scaling up, allowing them to quickly adapt to downstream tasks with only a few demonstration examples prepended in the input sequence. Nonetheless, the current practice of ICL treats all demonstration examples equally, which still warrants improvement, as the quality of examples is usually uneven. In this paper, we investigate how to determine approximately optimal weights for demonstration examples and how to apply them during ICL. To assess the quality of weights in the absence of additional validation data, we design a masked self-prediction (MSP) score that exhibits a strong correlation with the final ICL performance. To expedite the weight-searching process, we discretize the continuous weight space and adopt beam search. With approximately optimal weights obtained, we further propose two strategies to apply them to demonstrations at different model positions. Experimental results on 8 text classification tasks show that our approach outperforms conventional ICL by a large margin. Our code are publicly available at https: github.com/Zhe-Young/WICL.
引用
收藏
页码:13209 / 13221
页数:13
相关论文
共 50 条
  • [31] PROGRAM FOR COMPUTATION OF PLAUSIBILITIES OF PATERNITY BY MEANS OF SEROLOGICAL FINDINGS .2. DEMONSTRATION OF EXAMPLES
    RITTNER, C
    BAUR, MP
    ZEITSCHRIFT FUR RECHTSMEDIZIN-JOURNAL OF LEGAL MEDICINE, 1976, 78 (03): : 243 - 252
  • [32] Learning parse and translation decisions from examples with rich context
    Hermjakob, U
    Mooney, RJ
    35TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS AND THE 8TH CONFERENCE OF THE EUROPEAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, PROCEEDINGS OF THE CONFERENCE, 1997, : 482 - 489
  • [33] Investigating Learning Strategies in a Dispositional Learning Analytics Context: The Case of Worked Examples
    Tempelaar, Dirk
    Rienties, Bart
    Quan Nguyen
    PROCEEDINGS OF THE 8TH INTERNATIONAL CONFERENCE ON LEARNING ANALYTICS & KNOWLEDGE (LAK'18): TOWARDS USER-CENTRED LEARNING ANALYTICS, 2018, : 201 - 205
  • [34] Learning programming from erroneous worked-examples. Which type of error is beneficial for learning?
    Beege, Maik
    Schneider, Sascha
    Nebel, Steve
    Zimm, Justus
    Windisch, Sarah
    Rey, Guenter Daniel
    LEARNING AND INSTRUCTION, 2021, 75
  • [35] Description and demonstration of the EXPOLIS simulation model: Two examples of modeling population exposure to particulate matter
    Hanneke Kruize
    Otto Hänninen
    Oscar Breugelmans
    Erik Lebret
    Matti Jantunen
    Journal of Exposure Science & Environmental Epidemiology, 2003, 13 : 87 - 99
  • [36] Description and demonstration of the EXPOLIS simulation model:: Two examples of modeling population exposure to particulate matter
    Kruize, H
    Hänninen, O
    Breugelmans, O
    Lebret, E
    Jantunen, M
    JOURNAL OF EXPOSURE ANALYSIS AND ENVIRONMENTAL EPIDEMIOLOGY, 2003, 13 (02): : 87 - 99
  • [37] Iterative Learning of Answer Set Programs from Context Dependent Examples
    Law, Mark
    Russo, Alessandra
    Broda, Krysia
    THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2016, 16 : 834 - 848
  • [38] TEACHERS' LEARNING: EXAMPLES OF A STUDY GROUP CONTEXT FOR TEACHER EDUCATION DEVELOPMENT
    da Silva, Sandra A. F.
    Santos-Wagner, Vania M.
    PME 34 BRAZIL: PROCEEDINGS OF THE 34TH CONFERENCE OF THE INTERNATIONAL GROUP FOR THE PSYCHOLOGY OF MATHEMATICS EDUCATION, VOL 2: MATHEMATICS IN DIFFERENT SETTINGS, 2010, : 107 - 107
  • [39] Learning context-free grammars from partially structured examples
    Sakakibara, Y
    Muramatsu, H
    GRAMMATICAL INFERENCE: ALGORITHMS AND APPLICATIONS, 2000, 1891 : 229 - 240
  • [40] Demonstrations Are All You Need: Advancing Offensive Content Paraphrasing using In-Context Learning
    Som, Anirudh
    Sikka, Karan
    Gent, Helen
    Divakaran, Ajay
    Kathol, Andreas
    Vergyri, Dimitra
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: ACL 2024, 2024, : 12612 - 12627