EMNLP Findings2024
Exploring the Relationship between In-Context Learning and Instruction Tuning
Hanyu Duan, Yixuan Tang, Yi Yang, Ahmed Abbasi, Kar Yan Tam
Abstract
In-Context Learning (ICL) and Instruction Tuning (IT) are two primary paradigms of adopting Large Language Models (LLMs) to downstream applications. However, they are significantly different. In ICL, a set of demonstrations is provided at the inference time, but the LLM's parameters are not updated. In IT, a set of demonstrations is used to adjust the parameters of the LLM during training, but no demonstrations are provided at the inference time. Although a growing body of literature has explored ICL and IT, studies on these topics have largely been conducted in isolation, leading to a disconnect between these two paradigms. In this work, we explore the relationship between ICL and IT by examining how the hidden states of LLMs change in these two paradigms. Through carefully designed experiments conducted with LLaMA-2 and LLaMA-2-Chat (7B and 13B), we find that ICL and IT converge in LLM hidden states despite their apparent differences in implementation. Specifically, ICL changes an LLM's hidden states as if its accompanying demonstrations were used to instructionally tune the model. Furthermore, the convergence between ICL and IT is largely contingent upon several factors related to the demonstration. Overall, this work offers a unique perspective to explore the connection between ICL and IT and sheds light on understanding the behaviors of LLMs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
- What Makes Good Instruction-Tuning Data? An In-Context Learning Perspective cites Language Models are Few-Shot Learners
- Is In-Context Learning Sufficient for Instruction Following in LLMs? cites The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning
- Is In-Context Learning Sufficient for Instruction Following in LLMs? cites Language Models are Few-Shot Learners
- Is In-Context Learning Sufficient for Instruction Following in LLMs? cites LIMA: Less Is More for Alignment
- Is In-Context Learning Sufficient for Instruction Following in LLMs? cites Training language models to follow instructions with human feedback
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
- Focused Large Language Models are Stable Many-Shot Learners cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Focused Large Language Models are Stable Many-Shot Learners cites Language Models are Few-Shot Learners
- The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learning cites Training language models to follow instructions with human feedback
- LIMA: Less Is More for Alignment cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
- Language Models Don't Learn the Physical Manifestation of Language cites Language Models are Few-Shot Learners
Cited by top-tier papers5
- The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context LearningBill Yuchen Lin, Abhilasha Ravichander, Ximing Lu, Nouha Dziri et al.ICLR 2024 · 299 citations
- What Makes Good Instruction-Tuning Data? An In-Context Learning PerspectiveGuangzeng Han, Xiaolei HuangACL 2026 · 1 citation
- Is In-Context Learning Sufficient for Instruction Following in LLMs?Hao Zhao, Maksym Andriushchenko, Francesco Croce, Nicolas FlammarionICLR 2025
- Focused Large Language Models are Stable Many-Shot LearnersPeiwen Yuan, Shaoxiong Feng, Yiwei Li, Xinglin Wang et al.EMNLP 2024
- Language Models Don't Learn the Physical Manifestation of LanguageBruce W. Lee, Jaehyuk LimACL 2024
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
- LIMA: Less Is More for AlignmentChunting Zhou, Pengfei Liu, Puxin Xu, Srinivasan Iyer et al.NeurIPS 2023 · 1,486 citations
Related papers
- The Missing Alignment Link of In-context Learning on SequencesHarshvardhan Agarwal, Sunita SarawagiICML 2025
- A Closer Look at the Limitations of Instruction TuningSreyan Ghosh, Chandra Kiran Reddy Evuru, Sonal Kumar, Ramaneswaran S. et al.ICML 2024 · 90 citations
- Rethinking the Evaluation of In-Context Learning for LLMsGuoxin Yu, Lemao Liu, Mo Yu, Yue Yu et al.EMNLP 2024
- Context-Parametric Inversion: Why Instruction Finetuning May Not Actually Improve Context RelianceSachin Goyal, Christina Baek, J. Zico Kolter, Aditi RaghunathanICLR 2025
- From English to Second Language Mastery: Enhancing LLMs with Cross-Lingual Continued Instruction TuningLinjuan Wu, Haoran Wei, Baosong Yang, Weiming LuACL 2025 · 3 citations
