Compositional Exemplars for In-context Learning
Jiacheng Ye, Zhiyong Wu, Jiangtao Feng, Tao Yu, Lingpeng Kong
摘要
Large pretrained language models (LMs) have shown impressive In-Context Learning (ICL) ability, where the model learns to do an unseen task via a prompt consisting of input-output examples as the demonstration, without any parameter updates. The performance of ICL is highly dominated by the quality of the selected in-context examples. However, previous selection methods are mostly based on simple heuristics, leading to sub-optimal performance. In this work, we formulate in-context example selection as a subset selection problem. We propose CEIL (Compositional Exemplars for In-context Learning), which is instantiated by Determinantal Point Processes (DPPs) to model the interaction between the given input and in-context examples, and optimized through a carefully-designed contrastive learning objective to obtain preference from LMs. We validate CEIL on 12 classification and generation datasets from 7 distinct NLP tasks, including sentiment analysis, paraphrase detection, natural language inference, commonsense reasoning, open-domain question answering, code generation, and semantic parsing. Extensive experiments demonstrate not only the state-of-the-art performance but also the transferability and compositionality of CEIL, shedding new light on effective and efficient in-context learning. Our code is released at https://github.com/HKUNLP/icl-ceil.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 74 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Language Models are Few-Shot Learners
- Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 The Curious Case of Neural Text Degeneration
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Language Models are Few-Shot Learners
- A Survey on In-context Learning 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- A Survey on In-context Learning 引用了 Language Models are Few-Shot Learners
- Language Models are Few-Shot Learners 引用了 The Curious Case of Neural Text Degeneration
- Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of Exemplars 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of Exemplars 引用了 Language Models are Few-Shot Learners
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models 引用了 Language Models are Few-Shot Learners
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models 引用了 The Curious Case of Neural Text Degeneration
- Grammar Prompting for Domain-Specific Language Generation with Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Grammar Prompting for Domain-Specific Language Generation with Large Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper74
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng 等EMNLP 2024 · 479 次引用
- Grammar Prompting for Domain-Specific Language Generation with Large Language ModelsBailin Wang, Zi Wang, Xuezhi Wang, Yuan Cao 等NeurIPS 2023 · 138 次引用
- Training-Free Long-Context Scaling of Large Language ModelsChenxin An, Fei Huang, Jun Zhang, Shansan Gong 等ICML 2024 · 68 次引用
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language ModelsJiacheng Ye, Shansan Gong, Liheng Chen, Lin Zheng 等NeurIPS 2024 · 47 次引用
- Prompt Optimization with EASE? Efficient Ordering-aware Automated Selection of ExemplarsZhaoxuan Wu, Xiaoqiang Lin, Zhongxiang Dai, Wenyang Hu 等NeurIPS 2024 · 44 次引用
它引用的 Paper16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
- Extractive Summarization as Text MatchingMing Zhong, Pengfei Liu, Yiran Chen, Danqing Wang 等ACL 2020 · 410 次引用
相关 Paper
- Task Descriptors Help Transformers Learn Linear Models In-ContextRuomin Huang, Rong GeICLR 2025
- What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 次引用
- Not All Demonstration Examples are Equally Beneficial: Reweighting Demonstration Examples for In-Context LearningZhe Yang, Damai Dai, Peiyi Wang, Zhifang SuiEMNLP Findings 2023 · 3 次引用
- Large Language Models Might Not Care What You Are Saying: Prompt Format Beats DescriptionsChenming Tang, Zhixiang Wang, Hao Sun, Yunfang WuEMNLP Findings 2025 · 2 次引用
- Data Curation Alone Can Stabilize In-context LearningTing-Yun Chang, Robin JiaACL 2023 · 11 次引用
