mlsanityData to 7 Oct 2026

Investigating the Pre-Training Dynamics of In-Context Learning: Task Recognition vs. Task Learning

arXiv 2406.14022 ↗First posted 20 Jun 2024cs.LG cs.CLcited by 6

On the map: Offline RL and imitation learning from data → Robot manipulation imitation learning

Abstract (arXiv)

The emergence of in-context learning (ICL) is potentially attributed to two major abilities: task recognition (TR) for recognizing the task from demonstrations and utilizing pre-trained priors, and task learning (TL) for learning from demonstrations. However, relationships between the two abilities and how such relationships affect the emergence of ICL is unclear. In this paper, we take the first step by examining the pre-training dynamics of the emergence of ICL. With carefully designed metrics, we find that these two abilities are, in fact, competitive during pre-training. Moreover, we observe a strong negative correlation between the competition and ICL performance. Further analysis of common pre-training factors (i.e., model size, dataset size, and data curriculum) demonstrates possible ways to manage the competition. Based on these insights, we propose a simple yet effective method to better integrate these two abilities for ICL at inference time. Through adaptive ensemble learning, the performance of ICL can be significantly boosted, enabling two small models to outperform a larger one with more than twice the parameters. The code is available at https://github.com/RUCAIBox/Competitive-ICL.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Robot manipulation imitation learning, one of 13 directions in Offline RL and imitation learning from data. Builds on 22 of its 37 references that are in the map. First posted on arXiv 20 Jun 2024.

Builds on

22 of 37 references.

References · 22

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2020Scaling Laws for Neural Language Modelscited by 6,411
  3. 2015A large annotated corpus for learning natural language inferencecited by 1,837
  4. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  6. 2023StarCoder: may the source be with you!cited by 790
  7. 2022A Survey on In-context Learningcited by 717
  8. 2024MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategiescited by 694
  9. 2023Baichuan 2: Open Large-scale Language Modelscited by 664
  10. 2024OLMo: Accelerating the Science of Language Modelscited by 599
  11. 2020Federated Learning with Matched Averagingcited by 564
  12. 2023Larger language models do in-context learning differentlycited by 386
10 more
  1. 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
  2. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 251
  3. 2019Uniform convergence may be unable to explain generalization in deep learningcited by 223
  4. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 149
  5. 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
  6. 2023LLM360: Towards Fully Transparent Open-Source LLMscited by 100
  7. 2020Optimizing Mode Connectivity via Neuron Alignmentcited by 85
  8. 2020Investigating Societal Biases in a Poetry Composition Systemcited by 47
  9. 2024Dual Operating Modes of In-Context Learningcited by 42
  10. 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgettingcited by 15

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 5.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025On the Relationship Between the Choice of Representation and In-Context Learning
  2. 2026Demonstrations, CoT, and Prompting: A Theoretical Analysis of ICL
  3. 2026The Alchemy of Thought: Understanding In-Context Learning Through Supervised Classification
  4. 2025Is In-Context Learning Learning?
  5. 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
  6. 2025Probing In-Context Learning: Impact of Task Complexity and Model Architecture on Generalization and Efficiency
  7. 2025From Compression to Expression: A Layerwise Analysis of In-Context Learning
  8. 2023Dr.ICL: Demonstration-Retrieved In-context Learning