Why Larger Language Models Do In-context Learning Differently?
Zhenmei Shi, Junyi Wei, Zhuoyan Xu, Yingyu Liang
摘要
Large language models (LLM) have emerged as a powerful tool for AI, with the key ability of in-context learning (ICL), where they can perform well on unseen tasks based on a brief series of task examples without necessitating any adjustments to the model parameters. One recent interesting mysterious observation is that models of different scales may have different ICL behaviors: larger models tend to be more sensitive to noise in the test context. This work studies this observation theoretically aiming to improve the understanding of LLM and ICL. We analyze two stylized settings: (1) linear regression with one-layer single-head linear transformers and (2) parity classification with two-layer multiple attention heads transformers (non-linear data and non-linear model). In both settings, we give closed-form optimal solutions and find that smaller models emphasize important hidden features while larger ones cover more hidden features; thus, smaller models are more robust to noise while larger ones are more easily distracted, leading to different ICL behaviors. This sheds light on where transformers pay attention to and how that affects ICL. Preliminary experimental results on large base and chat models provide positive support for our analysis.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 23 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence 引用了 Language Models are Few-Shot Learners
- Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence 引用了 Training language models to follow instructions with human feedback
- Towards Few-Shot Adaptation of Foundation Models via Multitask Finetuning 引用了 Language Models are Few-Shot Learners
- Towards Few-Shot Adaptation of Foundation Models via Multitask Finetuning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Pragma-VL: Towards a Pragmatic Arbitration of Safety and Helpfulness in MLLMs 引用了 Training language models to follow instructions with human feedback
- Is A Picture Worth A Thousand Words? Delving Into Spatial Reasoning for Vision Language Models 引用了 Towards Few-Shot Adaptation of Foundation Models via Multitask Finetuning
- Is A Picture Worth A Thousand Words? Delving Into Spatial Reasoning for Vision Language Models 引用了 Language Models are Few-Shot Learners
- Finetuned Language Models are Zero-Shot Learners 引用了 Language Models are Few-Shot Learners
- Finetuned Language Models are Zero-Shot Learners 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Finetuned Language Models are Zero-Shot Learners 引用了 Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback 引用了 Finetuned Language Models are Zero-Shot Learners
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper23
- Is A Picture Worth A Thousand Words? Delving Into Spatial Reasoning for Vision Language ModelsJiayu Wang, Yifei Ming, Zhenmei Shi, Vibhav Vineet 等NeurIPS 2024 · 166 次引用
- Towards Few-Shot Adaptation of Foundation Models via Multitask FinetuningZhuoyan Xu, Zhenmei Shi, Junyi Wei, Fangzhou Mu 等ICLR 2024 · 39 次引用
- Beyond Prompt Engineering: Robust Behavior Control in LLMs via Steering Target AtomsMengru Wang, Ziwen Xu, Shengyu Mao, Shumin Deng 等ACL 2025 · 19 次引用
- Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical EvidenceShaopeng Fu, Liang Ding, Jingfeng Zhang, Di WangNeurIPS 2025 · 15 次引用
- Pragma-VL: Towards a Pragmatic Arbitration of Safety and Helpfulness in MLLMsMing Wen, Kun Yang, Xin Chen, Jingyu Zhang 等ICLR 2026 · 4 次引用
它引用的 Paper57
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
- Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用
相关 Paper
- In-Context Learning with Representations: Contextual Generalization of Trained TransformersTong Yang, Yu Huang, Yingbin Liang, Yuejie ChiNeurIPS 2024 · 45 次引用
- Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in SuperpositionZheyang Xiong, Ziyang Cai, John Cooper, Albert Ge 等ICML 2025
- Prior Forgetting and In-Context OverfittingSungyoon LeeNeurIPS 2025 · 1 次引用
- What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 次引用
- How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with RepresentationsTianyu Guo, Wei Hu, Song Mei, Huan Wang 等ICLR 2024 · 80 次引用
